stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ARC: uaccess: dont use "l" gcc inline asm constraint modifier" has been added to the 4.9-stable tree
@ 2018-01-07  8:38 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-01-07  8:38 UTC (permalink / raw)
  To: vgupta, gregkh; +Cc: stable, stable-commits


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

    ARC: uaccess: dont use "l" gcc inline asm constraint modifier

to the 4.9-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:
     arc-uaccess-dont-use-l-gcc-inline-asm-constraint-modifier.patch
and it can be found in the queue-4.9 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 79435ac78d160e4c245544d457850a56f805ac0d Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@synopsys.com>
Date: Fri, 8 Dec 2017 08:26:58 -0800
Subject: ARC: uaccess: dont use "l" gcc inline asm constraint modifier

From: Vineet Gupta <vgupta@synopsys.com>

commit 79435ac78d160e4c245544d457850a56f805ac0d upstream.

This used to setup the LP_COUNT register automatically, but now has been
removed.

There was an earlier fix 3c7c7a2fc8811 which fixed instance in delay.h but
somehow missed this one as gcc change had not made its way into
production toolchains and was not pedantic as it is now !

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arc/include/asm/uaccess.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/arch/arc/include/asm/uaccess.h
+++ b/arch/arc/include/asm/uaccess.h
@@ -673,6 +673,7 @@ __arc_strncpy_from_user(char *dst, const
 		return 0;
 
 	__asm__ __volatile__(
+	"	mov	lp_count, %5		\n"
 	"	lp	3f			\n"
 	"1:	ldb.ab  %3, [%2, 1]		\n"
 	"	breq.d	%3, 0, 3f               \n"
@@ -689,8 +690,8 @@ __arc_strncpy_from_user(char *dst, const
 	"	.word   1b, 4b			\n"
 	"	.previous			\n"
 	: "+r"(res), "+r"(dst), "+r"(src), "=r"(val)
-	: "g"(-EFAULT), "l"(count)
-	: "memory");
+	: "g"(-EFAULT), "r"(count)
+	: "lp_count", "lp_start", "lp_end", "memory");
 
 	return res;
 }


Patches currently in stable-queue which might be from vgupta@synopsys.com are

queue-4.9/arc-uaccess-dont-use-l-gcc-inline-asm-constraint-modifier.patch

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

only message in thread, other threads:[~2018-01-07  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-07  8:38 Patch "ARC: uaccess: dont use "l" gcc inline asm constraint modifier" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).