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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+i-1C2C4GSd3Jhw56WfccKizoeLj4ychCz2BpOU6AwESjzSyg@mail.gmail.com>
Date: Wed, 26 Feb 2025 11:47:00 +0100
From: Brendan Jackman <jackmanb@...gle.com>
To: Brendan Higgins <brendan.higgins@...ux.dev>, David Gow <davidgow@...gle.com>, 
	Rae Moar <rmoar@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>, 
	David Hildenbrand <david@...hat.com>, Oscar Salvador <osalvador@...e.de>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, 
	Michal Hocko <mhocko@...nel.org>, linux-kselftest@...r.kernel.org, 
	kunit-dev@...glegroups.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org, 
	Yosry Ahmed <yosry.ahmed@...ux.dev>
Subject: Re: [PATCH RFC 4/4] mm/page_alloc_test: Add smoke-test for page allocation

On Mon, 24 Feb 2025 at 15:47, Brendan Jackman <jackmanb@...gle.com> wrote:
> +static inline struct page *alloc_pages_force_nid(struct kunit *test,
> +                                                gfp_t gfp, int order, int nid)
> +{
> +       NODEMASK_ALLOC(nodemask_t, nodemask, GFP_KERNEL);
> +       struct page *page;
> +
> +       KUNIT_ASSERT_NOT_NULL(test, nodemask);
> +       kunit_add_action(test, action_nodemask_free, &nodemask);
> +       nodes_clear(*nodemask);
> +       node_set(nid, *nodemask);
> +
> +       page = __alloc_pages_noprof(GFP_KERNEL, 0, nid, nodemask);

Oops, it's ignoring the gfp argument here.

> +       { .gfp_flags = GFP_DMA32,       .want_zone = ZONE_NORMAL },

And with that fixed, it becomes clear DMA32 allocations can't be
expected to succeed in this zone setup.

(Anyway, it's a bit of a silly test regardless, just something to
illustrate the KUnit idea).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ