* [PATCH 00/10] vdso: Misc cleanups and prevent code duplication
@ 2024-02-19 15:39 Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 01/10] vdso/helpers: Fix grammar in comments Anna-Maria Behnsen
` (11 more replies)
0 siblings, 12 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen
Hi,
the vdso related cleanup queue contains two parts:
- Patch 1-3: Misc cleanups related to a comment, a superfluous header
include and ifdeffery
- Patch 4-10: The union vdso_data_store is defined in seven
architectures. Make this union available in a generic vdso
header file to prevent code duplication and fix the
architectures one by one to use the generic vdso_data_store.
Thanks,
Anna-Maria
Anna-Maria Behnsen (10):
vdso/helpers: Fix grammar in comments
s390/vdso/data: Drop unnecessary header include
csky/vdso: Remove superfluous ifdeffery
vdso/arm: make union vdso_data_store available for all
arm64/vdso: Use generic union vdso_data_store
riscv/vdso: Use generic union vdso_data_store
s390/vdso: Use generic union vdso_data_store
loongarch/vdso: Use generic union vdso_data_store
mips/vdso: Use generic union vdso_data_store
csky/vdso: Use generic union vdso_data_store
arch/arm/include/asm/elf.h | 1 -
arch/arm/include/asm/vdso_datapage.h | 26 --------------------------
arch/arm/kernel/asm-offsets.c | 4 +++-
arch/arm/kernel/vdso.c | 4 ----
arch/arm64/kernel/vdso.c | 5 +----
arch/csky/include/asm/vdso.h | 5 -----
arch/csky/kernel/vdso.c | 14 ++------------
arch/loongarch/kernel/vdso.c | 6 ++----
arch/mips/include/asm/vdso.h | 5 -----
arch/mips/kernel/vdso.c | 2 +-
arch/riscv/kernel/vdso.c | 8 +-------
arch/s390/include/asm/vdso/data.h | 1 -
arch/s390/kernel/vdso.c | 5 +----
include/vdso/datapage.h | 10 ++++++++++
include/vdso/helpers.h | 8 ++++----
15 files changed, 25 insertions(+), 79 deletions(-)
delete mode 100644 arch/arm/include/asm/vdso_datapage.h
--
2.39.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 01/10] vdso/helpers: Fix grammar in comments
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 02/10] s390/vdso/data: Drop unnecessary header include Anna-Maria Behnsen
` (10 subsequent siblings)
11 siblings, 1 reply; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
include/vdso/helpers.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h
index 9a2af9fca45e..73501149439d 100644
--- a/include/vdso/helpers.h
+++ b/include/vdso/helpers.h
@@ -30,9 +30,9 @@ static __always_inline u32 vdso_read_retry(const struct vdso_data *vd,
static __always_inline void vdso_write_begin(struct vdso_data *vd)
{
/*
- * WRITE_ONCE it is required otherwise the compiler can validly tear
+ * WRITE_ONCE() is required otherwise the compiler can validly tear
* updates to vd[x].seq and it is possible that the value seen by the
- * reader it is inconsistent.
+ * reader is inconsistent.
*/
WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
@@ -43,9 +43,9 @@ static __always_inline void vdso_write_end(struct vdso_data *vd)
{
smp_wmb();
/*
- * WRITE_ONCE it is required otherwise the compiler can validly tear
+ * WRITE_ONCE() is required otherwise the compiler can validly tear
* updates to vd[x].seq and it is possible that the value seen by the
- * reader it is inconsistent.
+ * reader is inconsistent.
*/
WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 02/10] s390/vdso/data: Drop unnecessary header include
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 01/10] vdso/helpers: Fix grammar in comments Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-19 16:21 ` Heiko Carstens
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery Anna-Maria Behnsen
` (9 subsequent siblings)
11 siblings, 2 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, linux-s390
vdso/datapage.h includes the arch specific vdso/data.h file. So there is no
need to do it also the other way round and including the generic
vdso/datapage.h file inside the arch specific data.h file.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
---
arch/s390/include/asm/vdso/data.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/s390/include/asm/vdso/data.h b/arch/s390/include/asm/vdso/data.h
index 73ee89142666..0e2b40ef69b0 100644
--- a/arch/s390/include/asm/vdso/data.h
+++ b/arch/s390/include/asm/vdso/data.h
@@ -3,7 +3,6 @@
#define __S390_ASM_VDSO_DATA_H
#include <linux/types.h>
-#include <vdso/datapage.h>
struct arch_vdso_data {
__s64 tod_steering_delta;
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 01/10] vdso/helpers: Fix grammar in comments Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 02/10] s390/vdso/data: Drop unnecessary header include Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 1:12 ` Guo Ren
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 04/10] vdso/arm: make union vdso_data_store available for all Anna-Maria Behnsen
` (8 subsequent siblings)
11 siblings, 2 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Guo Ren, linux-csky
CSKY selects GENERIC_TIME_VSYSCALL. GENERIC_TIME_VSYSCALL dependent
ifdeffery is superfluous. Clean it up.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Guo Ren <guoren@kernel.org>
Cc: linux-csky@vger.kernel.org
---
arch/csky/include/asm/vdso.h | 5 -----
arch/csky/kernel/vdso.c | 4 ----
2 files changed, 9 deletions(-)
diff --git a/arch/csky/include/asm/vdso.h b/arch/csky/include/asm/vdso.h
index bdce581b5fcb..181a15edafe8 100644
--- a/arch/csky/include/asm/vdso.h
+++ b/arch/csky/include/asm/vdso.h
@@ -5,11 +5,6 @@
#include <linux/types.h>
-#ifndef GENERIC_TIME_VSYSCALL
-struct vdso_data {
-};
-#endif
-
/*
* The VDSO symbols are mapped into Linux so we can just use regular symbol
* addressing to get their offsets in userspace. The symbols are mapped at an
diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c
index 16c20d64d165..e74a2504d331 100644
--- a/arch/csky/kernel/vdso.c
+++ b/arch/csky/kernel/vdso.c
@@ -8,11 +8,7 @@
#include <linux/slab.h>
#include <asm/page.h>
-#ifdef GENERIC_TIME_VSYSCALL
#include <vdso/datapage.h>
-#else
-#include <asm/vdso.h>
-#endif
extern char vdso_start[], vdso_end[];
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 04/10] vdso/arm: make union vdso_data_store available for all
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (2 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] vdso/ARM: Make union vdso_data_store available for all architectures tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store Anna-Maria Behnsen
` (7 subsequent siblings)
11 siblings, 1 reply; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Russell King, Eric Biederman, Kees Cook,
linux-mm, linux-arm-kernel
The vDSO data page "union vdso_data_store" is defined in an arm header file
and also defined in several other places.
Move the definition from arm header file into the generic vdso datapage
header to make it also usable for others and to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-mm@kvack.org
Cc: linux-arm-kernel@lists.infradead.org
---
arch/arm/include/asm/elf.h | 1 -
arch/arm/include/asm/vdso_datapage.h | 26 --------------------------
arch/arm/kernel/asm-offsets.c | 4 +++-
arch/arm/kernel/vdso.c | 4 ----
include/vdso/datapage.h | 10 ++++++++++
5 files changed, 13 insertions(+), 32 deletions(-)
delete mode 100644 arch/arm/include/asm/vdso_datapage.h
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index d68101655b74..9f21e170320f 100644
--- a/arch/arm/include/asm/elf.h
+++ b/arch/arm/include/asm/elf.h
@@ -4,7 +4,6 @@
#include <asm/auxvec.h>
#include <asm/hwcap.h>
-#include <asm/vdso_datapage.h>
/*
* ELF register definitions..
diff --git a/arch/arm/include/asm/vdso_datapage.h b/arch/arm/include/asm/vdso_datapage.h
deleted file mode 100644
index bef68f59928d..000000000000
--- a/arch/arm/include/asm/vdso_datapage.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Adapted from arm64 version.
- *
- * Copyright (C) 2012 ARM Limited
- */
-#ifndef __ASM_VDSO_DATAPAGE_H
-#define __ASM_VDSO_DATAPAGE_H
-
-#ifdef __KERNEL__
-
-#ifndef __ASSEMBLY__
-
-#include <vdso/datapage.h>
-#include <asm/page.h>
-
-union vdso_data_store {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-};
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASM_VDSO_DATAPAGE_H */
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
index 219cbc7e5d13..4915662842ff 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
@@ -21,10 +21,12 @@
#include <asm/mpu.h>
#include <asm/procinfo.h>
#include <asm/suspend.h>
-#include <asm/vdso_datapage.h>
#include <asm/hardware/cache-l2x0.h>
#include <linux/kbuild.h>
#include <linux/arm-smccc.h>
+
+#include <vdso/datapage.h>
+
#include "signal.h"
/*
diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index f297d66a8a76..d499ad461b00 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -21,7 +21,6 @@
#include <asm/cacheflush.h>
#include <asm/page.h>
#include <asm/vdso.h>
-#include <asm/vdso_datapage.h>
#include <clocksource/arm_arch_timer.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
@@ -35,9 +34,6 @@ extern char vdso_start[], vdso_end[];
/* Total number of pages needed for the data and text portions of the VDSO. */
unsigned int vdso_total_pages __ro_after_init;
-/*
- * The VDSO data page.
- */
static union vdso_data_store vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = vdso_data_store.data;
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 73eb622e7663..7ba44379a095 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -19,6 +19,8 @@
#include <vdso/time32.h>
#include <vdso/time64.h>
+#include <asm/page.h>
+
#ifdef CONFIG_ARCH_HAS_VDSO_DATA
#include <asm/vdso/data.h>
#else
@@ -121,6 +123,14 @@ struct vdso_data {
extern struct vdso_data _vdso_data[CS_BASES] __attribute__((visibility("hidden")));
extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("hidden")));
+/**
+ * union vdso_data_store - Generic vDSO data page
+ */
+union vdso_data_store {
+ struct vdso_data data[CS_BASES];
+ u8 page[PAGE_SIZE];
+};
+
/*
* The generic vDSO implementation requires that gettimeofday.h
* provides:
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (3 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 04/10] vdso/arm: make union vdso_data_store available for all Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] arm64: vdso: " tip-bot2 for Anna-Maria Behnsen
2024-02-22 15:41 ` [PATCH 05/10] arm64/vdso: " Will Deacon
2024-02-19 15:39 ` [PATCH 06/10] riscv/vdso: " Anna-Maria Behnsen
` (6 subsequent siblings)
11 siblings, 2 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Catalin Marinas, Will Deacon,
linux-arm-kernel
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
---
arch/arm64/kernel/vdso.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 5562daf38a22..89b6e7840002 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -69,10 +69,7 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = {
/*
* The vDSO data page.
*/
-static union {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = vdso_data_store.data;
static int vdso_mremap(const struct vm_special_mapping *sm,
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 06/10] riscv/vdso: Use generic union vdso_data_store
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (4 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 6:45 ` kernel test robot
2024-02-20 8:52 ` [PATCH v1a] " Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 07/10] s390/vdso: " Anna-Maria Behnsen
` (5 subsequent siblings)
11 siblings, 2 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Paul Walmsley, Palmer Dabbelt, Albert Ou,
linux-riscv
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
---
arch/riscv/kernel/vdso.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c
index 2cf76218a5bd..100cdea6d3e3 100644
--- a/arch/riscv/kernel/vdso.c
+++ b/arch/riscv/kernel/vdso.c
@@ -30,13 +30,7 @@ enum rv_vdso_map {
#define VVAR_SIZE (VVAR_NR_PAGES << PAGE_SHIFT)
-/*
- * The vDSO data page.
- */
-static union {
- struct vdso_data data;
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = &vdso_data_store.data;
struct __vdso_info {
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 07/10] s390/vdso: Use generic union vdso_data_store
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (5 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 06/10] riscv/vdso: " Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-19 16:22 ` Heiko Carstens
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 08/10] loongarch/vdso: " Anna-Maria Behnsen
` (4 subsequent siblings)
11 siblings, 2 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, linux-s390
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
---
arch/s390/kernel/vdso.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index bbaefd84f15e..a45b3a4c91db 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -25,10 +25,7 @@ extern char vdso32_start[], vdso32_end[];
static struct vm_special_mapping vvar_mapping;
-static union {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = vdso_data_store.data;
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 08/10] loongarch/vdso: Use generic union vdso_data_store
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (6 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 07/10] s390/vdso: " Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] LoongArch: vdso: " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 09/10] mips/vdso: " Anna-Maria Behnsen
` (3 subsequent siblings)
11 siblings, 1 reply; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Huacai Chen, loongarch
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: loongarch@lists.linux.dev
---
arch/loongarch/kernel/vdso.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c
index 14941e4be66d..90dfccb41c14 100644
--- a/arch/loongarch/kernel/vdso.c
+++ b/arch/loongarch/kernel/vdso.c
@@ -21,15 +21,13 @@
#include <asm/vdso.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
+#include <vdso/datapage.h>
#include <generated/vdso-offsets.h>
extern char vdso_start[], vdso_end[];
/* Kernel-provided data used by the VDSO. */
-static union {
- u8 page[PAGE_SIZE];
- struct vdso_data data[CS_BASES];
-} generic_vdso_data __page_aligned_data;
+static union vdso_data_store generic_vdso_data __page_aligned_data;
static union {
u8 page[LOONGARCH_VDSO_DATA_SIZE];
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 09/10] mips/vdso: Use generic union vdso_data_store
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (7 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 08/10] loongarch/vdso: " Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] MIPS: vdso: " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 10/10] csky/vdso: " Anna-Maria Behnsen
` (2 subsequent siblings)
11 siblings, 1 reply; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Thomas Bogendoerfer, linux-mips
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
---
arch/mips/include/asm/vdso.h | 5 -----
arch/mips/kernel/vdso.c | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/mips/include/asm/vdso.h b/arch/mips/include/asm/vdso.h
index cc7b516129a8..afb03d45bcd0 100644
--- a/arch/mips/include/asm/vdso.h
+++ b/arch/mips/include/asm/vdso.h
@@ -50,9 +50,4 @@ extern struct mips_vdso_image vdso_image_o32;
extern struct mips_vdso_image vdso_image_n32;
#endif
-union mips_vdso_data {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-};
-
#endif /* __ASM_VDSO_H */
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c
index f6d40e43f108..dda36fa26307 100644
--- a/arch/mips/kernel/vdso.c
+++ b/arch/mips/kernel/vdso.c
@@ -24,7 +24,7 @@
#include <vdso/vsyscall.h>
/* Kernel-provided data used by the VDSO. */
-static union mips_vdso_data mips_vdso_data __page_aligned_data;
+static union vdso_data_store mips_vdso_data __page_aligned_data;
struct vdso_data *vdso_data = mips_vdso_data.data;
/*
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 10/10] csky/vdso: Use generic union vdso_data_store
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (8 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 09/10] mips/vdso: " Anna-Maria Behnsen
@ 2024-02-19 15:39 ` Anna-Maria Behnsen
2024-02-20 1:13 ` Guo Ren
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-20 0:26 ` [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Kees Cook
2024-02-20 14:48 ` Vincenzo Frascino
11 siblings, 2 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-19 15:39 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Guo Ren, linux-csky
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Guo Ren <guoren@kernel.org>
Cc: linux-csky@vger.kernel.org
---
arch/csky/kernel/vdso.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c
index e74a2504d331..2ca886e4a458 100644
--- a/arch/csky/kernel/vdso.c
+++ b/arch/csky/kernel/vdso.c
@@ -15,14 +15,8 @@ extern char vdso_start[], vdso_end[];
static unsigned int vdso_pages;
static struct page **vdso_pagelist;
-/*
- * The vDSO data page.
- */
-static union {
- struct vdso_data data;
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
-struct vdso_data *vdso_data = &vdso_data_store.data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
+struct vdso_data *vdso_data = vdso_data_store.data;
static int __init vdso_init(void)
{
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 02/10] s390/vdso/data: Drop unnecessary header include
2024-02-19 15:39 ` [PATCH 02/10] s390/vdso/data: Drop unnecessary header include Anna-Maria Behnsen
@ 2024-02-19 16:21 ` Heiko Carstens
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: Heiko Carstens @ 2024-02-19 16:21 UTC (permalink / raw)
To: Anna-Maria Behnsen
Cc: linux-kernel, Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Vasily Gorbik, Alexander Gordeev, linux-s390
On Mon, Feb 19, 2024 at 04:39:31PM +0100, Anna-Maria Behnsen wrote:
> vdso/datapage.h includes the arch specific vdso/data.h file. So there is no
> need to do it also the other way round and including the generic
> vdso/datapage.h file inside the arch specific data.h file.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> ---
> arch/s390/include/asm/vdso/data.h | 1 -
> 1 file changed, 1 deletion(-)
Acked-by: Heiko Carstens <hca@linux.ibm.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 07/10] s390/vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 07/10] s390/vdso: " Anna-Maria Behnsen
@ 2024-02-19 16:22 ` Heiko Carstens
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: Heiko Carstens @ 2024-02-19 16:22 UTC (permalink / raw)
To: Anna-Maria Behnsen
Cc: linux-kernel, Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Vasily Gorbik, Alexander Gordeev, linux-s390
On Mon, Feb 19, 2024 at 04:39:36PM +0100, Anna-Maria Behnsen wrote:
> There is already a generic union definition for vdso_data_store in vdso
> datapage header.
>
> Use this definition to prevent code duplication.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> ---
> arch/s390/kernel/vdso.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Acked-by: Heiko Carstens <hca@linux.ibm.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/10] vdso: Misc cleanups and prevent code duplication
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (9 preceding siblings ...)
2024-02-19 15:39 ` [PATCH 10/10] csky/vdso: " Anna-Maria Behnsen
@ 2024-02-20 0:26 ` Kees Cook
2024-02-20 9:50 ` Anna-Maria Behnsen
2024-02-20 14:48 ` Vincenzo Frascino
11 siblings, 1 reply; 31+ messages in thread
From: Kees Cook @ 2024-02-20 0:26 UTC (permalink / raw)
To: Anna-Maria Behnsen
Cc: linux-kernel, Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
On Mon, Feb 19, 2024 at 04:39:29PM +0100, Anna-Maria Behnsen wrote:
> Hi,
>
> the vdso related cleanup queue contains two parts:
>
> - Patch 1-3: Misc cleanups related to a comment, a superfluous header
> include and ifdeffery
>
> - Patch 4-10: The union vdso_data_store is defined in seven
> architectures. Make this union available in a generic vdso
> header file to prevent code duplication and fix the
> architectures one by one to use the generic vdso_data_store.
>
> Thanks,
>
> Anna-Maria
I do love a good clean-up! Thanks for this, I looked through all the
patches and they seem correct to me; removed definitions are all
identical, and __page_aligned_data is kept where needed.
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
--
Kees Cook
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery
2024-02-19 15:39 ` [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery Anna-Maria Behnsen
@ 2024-02-20 1:12 ` Guo Ren
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: Guo Ren @ 2024-02-20 1:12 UTC (permalink / raw)
To: Anna-Maria Behnsen
Cc: linux-kernel, Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
linux-csky
On Mon, Feb 19, 2024 at 11:40 PM Anna-Maria Behnsen
<anna-maria@linutronix.de> wrote:
>
> CSKY selects GENERIC_TIME_VSYSCALL. GENERIC_TIME_VSYSCALL dependent
> ifdeffery is superfluous. Clean it up.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Cc: Guo Ren <guoren@kernel.org>
> Cc: linux-csky@vger.kernel.org
> ---
> arch/csky/include/asm/vdso.h | 5 -----
> arch/csky/kernel/vdso.c | 4 ----
> 2 files changed, 9 deletions(-)
>
> diff --git a/arch/csky/include/asm/vdso.h b/arch/csky/include/asm/vdso.h
> index bdce581b5fcb..181a15edafe8 100644
> --- a/arch/csky/include/asm/vdso.h
> +++ b/arch/csky/include/asm/vdso.h
> @@ -5,11 +5,6 @@
>
> #include <linux/types.h>
>
> -#ifndef GENERIC_TIME_VSYSCALL
> -struct vdso_data {
> -};
> -#endif
> -
> /*
> * The VDSO symbols are mapped into Linux so we can just use regular symbol
> * addressing to get their offsets in userspace. The symbols are mapped at an
> diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c
> index 16c20d64d165..e74a2504d331 100644
> --- a/arch/csky/kernel/vdso.c
> +++ b/arch/csky/kernel/vdso.c
> @@ -8,11 +8,7 @@
> #include <linux/slab.h>
>
> #include <asm/page.h>
> -#ifdef GENERIC_TIME_VSYSCALL
> #include <vdso/datapage.h>
> -#else
> -#include <asm/vdso.h>
> -#endif
>
> extern char vdso_start[], vdso_end[];
>
> --
> 2.39.2
>
Acked-by: Guo Ren <guoren@kernel.org>
--
Best Regards
Guo Ren
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 10/10] csky/vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 10/10] csky/vdso: " Anna-Maria Behnsen
@ 2024-02-20 1:13 ` Guo Ren
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: Guo Ren @ 2024-02-20 1:13 UTC (permalink / raw)
To: Anna-Maria Behnsen
Cc: linux-kernel, Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
linux-csky
On Mon, Feb 19, 2024 at 11:40 PM Anna-Maria Behnsen
<anna-maria@linutronix.de> wrote:
>
> There is already a generic union definition for vdso_data_store in vdso
> datapage header.
>
> Use this definition to prevent code duplication.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Cc: Guo Ren <guoren@kernel.org>
> Cc: linux-csky@vger.kernel.org
> ---
> arch/csky/kernel/vdso.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c
> index e74a2504d331..2ca886e4a458 100644
> --- a/arch/csky/kernel/vdso.c
> +++ b/arch/csky/kernel/vdso.c
> @@ -15,14 +15,8 @@ extern char vdso_start[], vdso_end[];
> static unsigned int vdso_pages;
> static struct page **vdso_pagelist;
>
> -/*
> - * The vDSO data page.
> - */
> -static union {
> - struct vdso_data data;
> - u8 page[PAGE_SIZE];
> -} vdso_data_store __page_aligned_data;
> -struct vdso_data *vdso_data = &vdso_data_store.data;
> +static union vdso_data_store vdso_data_store __page_aligned_data;
> +struct vdso_data *vdso_data = vdso_data_store.data;
>
> static int __init vdso_init(void)
> {
> --
> 2.39.2
>
Acked-by: Guo Ren <guoren@kernel.org>
--
Best Regards
Guo Ren
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 06/10] riscv/vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 06/10] riscv/vdso: " Anna-Maria Behnsen
@ 2024-02-20 6:45 ` kernel test robot
2024-02-20 8:52 ` [PATCH v1a] " Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: kernel test robot @ 2024-02-20 6:45 UTC (permalink / raw)
To: Anna-Maria Behnsen, linux-kernel
Cc: oe-kbuild-all, Andy Lutomirski, Thomas Gleixner,
Vincenzo Frascino, Anna-Maria Behnsen, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-riscv
Hi Anna-Maria,
kernel test robot noticed the following build errors:
[auto build test ERROR on s390/features]
[also build test ERROR on kees/for-next/execve arm64/for-next/core linus/master v6.8-rc5 next-20240219]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Anna-Maria-Behnsen/vdso-helpers-Fix-grammar-in-comments/20240219-234251
base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
patch link: https://lore.kernel.org/r/20240219153939.75719-7-anna-maria%40linutronix.de
patch subject: [PATCH 06/10] riscv/vdso: Use generic union vdso_data_store
config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20240220/202402201410.g0YeFhx8-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240220/202402201410.g0YeFhx8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402201410.g0YeFhx8-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/riscv/kernel/vdso.c:34:31: error: initialization of 'struct vdso_data *' from incompatible pointer type 'struct vdso_data (*)[2]' [-Werror=incompatible-pointer-types]
34 | struct vdso_data *vdso_data = &vdso_data_store.data;
| ^
cc1: some warnings being treated as errors
vim +34 arch/riscv/kernel/vdso.c
78a743cd82a35c Tong Tiangen 2021-09-01 32
2f3f68e0423414 Anna-Maria Behnsen 2024-02-19 33 static union vdso_data_store vdso_data_store __page_aligned_data;
ad5d1122b82fbd Vincent Chen 2020-06-09 @34 struct vdso_data *vdso_data = &vdso_data_store.data;
76d2a0493a17d4 Palmer Dabbelt 2017-07-10 35
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v1a] riscv/vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 06/10] riscv/vdso: " Anna-Maria Behnsen
2024-02-20 6:45 ` kernel test robot
@ 2024-02-20 8:52 ` Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] riscv: vdso: " tip-bot2 for Anna-Maria Behnsen
1 sibling, 1 reply; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-20 8:52 UTC (permalink / raw)
To: linux-kernel
Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Anna-Maria Behnsen, Paul Walmsley, Palmer Dabbelt, Albert Ou,
linux-riscv
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
---
arch/riscv/kernel/vdso.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c
index 2cf76218a5bd..98315b98256d 100644
--- a/arch/riscv/kernel/vdso.c
+++ b/arch/riscv/kernel/vdso.c
@@ -30,14 +30,8 @@ enum rv_vdso_map {
#define VVAR_SIZE (VVAR_NR_PAGES << PAGE_SHIFT)
-/*
- * The vDSO data page.
- */
-static union {
- struct vdso_data data;
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
-struct vdso_data *vdso_data = &vdso_data_store.data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
+struct vdso_data *vdso_data = vdso_data_store.data;
struct __vdso_info {
const char *name;
--
2.39.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 00/10] vdso: Misc cleanups and prevent code duplication
2024-02-20 0:26 ` [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Kees Cook
@ 2024-02-20 9:50 ` Anna-Maria Behnsen
0 siblings, 0 replies; 31+ messages in thread
From: Anna-Maria Behnsen @ 2024-02-20 9:50 UTC (permalink / raw)
To: Kees Cook
Cc: linux-kernel, Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
Kees Cook <keescook@chromium.org> writes:
> On Mon, Feb 19, 2024 at 04:39:29PM +0100, Anna-Maria Behnsen wrote:
>> Hi,
>>
>> the vdso related cleanup queue contains two parts:
>>
>> - Patch 1-3: Misc cleanups related to a comment, a superfluous header
>> include and ifdeffery
>>
>> - Patch 4-10: The union vdso_data_store is defined in seven
>> architectures. Make this union available in a generic vdso
>> header file to prevent code duplication and fix the
>> architectures one by one to use the generic vdso_data_store.
>>
>> Thanks,
>>
>> Anna-Maria
>
> I do love a good clean-up! Thanks for this, I looked through all the
> patches and they seem correct to me;
Thank you! I had a mistake in there and already posted a new version for
this single patch - I forgot to update this patch before posting...
> removed definitions are all
> identical, and __page_aligned_data is kept where needed.
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
> -Kees
Thanks,
Anna-Maria
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 00/10] vdso: Misc cleanups and prevent code duplication
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
` (10 preceding siblings ...)
2024-02-20 0:26 ` [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Kees Cook
@ 2024-02-20 14:48 ` Vincenzo Frascino
11 siblings, 0 replies; 31+ messages in thread
From: Vincenzo Frascino @ 2024-02-20 14:48 UTC (permalink / raw)
To: Anna-Maria Behnsen, linux-kernel; +Cc: Andy Lutomirski, Thomas Gleixner
On 19/02/2024 15:39, Anna-Maria Behnsen wrote:
> Hi,
>
> the vdso related cleanup queue contains two parts:
>
> - Patch 1-3: Misc cleanups related to a comment, a superfluous header
> include and ifdeffery
>
> - Patch 4-10: The union vdso_data_store is defined in seven
> architectures. Make this union available in a generic vdso
> header file to prevent code duplication and fix the
> architectures one by one to use the generic vdso_data_store.
>
> Thanks,
>
> Anna-Maria
>
>
Really good cleanup. Thank you for this.
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Anna-Maria Behnsen (10):
> vdso/helpers: Fix grammar in comments
> s390/vdso/data: Drop unnecessary header include
> csky/vdso: Remove superfluous ifdeffery
> vdso/arm: make union vdso_data_store available for all
> arm64/vdso: Use generic union vdso_data_store
> riscv/vdso: Use generic union vdso_data_store
> s390/vdso: Use generic union vdso_data_store
> loongarch/vdso: Use generic union vdso_data_store
> mips/vdso: Use generic union vdso_data_store
> csky/vdso: Use generic union vdso_data_store
>
> arch/arm/include/asm/elf.h | 1 -
> arch/arm/include/asm/vdso_datapage.h | 26 --------------------------
> arch/arm/kernel/asm-offsets.c | 4 +++-
> arch/arm/kernel/vdso.c | 4 ----
> arch/arm64/kernel/vdso.c | 5 +----
> arch/csky/include/asm/vdso.h | 5 -----
> arch/csky/kernel/vdso.c | 14 ++------------
> arch/loongarch/kernel/vdso.c | 6 ++----
> arch/mips/include/asm/vdso.h | 5 -----
> arch/mips/kernel/vdso.c | 2 +-
> arch/riscv/kernel/vdso.c | 8 +-------
> arch/s390/include/asm/vdso/data.h | 1 -
> arch/s390/kernel/vdso.c | 5 +----
> include/vdso/datapage.h | 10 ++++++++++
> include/vdso/helpers.h | 8 ++++----
> 15 files changed, 25 insertions(+), 79 deletions(-)
> delete mode 100644 arch/arm/include/asm/vdso_datapage.h
>
--
Regards,
Vincenzo
^ permalink raw reply [flat|nested] 31+ messages in thread
* [tip: timers/core] csky/vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 10/10] csky/vdso: " Anna-Maria Behnsen
2024-02-20 1:13 ` Guo Ren
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
Guo Ren, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 56145a0f84e8862aeb3b36d6e21349bb4dd64269
Gitweb: https://git.kernel.org/tip/56145a0f84e8862aeb3b36d6e21349bb4dd64269
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:39 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:01 +01:00
csky/vdso: Use generic union vdso_data_store
There is already a generic union definition for vdso_data_store in the vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20240219153939.75719-11-anna-maria@linutronix.de
---
arch/csky/kernel/vdso.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c
index e74a250..2ca886e 100644
--- a/arch/csky/kernel/vdso.c
+++ b/arch/csky/kernel/vdso.c
@@ -15,14 +15,8 @@ extern char vdso_start[], vdso_end[];
static unsigned int vdso_pages;
static struct page **vdso_pagelist;
-/*
- * The vDSO data page.
- */
-static union {
- struct vdso_data data;
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
-struct vdso_data *vdso_data = &vdso_data_store.data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
+struct vdso_data *vdso_data = vdso_data_store.data;
static int __init vdso_init(void)
{
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] MIPS: vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 09/10] mips/vdso: " Anna-Maria Behnsen
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
0 siblings, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: d697a9997a0dfd1fcb26144f383c38e371b191b0
Gitweb: https://git.kernel.org/tip/d697a9997a0dfd1fcb26144f383c38e371b191b0
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:38 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:01 +01:00
MIPS: vdso: Use generic union vdso_data_store
There is already a generic union definition for vdso_data_store in the vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20240219153939.75719-10-anna-maria@linutronix.de
---
arch/mips/include/asm/vdso.h | 5 -----
arch/mips/kernel/vdso.c | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/mips/include/asm/vdso.h b/arch/mips/include/asm/vdso.h
index cc7b516..afb03d4 100644
--- a/arch/mips/include/asm/vdso.h
+++ b/arch/mips/include/asm/vdso.h
@@ -50,9 +50,4 @@ extern struct mips_vdso_image vdso_image_o32;
extern struct mips_vdso_image vdso_image_n32;
#endif
-union mips_vdso_data {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-};
-
#endif /* __ASM_VDSO_H */
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c
index f6d40e4..dda36fa 100644
--- a/arch/mips/kernel/vdso.c
+++ b/arch/mips/kernel/vdso.c
@@ -24,7 +24,7 @@
#include <vdso/vsyscall.h>
/* Kernel-provided data used by the VDSO. */
-static union mips_vdso_data mips_vdso_data __page_aligned_data;
+static union vdso_data_store mips_vdso_data __page_aligned_data;
struct vdso_data *vdso_data = mips_vdso_data.data;
/*
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] LoongArch: vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 08/10] loongarch/vdso: " Anna-Maria Behnsen
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
0 siblings, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 8d87d2cd1d0136452d2afcd143e511ccad49018f
Gitweb: https://git.kernel.org/tip/8d87d2cd1d0136452d2afcd143e511ccad49018f
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:37 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
LoongArch: vdso: Use generic union vdso_data_store
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20240219153939.75719-9-anna-maria@linutronix.de
---
arch/loongarch/kernel/vdso.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c
index 14941e4..90dfccb 100644
--- a/arch/loongarch/kernel/vdso.c
+++ b/arch/loongarch/kernel/vdso.c
@@ -21,15 +21,13 @@
#include <asm/vdso.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
+#include <vdso/datapage.h>
#include <generated/vdso-offsets.h>
extern char vdso_start[], vdso_end[];
/* Kernel-provided data used by the VDSO. */
-static union {
- u8 page[PAGE_SIZE];
- struct vdso_data data[CS_BASES];
-} generic_vdso_data __page_aligned_data;
+static union vdso_data_store generic_vdso_data __page_aligned_data;
static union {
u8 page[LOONGARCH_VDSO_DATA_SIZE];
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] s390/vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 07/10] s390/vdso: " Anna-Maria Behnsen
2024-02-19 16:22 ` Heiko Carstens
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
Heiko Carstens, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: cb3444cfdb48b7ee7d208d19c97a29dd8252d884
Gitweb: https://git.kernel.org/tip/cb3444cfdb48b7ee7d208d19c97a29dd8252d884
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:36 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
s390/vdso: Use generic union vdso_data_store
There is already a generic union definition for vdso_data_store in the vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20240219153939.75719-8-anna-maria@linutronix.de
---
arch/s390/kernel/vdso.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index bbaefd8..a45b3a4 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -25,10 +25,7 @@ extern char vdso32_start[], vdso32_end[];
static struct vm_special_mapping vvar_mapping;
-static union {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = vdso_data_store.data;
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] riscv: vdso: Use generic union vdso_data_store
2024-02-20 8:52 ` [PATCH v1a] " Anna-Maria Behnsen
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
0 siblings, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Anna-Maria Behnsen, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: eba755314fa7bcb147193f51a44546697f3888f1
Gitweb: https://git.kernel.org/tip/eba755314fa7bcb147193f51a44546697f3888f1
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Tue, 20 Feb 2024 09:52:12 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
riscv: vdso: Use generic union vdso_data_store
There is already a generic union definition for vdso_data_store in the vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240220085212.6547-1-anna-maria@linutronix.de
---
arch/riscv/kernel/vdso.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c
index 2cf7621..98315b9 100644
--- a/arch/riscv/kernel/vdso.c
+++ b/arch/riscv/kernel/vdso.c
@@ -30,14 +30,8 @@ enum rv_vdso_map {
#define VVAR_SIZE (VVAR_NR_PAGES << PAGE_SHIFT)
-/*
- * The vDSO data page.
- */
-static union {
- struct vdso_data data;
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
-struct vdso_data *vdso_data = &vdso_data_store.data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
+struct vdso_data *vdso_data = vdso_data_store.data;
struct __vdso_info {
const char *name;
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] arm64: vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store Anna-Maria Behnsen
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
2024-02-22 15:41 ` [PATCH 05/10] arm64/vdso: " Will Deacon
1 sibling, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: d0fba04847ae1dc7015a2e87d5e4ae1111f7744e
Gitweb: https://git.kernel.org/tip/d0fba04847ae1dc7015a2e87d5e4ae1111f7744e
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:34 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
arm64: vdso: Use generic union vdso_data_store
There is already a generic union definition for vdso_data_store in vdso
datapage header.
Use this definition to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20240219153939.75719-6-anna-maria@linutronix.de
---
arch/arm64/kernel/vdso.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 5562daf..89b6e78 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -69,10 +69,7 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = {
/*
* The vDSO data page.
*/
-static union {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
+static union vdso_data_store vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = vdso_data_store.data;
static int vdso_mremap(const struct vm_special_mapping *sm,
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] vdso/ARM: Make union vdso_data_store available for all architectures
2024-02-19 15:39 ` [PATCH 04/10] vdso/arm: make union vdso_data_store available for all Anna-Maria Behnsen
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
0 siblings, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: a0d2fcd62ac2d3749ff48e30635fe8ea184f0a97
Gitweb: https://git.kernel.org/tip/a0d2fcd62ac2d3749ff48e30635fe8ea184f0a97
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:33 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
vdso/ARM: Make union vdso_data_store available for all architectures
The vDSO data page "union vdso_data_store" is defined in an ARM specific
header file and also defined in several other places.
Move the definition from the ARM header file into the generic vdso datapage
header to make it also usable for others and to prevent code duplication.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20240219153939.75719-5-anna-maria@linutronix.de
---
arch/arm/include/asm/elf.h | 1 -
arch/arm/include/asm/vdso_datapage.h | 26 --------------------------
arch/arm/kernel/asm-offsets.c | 4 +++-
arch/arm/kernel/vdso.c | 4 ----
include/vdso/datapage.h | 10 ++++++++++
5 files changed, 13 insertions(+), 32 deletions(-)
delete mode 100644 arch/arm/include/asm/vdso_datapage.h
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index d681016..9f21e17 100644
--- a/arch/arm/include/asm/elf.h
+++ b/arch/arm/include/asm/elf.h
@@ -4,7 +4,6 @@
#include <asm/auxvec.h>
#include <asm/hwcap.h>
-#include <asm/vdso_datapage.h>
/*
* ELF register definitions..
diff --git a/arch/arm/include/asm/vdso_datapage.h b/arch/arm/include/asm/vdso_datapage.h
deleted file mode 100644
index bef68f5..0000000
--- a/arch/arm/include/asm/vdso_datapage.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Adapted from arm64 version.
- *
- * Copyright (C) 2012 ARM Limited
- */
-#ifndef __ASM_VDSO_DATAPAGE_H
-#define __ASM_VDSO_DATAPAGE_H
-
-#ifdef __KERNEL__
-
-#ifndef __ASSEMBLY__
-
-#include <vdso/datapage.h>
-#include <asm/page.h>
-
-union vdso_data_store {
- struct vdso_data data[CS_BASES];
- u8 page[PAGE_SIZE];
-};
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASM_VDSO_DATAPAGE_H */
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
index 219cbc7..4915662 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
@@ -21,10 +21,12 @@
#include <asm/mpu.h>
#include <asm/procinfo.h>
#include <asm/suspend.h>
-#include <asm/vdso_datapage.h>
#include <asm/hardware/cache-l2x0.h>
#include <linux/kbuild.h>
#include <linux/arm-smccc.h>
+
+#include <vdso/datapage.h>
+
#include "signal.h"
/*
diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index f297d66..d499ad4 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -21,7 +21,6 @@
#include <asm/cacheflush.h>
#include <asm/page.h>
#include <asm/vdso.h>
-#include <asm/vdso_datapage.h>
#include <clocksource/arm_arch_timer.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
@@ -35,9 +34,6 @@ extern char vdso_start[], vdso_end[];
/* Total number of pages needed for the data and text portions of the VDSO. */
unsigned int vdso_total_pages __ro_after_init;
-/*
- * The VDSO data page.
- */
static union vdso_data_store vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = vdso_data_store.data;
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 73eb622..7ba4437 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -19,6 +19,8 @@
#include <vdso/time32.h>
#include <vdso/time64.h>
+#include <asm/page.h>
+
#ifdef CONFIG_ARCH_HAS_VDSO_DATA
#include <asm/vdso/data.h>
#else
@@ -121,6 +123,14 @@ struct vdso_data {
extern struct vdso_data _vdso_data[CS_BASES] __attribute__((visibility("hidden")));
extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("hidden")));
+/**
+ * union vdso_data_store - Generic vDSO data page
+ */
+union vdso_data_store {
+ struct vdso_data data[CS_BASES];
+ u8 page[PAGE_SIZE];
+};
+
/*
* The generic vDSO implementation requires that gettimeofday.h
* provides:
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] csky/vdso: Remove superfluous ifdeffery
2024-02-19 15:39 ` [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery Anna-Maria Behnsen
2024-02-20 1:12 ` Guo Ren
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
Guo Ren, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 4eb0833d7de058735a424f1f783126c60a346b34
Gitweb: https://git.kernel.org/tip/4eb0833d7de058735a424f1f783126c60a346b34
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:32 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
csky/vdso: Remove superfluous ifdeffery
CSKY selects GENERIC_TIME_VSYSCALL. GENERIC_TIME_VSYSCALL dependent
ifdeffery is superfluous. Clean it up.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20240219153939.75719-4-anna-maria@linutronix.de
---
arch/csky/include/asm/vdso.h | 5 -----
arch/csky/kernel/vdso.c | 4 ----
2 files changed, 9 deletions(-)
diff --git a/arch/csky/include/asm/vdso.h b/arch/csky/include/asm/vdso.h
index bdce581..181a15e 100644
--- a/arch/csky/include/asm/vdso.h
+++ b/arch/csky/include/asm/vdso.h
@@ -5,11 +5,6 @@
#include <linux/types.h>
-#ifndef GENERIC_TIME_VSYSCALL
-struct vdso_data {
-};
-#endif
-
/*
* The VDSO symbols are mapped into Linux so we can just use regular symbol
* addressing to get their offsets in userspace. The symbols are mapped at an
diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c
index 16c20d6..e74a250 100644
--- a/arch/csky/kernel/vdso.c
+++ b/arch/csky/kernel/vdso.c
@@ -8,11 +8,7 @@
#include <linux/slab.h>
#include <asm/page.h>
-#ifdef GENERIC_TIME_VSYSCALL
#include <vdso/datapage.h>
-#else
-#include <asm/vdso.h>
-#endif
extern char vdso_start[], vdso_end[];
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] s390/vdso/data: Drop unnecessary header include
2024-02-19 15:39 ` [PATCH 02/10] s390/vdso/data: Drop unnecessary header include Anna-Maria Behnsen
2024-02-19 16:21 ` Heiko Carstens
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
1 sibling, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
Heiko Carstens, x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 3ebacc96f8862eb26f8a6568d91bda8ecff19879
Gitweb: https://git.kernel.org/tip/3ebacc96f8862eb26f8a6568d91bda8ecff19879
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:31 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
s390/vdso/data: Drop unnecessary header include
vdso/datapage.h includes the architecture specific vdso/data.h header
file. So there is no need to do it also the other way round and including
the generic vdso/datapage.h header file inside the architecture specific
data.h header file.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20240219153939.75719-3-anna-maria@linutronix.de
---
arch/s390/include/asm/vdso/data.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/s390/include/asm/vdso/data.h b/arch/s390/include/asm/vdso/data.h
index 73ee891..0e2b40e 100644
--- a/arch/s390/include/asm/vdso/data.h
+++ b/arch/s390/include/asm/vdso/data.h
@@ -3,7 +3,6 @@
#define __S390_ASM_VDSO_DATA_H
#include <linux/types.h>
-#include <vdso/datapage.h>
struct arch_vdso_data {
__s64 tod_steering_delta;
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [tip: timers/core] vdso/helpers: Fix grammar in comments
2024-02-19 15:39 ` [PATCH 01/10] vdso/helpers: Fix grammar in comments Anna-Maria Behnsen
@ 2024-02-20 20:04 ` tip-bot2 for Anna-Maria Behnsen
0 siblings, 0 replies; 31+ messages in thread
From: tip-bot2 for Anna-Maria Behnsen @ 2024-02-20 20:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Anna-Maria Behnsen, Thomas Gleixner, Vincenzo Frascino, Kees Cook,
x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: eeb9f5c2dcec90009d7cf12e780e7f9631993fc5
Gitweb: https://git.kernel.org/tip/eeb9f5c2dcec90009d7cf12e780e7f9631993fc5
Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
AuthorDate: Mon, 19 Feb 2024 16:39:30 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00
vdso/helpers: Fix grammar in comments
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20240219153939.75719-2-anna-maria@linutronix.de
---
include/vdso/helpers.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h
index 9a2af9f..7350114 100644
--- a/include/vdso/helpers.h
+++ b/include/vdso/helpers.h
@@ -30,9 +30,9 @@ static __always_inline u32 vdso_read_retry(const struct vdso_data *vd,
static __always_inline void vdso_write_begin(struct vdso_data *vd)
{
/*
- * WRITE_ONCE it is required otherwise the compiler can validly tear
+ * WRITE_ONCE() is required otherwise the compiler can validly tear
* updates to vd[x].seq and it is possible that the value seen by the
- * reader it is inconsistent.
+ * reader is inconsistent.
*/
WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
@@ -43,9 +43,9 @@ static __always_inline void vdso_write_end(struct vdso_data *vd)
{
smp_wmb();
/*
- * WRITE_ONCE it is required otherwise the compiler can validly tear
+ * WRITE_ONCE() is required otherwise the compiler can validly tear
* updates to vd[x].seq and it is possible that the value seen by the
- * reader it is inconsistent.
+ * reader is inconsistent.
*/
WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store
2024-02-19 15:39 ` [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] arm64: vdso: " tip-bot2 for Anna-Maria Behnsen
@ 2024-02-22 15:41 ` Will Deacon
1 sibling, 0 replies; 31+ messages in thread
From: Will Deacon @ 2024-02-22 15:41 UTC (permalink / raw)
To: Anna-Maria Behnsen
Cc: linux-kernel, Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino,
Catalin Marinas, linux-arm-kernel
On Mon, Feb 19, 2024 at 04:39:34PM +0100, Anna-Maria Behnsen wrote:
> There is already a generic union definition for vdso_data_store in vdso
> datapage header.
>
> Use this definition to prevent code duplication.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
> arch/arm64/kernel/vdso.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
> index 5562daf38a22..89b6e7840002 100644
> --- a/arch/arm64/kernel/vdso.c
> +++ b/arch/arm64/kernel/vdso.c
> @@ -69,10 +69,7 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = {
> /*
> * The vDSO data page.
> */
> -static union {
> - struct vdso_data data[CS_BASES];
> - u8 page[PAGE_SIZE];
> -} vdso_data_store __page_aligned_data;
> +static union vdso_data_store vdso_data_store __page_aligned_data;
> struct vdso_data *vdso_data = vdso_data_store.data;
>
> static int vdso_mremap(const struct vm_special_mapping *sm,
> --
> 2.39.2
Acked-by: Will Deacon <will@kernel.org>
Will
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2024-02-22 15:41 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-19 15:39 [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 01/10] vdso/helpers: Fix grammar in comments Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 02/10] s390/vdso/data: Drop unnecessary header include Anna-Maria Behnsen
2024-02-19 16:21 ` Heiko Carstens
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery Anna-Maria Behnsen
2024-02-20 1:12 ` Guo Ren
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 04/10] vdso/arm: make union vdso_data_store available for all Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] vdso/ARM: Make union vdso_data_store available for all architectures tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] arm64: vdso: " tip-bot2 for Anna-Maria Behnsen
2024-02-22 15:41 ` [PATCH 05/10] arm64/vdso: " Will Deacon
2024-02-19 15:39 ` [PATCH 06/10] riscv/vdso: " Anna-Maria Behnsen
2024-02-20 6:45 ` kernel test robot
2024-02-20 8:52 ` [PATCH v1a] " Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] riscv: vdso: " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 07/10] s390/vdso: " Anna-Maria Behnsen
2024-02-19 16:22 ` Heiko Carstens
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 08/10] loongarch/vdso: " Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] LoongArch: vdso: " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 09/10] mips/vdso: " Anna-Maria Behnsen
2024-02-20 20:04 ` [tip: timers/core] MIPS: vdso: " tip-bot2 for Anna-Maria Behnsen
2024-02-19 15:39 ` [PATCH 10/10] csky/vdso: " Anna-Maria Behnsen
2024-02-20 1:13 ` Guo Ren
2024-02-20 20:04 ` [tip: timers/core] " tip-bot2 for Anna-Maria Behnsen
2024-02-20 0:26 ` [PATCH 00/10] vdso: Misc cleanups and prevent code duplication Kees Cook
2024-02-20 9:50 ` Anna-Maria Behnsen
2024-02-20 14:48 ` Vincenzo Frascino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox