Re: [PATCH] csum_partial_copy_from_user: clean up inconsistencies in implementations

From: Mikulas Patocka
Date: Mon Feb 17 2014 - 17:21:41 EST




On Mon, 17 Feb 2014, David Miller wrote:

> From: Mikulas Patocka <mpatocka@xxxxxxxxxx>
> Date: Sat, 15 Feb 2014 10:49:54 -0500 (EST)
>
> > Here I'm sending a patch for networking to clean up inconsistent
> > implementations of csum_partial_copy_from_user in various architectures.
> > This patch doesn't fix any bug, but the confusion in implementations
> > caused a bug in the past. The patch should be queued for the kernel 3.15.
> >
> > Mikulas
>
> Please do not add commentary to the main body text of a patch submission,
> otherwise I have to edit it out.
>
> The proper way to add commentary is to put it after the "---" delimiter
> at the end of the commit message and before the actual patch.

Interesting - I used "---" as a delimiter between the commentary and the
git message in the past and some people said that their patch parser can't
detect "---" and that I should use "From:" line as a delimiter. And now I
see that your patch parser doesn't detect "From:" and needs "---".

> > From: Mikulas Patocka <mpatocka@xxxxxxxxxx>
> >
> > csum_partial_copy_from_user is called only from csum_and_copy_from_user in
> > include/net/checksum.h. csum_and_copy_from_user verifies the userspace
> > range with access_ok, so there is no need to repeat access_ok in the
> > implementation of csum_partial_copy_from_user.

...

> > The purpose of this patch is to make all the implementations of
> > csum_partial_copy_from_user consistent, so that people will keep them
> > consistent in the future.
> >
> > Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
>
> That is mainly a cleanup and entirely independent of fixing the Alpha
> bug.
>
> You should submit the Alpha bug fix through the usual arch channels
> and get that into Linus's tree.
>
> Then, after that fix propagates, you can do the access_ok() global
> cleanup as a separate patch targetting net-next.
>
> Thanks.

I already pushed the alpha bug fix to the upstream kernel and affected
stable kernels.

This patch is a cleanup that removes code bloat, intended for the next
kernel cycle.

Mikulas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/