linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andy Lutomirski <luto@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	Borislav Petkov <bp@suse.de>
Subject: linux-next: manual merge of the rseq tree with Linus' tree
Date: Wed, 15 Nov 2017 15:35:36 +1100	[thread overview]
Message-ID: <20171115153536.7fab87b7@canb.auug.org.au> (raw)

Hi Mathieu,

[I may regret adding the rseq tree ...]

Today's linux-next merge of the rseq tree got a conflict in:

  arch/x86/entry/entry_64.S

between commits:

  9da78ba6b47b ("x86/entry/64: Remove the restore_c_regs_and_iret label")
  26c4ef9c49d8 ("x86/entry/64: Split the IRET-to-user and IRET-to-kernel paths")
  e53178328c9b ("x86/entry/64: Shrink paranoid_exit_restore and make labels local")

from Linus' tree and commit:

  60a77bfd24d5 ("membarrier: x86: Provide core serializing command (v2)")

from the rseq tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/entry/entry_64.S
index a2b30ec69497,4859f04e1695..000000000000
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@@ -617,21 -612,8 +617,25 @@@ GLOBAL(retint_user
  	mov	%rsp,%rdi
  	call	prepare_exit_to_usermode
  	TRACE_IRQS_IRETQ
 +
 +GLOBAL(swapgs_restore_regs_and_return_to_usermode)
 +#ifdef CONFIG_DEBUG_ENTRY
 +	/* Assert that pt_regs indicates user mode. */
 +	testb	$3, CS(%rsp)
 +	jnz	1f
 +	ud2
 +1:
 +#endif
  	SWAPGS
 -	jmp	restore_regs_and_iret
 +	POP_EXTRA_REGS
 +	POP_C_REGS
 +	addq	$8, %rsp	/* skip regs->orig_ax */
++	/*
++	 * ARCH_HAS_MEMBARRIER_SYNC_CORE rely on iret core serialization
++	 * when returning from IPI handler.
++	 */
 +	INTERRUPT_RETURN
 +
  
  /* Returning to kernel space */
  retint_kernel:
@@@ -651,17 -633,19 +655,21 @@@
  	 */
  	TRACE_IRQS_IRETQ
  
 -/*
 - * At this label, code paths which return to kernel and to user,
 - * which come from interrupts/exception and from syscalls, merge.
 - */
 -GLOBAL(restore_regs_and_iret)
 -	RESTORE_EXTRA_REGS
 -restore_c_regs_and_iret:
 -	RESTORE_C_REGS
 -	REMOVE_PT_GPREGS_FROM_STACK 8
 +GLOBAL(restore_regs_and_return_to_kernel)
 +#ifdef CONFIG_DEBUG_ENTRY
 +	/* Assert that pt_regs indicates kernel mode. */
 +	testb	$3, CS(%rsp)
 +	jz	1f
 +	ud2
 +1:
 +#endif
 +	POP_EXTRA_REGS
 +	POP_C_REGS
 +	addq	$8, %rsp	/* skip regs->orig_ax */
+ 	/*
+ 	 * ARCH_HAS_MEMBARRIER_SYNC_CORE rely on iret core serialization
+ 	 * when returning from IPI handler.
+ 	 */
  	INTERRUPT_RETURN
  
  ENTRY(native_iret)

             reply	other threads:[~2017-11-15  4:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15  4:35 Stephen Rothwell [this message]
2017-11-15  8:07 ` linux-next: manual merge of the rseq tree with Linus' tree Ingo Molnar
2017-11-15 14:48   ` Stephen Rothwell
2017-11-15 15:00     ` Mathieu Desnoyers
2017-11-15 15:22       ` Thomas Gleixner
2017-11-15 15:41         ` Mathieu Desnoyers
2017-11-15 16:04           ` Thomas Gleixner
2017-11-15 16:12             ` Mathieu Desnoyers
2017-11-15 16:30               ` Thomas Gleixner
2017-11-15 16:39                 ` Mathieu Desnoyers
2017-11-16 15:21       ` Mathieu Desnoyers
2017-11-15 14:49   ` Mathieu Desnoyers
2017-11-15  4:35 Stephen Rothwell

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=20171115153536.7fab87b7@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@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;
as well as URLs for NNTP newsgroup(s).