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: <CAHUa44Gs8T+hxkmVr2ap-HKB9QHkPB14-O2S6BvLrkEhP-Rw9Q@mail.gmail.com>
Date: Tue, 17 Dec 2024 22:06:02 +0100
From: Jens Wiklander <jens.wiklander@...aro.org>
To: Sahil Malhotra <sahil.malhotra@....com>
Cc: Jerome Forissier <jerome.forissier@...aro.org>, op-tee@...ts.trustedfirmware.org, 
	linux-kernel@...r.kernel.org, Varun Sethi <V.Sethi@....com>, Peng Fan <peng.fan@....com>, 
	Aisheng Dong <aisheng.dong@....com>, Sumit Garg <sumit.garg@...aro.org>
Subject: Re: [PATCH] optee: fix format string for printing optee build_id

Hi Sahil,

On Fri, Nov 29, 2024 at 12:46 PM Sahil Malhotra <sahil.malhotra@....com> wrote:
>
> There has been a recent change in OP-TEE to print 8 and 16 character
> commit id for 32bit and 64bit architecture respectively.
> In case if commit id is starting with 0 like 04d1c612ec7beaede073b8c
> it is printing revision as below removing leading 0
> "optee: revision 4.4 (4d1c612ec7beaed)"
>
> Signed-off-by: Sahil Malhotra <sahil.malhotra@....com>
> ---
>  drivers/tee/optee/smc_abi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

I'm picking up this.

Thanks,
Jens

>
> diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
> index e9456e3e74cc..eb51dc18f32d 100644
> --- a/drivers/tee/optee/smc_abi.c
> +++ b/drivers/tee/optee/smc_abi.c
> @@ -1272,8 +1272,9 @@ static void optee_msg_get_os_revision(optee_invoke_fn *invoke_fn)
>                   &res.smccc);
>
>         if (res.result.build_id)
> -               pr_info("revision %lu.%lu (%08lx)", res.result.major,
> -                       res.result.minor, res.result.build_id);
> +               pr_info("revision %lu.%lu (%0*lx)", res.result.major,
> +                       res.result.minor, (int)sizeof(res.result.build_id) * 2,
> +                       res.result.build_id);
>         else
>                 pr_info("revision %lu.%lu", res.result.major, res.result.minor);
>  }
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ