[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ydcmk+WaBWKlLkAw@grain>
Date: Thu, 6 Jan 2022 20:27:47 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Pintu Agarwal <pintu.ping@...il.com>
Cc: 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,
christian.brauner@...ntu.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 Thu, Jan 06, 2022 at 10:19:55PM +0530, Pintu Agarwal wrote:
> > > diff --git a/include/uapi/linux/sysinfo.h b/include/uapi/linux/sysinfo.h
> > > index 435d5c2..6e77e90 100644
> > > --- a/include/uapi/linux/sysinfo.h
> > > +++ b/include/uapi/linux/sysinfo.h
> > > @@ -12,6 +12,7 @@ struct sysinfo {
> > > __kernel_ulong_t freeram; /* Available memory size */
> > > __kernel_ulong_t sharedram; /* Amount of shared memory */
> > > __kernel_ulong_t bufferram; /* Memory used by buffers */
> > > + __kernel_ulong_t availram; /* Memory available for allocation */
> > > __kernel_ulong_t totalswap; /* Total swap space size */
> > > __kernel_ulong_t freeswap; /* swap space still available */
> > > __u16 procs; /* Number of current processes */
> >
> > Hi! Sorry, but I don't understand -- the sysinfo structure seems to
> > be part of user API, no? Don't we break it up here?
>
> Yes, the corresponding user space header /usr/include/linux/sysinfo.h
> also needs to be updated.
> When we generate the kernel header it will be updated automatically.
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.
Powered by blists - more mailing lists