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-next>] [day] [month] [year] [list]
Date:	Fri, 1 Jul 2016 12:53:19 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Kees Cook <keescook@...omium.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: kstrtojunk

Could you please stop converting to kstrtobool()?

commit a81a5a17d44b26521fb1199f8ccf27f4af337a67
Author: Kees Cook <keescook@...omium.org>
Date:   Thu Mar 17 14:22:57 2016 -0700

    lib: add "on"/"off" support to kstrtobool

Especially after doing patches like this?

How on earth this was accepted?

Now the kernel is supposed to know about every pair of words
with the opposite meaning and accept them.

If kstrtobool() is ever going to be added it should accept
only '0' and '1' characters because kernel is not there
to second guess (same logic applies to whitespace trimming
for proc/sysfs files).

Another point is that in C/C++ any value other than 0
is true in for bool but kstrtobool() doesn't accept, say '2'
as true. This is why it wasn't added in the first place.

It is amazing to see how people think that every 2 common
lines of code should be generalized and pushed into lib/.

  Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ