Re: [RFC PATCH 00/11] printk: safe printing in NMI context
From: Paul E. McKenney
Date: Wed Jun 18 2014 - 17:38:03 EST
On Wed, Jun 18, 2014 at 11:32:53PM +0200, Jiri Kosina wrote:
> On Wed, 18 Jun 2014, Paul E. McKenney wrote:
>
> > > I agree that it might work nicely for RCU stall detector indeed. I was
> > > looking for solution that'd work nicely both for RCU and for sysrq-l
> > > (where we can't rely on processess being stuck in any way).
> >
> > Agreed. And if some more generally useful approach appears, I will be
> > quite happy to adjust RCU to use it. In the meantime, I expect that
> > my patch will be helpful.
>
> Agreed. And we'll look into fixing sysrq-l in parallel I guess; once there
> is a working solution (hangs with sysrq-l can be trivially reproduced
> almost immediately), we can then migrate RCU to it.
>
> Still, I feel bad about the fact that we are now hostages of our printk()
> implementation, which doesn't allow for any fixes/improvements. Having the
> possibility to printk() from NMI would be nice and more robust ...
> otherwise, we'll be getting people trying to do it in the future over and
> over again, even if we now get rid of it at once.
Well, we could always have printk() splat if invoke in_nmi().
Oh, wait... ;-)
More seriously, an in_nmi() printk() could taint the kernel, set a
flag that results in a deferred splat, do a trace_printk(), or any
number of things to let the developer know that this was a bad idea.
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/