Re: [PATCH -mm 1/3] proc: randomize "struct pde_opener"

From: Kees Cook
Date: Thu Feb 15 2018 - 19:53:36 EST


On Wed, Feb 14, 2018 at 12:19 AM, Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
> The more the merrier.

What made you choose this structure, BTW?

> Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
> ---
>
> fs/proc/internal.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/fs/proc/internal.h
> +++ b/fs/proc/internal.h
> @@ -177,7 +177,7 @@ struct pde_opener {
> struct list_head lh;
> bool closing;
> struct completion *c;
> -};
> +} __randomize_layout;
> extern const struct inode_operations proc_link_inode_operations;
>
> extern const struct inode_operations proc_pid_link_inode_operations;

-Kees

--
Kees Cook
Pixel Security