[tip: timers/vdso] random: vDSO: Drop custom PAGE_SIZE definitions

tip-bot2 for Thomas Weißschuh posted 1 patch 1 month, 2 weeks ago
lib/vdso/getrandom.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
[tip: timers/vdso] random: vDSO: Drop custom PAGE_SIZE definitions
Posted by tip-bot2 for Thomas Weißschuh 1 month, 2 weeks ago
The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     92e785d887a8a61a897289f2b342f754cf02551b
Gitweb:        https://git.kernel.org/tip/92e785d887a8a61a897289f2b342f754cf02551b
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Fri, 24 Jul 2026 15:40:30 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Mon, 10 Aug 2026 16:27:14 +02:00

random: vDSO: Drop custom PAGE_SIZE definitions

These custom definitions where added in commit 7f053812dab3 ("random:
vDSO: minimize and simplify header includes") to avoid pulling in
non-vDSO-safe headers from linux/page.h.

vdso/page.h provides these definitions for the vDSO now. Use that instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260724-vdso-random-page-size-v1-1-e69283d36b2f@linutronix.de
---
 lib/vdso/getrandom.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/vdso/getrandom.c b/lib/vdso/getrandom.c
index 7e29005..2851afa 100644
--- a/lib/vdso/getrandom.c
+++ b/lib/vdso/getrandom.c
@@ -8,6 +8,7 @@
 #include <vdso/datapage.h>
 #include <vdso/getrandom.h>
 #include <vdso/limits.h>
+#include <vdso/page.h>
 #include <vdso/unaligned.h>
 #include <asm/barrier.h>
 #include <asm/vdso/getrandom.h>
@@ -18,11 +19,6 @@
 /* Bring in default accessors */
 #include <vdso/vsyscall.h>
 
-#undef PAGE_SIZE
-#undef PAGE_MASK
-#define PAGE_SIZE (1UL << CONFIG_PAGE_SHIFT)
-#define PAGE_MASK (~(PAGE_SIZE - 1))
-
 #define MEMCPY_AND_ZERO_SRC(type, dst, src, len) do {				\
 	while (len >= sizeof(type)) {						\
 		__put_unaligned_t(type, __get_unaligned_t(type, src), dst);	\