Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 02 Apr 2020 11:05:21 -0500
From: (Eric W. Biederman)
To: Alexey Gladkov <>
Cc: LKML <>,
 Kernel Hardening <>,
 Linux API <>,
 Linux FS Devel <>,
 Linux Security Module <>,
 Akinobu Mita <>,
 Alexander Viro <>,
 Alexey Dobriyan <>,
 Alexey Gladkov <>,
 Andrew Morton <>,
 Andy Lutomirski <>,
 Daniel Micay <>,
 Djalal Harouni <>,
 "Dmitry V . Levin" <>,
 Greg Kroah-Hartman <>,
 Ingo Molnar <>,
 "J . Bruce Fields" <>,
 Jeff Layton <>,
 Jonathan Corbet <>,  Kees Cook <>,
 Linus Torvalds <>,
 Oleg Nesterov <>, David Howells <>
Subject: Re: [PATCH v10 8/9] proc: use human-readable values for hidehid

Alexey Gladkov <> writes:

> The hidepid parameter values are becoming more and more and it becomes
> difficult to remember what each new magic number means.

In principle I like this change.  In practice I think you have just
broken ABI compatiblity with the new mount ABI.

In particular the following line seems broken.

> diff --git a/fs/proc/root.c b/fs/proc/root.c
> index dbcd96f07c7a..ba782d6e6197 100644
> --- a/fs/proc/root.c
> +++ b/fs/proc/root.c
> @@ -45,7 +45,7 @@ enum proc_param {
>  static const struct fs_parameter_spec proc_fs_parameters[] = {
>  	fsparam_u32("gid",	Opt_gid),
> -	fsparam_u32("hidepid",	Opt_hidepid),
> +	fsparam_string("hidepid",	Opt_hidepid),
>  	fsparam_string("subset",	Opt_subset),
>  	{}
>  };

As I read fs_parser.c fs_param_is_u32 handles string inputs and turns them
into numbers, and it handles binary numbers.  However fs_param_is_string
appears to only handle strings.  It appears to have not capacity to turn
raw binary numbers into strings.

So I think we probably need to fix fs_param_is_string to raw binary
numbers before we can safely make this change to fs/proc/root.c

David am I reading the fs_parser.c code correctly?  If I am are you ok
with a change like the above?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.