Re: [PATCH v5 1/5] lib: fix _parse_integer_limit() to handle overflow
From: Andy Shevchenko
Date: Fri Feb 06 2026 - 05:11:59 EST
On Fri, Feb 06, 2026 at 12:53:50PM +0300, Dmitry Antipov wrote:
> On Fri, 2026-02-06 at 09:42 +0200, Andy Shevchenko wrote:
>
> > > Code looking at the terminating character wont be expecting a digit
> > > and will treat it as a syntax error - which is what you are trying to do.
> > >
> > > That is a much easier API to use, and a 'drop-in' for existing code.
> >
> > Maybe, but problematic from the usage point of view as I described above.
>
> Note that was an idea behihd memvalue(), see https://lists.openwall.net/linux-hardening/2026/01/07/23.
> IOW since "mem=64K" is expected to be used more often than, say, "mem=64K@0xaaaaa" or "mem=64K,sync",
> it may be useful to have a wrapper which is enough to parse "64K" but treat everything else as error.
It will make it less useful.
--
With Best Regards,
Andy Shevchenko