From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: x86@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 09:02:10 +0100 [thread overview]
Message-ID: <20150304080210.GA12265@gmail.com> (raw)
In-Reply-To: <385661f737a3c430ee2fb50e1531ae002fa263a0.1424994489.git.luto@amacapital.net>
* 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?
> This needs minor paravirt tweaks to ensure that On native, sp0
nit: s/On/on/
> defines the top of the kernel stack. On Xen and lguest, the
> hypervisor tracks it, but we want to start reading sp0 in the
> kernel. Fixing this is simple: just update our local copy of sp0 as
> well as the hypervisor's copy on task switches.
Thanks,
Ingo
next prev parent reply other threads:[~2015-03-04 8:02 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 [this message]
2015-03-04 18:51 ` Andy Lutomirski
2015-03-04 20:39 ` Ingo Molnar
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=20150304080210.GA12265@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome