Thread (26 messages) 26 messages, 11 authors, 2021-04-21

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

From: "hch@lst.de" <hch@lst.de>
Date: 2021-04-21 05:51:28
Also in: linux-arm-kernel, linux-mips, linux-mm, linuxppc-dev, lkml

On Tue, Apr 20, 2021 at 11:20:19PM +0200, Arnd Bergmann wrote:
In that case, there should be no problem for you.

The main issue is with system calls and ioctls that contain a misaligned
struct member like

struct s {
       u32 a;
       u64 b;
};

Passing this structure by reference from a 32-bit user space application
to a 64-bit kernel with different alignment constraints means that the
kernel has to convert the structure layout. See
compat_ioctl_preallocate() in fs/ioctl.c for one such example.
We've also had this problem with some on-disk structures in the past,
but hopefully people desining those have learnt the lesson by now.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help