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:	Sun, 30 Aug 2009 13:02:11 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Borislav Petkov <petkovbb@...glemail.com>, mingo@...hat.com,
	linux-kernel@...r.kernel.org, kjwinchester@...il.com,
	tglx@...utronix.de, borislav.petkov@....com,
	linux-tip-commits@...r.kernel.org
Subject: Re: [PATCH 3/3] x86, AMD: Disable wrongly set X86_FEATURE_LAHF_LM
 CPUID bit

On 08/30/2009 12:30 PM, Borislav Petkov wrote:
> On Sun, Aug 30, 2009 at 12:22:34PM -0700, H. Peter Anvin wrote:
>> On 08/30/2009 04:50 AM, Borislav Petkov wrote:
>>>  			clear_cpu_cap(c, X86_FEATURE_LAHF_LM);
>>> +			if (!rdmsrl_amd_safe(0xc001100d, &val)) {
>>> +				val &= ~(1ULL << 32);
>>> +				wrmsr_amd_safe(0xc001100d, (u32) val,
>>> +							   (u32)(val >> 32));
>>> +			}
>>> +		}
>> We presumably want/need wrmsrl_amd_safe() here!
> 
> Actually, it is wrmsr_amd_safe() because we need the magic value in
> %edi. wrmsr_amd_safe() calls the _regs variant with the array argument.
> And we don't have a wrmsrl_amd_safe-one which gets a 64bit msr value as
> an argument similar to the rdmsrl one.
> 

That's exactly the point.  We shouldn't have rdmsrl_amd_safe() on one
hand and wrmsr_asm_safe() on the other.  I have already fixed this up in
my tree, but this kind of asymmetry should have been a big red flashing
light.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ