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: <20181129142813.GC32259@char.us.oracle.com>
Date:   Thu, 29 Nov 2018 09:28:13 -0500
From:   Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Jiri Kosina <jkosina@...e.cz>,
        Tom Lendacky <thomas.lendacky@....com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        David Woodhouse <dwmw@...zon.co.uk>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Casey Schaufler <casey.schaufler@...el.com>,
        Asit Mallick <asit.k.mallick@...el.com>,
        Arjan van de Ven <arjan@...ux.intel.com>,
        Jon Masters <jcm@...hat.com>,
        Waiman Long <longman9394@...il.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Dave Stewart <david.c.stewart@...el.com>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [patch V2 02/28] x86/speculation: Clean up
 spectre_v2_parse_cmdline()

On Sun, Nov 25, 2018 at 07:33:30PM +0100, Thomas Gleixner wrote:
> Remove the unnecessary 'else' statement in spectre_v2_parse_cmdline()
> to save an indentation level.
> 
> Signed-off-by: Tim Chen <tim.c.chen@...ux.intel.com>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>

Thank you!
> 
> ---
>  arch/x86/kernel/cpu/bugs.c |   27 +++++++++++++--------------
>  1 file changed, 13 insertions(+), 14 deletions(-)
> 
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -276,22 +276,21 @@ static enum spectre_v2_mitigation_cmd __
>  
>  	if (cmdline_find_option_bool(boot_command_line, "nospectre_v2"))
>  		return SPECTRE_V2_CMD_NONE;
> -	else {
> -		ret = cmdline_find_option(boot_command_line, "spectre_v2", arg, sizeof(arg));
> -		if (ret < 0)
> -			return SPECTRE_V2_CMD_AUTO;
>  
> -		for (i = 0; i < ARRAY_SIZE(mitigation_options); i++) {
> -			if (!match_option(arg, ret, mitigation_options[i].option))
> -				continue;
> -			cmd = mitigation_options[i].cmd;
> -			break;
> -		}
> +	ret = cmdline_find_option(boot_command_line, "spectre_v2", arg, sizeof(arg));
> +	if (ret < 0)
> +		return SPECTRE_V2_CMD_AUTO;
>  
> -		if (i >= ARRAY_SIZE(mitigation_options)) {
> -			pr_err("unknown option (%s). Switching to AUTO select\n", arg);
> -			return SPECTRE_V2_CMD_AUTO;
> -		}
> +	for (i = 0; i < ARRAY_SIZE(mitigation_options); i++) {
> +		if (!match_option(arg, ret, mitigation_options[i].option))
> +			continue;
> +		cmd = mitigation_options[i].cmd;
> +		break;
> +	}
> +
> +	if (i >= ARRAY_SIZE(mitigation_options)) {
> +		pr_err("unknown option (%s). Switching to AUTO select\n", arg);
> +		return SPECTRE_V2_CMD_AUTO;
>  	}
>  
>  	if ((cmd == SPECTRE_V2_CMD_RETPOLINE ||
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ