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] [day] [month] [year] [list]
Message-ID: <20190829123450.GP2332@hirez.programming.kicks-ass.net>
Date:   Thu, 29 Aug 2019 14:34:50 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Chuhong Yuan <hslester96@...il.com>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 6/8] sched: Replace strncmp with str_has_prefix

On Fri, Aug 09, 2019 at 03:10:51PM +0800, Chuhong Yuan wrote:
> strncmp(str, const, len) is error-prone because len
> is easy to have typo.

I'm thinking that is exactly the easy case for compilers/semantic
checkers to verify. Now granted, GCC doesn't seem to do that by itself,
but still.

I'd buy your argument if the prefix is variable, because in that case
you can do prefix matching cheaper than strlen+strncmp, but as is, not
really.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ