Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-10-15 Thread Greg KH
On Mon, Oct 14, 2013 at 03:57:04PM -0700, Colin Cross wrote: > On Tue, Aug 20, 2013 at 7:04 AM, Al Viro wrote: > > On Tue, Aug 20, 2013 at 08:36:22AM +0100, Al Viro wrote: > > > >> Aha. _That_ is a bug, all right - dynamic_dname() is simply not suitable > >> for that kind of uses. ashmem.c is ce

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-10-14 Thread Colin Cross
On Tue, Aug 20, 2013 at 7:04 AM, Al Viro wrote: > On Tue, Aug 20, 2013 at 08:36:22AM +0100, Al Viro wrote: > >> Aha. _That_ is a bug, all right - dynamic_dname() is simply not suitable >> for that kind of uses. ashmem.c is certainly abusing shmem_file_setup(); >> feeding that kind of mess as den

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Arun KS
Hi Al Viro, On Tue, Aug 20, 2013 at 7:34 PM, Al Viro wrote: > On Tue, Aug 20, 2013 at 08:36:22AM +0100, Al Viro wrote: > >> Aha. _That_ is a bug, all right - dynamic_dname() is simply not suitable >> for that kind of uses. ashmem.c is certainly abusing shmem_file_setup(); >> feeding that kind o

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Al Viro
On Tue, Aug 20, 2013 at 08:36:22AM +0100, Al Viro wrote: > Aha. _That_ is a bug, all right - dynamic_dname() is simply not suitable > for that kind of uses. ashmem.c is certainly abusing shmem_file_setup(); > feeding that kind of mess as dentry name is a Bad Idea(tm). Anyway, > I'd suggest this

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Arun KS
Hi Al Viro, On Tue, Aug 20, 2013 at 1:06 PM, Al Viro wrote: > On Tue, Aug 20, 2013 at 12:51:56PM +0530, Arun KS wrote: > >> d_path expects the pathname to be less than 64 bytes. If its more than >> 64, it returns -ENAMETOOLONG. > > ?!?!? d_path() does not expect anything of that sort - it can ve

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Al Viro
On Tue, Aug 20, 2013 at 12:51:56PM +0530, Arun KS wrote: > d_path expects the pathname to be less than 64 bytes. If its more than > 64, it returns -ENAMETOOLONG. ?!?!? d_path() does not expect anything of that sort - it can very well produce names much longer, without ENAMETOOLONG. > char *dyna

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Arun KS
Hi Al Viro, On Tue, Aug 20, 2013 at 11:21 AM, Al Viro wrote: > On Tue, Aug 20, 2013 at 10:55:40AM +0530, Arun KS wrote: >> >From 932a134abeac597f18c86c513704709ad154994b Mon Sep 17 00:00:00 2001 >> From: Arun KS >> Date: Mon, 19 Aug 2013 12:06:33 +0530 >> Subject: seq_file: Fix overflow conditio

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-19 Thread Al Viro
On Tue, Aug 20, 2013 at 10:55:40AM +0530, Arun KS wrote: > >From 932a134abeac597f18c86c513704709ad154994b Mon Sep 17 00:00:00 2001 > From: Arun KS > Date: Mon, 19 Aug 2013 12:06:33 +0530 > Subject: seq_file: Fix overflow condition in seq_commit > > seq_path()/seq_commit() is treating a d_path() f

[PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-19 Thread Arun KS
>From 932a134abeac597f18c86c513704709ad154994b Mon Sep 17 00:00:00 2001 From: Arun KS Date: Mon, 19 Aug 2013 12:06:33 +0530 Subject: seq_file: Fix overflow condition in seq_commit seq_path()/seq_commit() is treating a d_path() failure as an overflow condition, but it isn't. seq_read handles over