Re: [PATCH 1/2] binfmt_misc: add comments & debug logs

2014-10-20 Thread Mike Frysinger
On 19 Oct 2014 17:41, Joe Perches wrote: > On Sun, 2014-10-19 at 19:03 -0400, Mike Frysinger wrote: > > let's deploy extensive pr_debug markers at > > logical parse points, and add comments to the dense parsing logic. > [] > > diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c > [] > > @@ -259,14 +27

Re: [PATCH 1/2] binfmt_misc: add comments & debug logs

2014-10-19 Thread Joe Perches
On Sun, 2014-10-19 at 19:03 -0400, Mike Frysinger wrote: > let's deploy extensive pr_debug markers at > logical parse points, and add comments to the dense parsing logic. [] > diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c [] > @@ -259,14 +270,17 @@ static char * check_special_flags (char * sfs,

[PATCH 1/2] binfmt_misc: add comments & debug logs

2014-10-19 Thread Mike Frysinger
When trying to develop a custom format handler, the errors returned all effectively get bucketed as EINVAL with no kernel messages. The other errors (ENOMEM/EFAULT) are internal/obvious and basic. Thus any time a bad handler is rejected, the developer has to walk the dense code and try to guess w