Re: [PATCH 6/6] exec: open code copy_string_kernel

2020-04-06 Thread Matthew Wilcox
On Mon, Apr 06, 2020 at 02:03:12PM +0200, Christoph Hellwig wrote: > + int len = strnlen(arg, MAX_ARG_STRLEN) + 1 /* terminating null */; If you end up doing another version of this, it's a terminating NUL, not null. I almost wonder if we shouldn't have #define TERMINATING_NUL 1 in

[PATCH 6/6] exec: open code copy_string_kernel

2020-04-06 Thread Christoph Hellwig
Currently copy_string_kernel is just a wrapper around copy_strings that simplifies the calling conventions and uses set_fs to allow passing a kernel pointer. But due to the fact the we only need to handle a single kernel argument pointer, the logic can be sigificantly simplified while getting rid