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: <CALCETrUHzWiu6G-uQghH6t+0QNc+yqpr3ZF6EX4JeZibjEWFsg@mail.gmail.com>
Date:	Mon, 24 Aug 2015 11:11:29 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Willy Tarreau <w@....eu>, Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Borislav Petkov <bp@...en8.de>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Brian Gerst <brgerst@...il.com>,
	Andrew Lutomirski <luto@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/asm] x86/asm/msr: Make wrmsrl() a function

On Sun, Aug 23, 2015 at 12:23 PM, H. Peter Anvin <hpa@...or.com> wrote:
> On 08/23/2015 04:45 AM, tip-bot for Andy Lutomirski wrote:
>> Commit-ID:  47edb65178cb7056c2eea0b6c41a7d8c84547192
>> Gitweb:     http://git.kernel.org/tip/47edb65178cb7056c2eea0b6c41a7d8c84547192
>> Author:     Andy Lutomirski <luto@...nel.org>
>> AuthorDate: Thu, 23 Jul 2015 12:14:40 -0700
>> Committer:  Ingo Molnar <mingo@...nel.org>
>> CommitDate: Sun, 23 Aug 2015 13:25:38 +0200
>>
>> x86/asm/msr: Make wrmsrl() a function
>>
>> As of cf991de2f614 ("x86/asm/msr: Make wrmsrl_safe() a
>> function"), wrmsrl_safe is a function, but wrmsrl is still a
>> macro.  The wrmsrl macro performs invalid shifts if the value
>> argument is 32 bits. This makes it unnecessarily awkward to
>> write code that puts an unsigned long into an MSR.
>>
>
> Looking at this: where do you see an invalid shift?  Everywhere I can
> see we do the proper casting.  Still not side effect free, though.

I'm having trouble reproducing it right now, but IIRC at one point I
got wrmsrl to warn that a constant turned into zero as a result of a
shift.

--Andy

>
>         -hpa
>



-- 
Andy Lutomirski
AMA Capital Management, LLC
--
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