[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHrFyr7nXUPxysMNv-HHRVSCB3UUmSb60qwFM8zg3Zv41NC1RQ@mail.gmail.com>
Date: Mon, 15 Oct 2018 21:32:30 +0200
From: Christian Brauner <christian@...uner.io>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
"Luis R. Rodriguez" <mcgrof@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Joe Lawrence <joe.lawrence@...hat.com>,
Waiman Long <longman@...hat.com>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Al Viro <viro@...iv.linux.org.uk>,
Kees Cook <keescook@...omium.org>
Subject: Re: Re: [PATCH v1 1/2] sysctl: cap to ULONG_MAX in proc_get_long()
On Mon, Oct 15, 2018 at 9:27 PM Alexey Dobriyan <adobriyan@...il.com> wrote:
>
> > int kstrtoul_bounded(const char *s, unsigned int base,
> > char **trailing, unsigned long long *res)
>
> NO! The whole point is not have million variants of slightly different
> integer parsing functions.
> Cap it in the sysctl -- noone would care.
(Please keep the CC list when replying.)
Whatever works; I prefer the local strtoul_cap_erange() in kernel/sysctl.c as
well.
Powered by blists - more mailing lists