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]
Message-Id: <20220719161836.b0ad5cdfb0aec0c04a862122@linux-foundation.org>
Date:   Tue, 19 Jul 2022 16:18:36 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Kassey Li <quic_yingangl@...cinc.com>
Cc:     linux-kernel@...r.kernel.org, Sasha Levin <sashal@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Minchan Kim <minchan@...nel.org>
Subject: Re: [PATCH] mm/cma_debug.c: align the name buffer length as struct
 cma

On Tue, 19 Jul 2022 17:15:54 +0800 Kassey Li <quic_yingangl@...cinc.com> wrote:

> Signed-off-by: Kassey Li <quic_yingangl@...cinc.com>
> ---
>  mm/cma_debug.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/cma_debug.c b/mm/cma_debug.c
> index 2e7704955f4f..c3ffe253e055 100644
> --- a/mm/cma_debug.c
> +++ b/mm/cma_debug.c
> @@ -163,7 +163,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(cma_alloc_fops, NULL, cma_alloc_write, "%llu\n");
>  static void cma_debugfs_add_one(struct cma *cma, struct dentry *root_dentry)
>  {
>  	struct dentry *tmp;
> -	char name[16];
> +	char name[CMA_MAX_NAME];
>  
>  	scnprintf(name, sizeof(name), "cma-%s", cma->name);

Seems logical.  But as CMA_MAX_NAME=64, this could result in alteration
of the output: less truncation of the original name.

Is it the case that the output is never >16 chars anyway?  If so, we'll
be OK.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ