# Re: \[PATCH v10 07/14\] unwind\_user/deferred: Make unwind deferral requests NMI-safe

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2025-06-19 09:42:44 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/06/3098794
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/06/3086227/t.md

```text


On June 19, 2025 5:32:26 AM EDT, Peter Zijlstra [ref] wrote:
>On Thu, Jun 19, 2025 at 05:07:10AM -0400, Steven Rostedt wrote:
>
>> Does #DB make in_nmi() true? If that's the case then we do need to handle that.
>
>Yes: #DF, #MC, #BP (int3), #DB and NMI all have in_nmi() true.
>
>Ignoring #DF because that's mostly game over, you can get them all
>nested for up to 4 (you're well aware of the normal NMI recursion
>crap).

We probably can implement this with stacked counters.

>Then there is the SEV #VC stuff, which is also NMI like. So if you're a
>CoCo-nut, you can perhaps get it up to 5.

The rest of the tracing infrastructure goes 4 deep and hasn't had issues, so 4 is probably sufficient.

-- Steve 

```
