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: <b60e55de-46b7-3eeb-4ad1-914d8cc5f25b@redhat.com>
Date:   Mon, 31 Oct 2022 11:28:15 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Rebecca Mckeever <remckee0@...il.com>,
        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 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.

Apart from that

Acked-by: David Hildenbrand <david@...hat.com>


Thanks!

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ