linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 05/14] ia64: csum_partial_copy_nocheck(): don't abuse csum_partial_copy_from_user()
Date: Wed, 3 Jun 2020 12:50:15 -0700	[thread overview]
Message-ID: <20200603195015.GA3364@roeck-us.net> (raw)

On Wed, Jun 03, 2020 at 08:10:38PM +0100, Al Viro wrote:
> On Wed, Jun 03, 2020 at 08:37:14AM -0700, Guenter Roeck wrote:
> > On Fri, Mar 27, 2020 at 11:31:08PM +0000, Al Viro wrote:
> > > From: Al Viro <viro@zeniv.linux.org.uk>
> > > 
> > > Just inline the call and use memcpy() instead of __copy_from_user() and
> > > note that the tail is precisely ia64 csum_partial().
> > > 
> > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > 
> > This patch results in:
> > 
> > arch/ia64/lib/csum_partial_copy.c: In function 'csum_partial_copy_nocheck':
> > arch/ia64/lib/csum_partial_copy.c:110:9: error: implicit declaration of function 'csum_partial'
> > 
> > for ia64:{defconfig, allnoconfig, tinyconfig}.
> 
> Argh...
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Yes, that does the trick.

Tested-by: Guenter Roeck <linux@roeck-us.net>

> ---
> diff --git a/arch/ia64/lib/csum_partial_copy.c b/arch/ia64/lib/csum_partial_copy.c
> index 5d147a33d648..6e82e0be8040 100644
> --- a/arch/ia64/lib/csum_partial_copy.c
> +++ b/arch/ia64/lib/csum_partial_copy.c
> @@ -12,7 +12,7 @@
>  #include <linux/types.h>
>  #include <linux/string.h>
>  
> -#include <linux/uaccess.h>
> +#include <net/checksum.h>
>  
>  /*
>   * XXX Fixme: those 2 inlines are meant for debugging and will go away

             reply	other threads:[~2020-06-03 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 19:50 Guenter Roeck [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-27 23:30 [RFC][PATCHSET] uaccess: getting csum_and_copy_..._user() into saner shape Al Viro
2020-03-27 23:31 ` [RFC][PATCH 01/14] get rid of csum_partial_copy_to_user() Al Viro
2020-03-27 23:31   ` [RFC][PATCH 05/14] ia64: csum_partial_copy_nocheck(): don't abuse csum_partial_copy_from_user() Al Viro
2020-06-03 15:37     ` Guenter Roeck
2020-06-03 19:10       ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200603195015.GA3364@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).