[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190508115759.yvxjgsqriez4z22l@treble>
Date: Wed, 8 May 2019 06:57:59 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Nicolai Stange <nstange@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Jiri Kosina <jikos@...nel.org>,
Miroslav Benes <mbenes@...e.cz>,
Petr Mladek <pmladek@...e.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Shuah Khan <shuah@...nel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Mimi Zohar <zohar@...ux.ibm.com>,
Juergen Gross <jgross@...e.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nayna Jain <nayna@...ux.ibm.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Joerg Roedel <jroedel@...e.de>,
linux-kselftest@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [RFC][PATCH 4/4] x86_32: Provide consistent pt_regs
On Wed, May 08, 2019 at 09:49:05AM +0200, Peter Zijlstra wrote:
> Currently pt_regs on x86_32 has an oddity in that kernel regs
> (!user_mode(regs)) are short two entries (esp/ss). This means that any
> code trying to use them (typically: regs->sp) needs to jump through
> some unfortunate hoops.
>
> Change the entry code to fix this up and create a full pt_regs frame.
>
> This then simplifies:
>
> - ftrace
> - kprobes
> - stack unwinder
> - ptrace
> - kdump
> - kgdb
>
> Hated-by: Linus Torvalds <torvalds@...ux-foundation.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> arch/x86/entry/entry_32.S | 105 ++++++++++++++++++++++++++++++++++----
> arch/x86/include/asm/kexec.h | 17 ------
> arch/x86/include/asm/ptrace.h | 17 ------
> arch/x86/include/asm/stacktrace.h | 2
> arch/x86/kernel/crash.c | 8 --
> arch/x86/kernel/ftrace_32.S | 81 ++++++++++++++++-------------
> arch/x86/kernel/kgdb.c | 8 --
> arch/x86/kernel/kprobes/common.h | 4 -
> arch/x86/kernel/kprobes/core.c | 29 ++++------
> arch/x86/kernel/kprobes/opt.c | 20 ++++---
> arch/x86/kernel/process_32.c | 16 +----
> arch/x86/kernel/ptrace.c | 29 ----------
> arch/x86/kernel/time.c | 3 -
> arch/x86/kernel/unwind_frame.c | 32 +----------
> arch/x86/kernel/unwind_orc.c | 2
> 15 files changed, 181 insertions(+), 192 deletions(-)
Very nice diffstat. This moves all the pain to the 32-bit entry code
where it belongs.
--
Josh
Powered by blists - more mailing lists