public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "hch@lst•de" <hch@lst•de>
To: Arnd Bergmann <arnd@kernel•org>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys•com>,
	Matthew Wilcox <willy@infradead•org>,
	"grygorii.strashko@ti•com" <grygorii.strashko@ti•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"ilias.apalodimas@linaro•org" <ilias.apalodimas@linaro•org>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"linux-mips@vger•kernel.org" <linux-mips@vger•kernel.org>,
	"mhocko@kernel•org" <mhocko@kernel•org>,
	"linux-mm@kvack•org" <linux-mm@kvack•org>,
	"mgorman@suse•de" <mgorman@suse•de>,
	"brouer@redhat•com" <brouer@redhat•com>,
	"mcroce@linux•microsoft.com" <mcroce@linux•microsoft.com>,
	"linux-snps-arc@lists•infradead.org" 
	<linux-snps-arc@lists•infradead.org>,
	"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>,
	"hch@lst•de" <hch@lst•de>,
	"linux-arm-kernel@lists•infradead.org" 
	<linux-arm-kernel@lists•infradead.org>
Subject: Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems
Date: Wed, 21 Apr 2021 07:50:28 +0200	[thread overview]
Message-ID: <20210421055028.GA28910@lst.de> (raw)
In-Reply-To: <CAK8P3a3rzz1gfNLoGC8aZJiAC-tgZYD6P8pQsoEfgCAmQK=FAw@mail.gmail.com>

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.

  reply	other threads:[~2021-04-21  5:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 23:07 [PATCH 0/2] Change struct page layout for page_pool Matthew Wilcox (Oracle)
2021-04-16 23:07 ` [PATCH 1/2] mm: Fix struct page layout on 32-bit systems Matthew Wilcox (Oracle)
2021-04-17  1:08   ` kernel test robot
2021-04-17  2:45   ` Matthew Wilcox
2021-04-17 18:32     ` Ilias Apalodimas
2021-04-17 20:22       ` Matthew Wilcox
2021-04-18 11:21         ` Ilias Apalodimas
2021-04-17 21:18     ` David Laight
2021-04-17 22:45       ` Matthew Wilcox
2021-04-20  2:48     ` Vineet Gupta
2021-04-20  3:10       ` Matthew Wilcox
2021-04-20  7:07         ` Arnd Bergmann
2021-04-20 21:14           ` Vineet Gupta
2021-04-20 21:20             ` Arnd Bergmann
2021-04-21  5:50               ` hch [this message]
2021-04-21  8:43               ` David Laight
2021-04-21  8:58                 ` Arnd Bergmann
2021-04-20  7:39     ` Geert Uytterhoeven
2021-04-20  8:39       ` David Laight
2021-04-20 11:32       ` Matthew Wilcox
2021-04-17  7:34   ` Jesper Dangaard Brouer
2021-04-20  7:21   ` Rasmus Villemoes
2021-04-16 23:07 ` [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head Matthew Wilcox (Oracle)
2021-04-17 21:13   ` David Laight
2021-04-17 21:28     ` Matthew Wilcox
2021-04-20  4:03 ` [PATCH 0/2] Change struct page layout for page_pool Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210421055028.GA28910@lst.de \
    --to=hch@lst$(echo .)de \
    --cc=Vineet.Gupta1@synopsys$(echo .)com \
    --cc=arnd@kernel$(echo .)org \
    --cc=brouer@redhat$(echo .)com \
    --cc=grygorii.strashko@ti$(echo .)com \
    --cc=ilias.apalodimas@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux-mm@kvack$(echo .)org \
    --cc=linux-snps-arc@lists$(echo .)infradead.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mcroce@linux$(echo .)microsoft.com \
    --cc=mgorman@suse$(echo .)de \
    --cc=mhocko@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=willy@infradead$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox