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>] [day] [month] [year] [list]
Date:	Sun, 15 Nov 2009 04:37:19 -0200
From:	André Goddard Rosa <andre.goddard@...il.com>
To:	Theodore Tso <tytso@....edu>,
	linux list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 12/12] tree-wide: convert open calls to remove spaces 
	to skip_spaces() lib function

[trimmed very long cc: line]

On Sun, Nov 8, 2009 at 4:47 PM, Theodore Tso <tytso@....edu> wrote:
> On Sat, Nov 07, 2009 at 01:16:20PM -0200, André Goddard Rosa wrote:
>> Makes use of skip_spaces() defined in lib/string.c for removing leading
>> spaces from strings all over the tree.
>>
>> Also, while at it, if we see (*str && isspace(*str)), we can be sure to
>> remove the first condition (*str) as the second one (isspace(*str)) also
>> evaluates to 0 whenever *str == 0, making it redundant. In other words,
>> "a char equals zero is never a space".
>
> There are a number of places that have the pattern of skipping
> whitespace, calling simpler_strtoul(), and then skipping whitespace
> afterwards.  And thinkpad_acpi.c and fs/ext4/super.c both have an
> indentical function, parse_strotul(), which basically does this plus
> doing actual error checking (a number of callers of simple_strtoul
> aren't checking to see if the user passed in a valid number or not,
> boo.)
>
> I would suggest that we should lift parse_strtoul() into lib/, both to
> save a bit of code, as well as encouraging people to do proper input
> validation, while we are doing this tree-wide cleanup.
>

Hi, Ted!

    I took a look at it but couldn't find use for it much besides the
ones you've
pointed out, so I'm not sure it really deserves a lib function. Most calls to
simple_strtoul() does not skips spaces.

Thanks,
André
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ