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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 1 Jun 2023 08:21:16 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     Yuwei Guan <ssawgyw@...il.com>
Cc:     akpm@...ux-foundation.org, wangkefeng.wang@...wei.com,
        anshuman.khandual@....com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] memblock: Update nid info in memblock debugfs

On Mon, May 29, 2023 at 02:20:02PM +0800, Yuwei Guan wrote:
> The node id for memblock reserved regions will be wrong,
> so let's show 'x' for reg->nid == MAX_NUMNODES in debugfs to keep it align.
> 
> Suggested-by: Mike Rapoport (IBM) <rppt@...nel.org>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> Signed-off-by: Yuwei Guan <ssawgyw@...il.com>

I believe this could use Co-developed-by tags.
Please take a look at Documentation/process/submitting-patches.rst

> ---
>  mm/memblock.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index c5c80d9bcea3..3d449aaba052 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -2169,17 +2169,21 @@ static int memblock_debug_show(struct seq_file *m, void *private)
>  {
>  	struct memblock_type *type = m->private;
>  	struct memblock_region *reg;
> -	int i, j;
> +	int i, j, nid;
>  	unsigned int count = ARRAY_SIZE(flagname);
>  	phys_addr_t end;
>  
>  	for (i = 0; i < type->cnt; i++) {
>  		reg = &type->regions[i];
>  		end = reg->base + reg->size - 1;
> +		nid = memblock_get_region_node(reg);
>  
>  		seq_printf(m, "%4d: ", i);
>  		seq_printf(m, "%pa..%pa ", &reg->base, &end);
> -		seq_printf(m, "%4d ", memblock_get_region_node(reg));
> +		if (nid != MAX_NUMNODES)
> +			seq_printf(m, "%4d ", nid);
> +		else
> +			seq_printf(m, "%4c ", 'x');
>  		if (reg->flags) {
>  			for (j = 0; j < count; j++) {
>  				if (reg->flags & (1U << j)) {
> -- 
> 2.34.1
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ