lkml.org 
[lkml]   [2019]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/sysctl.c: fix out of bounds access in fs.file-max
On Wed, Apr 03, 2019 at 05:24:26PM +0200, Matteo Croce wrote:
> On Wed, Apr 3, 2019 at 4:02 PM Christian Brauner <christian@brauner.io> wrote:
> > Yeah, maybe but it still feels cleaner and more obvious to just add:
> >
> > static long long_zero;
> >
> > given that most callers actually seem to want an (unsigned) int.
> >
> > I don't have a strong opinion though so if others feel that it's just a
> > waste of space consider it acked.
> >
>
> Well, given that the value is zero, in this expectional case we could
> avoid duplicating the symbol and save 4 bytes.
> What the maintainers think?

If we care about saving four bytes, we could just pass the address of
ZERO_PAGE(0).

\
 
 \ /
  Last update: 2019-04-03 17:52    [W:0.092 / U:9.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site