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]
Date:   Mon, 12 Apr 2021 15:45:36 +0530
From:   Rijo Thomas <Rijo-john.Thomas@....com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Jens Wiklander <jens.wiklander@...aro.org>,
        Devaraj Rangasamy <Devaraj.Rangasamy@....com>,
        Mythri Pandeshwara krishna <mythri.pandeshwarakrishna@....com>,
        op-tee@...ts.trustedfirmware.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes
 0



On 09/04/21 2:15 pm, Dan Carpenter wrote:
> On Mon, Apr 05, 2021 at 03:13:09PM +0530, Rijo Thomas wrote:
>> @@ -340,7 +398,8 @@ int handle_open_session(struct tee_ioctl_open_session_arg *arg, u32 *info,
>>
>>  int handle_load_ta(void *data, u32 size, struct tee_ioctl_open_session_arg *arg)
>>  {
>> -	struct tee_cmd_load_ta cmd = {0};
>> +	struct tee_cmd_unload_ta unload_cmd = {0};
>> +	struct tee_cmd_load_ta load_cmd = {0};
> 
> It's better style to write:
> 
> 	struct tee_cmd_unload_ta unload_cmd = {};
> 
> It doesn't make a difference in this case, but if the first struct
> member is a pointer then {0} can generate a Sparse warning.  Or
> depending on which bugs your version of GCC has it can affect whether
> struct holes are initialized.  But mostly it's just the prefered style.
>

Hi Dan,

We do not have any pointers nor do I see a possibility of structure holes, since all data
members are u32 in both struct tee_cmd_load_ta and struct tee_cmd_unload_ta. So, will prefer
to use {0} for now.

Thanks,
Rijo
 
> 
> regards,
> dan carpenter
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ