[PATCH v5 0/3] fs/binfmts: Improve handling of loops

2013-08-15 Thread Zach Levis
This v5 is based off Oleg's changes from "exec: more cleanups" and "exec: minor cleanups + minor fix" v5 is just some small fixes from Oleg and putting the test scripts into the commit message -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

[PATCH v5 1/3] fs/binfmts: Add a name field to the binfmt struct

2013-08-15 Thread Zach Levis
Adding the name field helps when printing error messages referring to specific binfmts Signed-off-by: Zach Levis --- fs/binfmt_aout.c|1 + fs/binfmt_elf.c |5 + fs/binfmt_elf_fdpic.c |1 + fs/binfmt_em86.c|1 + fs/binfmt_flat.c|1 + fs

[PATCH v5 2/3] fs/binfmts: Better handling of binfmt loops

2013-08-15 Thread Zach Levis
ript at /home/zlevis/test echo "hi" echo "$@" Signed-off-by: Zach Levis --- fs/exec.c | 192 ++- include/linux/binfmts.h |5 + 2 files changed, 145 insertions(+), 52 deletions(-) diff --git a/fs/exec.c b/f

[PATCH v5 3/3] fs/binfmts: Whitespace fixes with scripts/cleanfile

2013-08-15 Thread Zach Levis
Obligatory first-patchset whitespace commit Signed-off-by: Zach Levis --- fs/binfmt_aout.c |8 fs/binfmt_elf.c | 38 +++--- fs/binfmt_elf_fdpic.c |8 fs/binfmt_em86.c |9 ++--- fs/binfmt_flat.c | 26

[PATCH v4 1/3] fs/binfmts: Add a name field to the binfmt struct

2013-08-14 Thread Zach Levis
Adding the name field helps when printing error messages referring to specific binfmts Signed-off-by: Zach Levis --- fs/binfmt_aout.c|1 + fs/binfmt_elf.c |5 + fs/binfmt_elf_fdpic.c |1 + fs/binfmt_em86.c|1 + fs/binfmt_flat.c|1 + fs

[PATCH v4 3/3] fs/binfmts: Whitespace fixes with scripts/cleanfile

2013-08-14 Thread Zach Levis
Obligatory first-patchset whitespace commit Signed-off-by: Zach Levis --- fs/binfmt_aout.c |8 fs/binfmt_elf.c | 38 +++--- fs/binfmt_elf_fdpic.c |8 fs/binfmt_em86.c |9 ++--- fs/binfmt_flat.c | 26

[PATCH v4 2/3] fs/binfmts: Better handling of binfmt loops

2013-08-14 Thread Zach Levis
fects, but it may not work for everything and should not be depended on for regular usage. My (rough, but functional) test scripts for this issue are available at: https://gist.github.com/zml2008/6075418 Signed-off-by: Zach Levis --- fs/exec.c |

[PATCH v4 0/3] fs/binfmts: Improve handling of loops

2013-08-14 Thread Zach Levis
This v4 is based off Oleg's changes from "exec: more cleanups" and "exec: minor cleanups + minor fix" It incorporates Oleg and Andrew's suggestions and takes care of the issue from Dan's patch "fs/binfmts: double unlock in search_binary_handler()" New in v4 is how we handle resetting the linux_

Re: [PATCH v3 0/3] fs/binfmts: Improve handling of loops

2013-08-07 Thread Zach Levis
On 08/06/2013 02:11 PM, Kees Cook wrote: Hi Zach, I like the idea behind these clean ups. Thanks for working on them! On Fri, Aug 02, 2013 at 04:21:40PM -0700, Zach Levis wrote: This v3 is based off Oleg's changes from "exec: more cleanups" and "exec: minor cleanups +

[PATCH v3 0/3] fs/binfmts: Improve handling of loops

2013-08-02 Thread Zach Levis
This v3 is based off Oleg's changes from "exec: more cleanups" and "exec: minor cleanups + minor fix" It incorporates Oleg and Andrew's suggestions and takes care of the issue from Dan's patch "fs/binfmts: double unlock in search_binary_handler()" -- To unsubscribe from this list: send the lin

[PATCH v3 3/3] fs/binfmts: Whitespace fixes with scripts/cleanfile

2013-08-02 Thread Zach Levis
Obligatory first-patchset whitespace commit Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/binfmt_aout.c |8 fs/binfmt_elf.c | 38 +++--- fs/binfmt_elf_fdpic.c |8 fs/binfmt_em86.c |4 ++-- fs

[PATCH v3 2/3] fs/binfmts: Better handling of binfmt loops

2013-08-02 Thread Zach Levis
fects, but it may not work for everything and should not be depended on for regular usage. My (rough, but functional) test scripts for this issue are available at: https://gist.github.com/zml2008/6075418 Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/exec.c |

[PATCH v3 1/3] fs/binfmts: Add a name field to the binfmt struct

2013-08-02 Thread Zach Levis
Adding the name field helps when printing error messages referring to specific binfmts Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/binfmt_aout.c|1 + fs/binfmt_elf.c |1 + fs/binfmt_elf_fdpic.c |1 + fs/binfmt_em86.c|1 + fs

Re: [PATCH v2 2/3] fs/binfmts: Better handling of binfmt loops

2013-08-02 Thread Zach Levis
On 08/02/2013 03:12 PM, Zach Levis wrote: + if (retval == -ELOOP && bprm->recursion_depth == 0) { /* cur, previous */ + pr_err("Too much recursion with binfmts (0:%s, -1:%s) in file %s, skipping (base %s).\n", +

[PATCH v2 1/3] fs/binfmts: Add a name field to the binfmt struct

2013-08-02 Thread Zach Levis
Adding the name field helps when printing error messages referring to specific binfmts Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/binfmt_aout.c|1 + fs/binfmt_elf.c |1 + fs/binfmt_elf_fdpic.c |1 + fs/binfmt_em86.c|1 + fs

[PATCH v2 0/3] fs/binfmts: Improve handling of loops

2013-08-02 Thread Zach Levis
This v2 is based off Oleg's changes from "exec: more cleanups" and "exec: minor cleanups + minor fix" It incorporates Oleg and Andrew's suggestions and takes care of the issue from Dan's patch "fs/binfmts: double unlock in search_binary_handler()" -- To unsubscribe from this list: send the line

[PATCH v2 3/3] fs/binfmts: Whitespace fixes with scripts/cleanfile

2013-08-02 Thread Zach Levis
Obligatory first-patchset whitespace commit Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/binfmt_aout.c |8 fs/binfmt_elf.c | 38 +++--- fs/binfmt_elf_fdpic.c |8 fs/binfmt_em86.c |4 ++-- fs

[PATCH v2 2/3] fs/binfmts: Better handling of binfmt loops

2013-08-02 Thread Zach Levis
fects, but it may not work for everything and should not be depended on for regular usage. My (rough, but functional) test scripts for this issue are available at: https://gist.github.com/zml2008/6075418 Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/exec.c |

Re: [PATCH 0/3] exec: minor cleanups + minor fix

2013-08-02 Thread Zach Levis
On 08/02/2013 07:09 AM, Oleg Nesterov wrote: On 08/01, Oleg Nesterov wrote: Andrew, By discussion with Zach, please drop fs-binfmts-add-a-name-field-to-the-binfmt-struct.patch fs-binfmts-better-handling-of-binfmt-loops.patch fs-binfmts-whitespace-fixes-with-scripts-cle

Re: + fs-binfmts-better-handling-of-binfmt-loops.patch added to -mm tree

2013-08-01 Thread Zach Levis
Quoting Oleg Nesterov : On 08/01, Zach Levis wrote: So an example of what this would be used for (going into commit message of a v2 with your earlier suggestions): Ah, so you are going to send v2, great. May I ask you to wait a little bit? Once again, I believe that search_binary_handler

Re: + fs-binfmts-better-handling-of-binfmt-loops.patch added to -mm tree

2013-08-01 Thread Zach Levis
Quoting Oleg Nesterov : On 07/31, Oleg Nesterov wrote: > From: Zach Levis > Subject: fs/binfmts: better handling of binfmt loops > > With these changes, when a binfmt loop is encountered, the ELOOP will > propagate back to the 0 depth. At this point the argv and argc values

Re: [PATCH 2/3] fs/binfmts: Better handling of binfmt loops

2013-07-31 Thread Zach Levis
Quoting Andrew Morton : On Tue, 30 Jul 2013 16:16:51 -0700 Zach Levis wrote: Quoting Andrew Morton : > On Thu, 25 Jul 2013 08:40:44 -0700 Zach Levis wrote: > >> With these changes, when a binfmt loop is encountered, >> the ELOOP will propogate back to the 0 depth.

Re: [PATCH 2/3] fs/binfmts: Better handling of binfmt loops

2013-07-30 Thread Zach Levis
Quoting Andrew Morton : On Thu, 25 Jul 2013 08:40:44 -0700 Zach Levis wrote: With these changes, when a binfmt loop is encountered, the ELOOP will propogate back to the 0 depth. At this point the argv and argc values will be reset to what they were originally and an attempt is made to

[PATCH 2/3] fs/binfmts: Better handling of binfmt loops

2013-07-25 Thread Zach Levis
effects, but it may not work for everything and should not be depended on for regular usage. My (rough, but functional) test scripts for this issue are available at: https://gist.github.com/zml2008/6075418 Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/exec.c | 30

[PATCH 3/3] fs/binfmts: Whitespace fixes with scripts/cleanfile

2013-07-25 Thread Zach Levis
Obligatory first-patchset whitespace commit Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/binfmt_aout.c |8 fs/binfmt_elf.c | 38 +++--- fs/binfmt_elf_fdpic.c |8 fs/binfmt_em86.c |4 ++-- fs

[PATCH 1/3] fs/binfmts: Add a name field to the binfmt struct

2013-07-25 Thread Zach Levis
Adding the name field helps when printing error messages referring to specific binfmts Signed-off-by: Zach Levis Signed-off-by: Zach Levis --- fs/binfmt_aout.c|1 + fs/binfmt_elf.c |1 + fs/binfmt_elf_fdpic.c |1 + fs/binfmt_em86.c|1 + fs