[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrV2kOy1vorbYo4XZrsBBO1eBMtU306iDfputSTy0a60+g@mail.gmail.com>
Date: Sun, 14 Aug 2016 00:30:49 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Brian Gerst <brgerst@...il.com>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Byungchul Park <byungchul.park@....com>,
Nilay Vaish <nilayvaish@...il.com>
Subject: Re: [PATCH v3 15/51] x86/asm/head: standardize the end of the stack
for idle tasks
On Fri, Aug 12, 2016 at 7:28 AM, Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> Thanks to all the recent x86 entry code refactoring, most tasks' kernel
> stacks start at the same offset right above their saved pt_regs,
> regardless of which syscall was used to enter the kernel. That creates
> a nice convention which makes it straightforward to identify the end of
> the stack, which can be useful for stack walking code which needs to
> verify the stack is sane.
>
> However, the boot CPU's idle "swapper" task doesn't follow that
> convention. Fix that by starting its stack at a sizeof(pt_regs) offset
> from the end of the stack page.
>
I think this is an improvement. If you want to be fancy, from memory
it might be nice to poke -1 into the orig_ax slot, but this doesn't
matter much.
--Andy
Powered by blists - more mailing lists