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: <20250210101743.aqbhqqkdbvka2i46@vireshk-i7>
Date: Mon, 10 Feb 2025 15:47:43 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Sudeep Holla <sudeep.holla@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 17/18] firmware: arm_ffa: Add support for handling
 framework notifications

On 31-01-25, 11:24, Sudeep Holla wrote:
> +static void handle_fwk_notif_callbacks(u32 bitmap)
> +{
> +	void *buf;
> +	uuid_t uuid;
> +	int notify_id = 0, target;
> +	struct ffa_indirect_msg_hdr *msg;
> +	struct notifier_cb_info *cb_info = NULL;
> +
> +	/* Only one framework notification defined and supported for now */
> +	if (!(bitmap & FRAMEWORK_NOTIFY_RX_BUFFER_FULL))
> +		return;
> +
> +	mutex_lock(&drv_info->rx_lock);
> +
> +	msg = drv_info->rx_buffer;
> +	buf = kmalloc(msg->size, GFP_KERNEL);
> +	if (!buf) {
> +		mutex_unlock(&drv_info->rx_lock);
> +		return;
> +	}
> +	memcpy(buf, (void *)msg + msg->offset, msg->size);

Can use kmemdup() here instead.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ