[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210827090234.7aca7a2a@canb.auug.org.au>
Date: Fri, 27 Aug 2021 09:02:34 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Richard Weinberger <richard@....at>, Arnd Bergmann <arnd@...db.de>
Cc: Christoph Hellwig <hch@....de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the uml tree with the asm-generic tree
Hi all,
Today's linux-next merge of the uml tree got a conflict in:
arch/um/kernel/skas/uaccess.c
between commit:
f27180dd63e1 ("asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user")
from the asm-generic tree and commit:
043f5d3ffaf6 ("um: Remove set_fs")
from the uml tree.
I fixed it up (I think - 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/um/kernel/skas/uaccess.c
index a509be911026,dda2439ab550..000000000000
--- a/arch/um/kernel/skas/uaccess.c
+++ b/arch/um/kernel/skas/uaccess.c
@@@ -194,14 -184,6 +184,9 @@@ long strncpy_from_user(char *dst, cons
long n;
char *ptr = dst;
+ if (!access_ok(src, 1))
+ return -EFAULT;
+
- if (uaccess_kernel()) {
- strncpy(dst, (__force void *) src, count);
- return strnlen(dst, count);
- }
-
n = buffer_op((unsigned long) src, count, 0, strncpy_chunk_from_user,
&ptr);
if (n != 0)
@@@ -243,12 -220,6 +223,9 @@@ long strnlen_user(const char __user *st
{
int count = 0, n;
+ if (!access_ok(str, 1))
+ return -EFAULT;
+
- if (uaccess_kernel())
- return strnlen((__force char*)str, len) + 1;
-
n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
if (n == 0)
return count + 1;
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists