Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Neil Horman
On Sun, Jul 29, 2007 at 09:03:29PM +0800, Eugene Teo wrote: > Neil Horman wrote: > [...] > > + /* core limit size */ > > + case 'c': > > + rc = snprintf(out_ptr, out_end - out_ptr, > > + "%lu", >

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Eugene Teo
Neil Horman wrote: [...] > + /* core limit size */ > + case 'c': > + rc = snprintf(out_ptr, out_end - out_ptr, > + "%lu", > current->signal->rlim[RLIMIT_CORE].rlim_cur); Trailing space.

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Neil Horman
On Sun, Jul 29, 2007 at 11:34:18AM +0200, Martin Pitt wrote: > Hi Neil, > > Neil Horman [2007-07-28 13:21 -0400]: > > Jeremy asked that I make a patch next week to address split_argv's > > requirement > > that the argc parameter be non-NULL. I'll be fixing that next week, and > > what I > >

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Neil Horman
On Sun, Jul 29, 2007 at 02:23:10PM +0530, Aneesh Kumar K.V wrote: > > > Neil Horman wrote: > >On Sat, Jul 28, 2007 at 06:17:25PM +0200, Martin Pitt wrote: > >>Hi Neil, > >> > >>Neil Horman [2007-07-28 9:46 -0400]: > I just want to mention a potential problem with this: If you first >

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Martin Pitt
Hi Neil, Neil Horman [2007-07-28 13:21 -0400]: > Jeremy asked that I make a patch next week to address split_argv's requirement > that the argc parameter be non-NULL. I'll be fixing that next week, and what > I > can do is further enhance it such that it ignores spaces in quoted strings, >

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Aneesh Kumar K.V
Neil Horman wrote: On Sat, Jul 28, 2007 at 06:17:25PM +0200, Martin Pitt wrote: Hi Neil, Neil Horman [2007-07-28 9:46 -0400]: I just want to mention a potential problem with this: If you first expand the macros (from pattern to corename) and then split corename into an argv, then this

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Aneesh Kumar K.V
Neil Horman wrote: On Sat, Jul 28, 2007 at 06:17:25PM +0200, Martin Pitt wrote: Hi Neil, Neil Horman [2007-07-28 9:46 -0400]: I just want to mention a potential problem with this: If you first expand the macros (from pattern to corename) and then split corename into an argv, then this

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Martin Pitt
Hi Neil, Neil Horman [2007-07-28 13:21 -0400]: Jeremy asked that I make a patch next week to address split_argv's requirement that the argc parameter be non-NULL. I'll be fixing that next week, and what I can do is further enhance it such that it ignores spaces in quoted strings, which

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Neil Horman
On Sun, Jul 29, 2007 at 02:23:10PM +0530, Aneesh Kumar K.V wrote: Neil Horman wrote: On Sat, Jul 28, 2007 at 06:17:25PM +0200, Martin Pitt wrote: Hi Neil, Neil Horman [2007-07-28 9:46 -0400]: I just want to mention a potential problem with this: If you first expand the macros (from

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Neil Horman
On Sun, Jul 29, 2007 at 11:34:18AM +0200, Martin Pitt wrote: Hi Neil, Neil Horman [2007-07-28 13:21 -0400]: Jeremy asked that I make a patch next week to address split_argv's requirement that the argc parameter be non-NULL. I'll be fixing that next week, and what I can do is

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Eugene Teo
Neil Horman wrote: [...] + /* core limit size */ + case 'c': + rc = snprintf(out_ptr, out_end - out_ptr, + %lu, current-signal-rlim[RLIMIT_CORE].rlim_cur); Trailing space. [...]

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Neil Horman
On Sun, Jul 29, 2007 at 09:03:29PM +0800, Eugene Teo wrote: Neil Horman wrote: [...] + /* core limit size */ + case 'c': + rc = snprintf(out_ptr, out_end - out_ptr, + %lu,

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Neil Horman
On Sat, Jul 28, 2007 at 03:52:02PM -0700, Jeremy Fitzhardinge wrote: > Neil Horman wrote: > > Jeremy asked that I make a patch next week to address split_argv's > > requirement > > that the argc parameter be non-NULL. I'll be fixing that next week, and > > what I > > can do is further enhance

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Jeremy Fitzhardinge
Neil Horman wrote: > Jeremy asked that I make a patch next week to address split_argv's requirement > that the argc parameter be non-NULL. I'll be fixing that next week, and what > I > can do is further enhance it such that it ignores spaces in quoted strings, > which should address the case

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Neil Horman
On Sat, Jul 28, 2007 at 06:17:25PM +0200, Martin Pitt wrote: > Hi Neil, > > Neil Horman [2007-07-28 9:46 -0400]: > > > I just want to mention a potential problem with this: If you first > > > expand the macros (from pattern to corename) and then split > > > corename into an argv, then this

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Martin Pitt
Hi Neil, Neil Horman [2007-07-28 9:46 -0400]: > > I just want to mention a potential problem with this: If you first > > expand the macros (from pattern to corename) and then split > > corename into an argv, then this breaks macro expansions > > containing spaces. This mostly affects the

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Neil Horman
On Sat, Jul 28, 2007 at 11:23:55AM +0200, Martin Pitt wrote: > Hi Neil, > > thanks a lot for your work on this! > > Neil Horman [2007-07-27 16:08 -0400]: > > Hey > > Patch 2/3 of my core_pattern enhancements. This patch is a rewrite of > > my previous post for this enhancement. It uses

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Martin Pitt
Hi Neil, thanks a lot for your work on this! Neil Horman [2007-07-27 16:08 -0400]: > Hey > Patch 2/3 of my core_pattern enhancements. This patch is a rewrite of > my previous post for this enhancement. It uses jeremy's split_argv/free_argv > library functions to translate core_pattern

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Martin Pitt
Hi Neil, thanks a lot for your work on this! Neil Horman [2007-07-27 16:08 -0400]: Hey Patch 2/3 of my core_pattern enhancements. This patch is a rewrite of my previous post for this enhancement. It uses jeremy's split_argv/free_argv library functions to translate core_pattern into

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Neil Horman
On Sat, Jul 28, 2007 at 11:23:55AM +0200, Martin Pitt wrote: Hi Neil, thanks a lot for your work on this! Neil Horman [2007-07-27 16:08 -0400]: Hey Patch 2/3 of my core_pattern enhancements. This patch is a rewrite of my previous post for this enhancement. It uses jeremy's

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Martin Pitt
Hi Neil, Neil Horman [2007-07-28 9:46 -0400]: I just want to mention a potential problem with this: If you first expand the macros (from pattern to corename) and then split corename into an argv, then this breaks macro expansions containing spaces. This mostly affects the executable

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Neil Horman
On Sat, Jul 28, 2007 at 06:17:25PM +0200, Martin Pitt wrote: Hi Neil, Neil Horman [2007-07-28 9:46 -0400]: I just want to mention a potential problem with this: If you first expand the macros (from pattern to corename) and then split corename into an argv, then this breaks macro

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Jeremy Fitzhardinge
Neil Horman wrote: Jeremy asked that I make a patch next week to address split_argv's requirement that the argc parameter be non-NULL. I'll be fixing that next week, and what I can do is further enhance it such that it ignores spaces in quoted strings, which should address the case that

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-28 Thread Neil Horman
On Sat, Jul 28, 2007 at 03:52:02PM -0700, Jeremy Fitzhardinge wrote: Neil Horman wrote: Jeremy asked that I make a patch next week to address split_argv's requirement that the argc parameter be non-NULL. I'll be fixing that next week, and what I can do is further enhance it such that

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-27 Thread Neil Horman
On Fri, Jul 27, 2007 at 01:54:19PM -0700, Jeremy Fitzhardinge wrote: > Neil Horman wrote: > > + int helper_argc = 0; > > > > + helper_argv = argv_split(GFP_KERNEL, corename+1, _argc); > > > > Hm, I suspect most users of argv_split don't really care about argc, so > it would

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-27 Thread Jeremy Fitzhardinge
Neil Horman wrote: > + int helper_argc = 0; > > + helper_argv = argv_split(GFP_KERNEL, corename+1, _argc); > Hm, I suspect most users of argv_split don't really care about argc, so it would useful to change argv_split to take NULL as the argc pointer, rather than declare a

[PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-27 Thread Neil Horman
Hey Patch 2/3 of my core_pattern enhancements. This patch is a rewrite of my previous post for this enhancement. It uses jeremy's split_argv/free_argv library functions to translate core_pattern into an argv array to be passed to the user mode helper process. It also adds a translation

[PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-27 Thread Neil Horman
Hey Patch 2/3 of my core_pattern enhancements. This patch is a rewrite of my previous post for this enhancement. It uses jeremy's split_argv/free_argv library functions to translate core_pattern into an argv array to be passed to the user mode helper process. It also adds a translation

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-27 Thread Jeremy Fitzhardinge
Neil Horman wrote: + int helper_argc = 0; + helper_argv = argv_split(GFP_KERNEL, corename+1, helper_argc); Hm, I suspect most users of argv_split don't really care about argc, so it would useful to change argv_split to take NULL as the argc pointer, rather than declare a

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-27 Thread Neil Horman
On Fri, Jul 27, 2007 at 01:54:19PM -0700, Jeremy Fitzhardinge wrote: Neil Horman wrote: + int helper_argc = 0; + helper_argv = argv_split(GFP_KERNEL, corename+1, helper_argc); Hm, I suspect most users of argv_split don't really care about argc, so it would useful to