On Wed, Jun 16, 2021 at 11:20:01AM +0000, Haakon Bugge wrote: > > > > On 15 Jun 2021, at 18:13, Haakon Bugge <haakon.bugge@xxxxxxxxxx> wrote: > > > > > > > >> On 15 Jun 2021, at 07:08, Leon Romanovsky <leon@xxxxxxxxxx> wrote: > >> > >> On Mon, Jun 14, 2021 at 04:29:09PM +0000, Haakon Bugge wrote: > >>> > >>> > >>>> On 14 Jun 2021, at 09:25, Leon Romanovsky <leon@xxxxxxxxxx> wrote: > >>>> > >>>> On Mon, Jun 14, 2021 at 03:32:39AM +0000, Haakon Bugge wrote: > >>>>> > >>>>> > >>>>>> On 9 Jun 2021, at 12:40, Leon Romanovsky <leon@xxxxxxxxxx> wrote: > >>>>>> > >>>>>> On Wed, Jun 09, 2021 at 09:26:03AM +0000, Anand Khoje wrote: > >>>>>>> Hi Leon, > >>>>>> > >>>>>> Please don't do top-posting. > >>>>>> > >>>>>> > >>>>>>> > >>>>>>> The set_bit()/clear_bit() and enum ib_port_data_flags has been added as a device that can be used for future enhancements. > >>>>>>> Also, usage of set_bit()/clear_bit() ensures the operations on this bit is atomic. > >>>>>> > >>>>>> The bitfield variables are better suit this use case. > >>>>>> Let's don't overcomplicate code without the reason. > >>>>> > >>>>> The problem is always that people tend to build on what's in there. For example, look at the bitfields in rdma_id_private, tos_set, timeout_set, and min_rnr_timer_set. > >>>>> > >>>>> What do you think will happen when, let's say, rdma_set_service_type() and rdma_set_ack_timeout() are called in close proximity in time? There is no locking, and the RMW will fail intermittently. > >>>> > >>>> We are talking about device initialization flow that shouldn't be > >>>> performed in parallel to another initialization of same device, so the > >>>> comparison to rdma-cm is not valid here. > >>> > >>> I can agree to that. And it is probably not worthwhile to fix the bit-fields in rdma_id_private? > >> > >> Before this article [1], I would say no, we don't need to fix. > >> Now, I'm not sure about that. > >> > >> "He also notes that even though the design flaws are difficult to exploit > >> on their own, they can be combined with the other flaws found to make for > >> a much more serious problem." > >> > >> and > >> > >> "In other words, people did notice this vulnerability and a defense was standardized, > >> but in practice the defense was never adopted. This is a good example that security > >> defenses must be adopted before attacks become practical." > > > > Let me send you a commit tomorrow. The last sentence you quoted above is ambiguous as far as I can understand. But the intention is clear though :-) > > Do you prefer for-next or for-rc for this? for-next, please. Thanks > > Thxs, Håkon >