lkml.org 
[lkml]   [2009]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC,PATCH 14/14] utrace core
Date
> > > +	 * Some machines get here with interrupts disabled.  The same arch
> > > + * code path leads to calling into get_signal_to_deliver(), which
> > > + * implicitly reenables them by virtue of spin_unlock_irq.
> > > + */
> > > + local_irq_enable();
> >
> > Hrmm, I would much prefer to fix up the calling conventions of
> > tracehook_notify_resume() than to bury something like this in the guts
> > of a tracehook user.

The reason I did it this way was mainly just not to make the requirement
for arch maintainers' too subtle. As it is, we just say that you call
tracehook_notify_resume() after clearing TIF_NOTIFY_RESUME, when it was
set. That keeps the specification quite simple. Of course, that is not
really much of a reason. If arch folks don't mind the requirement to
replace e.g.:

if (thread_info_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}

with:


if (thread_info_flags & _TIF_NOTIFY_RESUME) {
local_irq_enable();
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}

then that is certainly fine by me. But we do now have almost all the
arch's calling tracehook_notify_resume() and I don't know how many of
them do it in irqs-disabled context so they would need this change.

> But in any case, imho it would be better to do this after we merge utrace,
> otherwise we need more subtle arch-dependent changes before.

I tend to agree.


Thanks,
Roland


\
 
 \ /
  Last update: 2009-12-05 20:25    [W:0.207 / U:1.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site