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] [thread-next>] [day] [month] [year] [list]
Message-ID: <167999248584.5837.2675247233861998370.tip-bot2@tip-bot2>
Date:   Tue, 28 Mar 2023 08:34:45 -0000
From:   "tip-bot2 for Valentin Schneider" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Valentin Schneider <vschneid@...hat.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        "Steven Rostedt (Google)" <rostedt@...dmis.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: smp/core] irq_work: Trace self-IPIs sent via arch_irq_work_raise()

The following commit has been merged into the smp/core branch of tip:

Commit-ID:     4468161a5ca2ea239c92de7c0a0dca61854ec4da
Gitweb:        https://git.kernel.org/tip/4468161a5ca2ea239c92de7c0a0dca61854ec4da
Author:        Valentin Schneider <vschneid@...hat.com>
AuthorDate:    Tue, 07 Mar 2023 14:35:55 
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Fri, 24 Mar 2023 11:01:27 +01:00

irq_work: Trace self-IPIs sent via arch_irq_work_raise()

IPIs sent to remote CPUs via irq_work_queue_on() are now covered by
trace_ipi_send_cpumask(), add another instance of the tracepoint to cover
self-IPIs.

Signed-off-by: Valentin Schneider <vschneid@...hat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>
Link: https://lore.kernel.org/r/20230307143558.294354-5-vschneid@redhat.com
---
 kernel/irq_work.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index 7afa40f..c33e88e 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -22,6 +22,8 @@
 #include <asm/processor.h>
 #include <linux/kasan.h>
 
+#include <trace/events/ipi.h>
+
 static DEFINE_PER_CPU(struct llist_head, raised_list);
 static DEFINE_PER_CPU(struct llist_head, lazy_list);
 static DEFINE_PER_CPU(struct task_struct *, irq_workd);
@@ -74,6 +76,16 @@ void __weak arch_irq_work_raise(void)
 	 */
 }
 
+static __always_inline void irq_work_raise(struct irq_work *work)
+{
+	if (trace_ipi_send_cpumask_enabled() && arch_irq_work_has_interrupt())
+		trace_ipi_send_cpumask(cpumask_of(smp_processor_id()),
+				       _RET_IP_,
+				       work->func);
+
+	arch_irq_work_raise();
+}
+
 /* Enqueue on current CPU, work must already be claimed and preempt disabled */
 static void __irq_work_queue_local(struct irq_work *work)
 {
@@ -99,7 +111,7 @@ static void __irq_work_queue_local(struct irq_work *work)
 
 	/* If the work is "lazy", handle it from next tick if any */
 	if (!lazy_work || tick_nohz_tick_stopped())
-		arch_irq_work_raise();
+		irq_work_raise(work);
 }
 
 /* Enqueue the irq work @work on the current CPU */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ