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:
pgp4u1eK6KyMG.pgp
Description: OpenPGP digital signature