lkml.org 
[lkml]   [2022]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2022-01-07 20:52    [W:0.074 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site