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: <e189784c286a2d7f839e973eb88e287c9ea0774d.camel@mailbox.org>
Date: Fri, 24 Oct 2025 13:05:55 +0200
From: Philipp Stanner <phasta@...lbox.org>
To: tanze <tanze@...inos.cn>, perex@...ex.cz, phasta@...nel.org,
 tiwai@...e.com
Cc: linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org
Subject: Re: [PATCH v2] ALSA: maestro3: using vmalloc_array() to handle the
 code

On Fri, 2025-10-24 at 18:55 +0800, tanze wrote:
> Change array_size() to vmalloc_array(), due to vmalloc_array()
> being optimized better, using fewer instructions, and handles
> overflow more concisely.
> 
> Signed-off-by: tanze <tanze@...inos.cn>

Reviewed-by: Philipp Stanner <phasta@...nel.org>

> ---
> Hi, Philipp Stanner,
> 
> Thank you for your suggestions.
> I have made revisions according to your requirements.
> 
> Regarding the issue of my full name, thank you for your 
> attention to detail. Since I am in China, I use the name 
> "tanze" on many occasions, and the code I previously submitted 
> to the upstream community was also under this name.
> ---
> Changes in v2:
>  - Fix some issues in the commit message.
> 
> v1:
>  - patch: https://lore.kernel.org/all/20251022092339.551438-1-tanze@kylinos.cn/
> 
> Best regards,
> Ze Tan 

Well, if your name is Ze Tan you could use that :)

Don't get me wrong, it's not a huge issue; tanze just might raise an
eyebrow here and there and have people wonder whether that's a
pseudonym or nickname or sth.

What's fine for Takashi is fine for me.

Regards
Philipp

> ---
>  sound/pci/maestro3.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
> index bddf47a1f263..3353980d5cd8 100644
> --- a/sound/pci/maestro3.c
> +++ b/sound/pci/maestro3.c
> @@ -2571,9 +2571,9 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
>  
>  	if (IS_ENABLED(CONFIG_PM_SLEEP)) {
>  		chip->suspend_mem =
> -			vmalloc(array_size(sizeof(u16),
> -					   REV_B_CODE_MEMORY_LENGTH +
> -					   REV_B_DATA_MEMORY_LENGTH));
> +			vmalloc_array(REV_B_CODE_MEMORY_LENGTH +
> +				      REV_B_DATA_MEMORY_LENGTH,
> +				      sizeof(u16));
>  		if (!chip->suspend_mem)
>  			dev_warn(card->dev, "can't allocate apm buffer\n");
>  	}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ