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: <20171005145454.v52uzhzqtqshtksc@pd.tnic>
Date:   Thu, 5 Oct 2017 16:55:08 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Mathias Krause <minipli@...glemail.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86-ml <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Michael Matz <matz@...e.de>
Subject: Re: [PATCH] x86/alternatives: Fix alt_max_short macro to really be a
 max()

On Thu, Oct 05, 2017 at 02:35:33PM +0200, Mathias Krause wrote:
> Oh, btw., quoting its counter part from arch/x86/include/asm/alternative-asm.h:
> 
> /*
>  * max without conditionals. Idea adapted from:
>  * http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax
>  */
> #define alt_max_short(a, b) ((a) ^ (((a) ^ (b)) & -(-((a) < (b)))))
> 
> Note the "<"! ...comment is wrong, though the implementation works!

Ok, please fix that comment in alternative-asm.h and add

Reviewed-and-tested-by: Borislav Petkov <bp@...e.de>

to v2 before sending it.

Thanks!

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ