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: <e92c7992-303a-0f71-13b2-f33efbba4b22@wanadoo.fr>
Date:   Mon, 20 Feb 2023 23:16:34 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Jason Gunthorpe <jgg@...pe.ca>
Cc:     Leon Romanovsky <leon@...nel.org>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH] RDMA/restrack: Reorder fields in 'struct
 rdma_restrack_entry'

Le 15/02/2023 à 12:31, Leon Romanovsky a écrit :
> On Tue, Feb 14, 2023 at 11:01:00AM -0400, Jason Gunthorpe wrote:
>> On Tue, Feb 14, 2023 at 03:34:21PM +0100, Christophe JAILLET wrote:
>>> Le 14/02/2023 à 14:08, Jason Gunthorpe a écrit :
>>>> On Tue, Feb 14, 2023 at 01:53:52PM +0100, Christophe JAILLET wrote:
>>>>> diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h
>>>>> index 8b7c46daeb07..da53fefe6f9e 100644
>>>>> --- a/include/rdma/restrack.h
>>>>> +++ b/include/rdma/restrack.h
>>>>> @@ -80,6 +80,10 @@ struct rdma_restrack_entry {
>>>>>    	 * query stage.
>>>>>    	 */
>>>>>    	u8			no_track : 1;
>>>>> +	/**
>>>>> +	 * @user: user resource
>>>>> +	 */
>>>>> +	bool			user;
>>>>
>>>> Can we combine this into the bitfield above?
>>>>
>>>> Jason
>>>>
>>> Hi,
>>>
>>> and even above, we have
>>> 	bool	valid;
>>>
>>> I wanted to keep the changes as minimal as possible, but I can change them
>>> all in a single bitfield.
>>
>> IIRC it needs to be checked, I vaugely remember valid can't be a
>> bitfield because it is an atomic
> 
> I don't remember anything like this.
> 
> Thanks
> 

If I understand code correctly, 'valid' is only used in 
rdma_restrack_add() and rdma_restrack_del().

I don't think that any atomic behavior is in place in these functions.


I'll send in the coming days a v2 which changes 'valid', 'no_track' and 
'user' as bool:1.

CJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ