diff mbox series

[4/9] vdso: Introduce vdso/page.h

Message ID 20240903151437.1002990-5-vincenzo.frascino@arm.com (mailing list archive)
State New
Headers show
Series vdso: Use only headers from the vdso/ namespace | expand

Commit Message

Vincenzo Frascino Sept. 3, 2024, 3:14 p.m. UTC
The VDSO implementation includes headers from outside of the
vdso/ namespace.

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

Cc: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 include/vdso/page.h | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 include/vdso/page.h

Comments

Christophe Leroy Sept. 4, 2024, 5:16 p.m. UTC | #1
Le 03/09/2024 à 17:14, Vincenzo Frascino a écrit :
> The VDSO implementation includes headers from outside of the
> vdso/ namespace.
> 
> Introduce vdso/page.h to make sure that the generic library
> uses only the allowed namespace.
> 
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason A. Donenfeld <Jason@zx2c4.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
>   include/vdso/page.h | 7 +++++++
>   1 file changed, 7 insertions(+)
>   create mode 100644 include/vdso/page.h
> 
> diff --git a/include/vdso/page.h b/include/vdso/page.h
> new file mode 100644
> index 000000000000..f18e304941cb
> --- /dev/null
> +++ b/include/vdso/page.h
> @@ -0,0 +1,7 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __VDSO_PAGE_H
> +#define __VDSO_PAGE_H
> +
> +#include <asm/vdso/page.h>

I can't see the benefit of that, the generic library can directly 
include asm/vdso/page.h

> +
> +#endif	/* __VDSO_PAGE_H */
Vincenzo Frascino Sept. 6, 2024, 11:35 a.m. UTC | #2
Hi Christophe,

On 04/09/2024 18:16, Christophe Leroy wrote:
> 
> 
> Le 03/09/2024 à 17:14, Vincenzo Frascino a écrit :
>> The VDSO implementation includes headers from outside of the
>> vdso/ namespace.
>>
>> Introduce vdso/page.h to make sure that the generic library
>> uses only the allowed namespace.
>>
>> Cc: Andy Lutomirski <luto@kernel.org>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Jason A. Donenfeld <Jason@zx2c4.com>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>> ---
>>   include/vdso/page.h | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>   create mode 100644 include/vdso/page.h
>>
>> diff --git a/include/vdso/page.h b/include/vdso/page.h
>> new file mode 100644
>> index 000000000000..f18e304941cb
>> --- /dev/null
>> +++ b/include/vdso/page.h
>> @@ -0,0 +1,7 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#ifndef __VDSO_PAGE_H
>> +#define __VDSO_PAGE_H
>> +
>> +#include <asm/vdso/page.h>
> 
> I can't see the benefit of that, the generic library can directly include
> asm/vdso/page.h
> 

I think you agree that any discussion we can have on this point will be made
obsolete by the fact that we will end up defining PAGE_SIZE/PAGE_MASK in
vdso/page.h.

>> +
>> +#endif    /* __VDSO_PAGE_H */
diff mbox series

Patch

diff --git a/include/vdso/page.h b/include/vdso/page.h
new file mode 100644
index 000000000000..f18e304941cb
--- /dev/null
+++ b/include/vdso/page.h
@@ -0,0 +1,7 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __VDSO_PAGE_H
+#define __VDSO_PAGE_H
+
+#include <asm/vdso/page.h>
+
+#endif	/* __VDSO_PAGE_H */