From: Ingo Molnar <mingo@kernel.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Dave Hansen <dave.hansen@intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
David Woodhouse <dwmw2@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] x86/entry/64: Fix CR3 restore order in paranoid_exit()
Date: Wed, 14 Feb 2018 23:27:57 +0100 [thread overview]
Message-ID: <20180214222757.zda2xvytzb7jjfyy@gmail.com> (raw)
In-Reply-To: <20180214161148.c4uxsmbwycsbcfh4@treble>
* Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> Dave was right, my patch was obviously bogus. I couldn't figure out a
> real reproducer, so I made an artificial one (see below) and can confirm
> that your patch fixes it.
>
> I would resubmit the patch, but now you're the author, so I'm not sure
> how that works with the SOB.
I'd just have made you the author of the oneliner fix, in fair payment for writing
the changelog! ;-)
For anything larger and more complex we can do:
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Which is technically an unusual but still correct 'SoB chain' describing the
true route of the patch.
See for example these scheduler commits:
8c0944cee7af: sched/deadline: Rename __dl_clear() to __dl_sub()
07f06cb3b5f6: sched: Start stopper early
7675104990ed: sched: Implement lockless wake-queues
In particular 7675104990ed is a good example:
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
[tweaks, adjustments, comments, etc.]
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
With his developer hat on PeterZ sent out a first implementation which Davidlohr
fixed, tested and signed off on - which PeterZ then applied with his maintainer
hat on, which Thomas acked and I committed to the scheduler git tree.
It would require two commits (one of which could easily be a bisection-breaker) to
express this in any other way.
But such chains are pretty rare and very much the exception: usually either the
original author takes care of everything, or the secondary author makes so many
changes that the secondary author becomes the primary author and the original
author is credited via a copyright notice and/or a tag like:
Originally-From: Ingo Molnar <mingo@kernel.org>
> Feel free to add my
>
> Reported-and-tested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Thanks and added!
BTW:
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -325,6 +325,8 @@ syscall_return_via_sysret:
> */
> SWITCH_TO_USER_CR3_STACK scratch_reg=%rdi
>
> + int3
> +
> popq %rdi
> popq %rsp
> USERGS_SYSRET64
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index 3d9b2308e7fa..74fabcdf6c36 100644
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -605,6 +605,8 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
> goto exit;
> #endif
>
> + goto exit;
That's a very clever way to test such races!
Thanks,
Ingo
next prev parent reply other threads:[~2018-02-14 22:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 2:27 [PATCH] x86/entry/64: Fix CR3 restore order in paranoid_exit() Josh Poimboeuf
2018-02-14 4:19 ` Dave Hansen
2018-02-14 7:39 ` Ingo Molnar
2018-02-14 16:11 ` Josh Poimboeuf
2018-02-14 22:27 ` Ingo Molnar [this message]
2018-02-14 16:13 ` Thomas Gleixner
2018-02-14 17:16 ` Andy Lutomirski
2018-02-14 23:31 ` [tip:x86/pti] x86/entry/64: Fix CR3 restore " tip-bot for Ingo Molnar
2018-02-15 0:31 ` tip-bot for Ingo Molnar
2018-02-14 7:35 ` [PATCH] x86/entry/64: Fix CR3 restore order " Ingo Molnar
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=20180214222757.zda2xvytzb7jjfyy@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=dave.hansen@intel.com \
--cc=dwmw2@infradead.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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