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]
Date:   Fri, 17 Apr 2020 12:56:01 -0700
From:   "Luck, Tony" <tony.luck@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Ingo Molnar <mingo@...nel.org>, Fenghua Yu <fenghua.yu@...el.com>,
        Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Andy Lutomirski <luto@...nel.org>,
        linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH 2/3] x86/split_lock: Bits in IA32_CORE_CAPABILITIES are
 not architectural

On Fri, Apr 17, 2020 at 09:29:13PM +0200, Thomas Gleixner wrote:
> "Luck, Tony" <tony.luck@...el.com> writes:
> > On Fri, Apr 17, 2020 at 12:04:36PM +0200, Thomas Gleixner wrote:
> > +	if (!m->driver_data)
> > +		goto setup;
> > +	if (!cpu_has(c, X86_FEATURE_CORE_CAPABILITIES))
> > +		return;
> > +	rdmsrl(MSR_IA32_CORE_CAPS, ia32_core_caps);
> > +	if (!(ia32_core_caps & MSR_IA32_CORE_CAPS_SPLIT_LOCK_DETECT))
> > +		return;
> > +setup:
> > +	split_lock_setup();
> 
> Which looks nicer w/o the goto:
> 
> 	if (m->driver_data) {
> 		if (!cpu_has(c, X86_FEATURE_CORE_CAPABILITIES))
> 			return;
> 		rdmsrl(MSR_IA32_CORE_CAPS, ia32_core_caps);
> 		if (!(ia32_core_caps & MSR_IA32_CORE_CAPS_SPLIT_LOCK_DETECT))
> 			return;
> 	}
> 
> Hmm?

Swings and roundabouts ... getting rid of the goto makes for
deeper indentation. But if you really want to get rid of the
goto, then your version is fine with me.

Do you want me to spin it into v3?

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ