lkml.org 
[lkml]   [2015]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 4/8] x86: Add support for rd/wr fs/gs base
On Fri, Apr 10, 2015 at 3:52 PM, Andi Kleen <andi@firstfloor.org> wrote:
>> I think all of this stems from unfortunate naming. DEBUG_STACK isn't
>> one stack -- it's a debug stack *array*. The IST shift mechanism
>> means that we can use different entries in that array as our stacks
>> depending on how deeply nested we are.
>
> It's not. It was always intended as one stack. It still is, for anyone
> not nesting debuggers (which afaik doesn't happen in-tree, it was
> only for Jan Beulich's magic debugger)
>
> I wrote the original code, so I should know.

Regardless of who wrote what, the entry code does this:

.if \shift_ist != -1
subq $EXCEPTION_STKSZ, INIT_TSS_IST(\shift_ist)
.endif

call \do_sym

.if \shift_ist != -1
addq $EXCEPTION_STKSZ, INIT_TSS_IST(\shift_ist)
.endif

I wrote that in its current form, but it does *exactly* the same thing
(as in literally identical generated code) as the old code.

One might argue that this code serves no purpose, but it's there, so
we had better keep our per-invocation usage of DEBUG_STACK within 4k.

--Andy


\
 
 \ /
  Last update: 2015-04-11 01:21    [W:0.099 / U:2.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site