All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "nios2: fix __get_user()" has been added to the 4.4-stable tree
@ 2016-09-22 15:42 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-22 15:42 UTC (permalink / raw)
  To: viro, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    nios2: fix __get_user()

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nios2-fix-__get_user.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 2e29f50ad5e23db37dde9be71410d95d50241ecd Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Sat, 20 Aug 2016 16:39:01 -0400
Subject: nios2: fix __get_user()

From: Al Viro <viro@zeniv.linux.org.uk>

commit 2e29f50ad5e23db37dde9be71410d95d50241ecd upstream.

a) should not leave crap on fault
b) should _not_ require access_ok() in any cases.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/nios2/include/asm/uaccess.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/nios2/include/asm/uaccess.h
+++ b/arch/nios2/include/asm/uaccess.h
@@ -139,7 +139,7 @@ extern long strnlen_user(const char __us
 
 #define __get_user_unknown(val, size, ptr, err) do {			\
 	err = 0;							\
-	if (copy_from_user(&(val), ptr, size)) {			\
+	if (__copy_from_user(&(val), ptr, size)) {			\
 		err = -EFAULT;						\
 	}								\
 	} while (0)
@@ -166,7 +166,7 @@ do {									\
 	({								\
 	long __gu_err = -EFAULT;					\
 	const __typeof__(*(ptr)) __user *__gu_ptr = (ptr);		\
-	unsigned long __gu_val;						\
+	unsigned long __gu_val = 0;					\
 	__get_user_common(__gu_val, sizeof(*(ptr)), __gu_ptr, __gu_err);\
 	(x) = (__force __typeof__(x))__gu_val;				\
 	__gu_err;							\


Patches currently in stable-queue which might be from viro@zeniv.linux.org.uk are

queue-4.4/nios2-copy_from_user-should-zero-the-tail-of-destination.patch
queue-4.4/m32r-fix-__get_user.patch
queue-4.4/microblaze-fix-copy_from_user.patch
queue-4.4/cris-buggered-copy_from_user-copy_to_user-clear_user.patch
queue-4.4/asm-generic-make-copy_from_user-zero-the-destination-properly.patch
queue-4.4/metag-copy_from_user-should-zero-the-destination-on-access_ok-failure.patch
queue-4.4/score-fix-__get_user-get_user.patch
queue-4.4/parisc-fix-copy_from_user.patch
queue-4.4/mips-copy_from_user-must-zero-the-destination-on-access_ok-failure.patch
queue-4.4/alpha-fix-copy_from_user.patch
queue-4.4/mn10300-failing-__get_user-and-get_user-should-zero.patch
queue-4.4/openrisc-fix-copy_from_user.patch
queue-4.4/avr32-fix-copy_from_user.patch
queue-4.4/score-fix-copy_from_user-and-friends.patch
queue-4.4/sh64-failing-__get_user-should-zero.patch
queue-4.4/arc-uaccess-get_user-to-zero-out-dest-in-cause-of-fault.patch
queue-4.4/hexagon-fix-strncpy_from_user-error-return.patch
queue-4.4/frv-fix-clear_user.patch
queue-4.4/fix-minor-infoleak-in-get_user_ex.patch
queue-4.4/asm-generic-make-get_user-clear-the-destination-on-errors.patch
queue-4.4/mn10300-copy_from_user-should-zero-on-access_ok-failure.patch
queue-4.4/s390-get_user-should-zero-on-failure.patch
queue-4.4/microblaze-fix-__get_user.patch
queue-4.4/blackfin-fix-copy_from_user.patch
queue-4.4/fix-iov_iter_fault_in_readable.patch
queue-4.4/nios2-fix-__get_user.patch
queue-4.4/sh-fix-copy_from_user.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-22 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 15:42 Patch "nios2: fix __get_user()" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.