* mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ @ 2020-08-20 9:29 Naresh Kamboju 2020-08-20 9:37 ` Naresh Kamboju 2020-08-20 20:55 ` Andrew Morton 0 siblings, 2 replies; 4+ messages in thread From: Naresh Kamboju @ 2020-08-20 9:29 UTC (permalink / raw) To: Linux-Next Mailing List, open list, linux-mm, lkft-triage, Andrew Morton Cc: linuxarm, Barry Song, John Hubbard, Jan Kara, Jérôme Glisse, Matthew Wilcox (Oracle), Al Viro, Christoph Hellwig, Dan Williams, Dave Chinner, Jason Gunthorpe, Jonathan Corbet, Michal Hocko, Mike Kravetz, Shuah Khan, Vlastimil Babka arm and riscv architecture build failed on linux next 20200820 tag. make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache arm-linux-gnueabihf-gcc" O=build zImage 348# 349../mm/gup.c: In function ‘get_user_pages’: 350../mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ [-Werror=implicit-function-declaration] 351 1922 | if (!is_valid_gup_flags(gup_flags)) 352 | ^~~~~~~~~~~~~~~~~~ 353cc1: some warnings being treated as errors Full build log, https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/695005038 https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/695005042 -- Linaro LKFT https://lkft.linaro.org ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ 2020-08-20 9:29 mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ Naresh Kamboju @ 2020-08-20 9:37 ` Naresh Kamboju 2020-08-20 20:55 ` Andrew Morton 1 sibling, 0 replies; 4+ messages in thread From: Naresh Kamboju @ 2020-08-20 9:37 UTC (permalink / raw) To: Linux-Next Mailing List, open list, linux-mm, lkft-triage, Andrew Morton Cc: linuxarm, Barry Song, John Hubbard, Jan Kara, Jérôme Glisse, Matthew Wilcox (Oracle), Al Viro, Christoph Hellwig, Dan Williams, Dave Chinner, Jason Gunthorpe, Jonathan Corbet, Michal Hocko, Mike Kravetz, Shuah Khan, Vlastimil Babka On Thu, 20 Aug 2020 at 14:59, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: > > arm and riscv architecture build failed on linux next 20200820 tag. The pass with defconfig but failed with tinyconfig and allnoconfig. > make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm > CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache > arm-linux-gnueabihf-gcc" O=build zImage > > 348# > 349../mm/gup.c: In function ‘get_user_pages’: > 350../mm/gup.c:1922:7: error: implicit declaration of function > ‘is_valid_gup_flags’ [-Werror=implicit-function-declaration] > 351 1922 | if (!is_valid_gup_flags(gup_flags)) > 352 | ^~~~~~~~~~~~~~~~~~ > 353cc1: some warnings being treated as errors > > Full build log, > https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/695005038 > https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/695005042 > > -- > Linaro LKFT > https://lkft.linaro.org ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ 2020-08-20 9:29 mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ Naresh Kamboju 2020-08-20 9:37 ` Naresh Kamboju @ 2020-08-20 20:55 ` Andrew Morton 2020-08-21 1:07 ` Song Bao Hua (Barry Song) 1 sibling, 1 reply; 4+ messages in thread From: Andrew Morton @ 2020-08-20 20:55 UTC (permalink / raw) To: Naresh Kamboju Cc: Linux-Next Mailing List, open list, linux-mm, lkft-triage, linuxarm, Barry Song, John Hubbard, Jan Kara, Jérôme Glisse, Matthew Wilcox (Oracle), Al Viro, Christoph Hellwig, Dan Williams, Dave Chinner, Jason Gunthorpe, Jonathan Corbet, Michal Hocko, Mike Kravetz, Shuah Khan, Vlastimil Babka On Thu, 20 Aug 2020 14:59:52 +0530 Naresh Kamboju <naresh.kamboju@linaro.org> wrote: > arm and riscv architecture build failed on linux next 20200820 tag. > > make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm > CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache > arm-linux-gnueabihf-gcc" O=build zImage > > 348# > 349../mm/gup.c: In function ‘get_user_pages’: > 350../mm/gup.c:1922:7: error: implicit declaration of function > ‘is_valid_gup_flags’ [-Werror=implicit-function-declaration] > 351 1922 | if (!is_valid_gup_flags(gup_flags)) > 352 | ^~~~~~~~~~~~~~~~~~ > 353cc1: some warnings being treated as errors > Yes, thanks. From: Andrew Morton <akpm@linux-foundation.org> Subject: mm-gup-dont-permit-users-to-call-get_user_pages-with-foll_longterm-fix fix CONFIG_MMU=n build Link: https://lkml.kernel.org/r/CA+G9fYuNS3k0DVT62twfV746pfNhCSrk5sVMcOcQ1PGGnEseyw@mail.gmail.com Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Cc: Barry Song <song.bao.hua@hisilicon.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- mm/gup.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) --- a/mm/gup.c~mm-gup-dont-permit-users-to-call-get_user_pages-with-foll_longterm-fix +++ a/mm/gup.c @@ -1759,6 +1759,25 @@ static __always_inline long __gup_longte } #endif /* CONFIG_FS_DAX || CONFIG_CMA */ +static bool is_valid_gup_flags(unsigned int gup_flags) +{ + /* + * FOLL_PIN must only be set internally by the pin_user_pages*() APIs, + * never directly by the caller, so enforce that with an assertion: + */ + if (WARN_ON_ONCE(gup_flags & FOLL_PIN)) + return false; + /* + * FOLL_PIN is a prerequisite to FOLL_LONGTERM. Another way of saying + * that is, FOLL_LONGTERM is a specific case, more restrictive case of + * FOLL_PIN. + */ + if (WARN_ON_ONCE(gup_flags & FOLL_LONGTERM)) + return false; + + return true; +} + #ifdef CONFIG_MMU static long __get_user_pages_remote(struct mm_struct *mm, unsigned long start, unsigned long nr_pages, @@ -1789,25 +1808,6 @@ static long __get_user_pages_remote(stru gup_flags | FOLL_TOUCH | FOLL_REMOTE); } -static bool is_valid_gup_flags(unsigned int gup_flags) -{ - /* - * FOLL_PIN must only be set internally by the pin_user_pages*() APIs, - * never directly by the caller, so enforce that with an assertion: - */ - if (WARN_ON_ONCE(gup_flags & FOLL_PIN)) - return false; - /* - * FOLL_PIN is a prerequisite to FOLL_LONGTERM. Another way of saying - * that is, FOLL_LONGTERM is a specific case, more restrictive case of - * FOLL_PIN. - */ - if (WARN_ON_ONCE(gup_flags & FOLL_LONGTERM)) - return false; - - return true; -} - /** * get_user_pages_remote() - pin user pages in memory * @mm: mm_struct of target mm _ ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ 2020-08-20 20:55 ` Andrew Morton @ 2020-08-21 1:07 ` Song Bao Hua (Barry Song) 0 siblings, 0 replies; 4+ messages in thread From: Song Bao Hua (Barry Song) @ 2020-08-21 1:07 UTC (permalink / raw) To: Andrew Morton, Naresh Kamboju Cc: Linux-Next Mailing List, open list, linux-mm, lkft-triage, Linuxarm, John Hubbard, Jan Kara, Jérôme Glisse, Matthew Wilcox (Oracle), Al Viro, Christoph Hellwig, Dan Williams, Dave Chinner, Jason Gunthorpe, Jonathan Corbet, Michal Hocko, Mike Kravetz, Shuah Khan, Vlastimil Babka > -----Original Message----- > From: owner-linux-mm@kvack.org [mailto:owner-linux-mm@kvack.org] On > Behalf Of Andrew Morton > Sent: Friday, August 21, 2020 8:55 AM > To: Naresh Kamboju <naresh.kamboju@linaro.org> > Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>; open list > <linux-kernel@vger.kernel.org>; linux-mm <linux-mm@kvack.org>; > lkft-triage@lists.linaro.org; Linuxarm <linuxarm@huawei.com>; Song Bao Hua > (Barry Song) <song.bao.hua@hisilicon.com>; John Hubbard > <jhubbard@nvidia.com>; Jan Kara <jack@suse.cz>; Jérôme Glisse > <jglisse@redhat.com>; Matthew Wilcox (Oracle) <willy@infradead.org>; Al > Viro <viro@zeniv.linux.org.uk>; Christoph Hellwig <hch@infradead.org>; Dan > Williams <dan.j.williams@intel.com>; Dave Chinner <david@fromorbit.com>; > Jason Gunthorpe <jgg@ziepe.ca>; Jonathan Corbet <corbet@lwn.net>; Michal > Hocko <mhocko@suse.com>; Mike Kravetz <mike.kravetz@oracle.com>; > Shuah Khan <shuah@kernel.org>; Vlastimil Babka <vbabka@suse.cz> > Subject: Re: mm/gup.c:1922:7: error: implicit declaration of function > ‘is_valid_gup_flags’ > > On Thu, 20 Aug 2020 14:59:52 +0530 Naresh Kamboju > <naresh.kamboju@linaro.org> wrote: > > > arm and riscv architecture build failed on linux next 20200820 tag. > > > > make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm > > CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache > > arm-linux-gnueabihf-gcc" O=build zImage > > > > 348# > > 349../mm/gup.c: In function ‘get_user_pages’: > > 350../mm/gup.c:1922:7: error: implicit declaration of function > > ‘is_valid_gup_flags’ [-Werror=implicit-function-declaration] > > 351 1922 | if (!is_valid_gup_flags(gup_flags)) > > 352 | ^~~~~~~~~~~~~~~~~~ > > 353cc1: some warnings being treated as errors > > > > Yes, thanks. > > From: Andrew Morton <akpm@linux-foundation.org> > Subject: > mm-gup-dont-permit-users-to-call-get_user_pages-with-foll_longterm-fix > > fix CONFIG_MMU=n build > > Link: > https://lkml.kernel.org/r/CA+G9fYuNS3k0DVT62twfV746pfNhCSrk5sVMcOcQ1 > PGGnEseyw@mail.gmail.com > Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> > Cc: Barry Song <song.bao.hua@hisilicon.com> > Cc: Stephen Rothwell <sfr@canb.auug.org.au> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Andrew, Thanks for taking care of this build issue. Acked-by: Barry Song <song.bao.hua@hisilicon.com> > --- > > mm/gup.c | 38 +++++++++++++++++++------------------- > 1 file changed, 19 insertions(+), 19 deletions(-) > > --- > a/mm/gup.c~mm-gup-dont-permit-users-to-call-get_user_pages-with-foll_long > term-fix > +++ a/mm/gup.c > @@ -1759,6 +1759,25 @@ static __always_inline long __gup_longte } > #endif /* CONFIG_FS_DAX || CONFIG_CMA */ > > +static bool is_valid_gup_flags(unsigned int gup_flags) { > + /* > + * FOLL_PIN must only be set internally by the pin_user_pages*() APIs, > + * never directly by the caller, so enforce that with an assertion: > + */ > + if (WARN_ON_ONCE(gup_flags & FOLL_PIN)) > + return false; > + /* > + * FOLL_PIN is a prerequisite to FOLL_LONGTERM. Another way of saying > + * that is, FOLL_LONGTERM is a specific case, more restrictive case of > + * FOLL_PIN. > + */ > + if (WARN_ON_ONCE(gup_flags & FOLL_LONGTERM)) > + return false; > + > + return true; > +} > + > #ifdef CONFIG_MMU > static long __get_user_pages_remote(struct mm_struct *mm, > unsigned long start, unsigned long nr_pages, @@ > -1789,25 +1808,6 @@ static long __get_user_pages_remote(stru > gup_flags | FOLL_TOUCH | FOLL_REMOTE); } > > -static bool is_valid_gup_flags(unsigned int gup_flags) -{ > - /* > - * FOLL_PIN must only be set internally by the pin_user_pages*() APIs, > - * never directly by the caller, so enforce that with an assertion: > - */ > - if (WARN_ON_ONCE(gup_flags & FOLL_PIN)) > - return false; > - /* > - * FOLL_PIN is a prerequisite to FOLL_LONGTERM. Another way of saying > - * that is, FOLL_LONGTERM is a specific case, more restrictive case of > - * FOLL_PIN. > - */ > - if (WARN_ON_ONCE(gup_flags & FOLL_LONGTERM)) > - return false; > - > - return true; > -} > - > /** > * get_user_pages_remote() - pin user pages in memory > * @mm: mm_struct of target mm > _ > Best Regards Barry ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-21 1:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-08-20 9:29 mm/gup.c:1922:7: error: implicit declaration of function ‘is_valid_gup_flags’ Naresh Kamboju 2020-08-20 9:37 ` Naresh Kamboju 2020-08-20 20:55 ` Andrew Morton 2020-08-21 1:07 ` Song Bao Hua (Barry Song)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox