Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1516193 > unrolled thread

[PATCH 3.12 69/72] Revert "fix minor infoleak in get_user_ex()"

Started byJiri Slaby <jslaby@suse.cz>
First post2016-11-07 14:40 +0100
Last post2016-11-08 11:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 69/72] Revert "fix minor infoleak in get_user_ex()" Jiri Slaby <jslaby@suse.cz> - 2016-11-07 14:40 +0100
    Re: [PATCH 3.12 69/72] Revert "fix minor infoleak in get_user_ex()" Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-07 18:10 +0100
      Re: [PATCH 3.12 69/72] Revert "fix minor infoleak in get_user_ex()" Greg KH <greg@kroah.com> - 2016-11-08 11:40 +0100

#1516193 — [PATCH 3.12 69/72] Revert "fix minor infoleak in get_user_ex()"

FromJiri Slaby <jslaby@suse.cz>
Date2016-11-07 14:40 +0100
Subject[PATCH 3.12 69/72] Revert "fix minor infoleak in get_user_ex()"
Message-ID<sASjv-3Kx-11@gated-at.bofh.it>
3.12-stable review patch.  If anyone has any objections, please let me know.

===============

This reverts commit d42924ab1ec523c0671f5560d51750996be31d3a which is
1c109fabbd51863475cd12ac206bdd249aee35af upstream.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
---
 arch/x86/include/asm/uaccess.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 01635e4e187a..5838fa911aa0 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -383,11 +383,7 @@ do {									\
 #define __get_user_asm_ex(x, addr, itype, rtype, ltype)			\
 	asm volatile("1:	mov"itype" %1,%"rtype"0\n"		\
 		     "2:\n"						\
-		     ".section .fixup,\"ax\"\n"				\
-                     "3:xor"itype" %"rtype"0,%"rtype"0\n"		\
-		     "  jmp 2b\n"					\
-		     ".previous\n"					\
-		     _ASM_EXTABLE_EX(1b, 3b)				\
+		     _ASM_EXTABLE_EX(1b, 2b)				\
 		     : ltype(x) : "m" (__m(addr)))
 
 #define __put_user_nocheck(x, ptr, size)			\
-- 
2.10.2

[toc] | [next] | [standalone]


#1516344

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-11-07 18:10 +0100
Message-ID<sAVAK-62m-31@gated-at.bofh.it>
In reply to#1516193

[Multipart message — attachments visible in raw view] — view raw

So a patch something like this might be a safe way to fix the
potential infoleak in older kernels.

THIS IS UNTESTED. It's a very obvious patch, though, so if it compiles
it probably works. It just initializes the output variable with 0 in
the inline asm description, instead of doing it in the exception
handler.

It will generate slightly worse code (a few unnecessary ALU
operations), but it doesn't have any interactions with the exception
handler implementation.

                  Linus

[toc] | [prev] | [next] | [standalone]


#1517056

FromGreg KH <greg@kroah.com>
Date2016-11-08 11:40 +0100
Message-ID<sBbYR-8bd-3@gated-at.bofh.it>
In reply to#1516344
On Mon, Nov 07, 2016 at 08:45:59AM -0800, Linus Torvalds wrote:
> So a patch something like this might be a safe way to fix the
> potential infoleak in older kernels.
> 
> THIS IS UNTESTED. It's a very obvious patch, though, so if it compiles
> it probably works. It just initializes the output variable with 0 in
> the inline asm description, instead of doing it in the exception
> handler.
> 
> It will generate slightly worse code (a few unnecessary ALU
> operations), but it doesn't have any interactions with the exception
> handler implementation.

It builds here, so I've queued it up for 4.4-stable, let's see if
the auto-builders have any problems with it.  Thanks for the patch.

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web