From: Matthew Wilcox <willy@infradead.org>
To: Matteo Croce <mcroce@redhat.com>
Cc: Christian Brauner <christian@brauner.io>,
linux-fsdevel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
Zev Weiss <zev@bewilderbeest.net>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] kernel/sysctl.c: fix out of bounds access in fs.file-max
Date: Wed, 3 Apr 2019 08:51:08 -0700 [thread overview]
Message-ID: <20190403155108.GI22763@bombadil.infradead.org> (raw)
In-Reply-To: <CAGnkfhx+igF579dez6qwAxrtT-JrGSSEn-QmK+92447qBqXPpg@mail.gmail.com>
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).
next prev parent reply other threads:[~2019-04-03 15:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 13:03 [PATCH] kernel/sysctl.c: fix out of bounds access in fs.file-max Matteo Croce
2019-04-03 11:54 ` Matteo Croce
2019-04-03 14:02 ` Christian Brauner
2019-04-03 15:24 ` Matteo Croce
2019-04-03 15:51 ` Matthew Wilcox [this message]
2019-04-03 16:40 ` Matteo Croce
2019-04-03 17:08 ` Matteo Croce
2019-04-04 14:09 ` Christian Brauner
2019-04-04 14:49 ` Matteo Croce
2019-04-03 17:41 ` Kees Cook
2019-04-04 0:13 ` Matteo Croce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190403155108.GI22763@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=christian@brauner.io \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mcroce@redhat.com \
--cc=zev@bewilderbeest.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).