From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] sh: implicit access_ok() needs an #include
Date: Thu, 2 Feb 2023 09:22:34 +0100 [thread overview]
Message-ID: <CAMuHMdWPyTRh_E-jRET0zObm1+RYcPy0YrnVr-+ozEO84F0DWw@mail.gmail.com> (raw)
In-Reply-To: <980912a0-f5a0-4dea-9b5b-565d05bc4a6c@app.fastmail.com>
Hi Arnd,
On Thu, Feb 2, 2023 at 8:52 AM Arnd Bergmann <arnd@arndb.de> wrote:
> On Thu, Feb 2, 2023, at 06:31, Randy Dunlap wrote:
> > Building arch/sh/ has a build error/warning that is fixed by
> > adding an #include of a header file.
> >
> > ../arch/sh/include/asm/checksum_32.h: In function
> > 'csum_and_copy_from_user':
> > ../arch/sh/include/asm/checksum_32.h:53:14: error: implicit declaration
> > of function 'access_ok' [-Werror=implicit-function-declaration]
> > 53 | if (!access_ok(src, len))
> > | ^~~~~~~~~
> >
> > Fixes: 7fe8970a78a1 ("sh32: convert to csum_and_copy_from_user()")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Al Viro <viro@zeniv.linux.org.uk>
> > Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> > Cc: Rich Felker <dalias@libc.org>
> > Cc: linux-sh@vger.kernel.org
> > Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > v2: add Subject: and patch description
>
> Thanks for the fix!
>
> >
> > arch/sh/include/asm/checksum_32.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff -- a/arch/sh/include/asm/checksum_32.h b/arch/sh/include/asm/checksum_32.h
> > --- a/arch/sh/include/asm/checksum_32.h
> > +++ b/arch/sh/include/asm/checksum_32.h
> > @@ -7,6 +7,7 @@
> > */
> >
> > #include <linux/in6.h>
> > +#include <asm-generic/access_ok.h>
>
> This will work correctly, but it is not the intended usage of the
> header. Anything in asm-generic/*.h should only be included by
> a particular header, usually the asm/*.h with the same name or in this
> case the asm/uaccess.h header.
>
> I think the correct fix here is to include asm/uaccess.h instead
> of asm-generic/access_ok.h.
Which should already be there, or RSN:
https://lore.kernel.org/all/167514181688.11863.771497291150527329.git-patchwork-notify@kernel.org
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2023-02-02 8:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 5:31 Randy Dunlap
2023-02-02 7:45 ` Arnd Bergmann
2023-02-02 8:22 ` Geert Uytterhoeven [this message]
2023-02-02 15:22 ` Randy Dunlap
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=CAMuHMdWPyTRh_E-jRET0zObm1+RYcPy0YrnVr-+ozEO84F0DWw@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=viro@zeniv.linux.org.uk \
--cc=ysato@users.sourceforge.jp \
/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
all inboxes | Powered by JetHome®