# Re: \[PATCH\] x86/dumpstack/64: Add guard pages to stack\_info

- From: Peter Zijlstra \<peterz@infradead.org\>
- Date: 2021-09-17 10:21:54 
- List: linux-perf-users
- Page: https://ratatoskr.run/linux-perf-users/2021/09/1512784
- Thread: https://ratatoskr.run/linux-perf-users/2021/09/1500775/t.md

```text
On Fri, Sep 17, 2021 at 11:02:07AM +0800, 王贇 wrote:
> 
> 
> On 2021/9/16 下午6:02, Peter Zijlstra wrote:
> [snip]
> >  
> > +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.
```
