From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Richard Weinberger <richard@nod•at>, Arnd Bergmann <arnd@arndb•de>
Cc: Christoph Hellwig <hch@lst•de>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the uml tree with the asm-generic tree
Date: Fri, 27 Aug 2021 09:02:34 +1000 [thread overview]
Message-ID: <20210827090234.7aca7a2a@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]
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;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
reply other threads:[~2021-08-26 23:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210827090234.7aca7a2a@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=arnd@arndb$(echo .)de \
--cc=hch@lst$(echo .)de \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=richard@nod$(echo .)at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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