Thread (1 message) 1 message, 1 author, 2020-08-05

Re: [PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers

From: peterz@infradead.org
Date: 2020-08-05 19:49:58
Also in: lkml

On Wed, Aug 05, 2020 at 03:26:29PM +0200, Marco Elver wrote:
Add missing noinstr to arch_local*() helpers, as they may be called from
noinstr code.

On a KCSAN config with CONFIG_PARAVIRT=y, syzbot stumbled across corrupt
Cute, so I've been working on adding objtool support for this a little:

  https://lkml.kernel.org/r/20200803143231.GE2674@hirez.programming.kicks-ass.net
quoted hunk
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 3d2afecde50c..a606f2ba2b5e 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -760,27 +760,27 @@ bool __raw_callee_save___native_vcpu_is_preempted(long cpu);
 	((struct paravirt_callee_save) { func })
 
 #ifdef CONFIG_PARAVIRT_XXL
-static inline notrace unsigned long arch_local_save_flags(void)
+static inline noinstr unsigned long arch_local_save_flags(void)
 {
 	return PVOP_CALLEE0(unsigned long, irq.save_fl);
 }
 
-static inline notrace void arch_local_irq_restore(unsigned long f)
+static inline noinstr void arch_local_irq_restore(unsigned long f)
 {
 	PVOP_VCALLEE1(irq.restore_fl, f);
 }
 
-static inline notrace void arch_local_irq_disable(void)
+static inline noinstr void arch_local_irq_disable(void)
 {
 	PVOP_VCALLEE0(irq.irq_disable);
 }
 
-static inline notrace void arch_local_irq_enable(void)
+static inline noinstr void arch_local_irq_enable(void)
 {
 	PVOP_VCALLEE0(irq.irq_enable);
 }
 
-static inline notrace unsigned long arch_local_irq_save(void)
+static inline noinstr unsigned long arch_local_irq_save(void)
 {
 	unsigned long f;
 
Shouldn't we __always_inline those? They're going to be really small.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help