[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <626baa55-ca84-49ba-9131-c1657e0c0454@csgroup.eu>
Date: Wed, 25 Sep 2024 08:51:00 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Vincenzo Frascino <vincenzo.frascino@....com>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org, linux-mm@...ck.org
Cc: Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
"Jason A . Donenfeld" <Jason@...c4.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Naveen N Rao <naveen@...nel.org>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"H . Peter Anvin" <hpa@...or.com>, Theodore Ts'o <tytso@....edu>,
Arnd Bergmann <arnd@...db.de>, Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH v2 1/8] x86: vdso: Introduce asm/vdso/mman.h
Le 23/09/2024 à 16:19, Vincenzo Frascino a écrit :
> The VDSO implementation includes headers from outside of the
> vdso/ namespace.
>
> Introduce asm/vdso/mman.h to make sure that the generic library
> uses only the allowed namespace.
>
> Cc: Andy Lutomirski <luto@...nel.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Jason A. Donenfeld <Jason@...c4.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
> ---
> arch/x86/include/asm/vdso/mman.h | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
> create mode 100644 arch/x86/include/asm/vdso/mman.h
>
> diff --git a/arch/x86/include/asm/vdso/mman.h b/arch/x86/include/asm/vdso/mman.h
> new file mode 100644
> index 000000000000..4c936c9d11ab
> --- /dev/null
> +++ b/arch/x86/include/asm/vdso/mman.h
> @@ -0,0 +1,15 @@
> +
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __ASM_VDSO_MMAN_H
> +#define __ASM_VDSO_MMAN_H
> +
> +#ifndef __ASSEMBLY__
> +
> +#include <uapi/linux/mman.h>
> +
> +#define VDSO_MMAP_PROT PROT_READ | PROT_WRITE
> +#define VDSO_MMAP_FLAGS MAP_DROPPABLE | MAP_ANONYMOUS
I still can't see the point with that change.
Today 4 architectures implement getrandom and none of them require that
indirection. Please leave prot and flags as they are in the code.
Then this file is totally pointless, VDSO code can include
uapi/linux/mman.h directly.
VDSO is userland code, it should be safe to include any UAPI file there.
Christophe
> +
> +#endif /* !__ASSEMBLY__ */
> +
> +#endif /* __ASM_VDSO_MMAN_H */
Powered by blists - more mailing lists