Messages in this thread | | | Date | Mon, 10 Sep 2012 19:27:36 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 4/7] ptrace: Partly fix set_task_blockstep()->update_debugctlmsr() logic |
| |
Sebastian, I am replying to my message because I removed your email by mistake. Fortunately I can see it on marc.info...
> ptrace and uprobe are calling this function from process context. As > long as you have here get_cpu() instead of local_irq_disable() you should > be safe here.
local_irq_disable() looks more safe. We can have new users playing with MSR_IA32_DEBUGCTLMSR from irq.
> perf > uses raw_local_irqsave() (raw_* most likely due to -RT).
This is completely irrelevant, we alrady discussed this.
> I have no idea > what you can against NMI unless not touching the register in NMI > context.
Neither me, and this is documented in the changelog:
And afaics there is yet another problem: perf can play with MSR_IA32_DEBUGCTLMSR from nmi, this obviously means that even __switch_to_xtra() has problems.
and please note __switch_to_xtra() above, it has the same problem by the same reason.
Oleg.
| |