Commit 055c706
committed
unwind_user/deferred: Make unwind deferral requests NMI-safe
Make unwind_deferred_request() NMI-safe so tracers in NMI context can
call it and safely request a user space stacktrace when the task exits.
Note, this is only allowed for architectures that implement a safe
cmpxchg. If an architecture requests a deferred stack trace from NMI
context that does not support a safe NMI cmpxchg, it will get an -EINVAL
and trigger a warning. For those architectures, they would need another
method (perhaps an irqwork), to request a deferred user space stack trace.
That can be dealt with later if one of theses architectures require this
feature.
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Indu Bhagat <[email protected]>
Cc: "Jose E. Marchesi" <[email protected]>
Cc: Beau Belgrave <[email protected]>
Cc: Jens Remus <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Florian Weimer <[email protected]>
Cc: Sam James <[email protected]>
Link: https://lore.kernel.org/[email protected]
Suggested-by: Peter Zijlstra <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent 2dffa35 commit 055c706
1 file changed
Lines changed: 44 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
15 | 40 | | |
16 | 41 | | |
17 | 42 | | |
| |||
42 | 67 | | |
43 | 68 | | |
44 | 69 | | |
45 | | - | |
46 | 70 | | |
47 | 71 | | |
48 | 72 | | |
49 | 73 | | |
50 | 74 | | |
51 | 75 | | |
52 | | - | |
| 76 | + | |
53 | 77 | | |
54 | 78 | | |
55 | 79 | | |
| |||
167 | 191 | | |
168 | 192 | | |
169 | 193 | | |
| 194 | + | |
170 | 195 | | |
171 | 196 | | |
172 | 197 | | |
173 | 198 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 199 | | |
178 | 200 | | |
179 | 201 | | |
180 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
181 | 211 | | |
182 | 212 | | |
183 | 213 | | |
184 | 214 | | |
185 | 215 | | |
186 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
187 | 222 | | |
188 | 223 | | |
189 | 224 | | |
190 | 225 | | |
191 | | - | |
| 226 | + | |
| 227 | + | |
192 | 228 | | |
| 229 | + | |
193 | 230 | | |
194 | | - | |
195 | 231 | | |
196 | 232 | | |
197 | 233 | | |
| |||
0 commit comments