Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Mon, 31 Dec 2007 10:15:36 -0800
Mike Frysinger wrote:
---Use __asm__ and __volatile__ in code that is exported to userspace. Wrap
kernel functions with __KERNEL__ so they get scrubbed.
Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index ba4b314..ffb9319 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -193,7 +193,7 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
/* wrmsr with exception handling */
#define wrmsr_safe(msr,a,b) ({ int ret__; \
- asm volatile("2: wrmsr ; xorl %0,%0\n" \
+ __asm__ __volatile__("2: wrmsr ; xorl %0,%0\n" \
"1:\n\t" \
".section .fixup,\"ax\"\n\t" \
"3: movl %4,%0 ; jmp 1b\n\t" \
rdmsr_safe/wrmsr_safe are definitely kernel-only.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- From: Mike Frysinger
- Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- References:
- asm-x86/msr.h for sanitized headers: clean it or punt it
- From: Mike Frysinger
- Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- From: Mike Frysinger
- Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- From: Andi Kleen
- Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- From: Mike Frysinger
- asm-x86/msr.h for sanitized headers: clean it or punt it
- Prev by Date: asm-x86/byteorder.h: clean up for userspace
- Next by Date: Re: 2.6.24-rc6-mm1 (build problem: gpio_keys)
- Previous by thread: Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- Next by thread: Re: asm-x86/msr.h for sanitized headers: clean it or punt it
- Index(es):