Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful

From: Linus Torvalds
Date: Thu Sep 01 2016 - 12:30:55 EST


On Thu, Sep 1, 2016 at 6:09 AM, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> I'm wonder if it might be useful to encode the addresses somehow; they
> could conceivably be used to debug use-after-free issues. Or we could
> just remove them.

I suspect we should just remove them. I'm sure they are useful in
theory, but I suspect they were more useful back when the whole "free
init memory" was originally done.

These days, if we have a use-after-free, I suspect the init-mem
situation is the easiest situation by far. Compared to all the dynamic
allocations which are much more likely to show it anyway. So having
debug output for that case is likely not all that productive.

Linus