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
| ||
|
Date: Thu, 19 May 2022 16:58:04 +0200 From: Frederic Weisbecker <frederic@...nel.org> To: LKML <linux-kernel@...r.kernel.org> Cc: Frederic Weisbecker <frederic@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Phil Auld <pauld@...hat.com>, Alex Belits <abelits@...vell.com>, Nicolas Saenz Julienne <nsaenz@...nel.org>, Xiongfeng Wang <wangxiongfeng2@...wei.com>, Neeraj Upadhyay <quic_neeraju@...cinc.com>, Thomas Gleixner <tglx@...utronix.de>, Yu Liao <liaoyu15@...wei.com>, Boqun Feng <boqun.feng@...il.com>, "Paul E . McKenney" <paulmck@...nel.org>, Marcelo Tosatti <mtosatti@...hat.com>, Paul Gortmaker <paul.gortmaker@...driver.com>, Uladzislau Rezki <uladzislau.rezki@...y.com>, Joel Fernandes <joel@...lfernandes.org>, Mark Rutland <mark.rutland@....com> Subject: [PATCH 02/21] rcu: Tag rcu_irq_*_irqson() as noinstr rcu_irq_*_irqson() functions can't be safely instrumented. Since they enter/exit to/from RCU idle mode, those functions must be tagged as "noinstr". Unfortunately this involves converting the instrumentable local_irq_save()/local_irq_restore() to their raw counterparts. Precious debugging informations might be lost on the way until a better way out is found. Signed-off-by: Frederic Weisbecker <frederic@...nel.org> Cc: Paul E. McKenney <paulmck@...nel.org> Cc: Peter Zijlstra <peterz@...radead.org> Cc: Thomas Gleixner <tglx@...utronix.de> Cc: Neeraj Upadhyay <quic_neeraju@...cinc.com> Cc: Uladzislau Rezki <uladzislau.rezki@...y.com> Cc: Joel Fernandes <joel@...lfernandes.org> Cc: Boqun Feng <boqun.feng@...il.com> Cc: Nicolas Saenz Julienne <nsaenz@...nel.org> Cc: Marcelo Tosatti <mtosatti@...hat.com> Cc: Xiongfeng Wang <wangxiongfeng2@...wei.com> Cc: Yu Liao<liaoyu15@...wei.com> Cc: Phil Auld <pauld@...hat.com> Cc: Paul Gortmaker<paul.gortmaker@...driver.com> Cc: Alex Belits <abelits@...vell.com> --- kernel/rcu/tree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 02233b17cce0..ff97264d8077 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -843,13 +843,13 @@ void rcu_irq_exit_check_preempt(void) * If you add or remove a call to rcu_irq_exit_irqson(), be sure to test * with CONFIG_RCU_EQS_DEBUG=y. */ -void rcu_irq_exit_irqson(void) +void noinstr rcu_irq_exit_irqson(void) { unsigned long flags; - local_irq_save(flags); + raw_local_irq_save(flags); rcu_irq_exit(); - local_irq_restore(flags); + raw_local_irq_restore(flags); } /* @@ -1081,13 +1081,13 @@ noinstr void rcu_irq_enter(void) * If you add or remove a call to rcu_irq_enter_irqson(), be sure to test * with CONFIG_RCU_EQS_DEBUG=y. */ -void rcu_irq_enter_irqson(void) +void noinstr rcu_irq_enter_irqson(void) { unsigned long flags; - local_irq_save(flags); + raw_local_irq_save(flags); rcu_irq_enter(); - local_irq_restore(flags); + raw_local_irq_restore(flags); } /* -- 2.25.1
Powered by blists - more mailing lists