Re: [PATCH 3/9] x86: vdso: Introduce asm/vdso/page.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Le 03/09/2024 à 17:14, Vincenzo Frascino a écrit :
The VDSO implementation includes headers from outside of the
vdso/ namespace.

Introduce asm/vdso/page.h to make sure that the generic library
uses only the allowed namespace.

Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Jason A. Donenfeld <Jason@xxxxxxxxx>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
---
  arch/x86/include/asm/vdso/page.h | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
  create mode 100644 arch/x86/include/asm/vdso/page.h

diff --git a/arch/x86/include/asm/vdso/page.h b/arch/x86/include/asm/vdso/page.h
new file mode 100644
index 000000000000..b0af8fbef27c
--- /dev/null
+++ b/arch/x86/include/asm/vdso/page.h
@@ -0,0 +1,15 @@
+
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_VDSO_PAGE_H
+#define __ASM_VDSO_PAGE_H
+
+#ifndef __ASSEMBLY__
+
+#include <asm/page_types.h>
+
+#define VDSO_PAGE_MASK	PAGE_MASK
+#define VDSO_PAGE_SIZE	PAGE_SIZE

Same, I don't think we need those macros to duplicate PAGE_SIZE and PAGE_MASK in each and every architecture.

The best would be to use CONFIG_PAGE_SHIFT which is defined the same way on every architecture and refactor PAGE_SIZE and PAGE_MASK and get rid of all arch specific definitions of PAGE_SIZE and PAGE_MASK.

+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* __ASM_VDSO_PAGE_H */




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux