lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1547901624-10766-1-git-send-email-tedheadster@gmail.com>
Date:   Sat, 19 Jan 2019 07:40:24 -0500
From:   Matthew Whitehead <tedheadster@...il.com>
To:     Andy Lutomirski <luto@...nel.org>,
        Ben Hutchings <ben.hutchings@...ethink.co.uk>,
        linux-kernel@...r.kernel.org
Cc:     Matthew Whitehead <tedheadster@...il.com>
Subject: [PATCH 3.16] Backport of x86/vdso: Fix vDSO syscall fallback asm constraint regression

On Fri, Jan 18, 2019 at 9:07 PM tedheadster <tedheadster@...il.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@...il.com>
tested-by: Matthew Whitehead <tedheadster@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ