All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: X86 ML <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Borislav Petkov <bp@alien8.de>, Oleg Nesterov <oleg@redhat.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC 1/3] x86: Add this_cpu_sp0() to read sp0 for the current cpu
Date: Wed, 4 Mar 2015 21:39:58 +0100	[thread overview]
Message-ID: <20150304203958.GA7247@gmail.com> (raw)
In-Reply-To: <CALCETrXi_RFCOwLvsgP8xsJ7-bFayK5OdJ+ROrhhO9S7w6sW_A@mail.gmail.com>


* Andy Lutomirski <luto@amacapital.net> wrote:

> On Wed, Mar 4, 2015 at 12:02 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Andy Lutomirski <luto@amacapital.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.

Thanks,

	Ingo

  reply	other threads:[~2015-03-04 20:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 23:52 [RFC 0/3] Baby steps toward cleaning up KERNEL_STACK_OFFSET Andy Lutomirski
2015-02-27  0:07 ` [RFC 1/3] x86: Add this_cpu_sp0() to read sp0 for the current cpu Andy Lutomirski
2015-03-04  8:02   ` Ingo Molnar
2015-03-04 18:51     ` Andy Lutomirski
2015-03-04 20:39       ` Ingo Molnar [this message]
2015-03-04 20:41         ` Andy Lutomirski
2015-03-04 21:05           ` Borislav Petkov
2015-03-04 22:12           ` Ingo Molnar
2015-03-04 22:20             ` Andy Lutomirski
2015-02-27  0:07 ` [RFC 2/3] x86: Switch all C consumers of kernel_stack to this_cpu_sp0 Andy Lutomirski
2015-02-27 16:13   ` Denys Vlasenko
2015-02-27 19:56     ` Andy Lutomirski
2015-02-27 21:11       ` Denys Vlasenko
2015-02-27 22:39         ` Andy Lutomirski
2015-02-27 16:52   ` Denys Vlasenko
2015-02-27 20:02     ` Andy Lutomirski
2015-02-27  0:07 ` [RFC 3/3] x86, asm: Change the 32-bit sysenter code to use sp0 Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150304203958.GA7247@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=dvlasenk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=oleg@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.