Messages in this thread | | | Date | Fri, 7 Jan 2022 22:51:48 +0300 | From | Cyrill Gorcunov <> | 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.
| |