Skip to content
Commit 08970fc4 authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

x86: msr: fix bogus return values from rdmsr_safe/wrmsr_safe



Impact: bogus error codes (+other?) on x86-64

The rdmsr_safe/wrmsr_safe routines have macros for the handling of the
edx:eax arguments.  Those macros take a variable number of assembly
arguments.  This is rather inherently incompatible with using
%digit-style escapes in the inline assembly; replace those with
%[name]-style escapes.

This fixes miscompilation on x86-64, which at the very least caused
bogus return values.  It is possible that this could also corrupt the
return value; I am not sure.

Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 9ea2b82e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment