Subject: linux-next: manual merge of the vfs tree with the powerpc tree

From: Stephen Rothwell <[email-masked]>
Date: Mon, 27 Jul 2020 11:32:16 +1000

Hi all,

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

  arch/powerpc/kernel/ptrace/ptrace-view.c

between commit:

  e0d8e991be64 ("powerpc/book3s64/kuap: Move UAMOR setup to key init function")

from the powerpc tree and commit:

  5e39a71bddb3 ("powerpc: switch to ->regset_get()")

from the vfs tree.

I fixed it up (I thnk - 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/powerpc/kernel/ptrace/ptrace-view.c
index ac7d480cb9c1,13208a9a02ca..000000000000
--- a/arch/powerpc/kernel/ptrace/ptrace-view.c
+++ b/arch/powerpc/kernel/ptrace/ptrace-view.c
@@@ -486,23 -468,15 +468,15 @@@ static int pkey_active(struct task_stru
  }
  
  static int pkey_get(struct task_struct *target, const struct user_regset *regset,
- 		    unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf)
+ 		    struct membuf to)
  {
- 	int ret;
- 
  	BUILD_BUG_ON(TSO(amr) + sizeof(unsigned long) != TSO(iamr));
 -	BUILD_BUG_ON(TSO(iamr) + sizeof(unsigned long) != TSO(uamor));
  
  	if (!arch_pkeys_enabled())
  		return -ENODEV;
  
- 	ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &target->thread.amr,
- 				  0, 2 * sizeof(unsigned long));
- 	if (ret)
- 		return ret;
- 
- 	ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &default_uamor,
- 				  2 * sizeof(unsigned long), 3 * sizeof(unsigned long));
- 	return ret;
 -	return membuf_write(&to, &target->thread.amr, ELF_NPKEY * sizeof(unsigned long));
++	membuf_write(&to, &target->thread.amr, 2 * sizeof(unsigned long));
++	return membuf_write(&to, &default_uamor, sizeof(unsigned long));
  }
  
  static int pkey_set(struct task_struct *target, const struct user_regset *regset,