lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y2JUlb6qzV/MqxnY@smile.fi.intel.com>
Date:   Wed, 2 Nov 2022 13:29:25 +0200
From:   Andy Shevchenko <andriy.shevchenko@...el.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Pasha Tatashin <pasha.tatashin@...een.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-mm@...ck.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()

On Tue, Nov 01, 2022 at 03:47:20PM -0700, Kees Cook wrote:
> On Tue, Nov 01, 2022 at 10:14:09PM +0100, Christophe JAILLET wrote:

...

> This seems in keeping with the removal of the simple_*str*() helpers:
> https://docs.kernel.org/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull

That piece of the documentation is partially wrong. Nobody will going to remove
simple_strtox() due to their convenience when it's related to parse something
from the stream. Yes, overflow is possible, but here is a trade-off.

Note, kstrtox() may not work at early boot stages when we need to parse stream
(with mixed digits and text and symbols) without acquiring space from the heap,
i.o.w. RO strings.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ