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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161019125706.GB207809@stormcage.americas.sgi.com>
Date:   Wed, 19 Oct 2016 07:57:06 -0500
From:   Alex Thorlton <athorlton@....com>
To:     Matt Fleming <matt@...eblueprint.co.uk>
Cc:     Alex Thorlton <athorlton@....com>, linux-kernel@...r.kernel.org,
        Mike Travis <travis@....com>, Russ Anderson <rja@....com>,
        Dimitri Sivanich <sivanich@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        x86@...nel.org, Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: Re: [PATCH] x86/platform/UV: Fix support for EFI_OLD_MEMMAP after
 BIOS callback updates

On Wed, Oct 19, 2016 at 12:32:00PM +0100, Matt Fleming wrote:
> Could you please invert the conditional? I had to read it 3 times to
> make sure it was correct given the comment that precedes it. E.g. this
> is preferable,
> 
> 	if (efi_enabled(EFI_OLD_MEMMAP))
> 		ret = efi_call((void *)__va(tab->function), (u64)which, a1, a2, a3, a4, a5);
> 	else
> 		ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);

Sure, no problem!  I generally default to checking for the more common
condition first, but I definitely see how that makes the code kind of
hard to read, in this case.

I'll send another version shortly.

Thanks, Matt!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ