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] [day] [month] [year] [list]
Message-ID: <20221103040247.GA10663@sophie>
Date:   Wed, 2 Nov 2022 23:02:47 -0500
From:   Rebecca Mckeever <remckee0@...il.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     Mike Rapoport <rppt@...nel.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/5] memblock tests: introduce range tests for
 memblock_alloc_exact_nid_raw

On Mon, Oct 31, 2022 at 11:28:15AM +0100, David Hildenbrand wrote:
> On 19.10.22 20:34, Rebecca Mckeever wrote:
> > Add TEST_F_EXACT flag, which specifies that tests should run
> > memblock_alloc_exact_nid_raw(). Introduce range tests for
> > memblock_alloc_exact_nid_raw() by using the TEST_F_EXACT flag to run the
> > range tests in alloc_nid_api.c, since memblock_alloc_exact_nid_raw() and
> > memblock_alloc_try_nid_raw() behave the same way when nid = NUMA_NO_NODE.
> > 
> > Rename tests and other functions in alloc_nid_api.c by removing "_try".
> > Since the test names will be displayed in verbose output, they need to
> > be general enough to refer to any of the memblock functions that the
> > tests may run.
> > 
> > Signed-off-by: Rebecca Mckeever <remckee0@...il.com>
> 
> [...]
> 
> > diff --git a/tools/testing/memblock/tests/alloc_nid_api.c b/tools/testing/memblock/tests/alloc_nid_api.c
> > index 2c2d60f4e3e3..df8e7e038cab 100644
> > --- a/tools/testing/memblock/tests/alloc_nid_api.c
> > +++ b/tools/testing/memblock/tests/alloc_nid_api.c
> > @@ -18,18 +18,27 @@ static const unsigned int node_fractions[] = {
> >   	 625, /* 1/16 */
> >   };
> > -static inline const char * const get_memblock_alloc_try_nid_name(int flags)
> > +static inline const char * const get_memblock_alloc_nid_name(int flags)
> >   {
> > +	if (flags & TEST_F_EXACT)
> > +		return "memblock_alloc_exact_nid_raw";
> >   	if (flags & TEST_F_RAW)
> >   		return "memblock_alloc_try_nid_raw";
> >   	return "memblock_alloc_try_nid";
> >   }
> > -static inline void *run_memblock_alloc_try_nid(phys_addr_t size,
> > -					       phys_addr_t align,
> > -					       phys_addr_t min_addr,
> > -					       phys_addr_t max_addr, int nid)
> > +static inline void *run_memblock_alloc_nid(phys_addr_t size,
> > +					   phys_addr_t align,
> > +					   phys_addr_t min_addr,
> > +					   phys_addr_t max_addr, int nid)
> >   {
> 
> I think we want to assert here that TEST_F_EXACT without TEST_F_RAW is not
> set --- because there is no API to support it.
> 
Good idea. Thanks for pointing this out. I will add an assert.

> Apart from that
> 
> Acked-by: David Hildenbrand <david@...hat.com>
> 
> 
> Thanks!
> 
> -- 
> Thanks,
> 
> David / dhildenb
> 
Thanks,
Rebecca

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ