Re: [PATCH] proc: reject "." and ".." as filenames

2018-03-13 Thread Alexey Dobriyan
On Mon, Mar 12, 2018 at 04:00:18PM -0700, Andrew Morton wrote: > - if (qstr.len == 1 && fn[0] == '.') { > - WARN(1, "name '.'\n"); > + if (WARN(qstr.len == 1 && fn[0] == '.', "name '.'\n")) > return NULL; > - } Oh, I hate this style of WARN. For one thing it o

Re: [PATCH] proc: reject "." and ".." as filenames

2018-03-12 Thread Andrew Morton
On Sat, 10 Mar 2018 03:12:23 +0300 Alexey Dobriyan wrote: > Various subsystems can create files and directories in /proc > with names directly controlled by userspace. > > Which means "/", "." and ".." are no-no. > > "/" split is already taken care of, do the other 2 prohibited names. > > ---

Re: [PATCH] proc: reject "." and ".." as filenames

2018-03-11 Thread Pavel Machek
On Mon 2018-03-12 00:35:34, Alexey Dobriyan wrote: > On Sun, Mar 11, 2018 at 10:30:58PM +0100, Pavel Machek wrote: > > On Sat 2018-03-10 03:12:23, Alexey Dobriyan wrote: > > > Various subsystems can create files and directories in /proc > > > with names directly controlled by userspace. > > > > >

Re: [PATCH] proc: reject "." and ".." as filenames

2018-03-11 Thread Alexey Dobriyan
On Sun, Mar 11, 2018 at 10:30:58PM +0100, Pavel Machek wrote: > On Sat 2018-03-10 03:12:23, Alexey Dobriyan wrote: > > Various subsystems can create files and directories in /proc > > with names directly controlled by userspace. > > > > Which means "/", "." and ".." are no-no. > > > > "/" split i

Re: [PATCH] proc: reject "." and ".." as filenames

2018-03-11 Thread Pavel Machek
On Sat 2018-03-10 03:12:23, Alexey Dobriyan wrote: > Various subsystems can create files and directories in /proc > with names directly controlled by userspace. > > Which means "/", "." and ".." are no-no. > > "/" split is already taken care of, do the other 2 prohibited names. Hmm, patch is pro

Re: [PATCH] proc: reject "." and ".." as filenames

2018-03-09 Thread Florian Westphal
Alexey Dobriyan wrote: > Various subsystems can create files and directories in /proc > with names directly controlled by userspace. > > Which means "/", "." and ".." are no-no. > > "/" split is already taken care of, do the other 2 prohibited names. Acked-by: Florian Westphal I'll send a pat

[PATCH] proc: reject "." and ".." as filenames

2018-03-09 Thread Alexey Dobriyan
Various subsystems can create files and directories in /proc with names directly controlled by userspace. Which means "/", "." and ".." are no-no. "/" split is already taken care of, do the other 2 prohibited names. Signed-off-by: Alexey Dobriyan --- fs/proc/generic.c |8 1 file