Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1455715
| From | Marcel Holtmann <marcel@holtmann.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Add file permission mode helpers |
| Date | 2016-08-03 12:00 +0200 |
| Message-ID | <s217X-Sn-1@gated-at.bofh.it> (permalink) |
| References | <s1OX7-1dt-9@gated-at.bofh.it> <s1Zzb-8wu-1@gated-at.bofh.it> <s1ZIR-8a-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Greg, >> An added advantage would be that during review it would stick out like a sore >> thumb if anyone used a 'weird' permission variant. >> >> For example, if you saw these lines in a driver patch: >> >> + __ATTR(l1, 0444, driver_show_l4, NULL); >> + __ATTR(l3, 0446, driver_show_l4, NULL); >> + __ATTR(l2, 04444, driver_show_l4, NULL); >> + __ATTR(l4, 0444, driver_show_l4, NULL); >> >> ... would you notice it at a glance that it contains two security holes? > > I've tried to deal with that in the past with the __ATTR_RW() and > __ATTR_RO() and __ATTR_WO() macros that more should be using. I swept > the tree a few years ago to try to fix up most of them, but I know I > didn't catch them all, and more files have been added since then. I said in another response that maybe module_param_rw and module_param_ro will make some sense. Not sure if they are easier to read or not. I mean for each usage, we could look at the tree and see what values are actually used. My bet is that for module_param only a few ones are used. I have the feeling it is 0444 or 0644 and nothing else. Maybe some outlaws with 0400 and 0600 that don't even need to be that secretive. Regards Marcel
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Please don't replace numeric parameter like 0444 with macro Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-02 23:00 +0200
Re: Please don't replace numeric parameter like 0444 with macro Rob Landley <rob@landley.net> - 2016-08-03 00:00 +0200
[PATCH] checkpatch: Look for symbolic permissions and suggest octal instead Joe Perches <joe@perches.com> - 2016-08-03 01:50 +0200
Re: [PATCH] checkpatch: Look for symbolic permissions and suggest octal instead Joe Perches <joe@perches.com> - 2016-08-03 02:40 +0200
Re: [PATCH] checkpatch: Look for symbolic permissions and suggest octal instead Al Viro <viro@ZenIV.linux.org.uk> - 2016-08-03 04:10 +0200
Re: Please don't replace numeric parameter like 0444 with macro Al Viro <viro@ZenIV.linux.org.uk> - 2016-08-03 02:50 +0200
Re: Please don't replace numeric parameter like 0444 with macro Konstantin Khlebnikov <koct9i@gmail.com> - 2016-08-03 10:10 +0200
Re: Please don't replace numeric parameter like 0444 with macro Richard Weinberger <richard.weinberger@gmail.com> - 2016-08-03 10:40 +0200
[PATCH] Add file permission mode helpers Ingo Molnar <mingo@kernel.org> - 2016-08-03 10:20 +0200
Re: [PATCH] Add file permission mode helpers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-03 10:30 +0200
Re: [PATCH] Add file permission mode helpers Ingo Molnar <mingo@kernel.org> - 2016-08-03 11:00 +0200
Re: [PATCH] Add file permission mode helpers Willy Tarreau <w@1wt.eu> - 2016-08-03 11:30 +0200
Re: [PATCH] Add file permission mode helpers Marcel Holtmann <marcel@holtmann.org> - 2016-08-03 12:00 +0200
Re: [PATCH] Add file permission mode helpers Joe Perches <joe@perches.com> - 2016-08-03 17:50 +0200
Re: [PATCH] Add file permission mode helpers Pavel Machek <pavel@ucw.cz> - 2016-08-03 19:00 +0200
csiph-web