lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdWX_fNxiPSBbWVSwSM+go_=1dccCK9jaYkR+2U14FR8pg@mail.gmail.com>
Date:   Sun, 25 Jun 2023 17:34:02 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Chuck Lever III <chuck.lever@...cle.com>
Cc:     Dan Carpenter <dan.carpenter@...aro.org>,
        Naresh Kamboju <naresh.kamboju@...aro.org>,
        open list <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>,
        kasan-dev <kasan-dev@...glegroups.com>,
        "kunit-dev@...glegroups.com" <kunit-dev@...glegroups.com>,
        "lkft-triage@...ts.linaro.org" <lkft-triage@...ts.linaro.org>,
        Marco Elver <elver@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: Re: next: WARNING: CPU: 0 PID: 1200 at mm/page_alloc.c:4744 __alloc_pages+0x2e8/0x3a0

Hi Chuck,

On Sun, Jun 25, 2023 at 5:17 PM Chuck Lever III <chuck.lever@...cle.com> wrote:
> > On Jun 25, 2023, at 4:46 AM, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > On Sat, May 13, 2023 at 10:54 AM Dan Carpenter <dan.carpenter@...aro.org> wrote:
> >> On Fri, May 12, 2023 at 01:56:30PM +0000, Chuck Lever III wrote:
> >>>> On May 12, 2023, at 6:32 AM, Dan Carpenter <dan.carpenter@...aro.org> wrote:
> >>>> I'm pretty sure Chuck Lever did this intentionally, but he's not on the
> >>>> CC list.  Let's add him.
> >>>>
> >>>> regards,
> >>>> dan carpenter
> >>>>
> >>>> On Fri, May 12, 2023 at 06:15:04PM +0530, Naresh Kamboju wrote:
> >>>>> Following kernel warning has been noticed on qemu-arm64 while running kunit
> >>>>> tests while booting Linux 6.4.0-rc1-next-20230512 and It was started from
> >>>>> 6.3.0-rc7-next-20230420.
> >>>>>
> >>>>> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> >>>>>
> >>>>> This is always reproducible on qemu-arm64, qemu-arm, qemu-x86 and qemu-i386.
> >>>>> Is this expected warning as a part of kunit tests ?
> >>>
> >>> Dan's correct, this Kunit test is supposed to check the
> >>> behavior of the API when a too-large privsize is specified.
> >>>
> >>> I'm not sure how to make this work without the superfluous
> >>> warning. Would adding GFP_NOWARN to the allocation help?
> >>
> >> That would silence the splat, yes.
> >
> > But introduce a build failure, as GFP_NOWARN does not exist.
>
> This is the fix that went in:
>
> commit b21c7ba6d9a5532add3827a3b49f49cbc0cb9779
> Author:     Chuck Lever <chuck.lever@...cle.com>
> AuthorDate: Fri May 19 13:12:50 2023 -0400
> Commit:     Jakub Kicinski <kuba@...nel.org>
> CommitDate: Mon May 22 19:24:52 2023 -0700
>
>     net/handshake: Squelch allocation warning during Kunit test
>
>     The "handshake_req_alloc excessive privsize" kunit test is intended
>     to check what happens when the maximum privsize is exceeded. The
>     WARN_ON_ONCE_GFP at mm/page_alloc.c:4744 can be disabled safely for
>     this test.
>
>     Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
>     Fixes: 88232ec1ec5e ("net/handshake: Add Kunit tests for the handshake consumer API")
>     Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
>     Link: https://lore.kernel.org/r/168451636052.47152.9600443326570457947.stgit@oracle-102.nfsv4bat.org
>     Signed-off-by: Jakub Kicinski <kuba@...nel.org>
>
> diff --git a/net/handshake/handshake-test.c b/net/handshake/handshake-test.c
> index e6adc5dec11a..6193e46ee6d9 100644
> --- a/net/handshake/handshake-test.c
> +++ b/net/handshake/handshake-test.c
> @@ -102,7 +102,7 @@ struct handshake_req_alloc_test_param handshake_req_alloc_params[] = {
>         {
>                 .desc                   = "handshake_req_alloc excessive privsize",
>                 .proto                  = &handshake_req_alloc_proto_6,
> -               .gfp                    = GFP_KERNEL,
> +               .gfp                    = GFP_KERNEL | __GFP_NOWARN,
>                 .expect_success         = false,
>         },
>         {
>
> Is there a platform where __GPF_NOWARN is not defined?

"git grep" says all of them, as you misspelled it in your question ;-)

"__GFP_NOWARN"  is defined in include/linux/gfp_types.h,
so it should be available everywhere.

Note the use of "__GFP_NOWARN" instead of "GFP_NOWARN".
Once in a while, people do submit patches using "GFP_NOWARN"...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ