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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 6 Jan 2016 18:48:04 +0100
From:	Borislav Petkov <bp@...e.de>
To:	Dave Hansen <dave@...1.net>
Cc:	x86@...nel.org, linux-kernel@...r.kernel.org,
	dave.hansen@...ux.intel.com, hpa@...or.com, fenghua.yu@...el.com,
	yu-cheng.yu@...el.com
Subject: Re: [PATCH 3/5] x86: simplify early command line parsing

On Wed, Jan 06, 2016 at 09:37:40AM -0800, Dave Hansen wrote:
> On 01/06/2016 09:10 AM, Borislav Petkov wrote:
> >> > -	if (!strlen(cmdline))
> >> > -		return 0;
> >> > -
> > Patch 1 adds the strlen(), this patch removes it. Please merge both patches.
> 
> As I mentioned, it doesn't strictly add it.
> 
> Plus, if I go add this back to that patch, I'll end up having to paste
> most of the changelog in to that one.  I think it's much more clear to
> have this hunk live on its own.

So why not leave the min_t:

	maxlen = min_t(int, strlen(cmdline), COMMAND_LINE_SIZE);

and then do:

	while (pos < maxlen)

?

This way it is absolutely clear what's going on.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
--
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