[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdiZ1BZ7gyMaJQCz@grain>
Date: Fri, 7 Jan 2022 22:51:48 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Christian Brauner <christian.brauner@...ntu.com>
Cc: Pintu Agarwal <pintu.ping@...il.com>,
Pintu Kumar <quic_pintu@...cinc.com>,
open list <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-mm <linux-mm@...ck.org>, ebiederm@...ssion.com,
sfr@...b.auug.org.au, legion@...nel.org, sashal@...nel.org,
chris.hyser@...cle.com, ccross@...gle.com, pcc@...gle.com,
dave@...olabs.net, caoxiaofeng@...ong.com, david@...hat.com
Subject: Re: [PATCH] sysinfo: include availram field in sysinfo struct
On Fri, Jan 07, 2022 at 01:04:51PM +0100, Christian Brauner wrote:
> >
> > Wait. The userspace may pass old structure here, and in result we
> > return incorrect layout which won't match old one, no? Old binary
> > code has no clue about this header update.
>
> Yes, that won't work as done.
>
Yup. When I've been developing struct prctl_mm_map I reserved
PR_SET_MM_MAP_SIZE opcode so userspace would be able to query
current structure size and provide memory slab needed to fit
running structure.
As far as I see we can cut off some space from padding (at the
end of the structure) though one need to make a precise check
that there is no alignment holes appear on different architectures
other than x86. This area is pretty sensitive.
Powered by blists - more mailing lists