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: <20230912132314.GA4160483@rayden>
Date:   Tue, 12 Sep 2023 15:23:14 +0200
From:   Jens Wiklander <jens.wiklander@...aro.org>
To:     Sudeep Holla <sudeep.holla@....com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Lucian Paul-Trifu <lucian.paul-trifu@....com>,
        Marc Bonnici <marc.bonnici@....com>,
        Coboy Chen <coboy.chen@...iatek.com>
Subject: Re: [PATCH RFT 05/12] firmware: arm_ffa: Implement the
 FFA_NOTIFICATION_SET interface

On Thu, Aug 03, 2023 at 08:02:09PM +0100, Sudeep Holla wrote:
> The framework provides an interface to the sender to specify the
> notification to signal to the receiver. A sender signals a notification
> by requesting its partition manager to set the corresponding bit in the
> notifications bitmap of the receiver invoking FFA_NOTIFICATION_SET.
> 
> Implement the FFA_NOTIFICATION_SET to enable the caller(sender) to send
> the notifications for any other partitions in the system.
> 
> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
> ---
>  drivers/firmware/arm_ffa/driver.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
> index 41171ae7f63a..492f5bfa3751 100644
> --- a/drivers/firmware/arm_ffa/driver.c
> +++ b/drivers/firmware/arm_ffa/driver.c
> @@ -604,6 +604,26 @@ static int ffa_notification_bind_common(u16 dst_id, u64 bitmap,
>  	return 0;
>  }
>  
> +static
> +int ffa_notification_set(u16 src_id, u16 dst_id, u32 flags, u64 bitmap)
> +{
> +	ffa_value_t ret;
> +	u32 src_dst_ids = PACK_TARGET_INFO(dst_id, src_id);

dst_id and src_id should be swapped in the argument to PACK_TARGET_INFO().

Thanks,
Jens

> +
> +	invoke_ffa_fn((ffa_value_t) {
> +		  .a0 = FFA_NOTIFICATION_SET, .a1 = src_dst_ids, .a2 = flags,
> +		  .a3 = NOTIFICATION_BITMAP_LOW(bitmap),
> +		  .a4 = NOTIFICATION_BITMAP_HIGH(bitmap),
> +		  }, &ret);
> +
> +	if (ret.a0 == FFA_ERROR)
> +		return ffa_to_linux_errno((int)ret.a2);
> +	else if (ret.a0 != FFA_SUCCESS)
> +		return -EINVAL;
> +
> +	return 0;
> +}
> +
>  static int ffa_run(struct ffa_device *dev, u16 vcpu)
>  {
>  	ffa_value_t ret;
> 
> -- 
> 2.41.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ