[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <161916182507.29796.16853623340794568240.tip-bot2@tip-bot2>
Date: Fri, 23 Apr 2021 07:10:25 -0000
From: "tip-bot2 for Marco Elver" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Marco Elver <elver@...gle.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: perf/core] signal, perf: Add missing TRAP_PERF case in siginfo_layout()
The following commit has been merged into the perf/core branch of tip:
Commit-ID: ed8e50800bf4c2d904db9c75408a67085e6cca3d
Gitweb: https://git.kernel.org/tip/ed8e50800bf4c2d904db9c75408a67085e6cca3d
Author: Marco Elver <elver@...gle.com>
AuthorDate: Thu, 22 Apr 2021 21:18:23 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Fri, 23 Apr 2021 09:03:16 +02:00
signal, perf: Add missing TRAP_PERF case in siginfo_layout()
Add the missing TRAP_PERF case in siginfo_layout() for interpreting the
layout correctly as SIL_PERF_EVENT instead of just SIL_FAULT. This
ensures the si_perf field is copied and not just the si_addr field.
This was caught and tested by running the perf_events/sigtrap_threads
kselftest as a 32-bit binary with a 64-bit kernel.
Fixes: fb6cc127e0b6 ("signal: Introduce TRAP_PERF si_code and si_perf to siginfo")
Signed-off-by: Marco Elver <elver@...gle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lkml.kernel.org/r/20210422191823.79012-2-elver@google.com
---
kernel/signal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/signal.c b/kernel/signal.c
index f683518..343d87c 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3206,6 +3206,8 @@ enum siginfo_layout siginfo_layout(unsigned sig, int si_code)
else if ((sig == SIGSEGV) && (si_code == SEGV_PKUERR))
layout = SIL_FAULT_PKUERR;
#endif
+ else if ((sig == SIGTRAP) && (si_code == TRAP_PERF))
+ layout = SIL_PERF_EVENT;
}
else if (si_code <= NSIGPOLL)
layout = SIL_POLL;
Powered by blists - more mailing lists