If something like this needs to be done (and the patches look reasonably
ok), then I'd much rather clean it up all the way.
So a real cleanup would do in addition to your changes:
- copystrings would return the error value, instead of writing it to a
pointer. I hate those kinds of interfaces (look at the extremes I went
to in order to avoid it for get_user(), for example).
- instead of passing in 5 arguments, just pass in the bprm pointer. That
way you get rid of the arguments that are always the same (bprm->page
and bprm->p), and you don't have to return bprm->p because copy_strings
can just modify it in place. (which allows you to do #1 above)
So copy_strings would be something like
int copy_strings(int argc, char *const*argv, &bprm)
instead of
unsigned long copy_strings(.. horror-arguments ..)
no?
Would you mind going that exra mile?
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/