Re: [patch V2 19/29] x86/exceptions: Split debug IST stack

From: Thomas Gleixner
Date: Fri Apr 05 2019 - 17:01:21 EST


On Fri, 5 Apr 2019, Sean Christopherson wrote:
> On Fri, Apr 05, 2019 at 05:07:17PM +0200, Thomas Gleixner wrote:
> > + /*
> > + * Note, this covers the guard page between DB and DB1 as well to
> > + * avoid two checks. But by all means @addr can never point into
> > + * the guard page.
> > + */
> > + return addr > bot && addr < top;
>
> Isn't this an off by one error? I.e. "return addr >= bot && addr < top".
> %rsp == bot is technically still in the DB1 stack even though the next
> PUSH/CALL will explode on the guard page.

Right you are.