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] [day] [month] [year] [list]
Message-ID: <CALCETrXtZZdnEGky6sArDT6zD06g4r-xM_yxNbA2BUZAmnxS-g@mail.gmail.com>
Date:	Wed, 4 Mar 2015 14:20:08 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Borislav Petkov <bp@...en8.de>,
	Oleg Nesterov <oleg@...hat.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [RFC 1/3] x86: Add this_cpu_sp0() to read sp0 for the current cpu

On Wed, Mar 4, 2015 at 2:12 PM, Ingo Molnar <mingo@...nel.org> wrote:
>
> * Andy Lutomirski <luto@...capital.net> wrote:
>
>> On Wed, Mar 4, 2015 at 12:39 PM, Ingo Molnar <mingo@...nel.org> wrote:
>> >
>> > * Andy Lutomirski <luto@...capital.net> wrote:
>> >
>> >> On Wed, Mar 4, 2015 at 12:02 AM, Ingo Molnar <mingo@...nel.org> wrote:
>> >> >
>> >> > * Andy Lutomirski <luto@...capital.net> wrote:
>> >> >
>> >> >> We currently store references to the top of the kernel stack in
>> >> >> multiple places: kernel_stack (with an offset) and
>> >> >> init_tss.x86_tss.sp0 (no offset).  The latter is defined by hardware
>> >> >> and is a clean canonical way to find the top of the stack.  Add an
>> >> >
>> >> > Btw., 'per_cpu(init_tss)' is a somewhat misleading name these days, as
>> >> > there's nothing 'init' about it anymore - we load it during CPU init
>> >> > and then manually maintain its contents. A better name would be
>> >> > 'current_tss' - referring to both the current CPU and the current
>> >> > task?
>> >>
>> >> Hmm.  That seems a little odd to me, since we never change the TSS
>> >> pointer.  It's certainly better than init_tss, though.  I'll add a
>> >> followup to rename it.
>> >
>> > Alternatively we could use 'cpu_tss': the CPU's current TSS.
>>
>> I painted my bikeshed "singleton_tss", since cpu_tss seemed
>> redundant for something that's already per cpu.  If you prefer your
>> bikeshed color, let me know.
>
> Yeah, name it *anything* but 'singleton'!!
>
> /me gets sick of design patterns ;-)

My tss factory laughs at your silly ideas :)

cpu_tss it is.

--Andy

>
> Thanks,
>
>         Ingo



-- 
Andy Lutomirski
AMA Capital Management, LLC
--
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