On Thu, Feb 12, 2015 at 03:08:38PM +0100, Jiri Kosina wrote:
> On Thu, 12 Feb 2015, Peter Zijlstra wrote:
> I personally am not a big fan of the task_rq_lock() public exposure 
> either. What might be generally useful though (not only for livepatching) 
> would be an API that would allow for "safe" stack dump (where "safe" means 
> that guarantee, that it wouldn't be interferred by process waking up in 
> the middle of dumping, would be provided).

In general, I think a safe stack dump is needed.  A lot of the stack
dumping in the kernel seems dangerous.  For example, it looks like doing
a `cat /proc/pid/stack` while the process is writing the stack could
easily go off into the weeds.

But I don't see how it would help the livepatch case.  What happens if
the process starts running in the to-be-patched function after we call
the "safe" dump_stack() but before switching it to the new universe?

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to