Re: [RFC, PATCH 08/22] mm: Introduce __GFP_ENCRYPT

From: Punit Agrawal
Date: Thu Mar 22 2018 - 12:02:16 EST


"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> writes:

> The patch adds new gfp flag to indicate that we're allocating encrypted
> page.
>
> Architectural code may need to do special preparation for encrypted
> pages such as flushing cache to avoid aliasing.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> ---
> include/linux/gfp.h | 12 ++++++++++++
> include/linux/mm.h | 2 ++
> include/trace/events/mmflags.h | 1 +
> mm/Kconfig | 3 +++
> mm/page_alloc.c | 3 +++
> tools/perf/builtin-kmem.c | 1 +
> 6 files changed, 22 insertions(+)
>
> diff --git a/include/linux/gfp.h b/include/linux/gfp.h
> index 1a4582b44d32..43a93ca11c3c 100644
> --- a/include/linux/gfp.h
> +++ b/include/linux/gfp.h
> @@ -24,6 +24,11 @@ struct vm_area_struct;
> #define ___GFP_HIGH 0x20u
> #define ___GFP_IO 0x40u
> #define ___GFP_FS 0x80u
> +#ifdef CONFIG_ARCH_WANTS_GFP_ENCRYPT
> +#define ___GFP_ENCYPT 0x100u
> +#else
> +#define ___GFP_ENCYPT 0

s/___GFP_ENCYPT/___GFP_ENCRYPT?

Thanks,
Punit

[...]