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
Reply to
王贇, 2021-09-17
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.
Thread (24 messages) 24 messages, 2 authors, last reply 2021-09-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help