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]
Date:   Wed, 7 Sep 2022 14:10:28 +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,
        op-tee@...ts.trustedfirmware.org,
        Marc Bonnici <marc.bonnici@....com>,
        Achin Gupta <achin.gupta@....com>,
        Valentin Laurent <valentin.laurent@...stonic.com>,
        Lukas Hanel <lukas.hanel@...stonic.com>,
        Coboy Chen <coboy.chen@...iatek.com>
Subject: Re: [PATCH v2 04/10] firmware: arm_ffa: Add support for querying FF-A features

On Fri, Sep 2, 2022 at 2:40 PM Sudeep Holla <sudeep.holla@....com> wrote:
>
> Add support for FFA_FEATURES to discover properties supported at the
> FF-A interface. This interface can be used to query:
>  - If an FF-A interface is implemented by the component at the higher EL,
>  - If an implemented FF-A interface also implements any optional features
>    described in its interface definition, and
>  - Any implementation details exported by an implemented FF-A interface
>    as described in its interface definition.
>
> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
> ---
>  drivers/firmware/arm_ffa/driver.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

Reviewed-by: Jens Wiklander <jens.wiklander@...aro.org>

>
> diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
> index 04e7cbb1b9aa..81b8d578b6ea 100644
> --- a/drivers/firmware/arm_ffa/driver.c
> +++ b/drivers/firmware/arm_ffa/driver.c
> @@ -571,6 +571,32 @@ static int ffa_memory_reclaim(u64 g_handle, u32 flags)
>         return 0;
>  }
>
> +static int ffa_features(u32 func_feat_id, u32 input_props,
> +                       u32 *if_props_1, u32 *if_props_2)
> +{
> +       ffa_value_t id;
> +
> +       if (!ARM_SMCCC_IS_FAST_CALL(func_feat_id) && input_props) {
> +               pr_err("%s: Invalid Parameters: %x, %x", __func__,
> +                      func_feat_id, input_props);
> +               return ffa_to_linux_errno(FFA_RET_INVALID_PARAMETERS);
> +       }
> +
> +       invoke_ffa_fn((ffa_value_t){
> +               .a0 = FFA_FEATURES, .a1 = func_feat_id, .a2 = input_props,
> +               }, &id);
> +
> +       if (id.a0 == FFA_ERROR)
> +               return ffa_to_linux_errno((int)id.a2);
> +
> +       if (if_props_1)
> +               *if_props_1 = id.a2;
> +       if (if_props_2)
> +               *if_props_2 = id.a3;
> +
> +       return 0;
> +}
> +
>  static u32 ffa_api_version_get(void)
>  {
>         return drv_info->version;
> --
> 2.37.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ