lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWVi6xUAnrBbYRC8UQeLq0NLuOJZDYhGKL2UAZ_SkMbPw@mail.gmail.com>
Date:	Fri, 10 Apr 2015 16:00:37 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Andi Kleen <ak@...ux.intel.com>, X86 ML <x86@...nel.org>,
	Andrew Lutomirski <luto@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH 4/8] x86: Add support for rd/wr fs/gs base

On Fri, Apr 10, 2015 at 3:52 PM, Andi Kleen <andi@...stfloor.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ