[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120807151343.GA13476@redhat.com>
Date: Tue, 7 Aug 2012 17:13:43 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Ingo Molnar <mingo@...e.hu>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Anton Arapov <anton@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Roland McGrath <roland@...k.frob.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ptrace: fix
set_task_blockstep()->update_debugctlmsr() logic
Hi.
Today I noticed by accident that starting from Aug 4 (at least)
all my emails went to nowhere. I am resending some of them...
Peter, Ingo, could you help?
See the question about nmi at the end.
On 08/03, Sebastian Andrzej Siewior wrote:
>
> On 08/03/2012 07:38 PM, Oleg Nesterov wrote:
>>>> update_debugctlmsr(debugctl);
>>>> + local_irq_enable();
>>>
>>> wouldn't preempt_disable() be enough?
>>
>> preempt_disable() can't help if interrupt handler changes
>> other bits in between?
>
> So perf() uses this register as well. Since perf() uses the raw
> primitives (raw_spin_lock())
Hmm. perf/whatever uses raw_spin_lock() if the lock is raw_spinlock_t.
But this doesn't matter? Whatever irq handler does has nothing to
do with the problem, either local_irq_disable() can prevent this
irq from happening, or not.
> shouldn't you do the same?
raw_local_irq_disable? I don't think so.
> If I recall
> correctly (but it is Friday and late) local_irq_enable() wouldn't
> disable irqs on RT
You mean it doesn't disable irqs in hardware? Yet local_irq_disable()
should protect against the interrupt handler.
OK, I know nothing about RT kernel (unfortunately), perhaps it has
other primitives, but
> and perf takes the raw lock
this certainly doesn't matter, afaics.
And note that __switch_to_xtra() runs under local_irq_disable() too.
However. It seems that perf (intel_pmu_handle_irq) can play with
MSR_IA32_DEBUGCTLMSR bits in nmi? In this case local_irq_disable()
can't help. Doesn't this mean __switch_to_xtra() has problems?
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists