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: <f9100627-ada0-4d78-8b98-15d6aef64d9a@web.de>
Date: Sat, 20 Jul 2024 10:05:58 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: George Yang <George.Yang@....com>, Lizhi Hou <lizhi.hou@....com>,
 Min Ma <min.ma@....com>, Narendra Gutta
 <VenkataNarendraKumar.Gutta@....com>, dri-devel@...ts.freedesktop.org,
 Oded Gabbay <ogabbay@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Max Zhen <max.zhen@....com>,
 Sonal Santan <sonal.santan@....com>
Subject: Re: [PATCH 02/10] accel/amdxdna: Support hardware mailbox

…
> +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
> @@ -0,0 +1,582 @@
…
> +int xdna_mailbox_send_msg(struct mailbox_channel *mb_chann,
> +			  const struct xdna_mailbox_msg *msg, u64 tx_timeout)
> +{
> +	struct xdna_msg_header *header;
> +	struct mailbox_msg *mb_msg;

I propose to take another software design option better into account
also according to the application of scope-based resource management.

* You may reduce the scopes of such local variables.

* Would you like to use the attribute “__free(kfree)” accordingly?
  https://elixir.bootlin.com/linux/v6.10/source/include/linux/slab.h#L282

…
> +	mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
…


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ