linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the risc-v and vfs trees with Linus' tree
@ 2020-10-15  0:10 Stephen Rothwell
  0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2020-10-15  0:10 UTC (permalink / raw)
  To: Palmer Dabbelt, Paul Walmsley
  Cc: Al Viro, Christoph Hellwig, Linus Torvalds,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

Hi all,

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

  arch/x86/lib/getuser.S

between commit:

  ea6f043fc984 ("x86: Make __get_user() generate an out-of-line call")

from Linus' tree and commit:

  47058bb54b57 ("x86: remove address space overrides using set_fs()")

from the risc-v and vfs trees.

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/lib/getuser.S
index 2cd902e06062,2f052bc96866..000000000000
--- a/arch/x86/lib/getuser.S
+++ b/arch/x86/lib/getuser.S
@@@ -35,12 -35,19 +35,21 @@@
  #include <asm/smap.h>
  #include <asm/export.h>
  
 +#define ASM_BARRIER_NOSPEC ALTERNATIVE "", "lfence", X86_FEATURE_LFENCE_RDTSC
 +
+ #ifdef CONFIG_X86_5LEVEL
+ #define LOAD_TASK_SIZE_MINUS_N(n) \
+ 	ALTERNATIVE __stringify(mov $((1 << 47) - 4096 - (n)),%rdx), \
+ 		    __stringify(mov $((1 << 56) - 4096 - (n)),%rdx), X86_FEATURE_LA57
+ #else
+ #define LOAD_TASK_SIZE_MINUS_N(n) \
+ 	mov $(TASK_SIZE_MAX - (n)),%_ASM_DX
+ #endif
+ 
  	.text
  SYM_FUNC_START(__get_user_1)
- 	mov PER_CPU_VAR(current_task), %_ASM_DX
- 	cmp TASK_addr_limit(%_ASM_DX),%_ASM_AX
+ 	LOAD_TASK_SIZE_MINUS_N(0)
+ 	cmp %_ASM_DX,%_ASM_AX
  	jae bad_get_user
  	sbb %_ASM_DX, %_ASM_DX		/* array_index_mask_nospec() */
  	and %_ASM_DX, %_ASM_AX

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-15  0:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  0:10 linux-next: manual merge of the risc-v and vfs trees with Linus' tree Stephen Rothwell

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).