Re: [PATCH] x86/dumpstack/64: Add guard pages to stack_info
From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-09-17 10:21:54
Also in:
bpf, lkml, netdev
From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-09-17 10:21:54
Also in:
bpf, lkml, netdev
On Fri, Sep 17, 2021 at 11:02:07AM +0800, 王贇 wrote:
On 2021/9/16 下午6:02, Peter Zijlstra wrote: [snip]quoted
+static __always_inline bool in_stack_guard(void *addr, void *begin, void *end) +{ +#ifdef CONFIG_VMAP_STACK + if (addr > (begin - PAGE_SIZE)) + return true;After fix this logical as: addr >= (begin - PAGE_SIZE) && addr < begin it's working.
Shees, I seem to have a knack for getting it wrong, don't I. Thanks! Anyway, I'll ammend the commit locally, but I'd really like some feedback from Andy, who wrote all that VIRT_STACK stuff in the first place.