mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Haakon Bugge <haakon.bugge@oracle.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Anand Khoje <anand.a.khoje@oracle.com>,
	OFED mailing list <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>
Subject: Re: [PATCH v3 3/3] IB/core: Obtain subnet_prefix from cache in IB devices.
Date: Tue, 15 Jun 2021 16:13:14 +0000	[thread overview]
Message-ID: <427FB96F-2550-4106-B8AD-EC589C1FD82B@oracle.com> (raw)
In-Reply-To: <YMg111mLzwqu8P0o@unreal>



> On 15 Jun 2021, at 07:08, Leon Romanovsky <leon@kernel.org> wrote:
> 
> On Mon, Jun 14, 2021 at 04:29:09PM +0000, Haakon Bugge wrote:
>> 
>> 
>>> On 14 Jun 2021, at 09:25, Leon Romanovsky <leon@kernel.org> wrote:
>>> 
>>> On Mon, Jun 14, 2021 at 03:32:39AM +0000, Haakon Bugge wrote:
>>>> 
>>>> 
>>>>> On 9 Jun 2021, at 12:40, Leon Romanovsky <leon@kernel.org> 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 :-)


Thxs, Håkon


  reply	other threads:[~2021-06-15 16:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09  5:55 [PATCH v3 0/3] IB/core: Obtaining subnet_prefix from cache in Anand Khoje
2021-06-09  5:55 ` [PATCH v3 1/3] IB/core: Removed port validity check from ib_get_cached_subnet_prefix Anand Khoje
2021-06-09  8:37   ` Leon Romanovsky
2021-06-09  5:55 ` [PATCH v3 2/3] IB/core: Shuffle locks in ib_port_data to save memory Anand Khoje
2021-06-09  5:55 ` [PATCH v3 3/3] IB/core: Obtain subnet_prefix from cache in IB devices Anand Khoje
2021-06-09  8:36   ` Leon Romanovsky
2021-06-09  9:26     ` Anand Khoje
2021-06-09 10:40       ` Leon Romanovsky
2021-06-14  3:32         ` Haakon Bugge
2021-06-14  7:25           ` Leon Romanovsky
2021-06-14 16:29             ` Haakon Bugge
2021-06-15  5:08               ` Leon Romanovsky
2021-06-15 16:13                 ` Haakon Bugge [this message]
2021-06-16 11:20                   ` Haakon Bugge
2021-06-16 12:43                     ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=427FB96F-2550-4106-B8AD-EC589C1FD82B@oracle.com \
    --to=haakon.bugge@oracle.com \
    --cc=anand.a.khoje@oracle.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®