All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] vdso: Complete the conversion to 32bit syscalls
@ 2019-08-30 13:58 ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

This patch series is a follow up to "lib/vdso, x86/vdso: Fix fallout
from generic VDSO conversion" [1].

The main purpose is to complete the 32bit vDSOs conversion to use the
legacy 32bit syscalls as a fallback. With the conversion of all the
architectures present in -next complete, this patch series removes as
well the conditional choice in between 32 and 64 bit for 32bit vDSOs.

This series has been rebased on linux-next/master.

[1] https://lkml.org/lkml/2019/7/28/86

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Vincenzo Frascino (8):
  arm64: compat: vdso: Expose BUILD_VDSO32
  lib: vdso: Build 32 bit specific functions in the right context
  mips: compat: vdso: Use legacy syscalls as fallback
  lib: vdso: Remove VDSO_HAS_32BIT_FALLBACK
  lib: vdso: Remove checks on return value for 32 bit vDSO
  arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  x86: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

 .../include/asm/vdso/compat_gettimeofday.h    |  2 +-
 arch/mips/include/asm/vdso/gettimeofday.h     | 43 +++++++++++++++++++
 arch/mips/vdso/config-n32-o32-env.c           |  1 +
 arch/x86/include/asm/vdso/gettimeofday.h      |  2 -
 lib/vdso/gettimeofday.c                       | 30 ++++++-------
 5 files changed, 57 insertions(+), 21 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v2 0/8] vdso: Complete the conversion to 32bit syscalls
@ 2019-08-30 13:58 ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

This patch series is a follow up to "lib/vdso, x86/vdso: Fix fallout
from generic VDSO conversion" [1].

The main purpose is to complete the 32bit vDSOs conversion to use the
legacy 32bit syscalls as a fallback. With the conversion of all the
architectures present in -next complete, this patch series removes as
well the conditional choice in between 32 and 64 bit for 32bit vDSOs.

This series has been rebased on linux-next/master.

[1] https://lkml.org/lkml/2019/7/28/86

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Vincenzo Frascino (8):
  arm64: compat: vdso: Expose BUILD_VDSO32
  lib: vdso: Build 32 bit specific functions in the right context
  mips: compat: vdso: Use legacy syscalls as fallback
  lib: vdso: Remove VDSO_HAS_32BIT_FALLBACK
  lib: vdso: Remove checks on return value for 32 bit vDSO
  arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  x86: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

 .../include/asm/vdso/compat_gettimeofday.h    |  2 +-
 arch/mips/include/asm/vdso/gettimeofday.h     | 43 +++++++++++++++++++
 arch/mips/vdso/config-n32-o32-env.c           |  1 +
 arch/x86/include/asm/vdso/gettimeofday.h      |  2 -
 lib/vdso/gettimeofday.c                       | 30 ++++++-------
 5 files changed, 57 insertions(+), 21 deletions(-)

-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v2 1/8] arm64: compat: vdso: Expose BUILD_VDSO32
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:58   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

clock_gettime32 and clock_getres_time32 should be compiled only with the
32 bit vdso library.

Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
indication to the generic library to include these symbols.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index c50ee1b7d5cd..fe7afe0f1a3d 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -17,6 +17,7 @@
 #define VDSO_HAS_CLOCK_GETRES		1
 
 #define VDSO_HAS_32BIT_FALLBACK		1
+#define BUILD_VDSO32			1
 
 static __always_inline
 int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 1/8] arm64: compat: vdso: Expose BUILD_VDSO32
@ 2019-08-30 13:58   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

clock_gettime32 and clock_getres_time32 should be compiled only with the
32 bit vdso library.

Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
indication to the generic library to include these symbols.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index c50ee1b7d5cd..fe7afe0f1a3d 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -17,6 +17,7 @@
 #define VDSO_HAS_CLOCK_GETRES		1
 
 #define VDSO_HAS_32BIT_FALLBACK		1
+#define BUILD_VDSO32			1
 
 static __always_inline
 int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:58   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

clock_gettime32 and clock_getres_time32 should be compiled only with a
32 bit vdso library.

Exclude these symbols when BUILD_VDSO32 is not defined.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
---
 lib/vdso/gettimeofday.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index e630e7ff57f1..a86e89e6dedc 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -117,6 +117,7 @@ __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -139,6 +140,7 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 
 static __maybe_unused int
 __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
@@ -229,6 +231,7 @@ int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -251,4 +254,5 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 #endif /* VDSO_HAS_CLOCK_GETRES */
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
@ 2019-08-30 13:58   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

clock_gettime32 and clock_getres_time32 should be compiled only with a
32 bit vdso library.

Exclude these symbols when BUILD_VDSO32 is not defined.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
---
 lib/vdso/gettimeofday.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index e630e7ff57f1..a86e89e6dedc 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -117,6 +117,7 @@ __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -139,6 +140,7 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 
 static __maybe_unused int
 __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
@@ -229,6 +231,7 @@ int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -251,4 +254,5 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 #endif /* VDSO_HAS_CLOCK_GETRES */
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:58   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
seccomp setups because these syscalls might be not (yet) allowed.

Implement the 32bit variants which use the legacy syscalls and select the
variant in the core library.

The 64bit time variants are not removed because they are required for the
time64 based vdso accessors.

Cc: Paul Burton <paul.burton@mips.com>
Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
 arch/mips/vdso/config-n32-o32-env.c       |  1 +
 2 files changed, 46 insertions(+)

diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
index c59fe08b0347..e78462e8ca2e 100644
--- a/arch/mips/include/asm/vdso/gettimeofday.h
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
@@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
 	return error ? -ret : ret;
 }
 
+#if _MIPS_SIM != _MIPS_SIM_ABI64
+
+#define VDSO_HAS_32BIT_FALLBACK	1
+
+static __always_inline long clock_gettime32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("a1") = _ts;
+	register clockid_t clkid asm("a0") = _clkid;
+	register long ret asm("v0");
+	register long nr asm("v0") = __NR_clock_gettime;
+	register long error asm("a3");
+
+	asm volatile(
+	"       syscall\n"
+	: "=r" (ret), "=r" (error)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
+	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
+
+	return error ? -ret : ret;
+}
+
+static __always_inline int clock_getres32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("a1") = _ts;
+	register clockid_t clkid asm("a0") = _clkid;
+	register long ret asm("v0");
+	register long nr asm("v0") = __NR_clock_getres;
+	register long error asm("a3");
+
+	asm volatile(
+	"       syscall\n"
+	: "=r" (ret), "=r" (error)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
+	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
+
+	return error ? -ret : ret;
+}
+#endif
+
 #ifdef CONFIG_CSRC_R4K
 
 static __always_inline u64 read_r4k_count(void)
diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
index 7f8d957abd4a..0011a632aef2 100644
--- a/arch/mips/vdso/config-n32-o32-env.c
+++ b/arch/mips/vdso/config-n32-o32-env.c
@@ -10,6 +10,7 @@
  */
 #undef CONFIG_64BIT
 
+#define BUILD_VDSO32
 #define CONFIG_32BIT 1
 #define CONFIG_GENERIC_ATOMIC64 1
 #define BUILD_VDSO32_64
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
@ 2019-08-30 13:58   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
seccomp setups because these syscalls might be not (yet) allowed.

Implement the 32bit variants which use the legacy syscalls and select the
variant in the core library.

The 64bit time variants are not removed because they are required for the
time64 based vdso accessors.

Cc: Paul Burton <paul.burton@mips.com>
Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
 arch/mips/vdso/config-n32-o32-env.c       |  1 +
 2 files changed, 46 insertions(+)

diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
index c59fe08b0347..e78462e8ca2e 100644
--- a/arch/mips/include/asm/vdso/gettimeofday.h
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
@@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
 	return error ? -ret : ret;
 }
 
+#if _MIPS_SIM != _MIPS_SIM_ABI64
+
+#define VDSO_HAS_32BIT_FALLBACK	1
+
+static __always_inline long clock_gettime32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("a1") = _ts;
+	register clockid_t clkid asm("a0") = _clkid;
+	register long ret asm("v0");
+	register long nr asm("v0") = __NR_clock_gettime;
+	register long error asm("a3");
+
+	asm volatile(
+	"       syscall\n"
+	: "=r" (ret), "=r" (error)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
+	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
+
+	return error ? -ret : ret;
+}
+
+static __always_inline int clock_getres32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("a1") = _ts;
+	register clockid_t clkid asm("a0") = _clkid;
+	register long ret asm("v0");
+	register long nr asm("v0") = __NR_clock_getres;
+	register long error asm("a3");
+
+	asm volatile(
+	"       syscall\n"
+	: "=r" (ret), "=r" (error)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
+	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
+
+	return error ? -ret : ret;
+}
+#endif
+
 #ifdef CONFIG_CSRC_R4K
 
 static __always_inline u64 read_r4k_count(void)
diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
index 7f8d957abd4a..0011a632aef2 100644
--- a/arch/mips/vdso/config-n32-o32-env.c
+++ b/arch/mips/vdso/config-n32-o32-env.c
@@ -10,6 +10,7 @@
  */
 #undef CONFIG_64BIT
 
+#define BUILD_VDSO32
 #define CONFIG_32BIT 1
 #define CONFIG_GENERIC_ATOMIC64 1
 #define BUILD_VDSO32_64
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 4/8] lib: vdso: Remove VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:58   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

VDSO_HAS_32BIT_FALLBACK was introduced to address a regression which
caused seccomp to deny access to the applications to clock_gettime64()
and clock_getres64() because they are not enabled in the existing
filters.

The purpose of VDSO_HAS_32BIT_FALLBACK was to simplify the conditional
implementation of __cvdso_clock_get*time32() variants.

Now that all the architectures that support the generic vDSO library
have been converted to support the 32 bit fallbacks the conditional
can be removed.

Cc: Thomas Gleixner <tglx@linutronix.de>
CC: Andy Lutomirski <luto@kernel.org>
References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 lib/vdso/gettimeofday.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index a86e89e6dedc..2c4b311c226d 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -126,13 +126,8 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_gettime_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_gettime_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret)) {
 		res->tv_sec = ts.tv_sec;
@@ -240,13 +235,8 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_getres_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_getres_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret)) {
 		res->tv_sec = ts.tv_sec;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 4/8] lib: vdso: Remove VDSO_HAS_32BIT_FALLBACK
@ 2019-08-30 13:58   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

VDSO_HAS_32BIT_FALLBACK was introduced to address a regression which
caused seccomp to deny access to the applications to clock_gettime64()
and clock_getres64() because they are not enabled in the existing
filters.

The purpose of VDSO_HAS_32BIT_FALLBACK was to simplify the conditional
implementation of __cvdso_clock_get*time32() variants.

Now that all the architectures that support the generic vDSO library
have been converted to support the 32 bit fallbacks the conditional
can be removed.

Cc: Thomas Gleixner <tglx@linutronix.de>
CC: Andy Lutomirski <luto@kernel.org>
References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 lib/vdso/gettimeofday.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index a86e89e6dedc..2c4b311c226d 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -126,13 +126,8 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_gettime_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_gettime_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret)) {
 		res->tv_sec = ts.tv_sec;
@@ -240,13 +235,8 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_getres_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_getres_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret)) {
 		res->tv_sec = ts.tv_sec;
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 5/8] lib: vdso: Remove checks on return value for 32 bit vDSO
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:58   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

Since all the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks it is not required
anymore to check the return value of __cvdso_clock_get*time32_common()
before updating the old_timespec fields.

Remove the related checks from the generic vdso library.

Cc: Thomas Gleixner <tglx@linutronix.de>
CC: Andy Lutomirski <luto@kernel.org>
References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 lib/vdso/gettimeofday.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 2c4b311c226d..d5bc16748f81 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -129,10 +129,10 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
 
-	if (likely(!ret)) {
-		res->tv_sec = ts.tv_sec;
-		res->tv_nsec = ts.tv_nsec;
-	}
+	/* For ret == 0 */
+	res->tv_sec = ts.tv_sec;
+	res->tv_nsec = ts.tv_nsec;
+
 	return ret;
 }
 #endif /* BUILD_VDSO32 */
@@ -238,10 +238,10 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
 
-	if (likely(!ret)) {
-		res->tv_sec = ts.tv_sec;
-		res->tv_nsec = ts.tv_nsec;
-	}
+	/* For ret == 0 */
+	res->tv_sec = ts.tv_sec;
+	res->tv_nsec = ts.tv_nsec;
+
 	return ret;
 }
 #endif /* BUILD_VDSO32 */
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 5/8] lib: vdso: Remove checks on return value for 32 bit vDSO
@ 2019-08-30 13:58   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:58 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

Since all the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks it is not required
anymore to check the return value of __cvdso_clock_get*time32_common()
before updating the old_timespec fields.

Remove the related checks from the generic vdso library.

Cc: Thomas Gleixner <tglx@linutronix.de>
CC: Andy Lutomirski <luto@kernel.org>
References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 lib/vdso/gettimeofday.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 2c4b311c226d..d5bc16748f81 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -129,10 +129,10 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
 
-	if (likely(!ret)) {
-		res->tv_sec = ts.tv_sec;
-		res->tv_nsec = ts.tv_nsec;
-	}
+	/* For ret == 0 */
+	res->tv_sec = ts.tv_sec;
+	res->tv_nsec = ts.tv_nsec;
+
 	return ret;
 }
 #endif /* BUILD_VDSO32 */
@@ -238,10 +238,10 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
 
-	if (likely(!ret)) {
-		res->tv_sec = ts.tv_sec;
-		res->tv_nsec = ts.tv_nsec;
-	}
+	/* For ret == 0 */
+	res->tv_sec = ts.tv_sec;
+	res->tv_nsec = ts.tv_nsec;
+
 	return ret;
 }
 #endif /* BUILD_VDSO32 */
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 6/8] arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:59   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:59 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from arm64 compat vdso.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index fe7afe0f1a3d..537b1e695365 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -16,7 +16,6 @@
 
 #define VDSO_HAS_CLOCK_GETRES		1
 
-#define VDSO_HAS_32BIT_FALLBACK		1
 #define BUILD_VDSO32			1
 
 static __always_inline
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 6/8] arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-08-30 13:59   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:59 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from arm64 compat vdso.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index fe7afe0f1a3d..537b1e695365 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -16,7 +16,6 @@
 
 #define VDSO_HAS_CLOCK_GETRES		1
 
-#define VDSO_HAS_32BIT_FALLBACK		1
 #define BUILD_VDSO32			1
 
 static __always_inline
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:59   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:59 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.

Cc: Paul Burton <paul.burton@mips.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/mips/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
index e78462e8ca2e..5ad2b086626d 100644
--- a/arch/mips/include/asm/vdso/gettimeofday.h
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
@@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
 
 #if _MIPS_SIM != _MIPS_SIM_ABI64
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline long clock_gettime32_fallback(
 					clockid_t _clkid,
 					struct old_timespec32 *_ts)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-08-30 13:59   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:59 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.

Cc: Paul Burton <paul.burton@mips.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/mips/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
index e78462e8ca2e..5ad2b086626d 100644
--- a/arch/mips/include/asm/vdso/gettimeofday.h
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
@@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
 
 #if _MIPS_SIM != _MIPS_SIM_ABI64
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline long clock_gettime32_fallback(
 					clockid_t _clkid,
 					struct old_timespec32 *_ts)
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 8/8] x86: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:58 ` Vincenzo Frascino
@ 2019-08-30 13:59   ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:59 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, tglx, salyzyn, 0x7f454c46, luto

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from x86 vdso.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/x86/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/include/asm/vdso/gettimeofday.h b/arch/x86/include/asm/vdso/gettimeofday.h
index ba71a63cdac4..6aa8e3eda31d 100644
--- a/arch/x86/include/asm/vdso/gettimeofday.h
+++ b/arch/x86/include/asm/vdso/gettimeofday.h
@@ -96,8 +96,6 @@ long clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 
 #else
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline
 long clock_gettime_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v2 8/8] x86: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-08-30 13:59   ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 13:59 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from x86 vdso.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 arch/x86/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/include/asm/vdso/gettimeofday.h b/arch/x86/include/asm/vdso/gettimeofday.h
index ba71a63cdac4..6aa8e3eda31d 100644
--- a/arch/x86/include/asm/vdso/gettimeofday.h
+++ b/arch/x86/include/asm/vdso/gettimeofday.h
@@ -96,8 +96,6 @@ long clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 
 #else
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline
 long clock_gettime_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 {
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 5/8] lib: vdso: Remove checks on return value for 32 bit vDSO
  2019-08-30 13:58   ` Vincenzo Frascino
@ 2019-08-30 14:16     ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 14:16 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

On 30/08/2019 14:58, Vincenzo Frascino wrote:
> Since all the architectures that support the generic vDSO library have
> been converted to support the 32 bit fallbacks it is not required
> anymore to check the return value of __cvdso_clock_get*time32_common()
> before updating the old_timespec fields.
> 
> Remove the related checks from the generic vdso library.
> 
> Cc: Thomas Gleixner <tglx@linutronix.de>
> CC: Andy Lutomirski <luto@kernel.org>

Forgot to add to this patch:

Suggested-by: Andy Lutomirski <luto@kernel.org>

> References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
>  lib/vdso/gettimeofday.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
> index 2c4b311c226d..d5bc16748f81 100644
> --- a/lib/vdso/gettimeofday.c
> +++ b/lib/vdso/gettimeofday.c
> @@ -129,10 +129,10 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
>  	if (unlikely(ret))
>  		return clock_gettime32_fallback(clock, res);
>  
> -	if (likely(!ret)) {
> -		res->tv_sec = ts.tv_sec;
> -		res->tv_nsec = ts.tv_nsec;
> -	}
> +	/* For ret == 0 */
> +	res->tv_sec = ts.tv_sec;
> +	res->tv_nsec = ts.tv_nsec;
> +
>  	return ret;
>  }
>  #endif /* BUILD_VDSO32 */
> @@ -238,10 +238,10 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
>  	if (unlikely(ret))
>  		return clock_getres32_fallback(clock, res);
>  
> -	if (likely(!ret)) {
> -		res->tv_sec = ts.tv_sec;
> -		res->tv_nsec = ts.tv_nsec;
> -	}
> +	/* For ret == 0 */
> +	res->tv_sec = ts.tv_sec;
> +	res->tv_nsec = ts.tv_nsec;
> +
>  	return ret;
>  }
>  #endif /* BUILD_VDSO32 */
> 

-- 
Regards,
Vincenzo

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 5/8] lib: vdso: Remove checks on return value for 32 bit vDSO
@ 2019-08-30 14:16     ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-08-30 14:16 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

On 30/08/2019 14:58, Vincenzo Frascino wrote:
> Since all the architectures that support the generic vDSO library have
> been converted to support the 32 bit fallbacks it is not required
> anymore to check the return value of __cvdso_clock_get*time32_common()
> before updating the old_timespec fields.
> 
> Remove the related checks from the generic vdso library.
> 
> Cc: Thomas Gleixner <tglx@linutronix.de>
> CC: Andy Lutomirski <luto@kernel.org>

Forgot to add to this patch:

Suggested-by: Andy Lutomirski <luto@kernel.org>

> References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
>  lib/vdso/gettimeofday.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
> index 2c4b311c226d..d5bc16748f81 100644
> --- a/lib/vdso/gettimeofday.c
> +++ b/lib/vdso/gettimeofday.c
> @@ -129,10 +129,10 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
>  	if (unlikely(ret))
>  		return clock_gettime32_fallback(clock, res);
>  
> -	if (likely(!ret)) {
> -		res->tv_sec = ts.tv_sec;
> -		res->tv_nsec = ts.tv_nsec;
> -	}
> +	/* For ret == 0 */
> +	res->tv_sec = ts.tv_sec;
> +	res->tv_nsec = ts.tv_nsec;
> +
>  	return ret;
>  }
>  #endif /* BUILD_VDSO32 */
> @@ -238,10 +238,10 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
>  	if (unlikely(ret))
>  		return clock_getres32_fallback(clock, res);
>  
> -	if (likely(!ret)) {
> -		res->tv_sec = ts.tv_sec;
> -		res->tv_nsec = ts.tv_nsec;
> -	}
> +	/* For ret == 0 */
> +	res->tv_sec = ts.tv_sec;
> +	res->tv_nsec = ts.tv_nsec;
> +
>  	return ret;
>  }
>  #endif /* BUILD_VDSO32 */
> 

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
  2019-08-30 13:58   ` Vincenzo Frascino
  (?)
@ 2019-09-03 13:52     ` Paul Burton
  -1 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 13:52 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Vincenzo,

On Fri, Aug 30, 2019 at 02:58:57PM +0100, Vincenzo Frascino wrote:
> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
> seccomp setups because these syscalls might be not (yet) allowed.
> 
> Implement the 32bit variants which use the legacy syscalls and select the
> variant in the core library.
> 
> The 64bit time variants are not removed because they are required for the
> time64 based vdso accessors.
> 
> Cc: Paul Burton <paul.burton@mips.com>
> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

How would you like this to be applied? I'd be happy to apply this one to
mips-next, where commit 24640f233b46 ("mips: Add support for generic
vDSO") added the file being modified here. Otherwise:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
>  arch/mips/vdso/config-n32-o32-env.c       |  1 +
>  2 files changed, 46 insertions(+)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index c59fe08b0347..e78462e8ca2e 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
>  	return error ? -ret : ret;
>  }
>  
> +#if _MIPS_SIM != _MIPS_SIM_ABI64
> +
> +#define VDSO_HAS_32BIT_FALLBACK	1
> +
> +static __always_inline long clock_gettime32_fallback(
> +					clockid_t _clkid,
> +					struct old_timespec32 *_ts)
> +{
> +	register struct old_timespec32 *ts asm("a1") = _ts;
> +	register clockid_t clkid asm("a0") = _clkid;
> +	register long ret asm("v0");
> +	register long nr asm("v0") = __NR_clock_gettime;
> +	register long error asm("a3");
> +
> +	asm volatile(
> +	"       syscall\n"
> +	: "=r" (ret), "=r" (error)
> +	: "r" (clkid), "r" (ts), "r" (nr)
> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
> +
> +	return error ? -ret : ret;
> +}
> +
> +static __always_inline int clock_getres32_fallback(
> +					clockid_t _clkid,
> +					struct old_timespec32 *_ts)
> +{
> +	register struct old_timespec32 *ts asm("a1") = _ts;
> +	register clockid_t clkid asm("a0") = _clkid;
> +	register long ret asm("v0");
> +	register long nr asm("v0") = __NR_clock_getres;
> +	register long error asm("a3");
> +
> +	asm volatile(
> +	"       syscall\n"
> +	: "=r" (ret), "=r" (error)
> +	: "r" (clkid), "r" (ts), "r" (nr)
> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
> +
> +	return error ? -ret : ret;
> +}
> +#endif
> +
>  #ifdef CONFIG_CSRC_R4K
>  
>  static __always_inline u64 read_r4k_count(void)
> diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
> index 7f8d957abd4a..0011a632aef2 100644
> --- a/arch/mips/vdso/config-n32-o32-env.c
> +++ b/arch/mips/vdso/config-n32-o32-env.c
> @@ -10,6 +10,7 @@
>   */
>  #undef CONFIG_64BIT
>  
> +#define BUILD_VDSO32
>  #define CONFIG_32BIT 1
>  #define CONFIG_GENERIC_ATOMIC64 1
>  #define BUILD_VDSO32_64
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
@ 2019-09-03 13:52     ` Paul Burton
  0 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 13:52 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Vincenzo,

On Fri, Aug 30, 2019 at 02:58:57PM +0100, Vincenzo Frascino wrote:
> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
> seccomp setups because these syscalls might be not (yet) allowed.
> 
> Implement the 32bit variants which use the legacy syscalls and select the
> variant in the core library.
> 
> The 64bit time variants are not removed because they are required for the
> time64 based vdso accessors.
> 
> Cc: Paul Burton <paul.burton@mips.com>
> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

How would you like this to be applied? I'd be happy to apply this one to
mips-next, where commit 24640f233b46 ("mips: Add support for generic
vDSO") added the file being modified here. Otherwise:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
>  arch/mips/vdso/config-n32-o32-env.c       |  1 +
>  2 files changed, 46 insertions(+)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index c59fe08b0347..e78462e8ca2e 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
>  	return error ? -ret : ret;
>  }
>  
> +#if _MIPS_SIM != _MIPS_SIM_ABI64
> +
> +#define VDSO_HAS_32BIT_FALLBACK	1
> +
> +static __always_inline long clock_gettime32_fallback(
> +					clockid_t _clkid,
> +					struct old_timespec32 *_ts)
> +{
> +	register struct old_timespec32 *ts asm("a1") = _ts;
> +	register clockid_t clkid asm("a0") = _clkid;
> +	register long ret asm("v0");
> +	register long nr asm("v0") = __NR_clock_gettime;
> +	register long error asm("a3");
> +
> +	asm volatile(
> +	"       syscall\n"
> +	: "=r" (ret), "=r" (error)
> +	: "r" (clkid), "r" (ts), "r" (nr)
> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
> +
> +	return error ? -ret : ret;
> +}
> +
> +static __always_inline int clock_getres32_fallback(
> +					clockid_t _clkid,
> +					struct old_timespec32 *_ts)
> +{
> +	register struct old_timespec32 *ts asm("a1") = _ts;
> +	register clockid_t clkid asm("a0") = _clkid;
> +	register long ret asm("v0");
> +	register long nr asm("v0") = __NR_clock_getres;
> +	register long error asm("a3");
> +
> +	asm volatile(
> +	"       syscall\n"
> +	: "=r" (ret), "=r" (error)
> +	: "r" (clkid), "r" (ts), "r" (nr)
> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
> +
> +	return error ? -ret : ret;
> +}
> +#endif
> +
>  #ifdef CONFIG_CSRC_R4K
>  
>  static __always_inline u64 read_r4k_count(void)
> diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
> index 7f8d957abd4a..0011a632aef2 100644
> --- a/arch/mips/vdso/config-n32-o32-env.c
> +++ b/arch/mips/vdso/config-n32-o32-env.c
> @@ -10,6 +10,7 @@
>   */
>  #undef CONFIG_64BIT
>  
> +#define BUILD_VDSO32
>  #define CONFIG_32BIT 1
>  #define CONFIG_GENERIC_ATOMIC64 1
>  #define BUILD_VDSO32_64
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
@ 2019-09-03 13:52     ` Paul Burton
  0 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 13:52 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, luto, catalin.marinas, 0x7f454c46, linux-kernel,
	linux-mips, linux-kselftest, tglx, salyzyn, will,
	linux-arm-kernel

Hi Vincenzo,

On Fri, Aug 30, 2019 at 02:58:57PM +0100, Vincenzo Frascino wrote:
> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
> seccomp setups because these syscalls might be not (yet) allowed.
> 
> Implement the 32bit variants which use the legacy syscalls and select the
> variant in the core library.
> 
> The 64bit time variants are not removed because they are required for the
> time64 based vdso accessors.
> 
> Cc: Paul Burton <paul.burton@mips.com>
> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

How would you like this to be applied? I'd be happy to apply this one to
mips-next, where commit 24640f233b46 ("mips: Add support for generic
vDSO") added the file being modified here. Otherwise:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
>  arch/mips/vdso/config-n32-o32-env.c       |  1 +
>  2 files changed, 46 insertions(+)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index c59fe08b0347..e78462e8ca2e 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
>  	return error ? -ret : ret;
>  }
>  
> +#if _MIPS_SIM != _MIPS_SIM_ABI64
> +
> +#define VDSO_HAS_32BIT_FALLBACK	1
> +
> +static __always_inline long clock_gettime32_fallback(
> +					clockid_t _clkid,
> +					struct old_timespec32 *_ts)
> +{
> +	register struct old_timespec32 *ts asm("a1") = _ts;
> +	register clockid_t clkid asm("a0") = _clkid;
> +	register long ret asm("v0");
> +	register long nr asm("v0") = __NR_clock_gettime;
> +	register long error asm("a3");
> +
> +	asm volatile(
> +	"       syscall\n"
> +	: "=r" (ret), "=r" (error)
> +	: "r" (clkid), "r" (ts), "r" (nr)
> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
> +
> +	return error ? -ret : ret;
> +}
> +
> +static __always_inline int clock_getres32_fallback(
> +					clockid_t _clkid,
> +					struct old_timespec32 *_ts)
> +{
> +	register struct old_timespec32 *ts asm("a1") = _ts;
> +	register clockid_t clkid asm("a0") = _clkid;
> +	register long ret asm("v0");
> +	register long nr asm("v0") = __NR_clock_getres;
> +	register long error asm("a3");
> +
> +	asm volatile(
> +	"       syscall\n"
> +	: "=r" (ret), "=r" (error)
> +	: "r" (clkid), "r" (ts), "r" (nr)
> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
> +
> +	return error ? -ret : ret;
> +}
> +#endif
> +
>  #ifdef CONFIG_CSRC_R4K
>  
>  static __always_inline u64 read_r4k_count(void)
> diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
> index 7f8d957abd4a..0011a632aef2 100644
> --- a/arch/mips/vdso/config-n32-o32-env.c
> +++ b/arch/mips/vdso/config-n32-o32-env.c
> @@ -10,6 +10,7 @@
>   */
>  #undef CONFIG_64BIT
>  
> +#define BUILD_VDSO32
>  #define CONFIG_32BIT 1
>  #define CONFIG_GENERIC_ATOMIC64 1
>  #define BUILD_VDSO32_64
> -- 
> 2.23.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
  2019-09-03 13:52     ` Paul Burton
  (?)
@ 2019-09-03 14:20       ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:20 UTC (permalink / raw)
  To: Paul Burton
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Paul,

thank you for your review.

On 9/3/19 2:52 PM, Paul Burton wrote:
> Hi Vincenzo,
> 
> On Fri, Aug 30, 2019 at 02:58:57PM +0100, Vincenzo Frascino wrote:
>> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
>> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
>> seccomp setups because these syscalls might be not (yet) allowed.
>>
>> Implement the 32bit variants which use the legacy syscalls and select the
>> variant in the core library.
>>
>> The 64bit time variants are not removed because they are required for the
>> time64 based vdso accessors.
>>
>> Cc: Paul Burton <paul.burton@mips.com>
>> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> How would you like this to be applied? I'd be happy to apply this one to
> mips-next, where commit 24640f233b46 ("mips: Add support for generic
> vDSO") added the file being modified here. Otherwise:
> 
>     Acked-by: Paul Burton <paul.burton@mips.com>
> 

Please feel free to apply this to mips-next.

Thanks,
Vincenzo

> Thanks,
>     Paul
> 
>> ---
>>  arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
>>  arch/mips/vdso/config-n32-o32-env.c       |  1 +
>>  2 files changed, 46 insertions(+)
>>
>> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
>> index c59fe08b0347..e78462e8ca2e 100644
>> --- a/arch/mips/include/asm/vdso/gettimeofday.h
>> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
>> @@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
>>  	return error ? -ret : ret;
>>  }
>>  
>> +#if _MIPS_SIM != _MIPS_SIM_ABI64
>> +
>> +#define VDSO_HAS_32BIT_FALLBACK	1
>> +
>> +static __always_inline long clock_gettime32_fallback(
>> +					clockid_t _clkid,
>> +					struct old_timespec32 *_ts)
>> +{
>> +	register struct old_timespec32 *ts asm("a1") = _ts;
>> +	register clockid_t clkid asm("a0") = _clkid;
>> +	register long ret asm("v0");
>> +	register long nr asm("v0") = __NR_clock_gettime;
>> +	register long error asm("a3");
>> +
>> +	asm volatile(
>> +	"       syscall\n"
>> +	: "=r" (ret), "=r" (error)
>> +	: "r" (clkid), "r" (ts), "r" (nr)
>> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
>> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
>> +
>> +	return error ? -ret : ret;
>> +}
>> +
>> +static __always_inline int clock_getres32_fallback(
>> +					clockid_t _clkid,
>> +					struct old_timespec32 *_ts)
>> +{
>> +	register struct old_timespec32 *ts asm("a1") = _ts;
>> +	register clockid_t clkid asm("a0") = _clkid;
>> +	register long ret asm("v0");
>> +	register long nr asm("v0") = __NR_clock_getres;
>> +	register long error asm("a3");
>> +
>> +	asm volatile(
>> +	"       syscall\n"
>> +	: "=r" (ret), "=r" (error)
>> +	: "r" (clkid), "r" (ts), "r" (nr)
>> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
>> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
>> +
>> +	return error ? -ret : ret;
>> +}
>> +#endif
>> +
>>  #ifdef CONFIG_CSRC_R4K
>>  
>>  static __always_inline u64 read_r4k_count(void)
>> diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
>> index 7f8d957abd4a..0011a632aef2 100644
>> --- a/arch/mips/vdso/config-n32-o32-env.c
>> +++ b/arch/mips/vdso/config-n32-o32-env.c
>> @@ -10,6 +10,7 @@
>>   */
>>  #undef CONFIG_64BIT
>>  
>> +#define BUILD_VDSO32
>>  #define CONFIG_32BIT 1
>>  #define CONFIG_GENERIC_ATOMIC64 1
>>  #define BUILD_VDSO32_64
>> -- 
>> 2.23.0
>>

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
@ 2019-09-03 14:20       ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:20 UTC (permalink / raw)
  To: Paul Burton
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Paul,

thank you for your review.

On 9/3/19 2:52 PM, Paul Burton wrote:
> Hi Vincenzo,
> 
> On Fri, Aug 30, 2019 at 02:58:57PM +0100, Vincenzo Frascino wrote:
>> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
>> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
>> seccomp setups because these syscalls might be not (yet) allowed.
>>
>> Implement the 32bit variants which use the legacy syscalls and select the
>> variant in the core library.
>>
>> The 64bit time variants are not removed because they are required for the
>> time64 based vdso accessors.
>>
>> Cc: Paul Burton <paul.burton@mips.com>
>> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> How would you like this to be applied? I'd be happy to apply this one to
> mips-next, where commit 24640f233b46 ("mips: Add support for generic
> vDSO") added the file being modified here. Otherwise:
> 
>     Acked-by: Paul Burton <paul.burton@mips.com>
> 

Please feel free to apply this to mips-next.

Thanks,
Vincenzo

> Thanks,
>     Paul
> 
>> ---
>>  arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
>>  arch/mips/vdso/config-n32-o32-env.c       |  1 +
>>  2 files changed, 46 insertions(+)
>>
>> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
>> index c59fe08b0347..e78462e8ca2e 100644
>> --- a/arch/mips/include/asm/vdso/gettimeofday.h
>> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
>> @@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
>>  	return error ? -ret : ret;
>>  }
>>  
>> +#if _MIPS_SIM != _MIPS_SIM_ABI64
>> +
>> +#define VDSO_HAS_32BIT_FALLBACK	1
>> +
>> +static __always_inline long clock_gettime32_fallback(
>> +					clockid_t _clkid,
>> +					struct old_timespec32 *_ts)
>> +{
>> +	register struct old_timespec32 *ts asm("a1") = _ts;
>> +	register clockid_t clkid asm("a0") = _clkid;
>> +	register long ret asm("v0");
>> +	register long nr asm("v0") = __NR_clock_gettime;
>> +	register long error asm("a3");
>> +
>> +	asm volatile(
>> +	"       syscall\n"
>> +	: "=r" (ret), "=r" (error)
>> +	: "r" (clkid), "r" (ts), "r" (nr)
>> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
>> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
>> +
>> +	return error ? -ret : ret;
>> +}
>> +
>> +static __always_inline int clock_getres32_fallback(
>> +					clockid_t _clkid,
>> +					struct old_timespec32 *_ts)
>> +{
>> +	register struct old_timespec32 *ts asm("a1") = _ts;
>> +	register clockid_t clkid asm("a0") = _clkid;
>> +	register long ret asm("v0");
>> +	register long nr asm("v0") = __NR_clock_getres;
>> +	register long error asm("a3");
>> +
>> +	asm volatile(
>> +	"       syscall\n"
>> +	: "=r" (ret), "=r" (error)
>> +	: "r" (clkid), "r" (ts), "r" (nr)
>> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
>> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
>> +
>> +	return error ? -ret : ret;
>> +}
>> +#endif
>> +
>>  #ifdef CONFIG_CSRC_R4K
>>  
>>  static __always_inline u64 read_r4k_count(void)
>> diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
>> index 7f8d957abd4a..0011a632aef2 100644
>> --- a/arch/mips/vdso/config-n32-o32-env.c
>> +++ b/arch/mips/vdso/config-n32-o32-env.c
>> @@ -10,6 +10,7 @@
>>   */
>>  #undef CONFIG_64BIT
>>  
>> +#define BUILD_VDSO32
>>  #define CONFIG_32BIT 1
>>  #define CONFIG_GENERIC_ATOMIC64 1
>>  #define BUILD_VDSO32_64
>> -- 
>> 2.23.0
>>

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
@ 2019-09-03 14:20       ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:20 UTC (permalink / raw)
  To: Paul Burton
  Cc: linux-arch, luto, catalin.marinas, 0x7f454c46, linux-kernel,
	linux-mips, linux-kselftest, tglx, salyzyn, will,
	linux-arm-kernel

Hi Paul,

thank you for your review.

On 9/3/19 2:52 PM, Paul Burton wrote:
> Hi Vincenzo,
> 
> On Fri, Aug 30, 2019 at 02:58:57PM +0100, Vincenzo Frascino wrote:
>> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
>> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
>> seccomp setups because these syscalls might be not (yet) allowed.
>>
>> Implement the 32bit variants which use the legacy syscalls and select the
>> variant in the core library.
>>
>> The 64bit time variants are not removed because they are required for the
>> time64 based vdso accessors.
>>
>> Cc: Paul Burton <paul.burton@mips.com>
>> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> How would you like this to be applied? I'd be happy to apply this one to
> mips-next, where commit 24640f233b46 ("mips: Add support for generic
> vDSO") added the file being modified here. Otherwise:
> 
>     Acked-by: Paul Burton <paul.burton@mips.com>
> 

Please feel free to apply this to mips-next.

Thanks,
Vincenzo

> Thanks,
>     Paul
> 
>> ---
>>  arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
>>  arch/mips/vdso/config-n32-o32-env.c       |  1 +
>>  2 files changed, 46 insertions(+)
>>
>> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
>> index c59fe08b0347..e78462e8ca2e 100644
>> --- a/arch/mips/include/asm/vdso/gettimeofday.h
>> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
>> @@ -105,6 +105,51 @@ static __always_inline int clock_getres_fallback(
>>  	return error ? -ret : ret;
>>  }
>>  
>> +#if _MIPS_SIM != _MIPS_SIM_ABI64
>> +
>> +#define VDSO_HAS_32BIT_FALLBACK	1
>> +
>> +static __always_inline long clock_gettime32_fallback(
>> +					clockid_t _clkid,
>> +					struct old_timespec32 *_ts)
>> +{
>> +	register struct old_timespec32 *ts asm("a1") = _ts;
>> +	register clockid_t clkid asm("a0") = _clkid;
>> +	register long ret asm("v0");
>> +	register long nr asm("v0") = __NR_clock_gettime;
>> +	register long error asm("a3");
>> +
>> +	asm volatile(
>> +	"       syscall\n"
>> +	: "=r" (ret), "=r" (error)
>> +	: "r" (clkid), "r" (ts), "r" (nr)
>> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
>> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
>> +
>> +	return error ? -ret : ret;
>> +}
>> +
>> +static __always_inline int clock_getres32_fallback(
>> +					clockid_t _clkid,
>> +					struct old_timespec32 *_ts)
>> +{
>> +	register struct old_timespec32 *ts asm("a1") = _ts;
>> +	register clockid_t clkid asm("a0") = _clkid;
>> +	register long ret asm("v0");
>> +	register long nr asm("v0") = __NR_clock_getres;
>> +	register long error asm("a3");
>> +
>> +	asm volatile(
>> +	"       syscall\n"
>> +	: "=r" (ret), "=r" (error)
>> +	: "r" (clkid), "r" (ts), "r" (nr)
>> +	: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
>> +	  "$14", "$15", "$24", "$25", "hi", "lo", "memory");
>> +
>> +	return error ? -ret : ret;
>> +}
>> +#endif
>> +
>>  #ifdef CONFIG_CSRC_R4K
>>  
>>  static __always_inline u64 read_r4k_count(void)
>> diff --git a/arch/mips/vdso/config-n32-o32-env.c b/arch/mips/vdso/config-n32-o32-env.c
>> index 7f8d957abd4a..0011a632aef2 100644
>> --- a/arch/mips/vdso/config-n32-o32-env.c
>> +++ b/arch/mips/vdso/config-n32-o32-env.c
>> @@ -10,6 +10,7 @@
>>   */
>>  #undef CONFIG_64BIT
>>  
>> +#define BUILD_VDSO32
>>  #define CONFIG_32BIT 1
>>  #define CONFIG_GENERIC_ATOMIC64 1
>>  #define BUILD_VDSO32_64
>> -- 
>> 2.23.0
>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 1/8] arm64: compat: vdso: Expose BUILD_VDSO32
  2019-08-30 13:58   ` Vincenzo Frascino
@ 2019-09-03 14:36     ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:36 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

Hi Catalin and Will,

On 8/30/19 2:58 PM, Vincenzo Frascino wrote:
> clock_gettime32 and clock_getres_time32 should be compiled only with the
> 32 bit vdso library.
> 
> Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
> indication to the generic library to include these symbols.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> ---
>  arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> index c50ee1b7d5cd..fe7afe0f1a3d 100644
> --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> @@ -17,6 +17,7 @@
>  #define VDSO_HAS_CLOCK_GETRES		1
>  
>  #define VDSO_HAS_32BIT_FALLBACK		1
> +#define BUILD_VDSO32			1
>  
>  static __always_inline
>  int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
> 

This patch is independent from the rest and touches only arch code. Can it go in
via the arm64 tree?

-- 
Regards,
Vincenzo

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 1/8] arm64: compat: vdso: Expose BUILD_VDSO32
@ 2019-09-03 14:36     ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:36 UTC (permalink / raw)
  To: linux-arch, linux-arm-kernel, linux-kernel, linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, tglx, will

Hi Catalin and Will,

On 8/30/19 2:58 PM, Vincenzo Frascino wrote:
> clock_gettime32 and clock_getres_time32 should be compiled only with the
> 32 bit vdso library.
> 
> Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
> indication to the generic library to include these symbols.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> ---
>  arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> index c50ee1b7d5cd..fe7afe0f1a3d 100644
> --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> @@ -17,6 +17,7 @@
>  #define VDSO_HAS_CLOCK_GETRES		1
>  
>  #define VDSO_HAS_32BIT_FALLBACK		1
> +#define BUILD_VDSO32			1
>  
>  static __always_inline
>  int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
> 

This patch is independent from the rest and touches only arch code. Can it go in
via the arm64 tree?

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 1/8] arm64: compat: vdso: Expose BUILD_VDSO32
  2019-09-03 14:36     ` Vincenzo Frascino
@ 2019-09-03 14:38       ` Will Deacon
  -1 siblings, 0 replies; 70+ messages in thread
From: Will Deacon @ 2019-09-03 14:38 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, 0x7f454c46, salyzyn,
	paul.burton, luto, tglx

On Tue, Sep 03, 2019 at 03:36:16PM +0100, Vincenzo Frascino wrote:
> On 8/30/19 2:58 PM, Vincenzo Frascino wrote:
> > clock_gettime32 and clock_getres_time32 should be compiled only with the
> > 32 bit vdso library.
> > 
> > Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
> > indication to the generic library to include these symbols.
> > 
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <will@kernel.org>
> > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> > Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> > ---
> >  arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> > index c50ee1b7d5cd..fe7afe0f1a3d 100644
> > --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> > +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> > @@ -17,6 +17,7 @@
> >  #define VDSO_HAS_CLOCK_GETRES		1
> >  
> >  #define VDSO_HAS_32BIT_FALLBACK		1
> > +#define BUILD_VDSO32			1
> >  
> >  static __always_inline
> >  int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
> > 
> 
> This patch is independent from the rest and touches only arch code. Can it go in
> via the arm64 tree?

Why not take it via -tip along with patch 6? Otherwise we'll get a silly
conflict. I'd assumed this series was going in as one thing.

Will

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 1/8] arm64: compat: vdso: Expose BUILD_VDSO32
@ 2019-09-03 14:38       ` Will Deacon
  0 siblings, 0 replies; 70+ messages in thread
From: Will Deacon @ 2019-09-03 14:38 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, luto, catalin.marinas, 0x7f454c46, linux-kernel,
	linux-mips, paul.burton, linux-kselftest, tglx, salyzyn,
	linux-arm-kernel

On Tue, Sep 03, 2019 at 03:36:16PM +0100, Vincenzo Frascino wrote:
> On 8/30/19 2:58 PM, Vincenzo Frascino wrote:
> > clock_gettime32 and clock_getres_time32 should be compiled only with the
> > 32 bit vdso library.
> > 
> > Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
> > indication to the generic library to include these symbols.
> > 
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <will@kernel.org>
> > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> > Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> > ---
> >  arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> > index c50ee1b7d5cd..fe7afe0f1a3d 100644
> > --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> > +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
> > @@ -17,6 +17,7 @@
> >  #define VDSO_HAS_CLOCK_GETRES		1
> >  
> >  #define VDSO_HAS_32BIT_FALLBACK		1
> > +#define BUILD_VDSO32			1
> >  
> >  static __always_inline
> >  int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
> > 
> 
> This patch is independent from the rest and touches only arch code. Can it go in
> via the arm64 tree?

Why not take it via -tip along with patch 6? Otherwise we'll get a silly
conflict. I'd assumed this series was going in as one thing.

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:59   ` Vincenzo Frascino
  (?)
  (?)
@ 2019-09-03 14:46     ` Paul Burton
  -1 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 14:46 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Vincenzo,

On Fri, Aug 30, 2019 at 02:59:01PM +0100, Vincenzo Frascino wrote:
> VDSO_HAS_32BIT_FALLBACK has been removed from the core since
> the architectures that support the generic vDSO library have
> been converted to support the 32 bit fallbacks.
> 
> Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.
> 
> Cc: Paul Burton <paul.burton@mips.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Do you want this one in mips-next too, or applied somewhere else along
with the rest of the series? If the latter:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index e78462e8ca2e..5ad2b086626d 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
>  
>  #if _MIPS_SIM != _MIPS_SIM_ABI64
>  
> -#define VDSO_HAS_32BIT_FALLBACK	1
> -
>  static __always_inline long clock_gettime32_fallback(
>  					clockid_t _clkid,
>  					struct old_timespec32 *_ts)
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-09-03 14:46     ` Paul Burton
  0 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 14:46 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, luto, catalin.marinas, 0x7f454c46, linux-kernel,
	linux-mips, linux-kselftest, tglx, salyzyn, will,
	linux-arm-kernel

Hi Vincenzo,

On Fri, Aug 30, 2019 at 02:59:01PM +0100, Vincenzo Frascino wrote:
> VDSO_HAS_32BIT_FALLBACK has been removed from the core since
> the architectures that support the generic vDSO library have
> been converted to support the 32 bit fallbacks.
> 
> Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.
> 
> Cc: Paul Burton <paul.burton@mips.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Do you want this one in mips-next too, or applied somewhere else along
with the rest of the series? If the latter:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index e78462e8ca2e..5ad2b086626d 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
>  
>  #if _MIPS_SIM != _MIPS_SIM_ABI64
>  
> -#define VDSO_HAS_32BIT_FALLBACK	1
> -
>  static __always_inline long clock_gettime32_fallback(
>  					clockid_t _clkid,
>  					struct old_timespec32 *_ts)
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-09-03 14:46     ` Paul Burton
  0 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 14:46 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Vincenzo,

On Fri, Aug 30, 2019 at 02:59:01PM +0100, Vincenzo Frascino wrote:
> VDSO_HAS_32BIT_FALLBACK has been removed from the core since
> the architectures that support the generic vDSO library have
> been converted to support the 32 bit fallbacks.
> 
> Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.
> 
> Cc: Paul Burton <paul.burton@mips.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Do you want this one in mips-next too, or applied somewhere else along
with the rest of the series? If the latter:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index e78462e8ca2e..5ad2b086626d 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
>  
>  #if _MIPS_SIM != _MIPS_SIM_ABI64
>  
> -#define VDSO_HAS_32BIT_FALLBACK	1
> -
>  static __always_inline long clock_gettime32_fallback(
>  					clockid_t _clkid,
>  					struct old_timespec32 *_ts)
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-09-03 14:46     ` Paul Burton
  0 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 14:46 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, luto, catalin.marinas, 0x7f454c46, linux-kernel,
	linux-mips, linux-kselftest, tglx, salyzyn, will,
	linux-arm-kernel

Hi Vincenzo,

On Fri, Aug 30, 2019 at 02:59:01PM +0100, Vincenzo Frascino wrote:
> VDSO_HAS_32BIT_FALLBACK has been removed from the core since
> the architectures that support the generic vDSO library have
> been converted to support the 32 bit fallbacks.
> 
> Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.
> 
> Cc: Paul Burton <paul.burton@mips.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Do you want this one in mips-next too, or applied somewhere else along
with the rest of the series? If the latter:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> ---
>  arch/mips/include/asm/vdso/gettimeofday.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
> index e78462e8ca2e..5ad2b086626d 100644
> --- a/arch/mips/include/asm/vdso/gettimeofday.h
> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
> @@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
>  
>  #if _MIPS_SIM != _MIPS_SIM_ABI64
>  
> -#define VDSO_HAS_32BIT_FALLBACK	1
> -
>  static __always_inline long clock_gettime32_fallback(
>  					clockid_t _clkid,
>  					struct old_timespec32 *_ts)
> -- 
> 2.23.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-09-03 14:46     ` Paul Burton
  (?)
@ 2019-09-03 14:51       ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:51 UTC (permalink / raw)
  To: Paul Burton
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Paul,

On 9/3/19 3:46 PM, Paul Burton wrote:
> Hi Vincenzo,
> 
> On Fri, Aug 30, 2019 at 02:59:01PM +0100, Vincenzo Frascino wrote:
>> VDSO_HAS_32BIT_FALLBACK has been removed from the core since
>> the architectures that support the generic vDSO library have
>> been converted to support the 32 bit fallbacks.
>>
>> Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.
>>
>> Cc: Paul Burton <paul.burton@mips.com>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> Do you want this one in mips-next too, or applied somewhere else along
> with the rest of the series? If the latter:
> 
>     Acked-by: Paul Burton <paul.burton@mips.com>
> 

This patch has a dependency on patch n5 hence can not be applied independently.

Thanks,
Vincenzo

> Thanks,
>     Paul
> 
>> ---
>>  arch/mips/include/asm/vdso/gettimeofday.h | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
>> index e78462e8ca2e..5ad2b086626d 100644
>> --- a/arch/mips/include/asm/vdso/gettimeofday.h
>> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
>> @@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
>>  
>>  #if _MIPS_SIM != _MIPS_SIM_ABI64
>>  
>> -#define VDSO_HAS_32BIT_FALLBACK	1
>> -
>>  static __always_inline long clock_gettime32_fallback(
>>  					clockid_t _clkid,
>>  					struct old_timespec32 *_ts)
>> -- 
>> 2.23.0
>>


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-09-03 14:51       ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:51 UTC (permalink / raw)
  To: Paul Burton
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, tglx, salyzyn,
	0x7f454c46, luto

Hi Paul,

On 9/3/19 3:46 PM, Paul Burton wrote:
> Hi Vincenzo,
> 
> On Fri, Aug 30, 2019 at 02:59:01PM +0100, Vincenzo Frascino wrote:
>> VDSO_HAS_32BIT_FALLBACK has been removed from the core since
>> the architectures that support the generic vDSO library have
>> been converted to support the 32 bit fallbacks.
>>
>> Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.
>>
>> Cc: Paul Burton <paul.burton@mips.com>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> Do you want this one in mips-next too, or applied somewhere else along
> with the rest of the series? If the latter:
> 
>     Acked-by: Paul Burton <paul.burton@mips.com>
> 

This patch has a dependency on patch n5 hence can not be applied independently.

Thanks,
Vincenzo

> Thanks,
>     Paul
> 
>> ---
>>  arch/mips/include/asm/vdso/gettimeofday.h | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
>> index e78462e8ca2e..5ad2b086626d 100644
>> --- a/arch/mips/include/asm/vdso/gettimeofday.h
>> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
>> @@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
>>  
>>  #if _MIPS_SIM != _MIPS_SIM_ABI64
>>  
>> -#define VDSO_HAS_32BIT_FALLBACK	1
>> -
>>  static __always_inline long clock_gettime32_fallback(
>>  					clockid_t _clkid,
>>  					struct old_timespec32 *_ts)
>> -- 
>> 2.23.0
>>

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 7/8] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
@ 2019-09-03 14:51       ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2019-09-03 14:51 UTC (permalink / raw)
  To: Paul Burton
  Cc: linux-arch, luto, catalin.marinas, 0x7f454c46, linux-kernel,
	linux-mips, linux-kselftest, tglx, salyzyn, will,
	linux-arm-kernel

Hi Paul,

On 9/3/19 3:46 PM, Paul Burton wrote:
> Hi Vincenzo,
> 
> On Fri, Aug 30, 2019 at 02:59:01PM +0100, Vincenzo Frascino wrote:
>> VDSO_HAS_32BIT_FALLBACK has been removed from the core since
>> the architectures that support the generic vDSO library have
>> been converted to support the 32 bit fallbacks.
>>
>> Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.
>>
>> Cc: Paul Burton <paul.burton@mips.com>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> Do you want this one in mips-next too, or applied somewhere else along
> with the rest of the series? If the latter:
> 
>     Acked-by: Paul Burton <paul.burton@mips.com>
> 

This patch has a dependency on patch n5 hence can not be applied independently.

Thanks,
Vincenzo

> Thanks,
>     Paul
> 
>> ---
>>  arch/mips/include/asm/vdso/gettimeofday.h | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
>> index e78462e8ca2e..5ad2b086626d 100644
>> --- a/arch/mips/include/asm/vdso/gettimeofday.h
>> +++ b/arch/mips/include/asm/vdso/gettimeofday.h
>> @@ -107,8 +107,6 @@ static __always_inline int clock_getres_fallback(
>>  
>>  #if _MIPS_SIM != _MIPS_SIM_ABI64
>>  
>> -#define VDSO_HAS_32BIT_FALLBACK	1
>> -
>>  static __always_inline long clock_gettime32_fallback(
>>  					clockid_t _clkid,
>>  					struct old_timespec32 *_ts)
>> -- 
>> 2.23.0
>>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
  2019-08-30 13:58   ` Vincenzo Frascino
  (?)
@ 2019-09-03 21:00     ` Paul Burton
  -1 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 21:00 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, Paul Burton, tglx,
	salyzyn, 0x7f454c46, luto, linux-mips

Hello,

Vincenzo Frascino wrote:
> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
> seccomp setups because these syscalls might be not (yet) allowed.
> 
> Implement the 32bit variants which use the legacy syscalls and select the
> variant in the core library.
> 
> The 64bit time variants are not removed because they are required for the
> time64 based vdso accessors.

Applied to mips-next.

> commit 932bb934ed4d
> https://git.kernel.org/mips/c/932bb934ed4d
> 
> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Signed-off-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
@ 2019-09-03 21:00     ` Paul Burton
  0 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 21:00 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, linux-arm-kernel, linux-kernel, linux-mips,
	linux-kselftest, catalin.marinas, will, Paul Burton, tglx,
	salyzyn, 0x7f454c46, luto

Hello,

Vincenzo Frascino wrote:
> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
> seccomp setups because these syscalls might be not (yet) allowed.
> 
> Implement the 32bit variants which use the legacy syscalls and select the
> variant in the core library.
> 
> The 64bit time variants are not removed because they are required for the
> time64 based vdso accessors.

Applied to mips-next.

> commit 932bb934ed4d
> https://git.kernel.org/mips/c/932bb934ed4d
> 
> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Signed-off-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback
@ 2019-09-03 21:00     ` Paul Burton
  0 siblings, 0 replies; 70+ messages in thread
From: Paul Burton @ 2019-09-03 21:00 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: linux-arch, Paul Burton, luto, catalin.marinas, 0x7f454c46,
	linux-kernel, linux-mips, linux-kselftest, tglx, salyzyn, will,
	linux-arm-kernel

Hello,

Vincenzo Frascino wrote:
> The generic VDSO implementation uses the Y2038 safe clock_gettime64() and
> clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks
> seccomp setups because these syscalls might be not (yet) allowed.
> 
> Implement the 32bit variants which use the legacy syscalls and select the
> variant in the core library.
> 
> The 64bit time variants are not removed because they are required for the
> time64 based vdso accessors.

Applied to mips-next.

> commit 932bb934ed4d
> https://git.kernel.org/mips/c/932bb934ed4d
> 
> Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Signed-off-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [tip: timers/core] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:59   ` Vincenzo Frascino
  (?)
  (?)
@ 2020-01-13 19:09   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-13 19:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Paul Burton, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     7bcf78b6e6891821983bd168380de1df43d42347
Gitweb:        https://git.kernel.org/tip/7bcf78b6e6891821983bd168380de1df43d42347
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:59:01 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 10 Jan 2020 21:14:06 +01:00

mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul Burton <paul.burton@mips.com>
Link: https://lore.kernel.org/r/20190830135902.20861-8-vincenzo.frascino@arm.com

---
 arch/mips/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
index 0ae9b4c..a58687e 100644
--- a/arch/mips/include/asm/vdso/gettimeofday.h
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
@@ -96,8 +96,6 @@ static __always_inline int clock_getres_fallback(
 
 #if _MIPS_SIM != _MIPS_SIM_ABI64
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline long clock_gettime32_fallback(
 					clockid_t _clkid,
 					struct old_timespec32 *_ts)

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] x86/vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:59   ` Vincenzo Frascino
  (?)
@ 2020-01-13 19:09   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-13 19:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Vincenzo Frascino, Thomas Gleixner, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     3dc69d086be439c143adbfc6ff62704f1be21039
Gitweb:        https://git.kernel.org/tip/3dc69d086be439c143adbfc6ff62704f1be21039
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:59:02 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 10 Jan 2020 21:14:06 +01:00

x86/vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from x86 vdso.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20190830135902.20861-9-vincenzo.frascino@arm.com

---
 arch/x86/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/include/asm/vdso/gettimeofday.h b/arch/x86/include/asm/vdso/gettimeofday.h
index e9ee139..52c3bcd 100644
--- a/arch/x86/include/asm/vdso/gettimeofday.h
+++ b/arch/x86/include/asm/vdso/gettimeofday.h
@@ -96,8 +96,6 @@ long clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 
 #else
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline
 long clock_gettime_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 {

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:59   ` Vincenzo Frascino
  (?)
@ 2020-01-13 19:09   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-13 19:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Catalin Marinas, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     8a0d48e94299958c13054126b2ed371bbe383286
Gitweb:        https://git.kernel.org/tip/8a0d48e94299958c13054126b2ed371bbe383286
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:59:00 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 10 Jan 2020 21:14:06 +01:00

arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from arm64 compat vdso.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20190830135902.20861-7-vincenzo.frascino@arm.com

---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index fe7afe0..537b1e6 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -16,7 +16,6 @@
 
 #define VDSO_HAS_CLOCK_GETRES		1
 
-#define VDSO_HAS_32BIT_FALLBACK		1
 #define BUILD_VDSO32			1
 
 static __always_inline

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] lib/vdso: Build 32 bit specific functions in the right context
  2019-08-30 13:58   ` Vincenzo Frascino
  (?)
@ 2020-01-13 19:09   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-13 19:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Andy Lutomirski, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     760554e20191c449d4bacd4767129262a4a40fba
Gitweb:        https://git.kernel.org/tip/760554e20191c449d4bacd4767129262a4a40fba
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:56 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 10 Jan 2020 21:14:05 +01:00

lib/vdso: Build 32 bit specific functions in the right context

clock_gettime32 and clock_getres_time32 should be compiled only with a
32 bit vdso library.

Exclude these symbols when BUILD_VDSO32 is not defined.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20190830135902.20861-3-vincenzo.frascino@arm.com

---
 lib/vdso/gettimeofday.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 42bd8ab..8e77071 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -117,6 +117,7 @@ __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -139,6 +140,7 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 
 static __maybe_unused int
 __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
@@ -231,6 +233,7 @@ int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -253,4 +256,5 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 #endif /* VDSO_HAS_CLOCK_GETRES */

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] lib/vdso: Remove checks on return value for 32 bit vDSO
  2019-08-30 13:58   ` Vincenzo Frascino
  (?)
  (?)
@ 2020-01-13 19:09   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-13 19:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Vincenzo Frascino, Thomas Gleixner, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     9dd92f63f94fab4c04a5880a839abe1f74ee906c
Gitweb:        https://git.kernel.org/tip/9dd92f63f94fab4c04a5880a839abe1f74ee906c
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:59 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 10 Jan 2020 21:14:05 +01:00

lib/vdso: Remove checks on return value for 32 bit vDSO

Since all the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks it is not required
anymore to check the return value of __cvdso_clock_get*time32_common()
before updating the old_timespec fields.

Remove the related checks from the generic vdso library.

References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20190830135902.20861-6-vincenzo.frascino@arm.com

---
 lib/vdso/gettimeofday.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index cd3aacf..b676a98 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -129,10 +129,10 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
 
-	if (likely(!ret)) {
-		res->tv_sec = ts.tv_sec;
-		res->tv_nsec = ts.tv_nsec;
-	}
+	/* For ret == 0 */
+	res->tv_sec = ts.tv_sec;
+	res->tv_nsec = ts.tv_nsec;
+
 	return ret;
 }
 #endif /* BUILD_VDSO32 */
@@ -240,7 +240,7 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
 
-	if (likely(!ret && res)) {
+	if (likely(res)) {
 		res->tv_sec = ts.tv_sec;
 		res->tv_nsec = ts.tv_nsec;
 	}

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] lib/vdso: Remove VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:58   ` Vincenzo Frascino
  (?)
@ 2020-01-13 19:09   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-13 19:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Vincenzo Frascino, Thomas Gleixner, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     746bc1f8e7efa210881405c52ee3729406fa4e95
Gitweb:        https://git.kernel.org/tip/746bc1f8e7efa210881405c52ee3729406fa4e95
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:58 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 10 Jan 2020 21:14:05 +01:00

lib/vdso: Remove VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK was introduced to address a regression which
caused seccomp to deny access to the applications to clock_gettime64()
and clock_getres64() because they are not enabled in the existing
filters.

The purpose of VDSO_HAS_32BIT_FALLBACK was to simplify the conditional
implementation of __cvdso_clock_get*time32() variants.

Now that all the architectures that support the generic vDSO library
have been converted to support the 32 bit fallbacks the conditional
can be removed.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20190830135902.20861-5-vincenzo.frascino@arm.com

References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
---
 lib/vdso/gettimeofday.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 8e77071..cd3aacf 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -126,13 +126,8 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_gettime_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_gettime_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret)) {
 		res->tv_sec = ts.tv_sec;
@@ -242,13 +237,8 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_getres_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_getres_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret && res)) {
 		res->tv_sec = ts.tv_sec;

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] arm64: compat: vdso: Expose BUILD_VDSO32
  2019-08-30 13:58   ` Vincenzo Frascino
  (?)
  (?)
@ 2020-01-13 19:09   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-13 19:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Catalin Marinas, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     4845c25326cf1db48e010a0fb162da4dfb07665a
Gitweb:        https://git.kernel.org/tip/4845c25326cf1db48e010a0fb162da4dfb07665a
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:55 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 10 Jan 2020 21:14:04 +01:00

arm64: compat: vdso: Expose BUILD_VDSO32

clock_gettime32 and clock_getres_time32 should be compiled only with the
32 bit vdso library.

Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
indication to the generic library to include these symbols.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20190830135902.20861-2-vincenzo.frascino@arm.com

---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index c50ee1b..fe7afe0 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -17,6 +17,7 @@
 #define VDSO_HAS_CLOCK_GETRES		1
 
 #define VDSO_HAS_32BIT_FALLBACK		1
+#define BUILD_VDSO32			1
 
 static __always_inline
 int gettimeofday_fallback(struct __kernel_old_timeval *_tv,

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
  2019-08-30 13:58   ` Vincenzo Frascino
@ 2020-01-13 22:28     ` Thomas Gleixner
  -1 siblings, 0 replies; 70+ messages in thread
From: Thomas Gleixner @ 2020-01-13 22:28 UTC (permalink / raw)
  To: Vincenzo Frascino, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, salyzyn, 0x7f454c46, luto

Vincenzo Frascino <vincenzo.frascino@arm.com> writes:

> clock_gettime32 and clock_getres_time32 should be compiled only with a
> 32 bit vdso library.
>
> Exclude these symbols when BUILD_VDSO32 is not defined.

This breaks the ARM build with:

arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_gettime’:
arch/arm/vdso/vgettimeofday.c:15:9: error: implicit declaration of function ‘__cvdso_clock_gettime32’; did you mean ‘__cvdso_clock_gettime’? [-Werror=implicit-function-declaration]
  return __cvdso_clock_gettime32(clock, ts);
         ^~~~~~~~~~~~~~~~~~~~~~~
         __cvdso_clock_gettime
arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_getres’:
arch/arm/vdso/vgettimeofday.c:33:9: error: implicit declaration of function ‘__cvdso_clock_getres_time32’; did you mean ‘__cvdso_clock_getres_common’? [-Werror=implicit-function-declaration]
  return __cvdso_clock_getres_time32(clock_id, res);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         __cvdso_clock_getres_common
cc1: some warnings being treated as errors

The patch below 'fixes' at least the build. Can someone please confirm
the correctness?

Thanks,

        tglx

8<----------------
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -14,7 +14,7 @@ targets := $(obj-vdso) vdso.so vdso.so.d
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
 ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
-ccflags-y += -DDISABLE_BRANCH_PROFILING
+ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO32
 
 ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
@ 2020-01-13 22:28     ` Thomas Gleixner
  0 siblings, 0 replies; 70+ messages in thread
From: Thomas Gleixner @ 2020-01-13 22:28 UTC (permalink / raw)
  To: Vincenzo Frascino, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, will

Vincenzo Frascino <vincenzo.frascino@arm.com> writes:

> clock_gettime32 and clock_getres_time32 should be compiled only with a
> 32 bit vdso library.
>
> Exclude these symbols when BUILD_VDSO32 is not defined.

This breaks the ARM build with:

arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_gettime’:
arch/arm/vdso/vgettimeofday.c:15:9: error: implicit declaration of function ‘__cvdso_clock_gettime32’; did you mean ‘__cvdso_clock_gettime’? [-Werror=implicit-function-declaration]
  return __cvdso_clock_gettime32(clock, ts);
         ^~~~~~~~~~~~~~~~~~~~~~~
         __cvdso_clock_gettime
arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_getres’:
arch/arm/vdso/vgettimeofday.c:33:9: error: implicit declaration of function ‘__cvdso_clock_getres_time32’; did you mean ‘__cvdso_clock_getres_common’? [-Werror=implicit-function-declaration]
  return __cvdso_clock_getres_time32(clock_id, res);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         __cvdso_clock_getres_common
cc1: some warnings being treated as errors

The patch below 'fixes' at least the build. Can someone please confirm
the correctness?

Thanks,

        tglx

8<----------------
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -14,7 +14,7 @@ targets := $(obj-vdso) vdso.so vdso.so.d
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
 ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
-ccflags-y += -DDISABLE_BRANCH_PROFILING
+ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO32
 
 ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
  2020-01-13 22:28     ` Thomas Gleixner
@ 2020-01-14  9:33       ` Thomas Gleixner
  -1 siblings, 0 replies; 70+ messages in thread
From: Thomas Gleixner @ 2020-01-14  9:33 UTC (permalink / raw)
  To: Vincenzo Frascino, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, salyzyn, 0x7f454c46, luto

Thomas Gleixner <tglx@linutronix.de> writes:

> Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>
>> clock_gettime32 and clock_getres_time32 should be compiled only with a
>> 32 bit vdso library.
>>
>> Exclude these symbols when BUILD_VDSO32 is not defined.
>
> This breaks the ARM build with:
>
> arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_gettime’:
> arch/arm/vdso/vgettimeofday.c:15:9: error: implicit declaration of function ‘__cvdso_clock_gettime32’; did you mean ‘__cvdso_clock_gettime’? [-Werror=implicit-function-declaration]
>   return __cvdso_clock_gettime32(clock, ts);
>          ^~~~~~~~~~~~~~~~~~~~~~~
>          __cvdso_clock_gettime
> arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_getres’:
> arch/arm/vdso/vgettimeofday.c:33:9: error: implicit declaration of function ‘__cvdso_clock_getres_time32’; did you mean ‘__cvdso_clock_getres_common’? [-Werror=implicit-function-declaration]
>   return __cvdso_clock_getres_time32(clock_id, res);
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>          __cvdso_clock_getres_common
> cc1: some warnings being treated as errors
>
> The patch below 'fixes' at least the build. Can someone please confirm
> the correctness?

Bah, it's not fixing it. That's what you get when you compile the wrong
tree...

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
@ 2020-01-14  9:33       ` Thomas Gleixner
  0 siblings, 0 replies; 70+ messages in thread
From: Thomas Gleixner @ 2020-01-14  9:33 UTC (permalink / raw)
  To: Vincenzo Frascino, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, will

Thomas Gleixner <tglx@linutronix.de> writes:

> Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>
>> clock_gettime32 and clock_getres_time32 should be compiled only with a
>> 32 bit vdso library.
>>
>> Exclude these symbols when BUILD_VDSO32 is not defined.
>
> This breaks the ARM build with:
>
> arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_gettime’:
> arch/arm/vdso/vgettimeofday.c:15:9: error: implicit declaration of function ‘__cvdso_clock_gettime32’; did you mean ‘__cvdso_clock_gettime’? [-Werror=implicit-function-declaration]
>   return __cvdso_clock_gettime32(clock, ts);
>          ^~~~~~~~~~~~~~~~~~~~~~~
>          __cvdso_clock_gettime
> arch/arm/vdso/vgettimeofday.c: In function ‘__vdso_clock_getres’:
> arch/arm/vdso/vgettimeofday.c:33:9: error: implicit declaration of function ‘__cvdso_clock_getres_time32’; did you mean ‘__cvdso_clock_getres_common’? [-Werror=implicit-function-declaration]
>   return __cvdso_clock_getres_time32(clock_id, res);
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>          __cvdso_clock_getres_common
> cc1: some warnings being treated as errors
>
> The patch below 'fixes' at least the build. Can someone please confirm
> the correctness?

Bah, it's not fixing it. That's what you get when you compile the wrong
tree...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
  2020-01-14  9:33       ` Thomas Gleixner
@ 2020-01-14 10:15         ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2020-01-14 10:15 UTC (permalink / raw)
  To: Thomas Gleixner, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, salyzyn, 0x7f454c46, luto

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hi Thomas,

On 14/01/2020 09:33, Thomas Gleixner wrote:
> Thomas Gleixner <tglx@linutronix.de> writes:
> 
[...]

> 
> Bah, it's not fixing it. That's what you get when you compile the wrong
> tree...
> 

I am having a look at it. Thanks.

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
@ 2020-01-14 10:15         ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2020-01-14 10:15 UTC (permalink / raw)
  To: Thomas Gleixner, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, will

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hi Thomas,

On 14/01/2020 09:33, Thomas Gleixner wrote:
> Thomas Gleixner <tglx@linutronix.de> writes:
> 
[...]

> 
> Bah, it's not fixing it. That's what you get when you compile the wrong
> tree...
> 

I am having a look at it. Thanks.

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
  2020-01-14 10:15         ` Vincenzo Frascino
@ 2020-01-14 10:37           ` Thomas Gleixner
  -1 siblings, 0 replies; 70+ messages in thread
From: Thomas Gleixner @ 2020-01-14 10:37 UTC (permalink / raw)
  To: Vincenzo Frascino, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, salyzyn, 0x7f454c46, luto

Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>
> On 14/01/2020 09:33, Thomas Gleixner wrote:
>> Thomas Gleixner <tglx@linutronix.de> writes:
>> 
> [...]
>
>> 
>> Bah, it's not fixing it. That's what you get when you compile the wrong
>> tree...

This part is required to cover the BUILD_VDSO32 guard, but then when the
fallback thing is removed it fails again because the 32bit fallbacks are
missing.

The patch below makes it build again.

Thanks,

        tglx

8<----------------
--- a/arch/arm/include/asm/vdso/gettimeofday.h
+++ b/arch/arm/include/asm/vdso/gettimeofday.h
@@ -52,6 +52,24 @@ static __always_inline long clock_gettim
 	return ret;
 }
 
+static __always_inline long clock_gettime32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("r1") = _ts;
+	register clockid_t clkid asm("r0") = _clkid;
+	register long ret asm ("r0");
+	register long nr asm("r7") = __NR_clock_gettime;
+
+	asm volatile(
+	"	swi #0\n"
+	: "=r" (ret)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "memory");
+
+	return ret;
+}
+
 static __always_inline int clock_getres_fallback(
 					clockid_t _clkid,
 					struct __kernel_timespec *_ts)
@@ -63,6 +81,24 @@ static __always_inline int clock_getres_
 
 	asm volatile(
 	"       swi #0\n"
+	: "=r" (ret)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "memory");
+
+	return ret;
+}
+
+static __always_inline int clock_getres32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("r1") = _ts;
+	register clockid_t clkid asm("r0") = _clkid;
+	register long ret asm ("r0");
+	register long nr asm("r7") = __NR_clock_getres;
+
+	asm volatile(
+	"       swi #0\n"
 	: "=r" (ret)
 	: "r" (clkid), "r" (ts), "r" (nr)
 	: "memory");

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
@ 2020-01-14 10:37           ` Thomas Gleixner
  0 siblings, 0 replies; 70+ messages in thread
From: Thomas Gleixner @ 2020-01-14 10:37 UTC (permalink / raw)
  To: Vincenzo Frascino, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, will

Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>
> On 14/01/2020 09:33, Thomas Gleixner wrote:
>> Thomas Gleixner <tglx@linutronix.de> writes:
>> 
> [...]
>
>> 
>> Bah, it's not fixing it. That's what you get when you compile the wrong
>> tree...

This part is required to cover the BUILD_VDSO32 guard, but then when the
fallback thing is removed it fails again because the 32bit fallbacks are
missing.

The patch below makes it build again.

Thanks,

        tglx

8<----------------
--- a/arch/arm/include/asm/vdso/gettimeofday.h
+++ b/arch/arm/include/asm/vdso/gettimeofday.h
@@ -52,6 +52,24 @@ static __always_inline long clock_gettim
 	return ret;
 }
 
+static __always_inline long clock_gettime32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("r1") = _ts;
+	register clockid_t clkid asm("r0") = _clkid;
+	register long ret asm ("r0");
+	register long nr asm("r7") = __NR_clock_gettime;
+
+	asm volatile(
+	"	swi #0\n"
+	: "=r" (ret)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "memory");
+
+	return ret;
+}
+
 static __always_inline int clock_getres_fallback(
 					clockid_t _clkid,
 					struct __kernel_timespec *_ts)
@@ -63,6 +81,24 @@ static __always_inline int clock_getres_
 
 	asm volatile(
 	"       swi #0\n"
+	: "=r" (ret)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "memory");
+
+	return ret;
+}
+
+static __always_inline int clock_getres32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("r1") = _ts;
+	register clockid_t clkid asm("r0") = _clkid;
+	register long ret asm ("r0");
+	register long nr asm("r7") = __NR_clock_getres;
+
+	asm volatile(
+	"       swi #0\n"
 	: "=r" (ret)
 	: "r" (clkid), "r" (ts), "r" (nr)
 	: "memory");

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
  2020-01-14 10:37           ` Thomas Gleixner
@ 2020-01-14 10:41             ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2020-01-14 10:41 UTC (permalink / raw)
  To: Thomas Gleixner, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, salyzyn, 0x7f454c46, luto

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

Hi Thomas,

On 14/01/2020 10:37, Thomas Gleixner wrote:
> Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>>
>> On 14/01/2020 09:33, Thomas Gleixner wrote:
>>> Thomas Gleixner <tglx@linutronix.de> writes:
>>>
>> [...]
>>
>>>
>>> Bah, it's not fixing it. That's what you get when you compile the wrong
>>> tree...
> 
> This part is required to cover the BUILD_VDSO32 guard, but then when the
> fallback thing is removed it fails again because the 32bit fallbacks are
> missing.
> 
> The patch below makes it build again.
> 

I agree. I am testing it now :) Do you prefer to create the patch or shall I do
it once I finish testing?

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
@ 2020-01-14 10:41             ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2020-01-14 10:41 UTC (permalink / raw)
  To: Thomas Gleixner, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, will

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

Hi Thomas,

On 14/01/2020 10:37, Thomas Gleixner wrote:
> Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>>
>> On 14/01/2020 09:33, Thomas Gleixner wrote:
>>> Thomas Gleixner <tglx@linutronix.de> writes:
>>>
>> [...]
>>
>>>
>>> Bah, it's not fixing it. That's what you get when you compile the wrong
>>> tree...
> 
> This part is required to cover the BUILD_VDSO32 guard, but then when the
> fallback thing is removed it fails again because the 32bit fallbacks are
> missing.
> 
> The patch below makes it build again.
> 

I agree. I am testing it now :) Do you prefer to create the patch or shall I do
it once I finish testing?

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
  2020-01-14 10:37           ` Thomas Gleixner
@ 2020-01-14 11:15             ` Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2020-01-14 11:15 UTC (permalink / raw)
  To: Thomas Gleixner, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, will, paul.burton, salyzyn, 0x7f454c46, luto

[-- Attachment #1: Type: text/plain, Size: 2946 bytes --]

Hi Thomas,

On 14/01/2020 10:37, Thomas Gleixner wrote:
> Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>>
>> On 14/01/2020 09:33, Thomas Gleixner wrote:
>>> Thomas Gleixner <tglx@linutronix.de> writes:
>>>
>> [...]
>>
>>>
>>> Bah, it's not fixing it. That's what you get when you compile the wrong
>>> tree...
> 
> This part is required to cover the BUILD_VDSO32 guard, but then when the
> fallback thing is removed it fails again because the 32bit fallbacks are
> missing.
> 
> The patch below makes it build again.
I completed the testing and everything seems fine. For completeness I am
reporting the test results below:

clock-gettime-monotonic: syscall: 938 nsec/call
clock-gettime-monotonic:    libc: 278 nsec/call
clock-gettime-monotonic:    vdso: 270 nsec/call
clock-getres-monotonic: syscall: 678 nsec/call
clock-getres-monotonic:    libc: 692 nsec/call
clock-getres-monotonic:    vdso: 33 nsec/call
clock-gettime-monotonic-coarse: syscall: 840 nsec/call
clock-gettime-monotonic-coarse:    libc: 184 nsec/call
clock-gettime-monotonic-coarse:    vdso: 172 nsec/call
clock-getres-monotonic-coarse: syscall: 710 nsec/call
clock-getres-monotonic-coarse:    libc: 733 nsec/call
clock-getres-monotonic-coarse:    vdso: 35 nsec/call
clock-gettime-monotonic-raw: syscall: 894 nsec/call
clock-gettime-monotonic-raw:    libc: 278 nsec/call
clock-gettime-monotonic-raw:    vdso: 270 nsec/call
clock-getres-monotonic-raw: syscall: 669 nsec/call
clock-getres-monotonic-raw:    libc: 696 nsec/call
clock-getres-monotonic-raw:    vdso: 35 nsec/call
clock-gettime-tai: syscall: 933 nsec/call
clock-gettime-tai:    libc: 277 nsec/call
clock-gettime-tai:    vdso: 264 nsec/call
clock-getres-tai: syscall: 674 nsec/call
clock-getres-tai:    libc: 696 nsec/call
clock-getres-tai:    vdso: 33 nsec/call
clock-gettime-boottime: syscall: 934 nsec/call
clock-gettime-boottime:    libc: 278 nsec/call
clock-gettime-boottime:    vdso: 270 nsec/call
clock-getres-boottime: syscall: 677 nsec/call
clock-getres-boottime:    libc: 690 nsec/call
clock-getres-boottime:    vdso: 33 nsec/call
clock-gettime-realtime: syscall: 901 nsec/call
clock-gettime-realtime:    libc: 278 nsec/call
clock-gettime-realtime:    vdso: 272 nsec/call
clock-getres-realtime: syscall: 677 nsec/call
clock-getres-realtime:    libc: 701 nsec/call
clock-getres-realtime:    vdso: 33 nsec/call
clock-gettime-realtime-coarse: syscall: 838 nsec/call
clock-gettime-realtime-coarse:    libc: 184 nsec/call
clock-gettime-realtime-coarse:    vdso: 172 nsec/call
clock-getres-realtime-coarse: syscall: 713 nsec/call
clock-getres-realtime-coarse:    libc: 736 nsec/call
clock-getres-realtime-coarse:    vdso: 35 nsec/call
getcpu: syscall: 620 nsec/call
getcpu:    libc: 648 nsec/call
gettimeofday: syscall: 1022 nsec/call
gettimeofday:    libc: 280 nsec/call
gettimeofday:    vdso: 272 nsec/call

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
@ 2020-01-14 11:15             ` Vincenzo Frascino
  0 siblings, 0 replies; 70+ messages in thread
From: Vincenzo Frascino @ 2020-01-14 11:15 UTC (permalink / raw)
  To: Thomas Gleixner, linux-arch, linux-arm-kernel, linux-kernel,
	linux-mips, linux-kselftest
  Cc: catalin.marinas, 0x7f454c46, salyzyn, paul.burton, luto, will

[-- Attachment #1: Type: text/plain, Size: 2946 bytes --]

Hi Thomas,

On 14/01/2020 10:37, Thomas Gleixner wrote:
> Vincenzo Frascino <vincenzo.frascino@arm.com> writes:
>>
>> On 14/01/2020 09:33, Thomas Gleixner wrote:
>>> Thomas Gleixner <tglx@linutronix.de> writes:
>>>
>> [...]
>>
>>>
>>> Bah, it's not fixing it. That's what you get when you compile the wrong
>>> tree...
> 
> This part is required to cover the BUILD_VDSO32 guard, but then when the
> fallback thing is removed it fails again because the 32bit fallbacks are
> missing.
> 
> The patch below makes it build again.
I completed the testing and everything seems fine. For completeness I am
reporting the test results below:

clock-gettime-monotonic: syscall: 938 nsec/call
clock-gettime-monotonic:    libc: 278 nsec/call
clock-gettime-monotonic:    vdso: 270 nsec/call
clock-getres-monotonic: syscall: 678 nsec/call
clock-getres-monotonic:    libc: 692 nsec/call
clock-getres-monotonic:    vdso: 33 nsec/call
clock-gettime-monotonic-coarse: syscall: 840 nsec/call
clock-gettime-monotonic-coarse:    libc: 184 nsec/call
clock-gettime-monotonic-coarse:    vdso: 172 nsec/call
clock-getres-monotonic-coarse: syscall: 710 nsec/call
clock-getres-monotonic-coarse:    libc: 733 nsec/call
clock-getres-monotonic-coarse:    vdso: 35 nsec/call
clock-gettime-monotonic-raw: syscall: 894 nsec/call
clock-gettime-monotonic-raw:    libc: 278 nsec/call
clock-gettime-monotonic-raw:    vdso: 270 nsec/call
clock-getres-monotonic-raw: syscall: 669 nsec/call
clock-getres-monotonic-raw:    libc: 696 nsec/call
clock-getres-monotonic-raw:    vdso: 35 nsec/call
clock-gettime-tai: syscall: 933 nsec/call
clock-gettime-tai:    libc: 277 nsec/call
clock-gettime-tai:    vdso: 264 nsec/call
clock-getres-tai: syscall: 674 nsec/call
clock-getres-tai:    libc: 696 nsec/call
clock-getres-tai:    vdso: 33 nsec/call
clock-gettime-boottime: syscall: 934 nsec/call
clock-gettime-boottime:    libc: 278 nsec/call
clock-gettime-boottime:    vdso: 270 nsec/call
clock-getres-boottime: syscall: 677 nsec/call
clock-getres-boottime:    libc: 690 nsec/call
clock-getres-boottime:    vdso: 33 nsec/call
clock-gettime-realtime: syscall: 901 nsec/call
clock-gettime-realtime:    libc: 278 nsec/call
clock-gettime-realtime:    vdso: 272 nsec/call
clock-getres-realtime: syscall: 677 nsec/call
clock-getres-realtime:    libc: 701 nsec/call
clock-getres-realtime:    vdso: 33 nsec/call
clock-gettime-realtime-coarse: syscall: 838 nsec/call
clock-gettime-realtime-coarse:    libc: 184 nsec/call
clock-gettime-realtime-coarse:    vdso: 172 nsec/call
clock-getres-realtime-coarse: syscall: 713 nsec/call
clock-getres-realtime-coarse:    libc: 736 nsec/call
clock-getres-realtime-coarse:    vdso: 35 nsec/call
getcpu: syscall: 620 nsec/call
getcpu:    libc: 648 nsec/call
gettimeofday: syscall: 1022 nsec/call
gettimeofday:    libc: 280 nsec/call
gettimeofday:    vdso: 272 nsec/call

-- 
Regards,
Vincenzo

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 14291 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [tip: timers/core] mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:59   ` Vincenzo Frascino
                     ` (2 preceding siblings ...)
  (?)
@ 2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Paul Burton, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     de0209f53aba44d9b57d0739a076dfb2db767584
Gitweb:        https://git.kernel.org/tip/de0209f53aba44d9b57d0739a076dfb2db767584
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:59:01 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:46 +01:00

mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul Burton <paul.burton@mips.com>
Link: https://lore.kernel.org/r/20190830135902.20861-8-vincenzo.frascino@arm.com


---
 arch/mips/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
index 0ae9b4c..a58687e 100644
--- a/arch/mips/include/asm/vdso/gettimeofday.h
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
@@ -96,8 +96,6 @@ static __always_inline int clock_getres_fallback(
 
 #if _MIPS_SIM != _MIPS_SIM_ABI64
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline long clock_gettime32_fallback(
 					clockid_t _clkid,
 					struct old_timespec32 *_ts)

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] x86/vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:59   ` Vincenzo Frascino
  (?)
  (?)
@ 2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Vincenzo Frascino, Thomas Gleixner, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     0b5c12332db5b71c6db0c102b3e6acc7c7c6a54d
Gitweb:        https://git.kernel.org/tip/0b5c12332db5b71c6db0c102b3e6acc7c7c6a54d
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:59:02 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:46 +01:00

x86/vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from x86 vdso.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20190830135902.20861-9-vincenzo.frascino@arm.com


---
 arch/x86/include/asm/vdso/gettimeofday.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/include/asm/vdso/gettimeofday.h b/arch/x86/include/asm/vdso/gettimeofday.h
index e9ee139..52c3bcd 100644
--- a/arch/x86/include/asm/vdso/gettimeofday.h
+++ b/arch/x86/include/asm/vdso/gettimeofday.h
@@ -96,8 +96,6 @@ long clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 
 #else
 
-#define VDSO_HAS_32BIT_FALLBACK	1
-
 static __always_inline
 long clock_gettime_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
 {

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:59   ` Vincenzo Frascino
  (?)
  (?)
@ 2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Catalin Marinas, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     972188f3a2dac07a6f000a4418776f446259fc87
Gitweb:        https://git.kernel.org/tip/972188f3a2dac07a6f000a4418776f446259fc87
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:59:00 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:45 +01:00

arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from arm64 compat vdso.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20190830135902.20861-7-vincenzo.frascino@arm.com


---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index fe7afe0..537b1e6 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -16,7 +16,6 @@
 
 #define VDSO_HAS_CLOCK_GETRES		1
 
-#define VDSO_HAS_32BIT_FALLBACK		1
 #define BUILD_VDSO32			1
 
 static __always_inline

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] lib/vdso: Remove VDSO_HAS_32BIT_FALLBACK
  2019-08-30 13:58   ` Vincenzo Frascino
  (?)
  (?)
@ 2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Vincenzo Frascino, Thomas Gleixner, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     b767081c07a400ff1c6f95b87639a9405886e7a6
Gitweb:        https://git.kernel.org/tip/b767081c07a400ff1c6f95b87639a9405886e7a6
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:58 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:44 +01:00

lib/vdso: Remove VDSO_HAS_32BIT_FALLBACK

VDSO_HAS_32BIT_FALLBACK was introduced to address a regression which
caused seccomp to deny access to the applications to clock_gettime64()
and clock_getres64() because they are not enabled in the existing
filters.

The purpose of VDSO_HAS_32BIT_FALLBACK was to simplify the conditional
implementation of __cvdso_clock_get*time32() variants.

Now that all the architectures that support the generic vDSO library
have been converted to support the 32 bit fallbacks the conditional
can be removed.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20190830135902.20861-5-vincenzo.frascino@arm.com

References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")

---
 lib/vdso/gettimeofday.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 8e77071..cd3aacf 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -126,13 +126,8 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_gettime_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_gettime_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret)) {
 		res->tv_sec = ts.tv_sec;
@@ -242,13 +237,8 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 
 	ret = __cvdso_clock_getres_common(clock, &ts);
 
-#ifdef VDSO_HAS_32BIT_FALLBACK
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
-#else
-	if (unlikely(ret))
-		ret = clock_getres_fallback(clock, &ts);
-#endif
 
 	if (likely(!ret && res)) {
 		res->tv_sec = ts.tv_sec;

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] lib/vdso: Build 32 bit specific functions in the right context
  2019-08-30 13:58   ` Vincenzo Frascino
                     ` (2 preceding siblings ...)
  (?)
@ 2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Andy Lutomirski, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     bf279849ad59538a1518c667c0795ec1fe9dbd66
Gitweb:        https://git.kernel.org/tip/bf279849ad59538a1518c667c0795ec1fe9dbd66
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:56 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:44 +01:00

lib/vdso: Build 32 bit specific functions in the right context

clock_gettime32 and clock_getres_time32 should be compiled only with a
32 bit vdso library.

Exclude these symbols when BUILD_VDSO32 is not defined.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20190830135902.20861-3-vincenzo.frascino@arm.com


---
 lib/vdso/gettimeofday.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 42bd8ab..8e77071 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -117,6 +117,7 @@ __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -139,6 +140,7 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 
 static __maybe_unused int
 __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
@@ -231,6 +233,7 @@ int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res)
 	return 0;
 }
 
+#ifdef BUILD_VDSO32
 static __maybe_unused int
 __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 {
@@ -253,4 +256,5 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	}
 	return ret;
 }
+#endif /* BUILD_VDSO32 */
 #endif /* VDSO_HAS_CLOCK_GETRES */

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] lib/vdso: Remove checks on return value for 32 bit vDSO
  2019-08-30 13:58   ` Vincenzo Frascino
                     ` (2 preceding siblings ...)
  (?)
@ 2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Vincenzo Frascino, Thomas Gleixner, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     a279235ddbe975670afe2267162028ec0a312293
Gitweb:        https://git.kernel.org/tip/a279235ddbe975670afe2267162028ec0a312293
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:59 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:45 +01:00

lib/vdso: Remove checks on return value for 32 bit vDSO

Since all the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks it is not required
anymore to check the return value of __cvdso_clock_get*time32_common()
before updating the old_timespec fields.

Remove the related checks from the generic vdso library.

References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20190830135902.20861-6-vincenzo.frascino@arm.com


---
 lib/vdso/gettimeofday.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index cd3aacf..b676a98 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -129,10 +129,10 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_gettime32_fallback(clock, res);
 
-	if (likely(!ret)) {
-		res->tv_sec = ts.tv_sec;
-		res->tv_nsec = ts.tv_nsec;
-	}
+	/* For ret == 0 */
+	res->tv_sec = ts.tv_sec;
+	res->tv_nsec = ts.tv_nsec;
+
 	return ret;
 }
 #endif /* BUILD_VDSO32 */
@@ -240,7 +240,7 @@ __cvdso_clock_getres_time32(clockid_t clock, struct old_timespec32 *res)
 	if (unlikely(ret))
 		return clock_getres32_fallback(clock, res);
 
-	if (likely(!ret && res)) {
+	if (likely(res)) {
 		res->tv_sec = ts.tv_sec;
 		res->tv_nsec = ts.tv_nsec;
 	}

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] ARM: vdso: Set BUILD_VDSO32 and provide 32bit fallbacks
  2020-01-13 22:28     ` Thomas Gleixner
  (?)
  (?)
@ 2020-01-14 13:02     ` tip-bot2 for Thomas Gleixner
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Thomas Gleixner @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Thomas Gleixner, Vincenzo Frascino, linux-arm-kernel, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     715f23b6104aa297feea20d4f200ca81941e23de
Gitweb:        https://git.kernel.org/tip/715f23b6104aa297feea20d4f200ca81941e23de
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Tue, 14 Jan 2020 09:41:09 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:43 +01:00

ARM: vdso: Set BUILD_VDSO32 and provide 32bit fallbacks

Setting BUILD_VDSO32 is required to expose the legacy 32bit interfaces in
the generic VDSO code which are going to be hidden behind an #ifdef
BUILD_VDSO32.

The 32bit fallbacks are necessary to remove the existing
VDSO_HAS_32BIT_FALLBACK hackery.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/87tv4zq9dc.fsf@nanos.tec.linutronix.de
---
 arch/arm/include/asm/vdso/gettimeofday.h | 36 +++++++++++++++++++++++-
 arch/arm/vdso/Makefile                   |  2 +-
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/vdso/gettimeofday.h b/arch/arm/include/asm/vdso/gettimeofday.h
index 0ad2429..fe6e1f6 100644
--- a/arch/arm/include/asm/vdso/gettimeofday.h
+++ b/arch/arm/include/asm/vdso/gettimeofday.h
@@ -52,6 +52,24 @@ static __always_inline long clock_gettime_fallback(
 	return ret;
 }
 
+static __always_inline long clock_gettime32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("r1") = _ts;
+	register clockid_t clkid asm("r0") = _clkid;
+	register long ret asm ("r0");
+	register long nr asm("r7") = __NR_clock_gettime;
+
+	asm volatile(
+	"	swi #0\n"
+	: "=r" (ret)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "memory");
+
+	return ret;
+}
+
 static __always_inline int clock_getres_fallback(
 					clockid_t _clkid,
 					struct __kernel_timespec *_ts)
@@ -70,6 +88,24 @@ static __always_inline int clock_getres_fallback(
 	return ret;
 }
 
+static __always_inline int clock_getres32_fallback(
+					clockid_t _clkid,
+					struct old_timespec32 *_ts)
+{
+	register struct old_timespec32 *ts asm("r1") = _ts;
+	register clockid_t clkid asm("r0") = _clkid;
+	register long ret asm ("r0");
+	register long nr asm("r7") = __NR_clock_getres;
+
+	asm volatile(
+	"       swi #0\n"
+	: "=r" (ret)
+	: "r" (clkid), "r" (ts), "r" (nr)
+	: "memory");
+
+	return ret;
+}
+
 static __always_inline u64 __arch_get_hw_counter(int clock_mode)
 {
 #ifdef CONFIG_ARM_ARCH_TIMER
diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
index 0fda344..1babb39 100644
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -14,7 +14,7 @@ targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.so.raw vdso.lds
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
 ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
-ccflags-y += -DDISABLE_BRANCH_PROFILING
+ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO32
 
 ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [tip: timers/core] arm64: compat: vdso: Expose BUILD_VDSO32
  2019-08-30 13:58   ` Vincenzo Frascino
                     ` (2 preceding siblings ...)
  (?)
@ 2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
  -1 siblings, 0 replies; 70+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-01-14 13:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Vincenzo Frascino, Thomas Gleixner, Catalin Marinas, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     3b5584afeef05319ade0fbf5f634a64fd3e5772b
Gitweb:        https://git.kernel.org/tip/3b5584afeef05319ade0fbf5f634a64fd3e5772b
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Fri, 30 Aug 2019 14:58:55 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 14 Jan 2020 12:20:43 +01:00

arm64: compat: vdso: Expose BUILD_VDSO32

clock_gettime32 and clock_getres_time32 should be compiled only with the
32 bit vdso library.

Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
indication to the generic library to include these symbols.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20190830135902.20861-2-vincenzo.frascino@arm.com


---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index c50ee1b..fe7afe0 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -17,6 +17,7 @@
 #define VDSO_HAS_CLOCK_GETRES		1
 
 #define VDSO_HAS_32BIT_FALLBACK		1
+#define BUILD_VDSO32			1
 
 static __always_inline
 int gettimeofday_fallback(struct __kernel_old_timeval *_tv,

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH] MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel
  2019-08-30 13:58   ` Vincenzo Frascino
                     ` (3 preceding siblings ...)
  (?)
@ 2020-01-16 19:43   ` Thomas Gleixner
  2020-01-16 20:11     ` Paul Burton
  2020-01-16 20:28     ` [tip: timers/core] " tip-bot2 for Thomas Gleixner
  -1 siblings, 2 replies; 70+ messages in thread
From: Thomas Gleixner @ 2020-01-16 19:43 UTC (permalink / raw)
  To: Vincenzo Frascino, linux-kernel, linux-mips
  Cc: paul.burton, luto, kbuild test robot

The confinement of the 32bit specific VDSO functions missed to define
BUILD_VDSO32 when building a 32bit MIPS kernel:

arch/mips/vdso/vgettimeofday.c: In function ‘__vdso_clock_gettime’:
arch/mips/vdso/vgettimeofday.c:17:9: error: implicit declaration of function ‘__cvdso_clock_gettime32’

arch/mips/vdso/vgettimeofday.c: In function ‘__vdso_clock_getres’:
arch/mips/vdso/vgettimeofday.c:39:9: error: implicit declaration of function ‘__cvdso_clock_getres_time32’

Force the define for 32bit builds in the VDSO Makefile.

Fixes: bf279849ad59 ("lib/vdso: Build 32 bit specific functions in the right context")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/mips/vdso/Makefile |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -18,6 +18,10 @@ ccflags-vdso := \
 	$(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \
 	-D__VDSO__
 
+ifndef CONFIG_64BIT
+ccflags-vdso += -DBUILD_VDSO32
+endif
+
 ifdef CONFIG_CC_IS_CLANG
 ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
 endif

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH] MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel
  2020-01-16 19:43   ` [PATCH] MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel Thomas Gleixner
@ 2020-01-16 20:11     ` Paul Burton
  2020-01-16 20:28     ` [tip: timers/core] " tip-bot2 for Thomas Gleixner
  1 sibling, 0 replies; 70+ messages in thread
From: Paul Burton @ 2020-01-16 20:11 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Vincenzo Frascino, linux-kernel, linux-mips, paul.burton, luto,
	kbuild test robot

Hi Thomas,

On Thu, Jan 16, 2020 at 08:43:41PM +0100, Thomas Gleixner wrote:
> The confinement of the 32bit specific VDSO functions missed to define
> BUILD_VDSO32 when building a 32bit MIPS kernel:
> 
> arch/mips/vdso/vgettimeofday.c: In function ‘__vdso_clock_gettime’:
> arch/mips/vdso/vgettimeofday.c:17:9: error: implicit declaration of function ‘__cvdso_clock_gettime32’
> 
> arch/mips/vdso/vgettimeofday.c: In function ‘__vdso_clock_getres’:
> arch/mips/vdso/vgettimeofday.c:39:9: error: implicit declaration of function ‘__cvdso_clock_getres_time32’
> 
> Force the define for 32bit builds in the VDSO Makefile.
> 
> Fixes: bf279849ad59 ("lib/vdso: Build 32 bit specific functions in the right context")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Presuming you want to take this through timers/core along with the patch
it fixes:

    Acked-by: Paul Burton <paulburton@kernel.org>

Thanks,
    Paul

> ---
>  arch/mips/vdso/Makefile |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- a/arch/mips/vdso/Makefile
> +++ b/arch/mips/vdso/Makefile
> @@ -18,6 +18,10 @@ ccflags-vdso := \
>  	$(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \
>  	-D__VDSO__
>  
> +ifndef CONFIG_64BIT
> +ccflags-vdso += -DBUILD_VDSO32
> +endif
> +
>  ifdef CONFIG_CC_IS_CLANG
>  ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
>  endif

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [tip: timers/core] MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel
  2020-01-16 19:43   ` [PATCH] MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel Thomas Gleixner
  2020-01-16 20:11     ` Paul Burton
@ 2020-01-16 20:28     ` tip-bot2 for Thomas Gleixner
  1 sibling, 0 replies; 70+ messages in thread
From: tip-bot2 for Thomas Gleixner @ 2020-01-16 20:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kbuild test robot, Thomas Gleixner, Paul Burton, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     99570c3da96a0f7aa11c6ad4981776f3adabf3b5
Gitweb:        https://git.kernel.org/tip/99570c3da96a0f7aa11c6ad4981776f3adabf3b5
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Thu, 16 Jan 2020 20:43:41 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 16 Jan 2020 21:24:25 +01:00

MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel

The confinement of the 32bit specific VDSO functions missed to define
BUILD_VDSO32 when building a 32bit MIPS kernel:

arch/mips/vdso/vgettimeofday.c: In function __vdso_clock_gettime:
arch/mips/vdso/vgettimeofday.c:17:9: error: implicit declaration of function __cvdso_clock_gettime32

arch/mips/vdso/vgettimeofday.c: In function __vdso_clock_getres:
arch/mips/vdso/vgettimeofday.c:39:9: error: implicit declaration of function __cvdso_clock_getres_time32

Force the define for 32bit builds in the VDSO Makefile.

Fixes: bf279849ad59 ("lib/vdso: Build 32 bit specific functions in the right context")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul Burton <paulburton@kernel.org>
Link: https://lore.kernel.org/r/87d0bjfaqa.fsf@nanos.tec.linutronix.de

---
 arch/mips/vdso/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index e059389..b2a2e03 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -18,6 +18,10 @@ ccflags-vdso := \
 	$(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \
 	-D__VDSO__
 
+ifndef CONFIG_64BIT
+ccflags-vdso += -DBUILD_VDSO32
+endif
+
 ifdef CONFIG_CC_IS_CLANG
 ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
 endif

^ permalink raw reply related	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2020-01-16 20:29 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 13:58 [PATCH v2 0/8] vdso: Complete the conversion to 32bit syscalls Vincenzo Frascino
2019-08-30 13:58 ` Vincenzo Frascino
2019-08-30 13:58 ` [PATCH v2 1/8] arm64: compat: vdso: Expose BUILD_VDSO32 Vincenzo Frascino
2019-08-30 13:58   ` Vincenzo Frascino
2019-09-03 14:36   ` Vincenzo Frascino
2019-09-03 14:36     ` Vincenzo Frascino
2019-09-03 14:38     ` Will Deacon
2019-09-03 14:38       ` Will Deacon
2020-01-13 19:09   ` [tip: timers/core] " tip-bot2 for Vincenzo Frascino
2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
2019-08-30 13:58 ` [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context Vincenzo Frascino
2019-08-30 13:58   ` Vincenzo Frascino
2020-01-13 19:09   ` [tip: timers/core] lib/vdso: " tip-bot2 for Vincenzo Frascino
2020-01-13 22:28   ` [PATCH v2 2/8] lib: vdso: " Thomas Gleixner
2020-01-13 22:28     ` Thomas Gleixner
2020-01-14  9:33     ` Thomas Gleixner
2020-01-14  9:33       ` Thomas Gleixner
2020-01-14 10:15       ` Vincenzo Frascino
2020-01-14 10:15         ` Vincenzo Frascino
2020-01-14 10:37         ` Thomas Gleixner
2020-01-14 10:37           ` Thomas Gleixner
2020-01-14 10:41           ` Vincenzo Frascino
2020-01-14 10:41             ` Vincenzo Frascino
2020-01-14 11:15           ` Vincenzo Frascino
2020-01-14 11:15             ` Vincenzo Frascino
2020-01-14 13:02     ` [tip: timers/core] ARM: vdso: Set BUILD_VDSO32 and provide 32bit fallbacks tip-bot2 for Thomas Gleixner
2020-01-14 13:02   ` [tip: timers/core] lib/vdso: Build 32 bit specific functions in the right context tip-bot2 for Vincenzo Frascino
2020-01-16 19:43   ` [PATCH] MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel Thomas Gleixner
2020-01-16 20:11     ` Paul Burton
2020-01-16 20:28     ` [tip: timers/core] " tip-bot2 for Thomas Gleixner
2019-08-30 13:58 ` [PATCH v2 3/8] mips: compat: vdso: Use legacy syscalls as fallback Vincenzo Frascino
2019-08-30 13:58   ` Vincenzo Frascino
2019-09-03 13:52   ` Paul Burton
2019-09-03 13:52     ` Paul Burton
2019-09-03 13:52     ` Paul Burton
2019-09-03 14:20     ` Vincenzo Frascino
2019-09-03 14:20       ` Vincenzo Frascino
2019-09-03 14:20       ` Vincenzo Frascino
2019-09-03 21:00   ` Paul Burton
2019-09-03 21:00     ` Paul Burton
2019-09-03 21:00     ` Paul Burton
2019-08-30 13:58 ` [PATCH v2 4/8] lib: vdso: Remove VDSO_HAS_32BIT_FALLBACK Vincenzo Frascino
2019-08-30 13:58   ` Vincenzo Frascino
2020-01-13 19:09   ` [tip: timers/core] lib/vdso: " tip-bot2 for Vincenzo Frascino
2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
2019-08-30 13:58 ` [PATCH v2 5/8] lib: vdso: Remove checks on return value for 32 bit vDSO Vincenzo Frascino
2019-08-30 13:58   ` Vincenzo Frascino
2019-08-30 14:16   ` Vincenzo Frascino
2019-08-30 14:16     ` Vincenzo Frascino
2020-01-13 19:09   ` [tip: timers/core] lib/vdso: " tip-bot2 for Vincenzo Frascino
2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
2019-08-30 13:59 ` [PATCH v2 6/8] arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK Vincenzo Frascino
2019-08-30 13:59   ` Vincenzo Frascino
2020-01-13 19:09   ` [tip: timers/core] " tip-bot2 for Vincenzo Frascino
2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
2019-08-30 13:59 ` [PATCH v2 7/8] mips: " Vincenzo Frascino
2019-08-30 13:59   ` Vincenzo Frascino
2019-09-03 14:46   ` Paul Burton
2019-09-03 14:46     ` Paul Burton
2019-09-03 14:46     ` Paul Burton
2019-09-03 14:46     ` Paul Burton
2019-09-03 14:51     ` Vincenzo Frascino
2019-09-03 14:51       ` Vincenzo Frascino
2019-09-03 14:51       ` Vincenzo Frascino
2020-01-13 19:09   ` [tip: timers/core] " tip-bot2 for Vincenzo Frascino
2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino
2019-08-30 13:59 ` [PATCH v2 8/8] x86: " Vincenzo Frascino
2019-08-30 13:59   ` Vincenzo Frascino
2020-01-13 19:09   ` [tip: timers/core] x86/vdso: " tip-bot2 for Vincenzo Frascino
2020-01-14 13:02   ` tip-bot2 for Vincenzo Frascino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.