Fix vDSO initialization on arm and mips

Message ID mvmftklexbf.fsf_-_@suse.de
State Committed
Commit eb502f72cda31fc9ebe37689491a0fdac93f67c8
Headers

Commit Message

Andreas Schwab Sept. 24, 2019, 11:41 a.m. UTC
  * sysdeps/unix/sysv/linux/arm/sysdep.h
	(HAVE_CLOCK_GETTIME_VSYSCALL): Define to "__vdso_clock_gettime",
	not "__vdso_gettimeofday".
	(HAVE_GETTIMEOFDAY_VSYSCALL): Define to "__vdso_gettimeofday", not
	"__vdso_clock_gettime".
	* sysdeps/unix/sysv/linux/mips/sysdep.h
	(HAVE_CLOCK_GETTIME_VSYSCALL): Define to "__vdso_clock_gettime",
	not "__vdso_gettimeofday".
	(HAVE_GETTIMEOFDAY_VSYSCALL): Define to "__vdso_gettimeofday", not
	"__vdso_clock_gettime".
  

Comments

Florian Weimer Sept. 24, 2019, 11:51 a.m. UTC | #1
* Andreas Schwab:

> 	* sysdeps/unix/sysv/linux/arm/sysdep.h
> 	(HAVE_CLOCK_GETTIME_VSYSCALL): Define to "__vdso_clock_gettime",
> 	not "__vdso_gettimeofday".
> 	(HAVE_GETTIMEOFDAY_VSYSCALL): Define to "__vdso_gettimeofday", not
> 	"__vdso_clock_gettime".
> 	* sysdeps/unix/sysv/linux/mips/sysdep.h
> 	(HAVE_CLOCK_GETTIME_VSYSCALL): Define to "__vdso_clock_gettime",
> 	not "__vdso_gettimeofday".
> 	(HAVE_GETTIMEOFDAY_VSYSCALL): Define to "__vdso_gettimeofday", not
> 	"__vdso_clock_gettime".

It would be nice if you could note in the commit message the commit
that is fixed by this change.
  
Adhemerval Zanella Sept. 24, 2019, 2:08 p.m. UTC | #2
Thanks to check on this and sorry for the trouble.

> Il giorno 24 set 2019, alle ore 04:41, Andreas Schwab <schwab@suse.de> ha scritto:
> 
>    * sysdeps/unix/sysv/linux/arm/sysdep.h
>    (HAVE_CLOCK_GETTIME_VSYSCALL): Define to "__vdso_clock_gettime",
>    not "__vdso_gettimeofday".
>    (HAVE_GETTIMEOFDAY_VSYSCALL): Define to "__vdso_gettimeofday", not
>    "__vdso_clock_gettime".
>    * sysdeps/unix/sysv/linux/mips/sysdep.h
>    (HAVE_CLOCK_GETTIME_VSYSCALL): Define to "__vdso_clock_gettime",
>    not "__vdso_gettimeofday".
>    (HAVE_GETTIMEOFDAY_VSYSCALL): Define to "__vdso_gettimeofday", not
>    "__vdso_clock_gettime".
> 
> diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
> index f9cc9335f5..e9e022e037 100644
> --- a/sysdeps/unix/sysv/linux/arm/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
> @@ -392,8 +392,8 @@ __local_syscall_error:                        \
> #define VDSO_HASH  61765110
> 
> /* List of system calls which are supported as vsyscalls.  */
> -#define HAVE_CLOCK_GETTIME_VSYSCALL    "__vdso_gettimeofday"
> -#define HAVE_GETTIMEOFDAY_VSYSCALL    "__vdso_clock_gettime"
> +#define HAVE_CLOCK_GETTIME_VSYSCALL    "__vdso_clock_gettime"
> +#define HAVE_GETTIMEOFDAY_VSYSCALL    "__vdso_gettimeofday"
> 
> #define LOAD_ARGS_0()
> #define ASM_ARGS_0
> diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h
> index b2045fcc55..82a3cf9f3d 100644
> --- a/sysdeps/unix/sysv/linux/mips/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/mips/sysdep.h
> @@ -20,8 +20,8 @@
> #define VDSO_HASH  61765110
> 
> /* List of system calls which are supported as vsyscalls.  */
> -#define HAVE_CLOCK_GETTIME_VSYSCALL     "__vdso_gettimeofday"
> -#define HAVE_GETTIMEOFDAY_VSYSCALL      "__vdso_clock_gettime"
> +#define HAVE_CLOCK_GETTIME_VSYSCALL     "__vdso_clock_gettime"
> +#define HAVE_GETTIMEOFDAY_VSYSCALL      "__vdso_gettimeofday"
> 
> #ifndef __ASSEMBLER__
> 
> -- 
> 2.23.0
> 
> -- 
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
  

Patch

diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index f9cc9335f5..e9e022e037 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -392,8 +392,8 @@  __local_syscall_error:						\
 #define VDSO_HASH  61765110
 
 /* List of system calls which are supported as vsyscalls.  */
-#define HAVE_CLOCK_GETTIME_VSYSCALL	"__vdso_gettimeofday"
-#define HAVE_GETTIMEOFDAY_VSYSCALL	"__vdso_clock_gettime"
+#define HAVE_CLOCK_GETTIME_VSYSCALL	"__vdso_clock_gettime"
+#define HAVE_GETTIMEOFDAY_VSYSCALL	"__vdso_gettimeofday"
 
 #define LOAD_ARGS_0()
 #define ASM_ARGS_0
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h
index b2045fcc55..82a3cf9f3d 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.h
@@ -20,8 +20,8 @@ 
 #define VDSO_HASH  61765110
 
 /* List of system calls which are supported as vsyscalls.  */
-#define HAVE_CLOCK_GETTIME_VSYSCALL     "__vdso_gettimeofday"
-#define HAVE_GETTIMEOFDAY_VSYSCALL      "__vdso_clock_gettime"
+#define HAVE_CLOCK_GETTIME_VSYSCALL     "__vdso_clock_gettime"
+#define HAVE_GETTIMEOFDAY_VSYSCALL      "__vdso_gettimeofday"
 
 #ifndef __ASSEMBLER__