]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.7-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2016 08:11:32 +0000 (10:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2016 08:11:32 +0000 (10:11 +0200)
added patches:
avr32-fix-undefined-reference-to-___copy_from_user.patch
openrisc-fix-the-fix-of-copy_from_user.patch

queue-4.7/avr32-fix-undefined-reference-to-___copy_from_user.patch [new file with mode: 0644]
queue-4.7/openrisc-fix-the-fix-of-copy_from_user.patch [new file with mode: 0644]
queue-4.7/series

diff --git a/queue-4.7/avr32-fix-undefined-reference-to-___copy_from_user.patch b/queue-4.7/avr32-fix-undefined-reference-to-___copy_from_user.patch
new file mode 100644 (file)
index 0000000..cadaff3
--- /dev/null
@@ -0,0 +1,48 @@
+From 65c0044ca8d7c7bbccae37f0ff2972f0210e9f41 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Sat, 17 Sep 2016 07:52:49 -0700
+Subject: avr32: fix 'undefined reference to `___copy_from_user'
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit 65c0044ca8d7c7bbccae37f0ff2972f0210e9f41 upstream.
+
+avr32 builds fail with:
+
+arch/avr32/kernel/built-in.o: In function `arch_ptrace':
+(.text+0x650): undefined reference to `___copy_from_user'
+arch/avr32/kernel/built-in.o:(___ksymtab+___copy_from_user+0x0): undefined
+reference to `___copy_from_user'
+kernel/built-in.o: In function `proc_doulongvec_ms_jiffies_minmax':
+(.text+0x5dd8): undefined reference to `___copy_from_user'
+kernel/built-in.o: In function `proc_dointvec_minmax_sysadmin':
+sysctl.c:(.text+0x6174): undefined reference to `___copy_from_user'
+kernel/built-in.o: In function `ptrace_has_cap':
+ptrace.c:(.text+0x69c0): undefined reference to `___copy_from_user'
+kernel/built-in.o:ptrace.c:(.text+0x6b90): more undefined references to
+`___copy_from_user' follow
+
+Fixes: 8630c32275ba ("avr32: fix copy_from_user()")
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com>
+Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/avr32/lib/copy_user.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/avr32/lib/copy_user.S
++++ b/arch/avr32/lib/copy_user.S
+@@ -23,8 +23,8 @@
+        */
+       .text
+       .align  1
+-      .global copy_from_user
+-      .type   copy_from_user, @function
++      .global ___copy_from_user
++      .type   ___copy_from_user, @function
+ ___copy_from_user:
+       branch_if_kernel r8, __copy_user
+       ret_if_privileged r8, r11, r10, r10
diff --git a/queue-4.7/openrisc-fix-the-fix-of-copy_from_user.patch b/queue-4.7/openrisc-fix-the-fix-of-copy_from_user.patch
new file mode 100644 (file)
index 0000000..36d6c8c
--- /dev/null
@@ -0,0 +1,33 @@
+From 8e4b72054f554967827e18be1de0e8122e6efc04 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Sat, 17 Sep 2016 12:57:24 -0700
+Subject: openrisc: fix the fix of copy_from_user()
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit 8e4b72054f554967827e18be1de0e8122e6efc04 upstream.
+
+Since commit acb2505d0119 ("openrisc: fix copy_from_user()"),
+copy_from_user() returns the number of bytes requested, not the
+number of bytes not copied.
+
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Fixes: acb2505d0119 ("openrisc: fix copy_from_user()")
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/openrisc/include/asm/uaccess.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/openrisc/include/asm/uaccess.h
++++ b/arch/openrisc/include/asm/uaccess.h
+@@ -276,7 +276,7 @@ copy_from_user(void *to, const void *fro
+       unsigned long res = n;
+       if (likely(access_ok(VERIFY_READ, from, n)))
+-              n = __copy_tofrom_user(to, from, n);
++              res = __copy_tofrom_user(to, from, n);
+       if (unlikely(res))
+               memset(to + (n - res), 0, res);
+       return res;
index ebc3f97b663dc358b591e2c5af17571716481333..375b884c9f6ce601a82e9d7bed8b00166d39d0e2 100644 (file)
@@ -182,3 +182,5 @@ ia64-copy_from_user-should-zero-the-destination-on-access_ok-failure.patch
 iwlegacy-avoid-warning-about-missing-braces.patch
 genirq-msi-fix-broken-debug-output.patch
 add-braces-to-avoid-ambiguous-else-compiler-warnings.patch
+avr32-fix-undefined-reference-to-___copy_from_user.patch
+openrisc-fix-the-fix-of-copy_from_user.patch