mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Whitehead <tedheadster@gmail.com>
To: Andy Lutomirski <luto@kernel.org>,
	Ben Hutchings <ben.hutchings@codethink.co.uk>,
	linux-kernel@vger.kernel.org
Cc: Matthew Whitehead <tedheadster@gmail.com>
Subject: [PATCH 3.16] Backport of x86/vdso: Fix vDSO syscall fallback asm constraint regression
Date: Sat, 19 Jan 2019 07:40:24 -0500	[thread overview]
Message-ID: <1547901624-10766-1-git-send-email-tedheadster@gmail.com> (raw)

On Fri, Jan 18, 2019 at 9:07 PM tedheadster <tedheadster@gmail.com> wrote:
>
> I do not see this problem with the upstream kernel, so 3.16 probably
> needs a missing upstream patch.

This was indeed fixed by Andy Lutomirski's follow-up patch "x86/vdso: Fix vDSO syscall fallback asm constraint regression". I tested part of Andy's patch and it resolved the failure.

The 3.16 LTS kernel does not have the tools/testing/selftests/x86/test_vdso.c code, so a partial patch is indicated, unless Andy wants to provide that.

Kindly backport to 3.16 LTS series.

reported-by: Matthew Whitehead <tedheadster@gmail.com>
tested-by: Matthew Whitehead <tedheadster@gmail.com>
---
 arch/x86/vdso/vclock_gettime.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index 00b5ea4..a3d5326 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -147,11 +147,11 @@ notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)
 
 	asm (
 		"mov %%ebx, %%edx \n"
-		"mov %2, %%ebx \n"
+		"mov %[clock], %%ebx \n"
 		"call __kernel_vsyscall \n"
 		"mov %%edx, %%ebx \n"
 		: "=a" (ret), "=m" (*ts)
-		: "0" (__NR_clock_gettime), "g" (clock), "c" (ts)
+		: "0" (__NR_clock_gettime), [clock] "g" (clock), "c" (ts)
 		: "memory", "edx");
 	return ret;
 }
@@ -162,11 +162,11 @@ notrace static long vdso_fallback_gtod(struct timeval *tv, struct timezone *tz)
 
 	asm (
 		"mov %%ebx, %%edx \n"
-		"mov %2, %%ebx \n"
+		"mov %[tv], %%ebx \n"
 		"call __kernel_vsyscall \n"
 		"mov %%edx, %%ebx \n"
 		: "=a" (ret), "=m" (*tv), "=m" (*tz)
-		: "0" (__NR_gettimeofday), "g" (tv), "c" (tz)
+		: "0" (__NR_gettimeofday), [tv] "g" (tv), "c" (tz)
 		: "memory", "edx");
 	return ret;
 }
-- 
1.8.3.1


             reply	other threads:[~2019-01-19 12:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19 12:40 Matthew Whitehead [this message]
2019-01-29 18:06 ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1547901624-10766-1-git-send-email-tedheadster@gmail.com \
    --to=tedheadster@gmail.com \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®