Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3356656pxj; Mon, 14 Jun 2021 22:10:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEFWtXNWrOiPpx2BBwzIRNmfTEjZOMQ4RbpkVilthGKh2jjLJ/BIq3a8XpoD/g4qQ2Wih3 X-Received: by 2002:a05:6402:11cb:: with SMTP id j11mr21524429edw.24.1623733805948; Mon, 14 Jun 2021 22:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623733805; cv=none; d=google.com; s=arc-20160816; b=s/5BvbQpGINNTYwtJcWTTpy4mxP81kHJVaEiFFByQfpBuwFbqaHkvV0WJlptLPHmDv A5yyr8buPj52ynuu9Z8Fd6C07ag+K9EVHSr5defr+TdGrC/80RBmrevDMJ4EgmoxkTrF OTUyRbwu4fo95yr6JwOxeeFvKMh/kYFzjP+wEhCrFoLaKRga+qfbtdN1c7epBHQ8izMV 4Nza3RbZCOP1V1uMMaRsl5tKKNPevqK1kiwUukNyOK+JXYWu41mWoiZzb7tlKP4tNtDK YBk3JvZE8C09Ah5sAJm2LQOcgnQYQpeCNXwtvNjivn2N0vd5XWh6FuEYMSWiR9iDfGSL tMag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=emm8VcYca3uhR33UL71g1YOv9BrjNsYprixm3U4IUWs=; b=u7M0civ5hBe/zwko9V4Ik/tMV6ViuPzMDf+fg7piplstRXHTaXuHbqZBdWrnNwahTT xlynp+CDdX4Su8guXkk4CQMnkLkEzxCsBkiU6Dzp3ZGxuCNYwcSjrZrKRysRkjRfOPMX Ztlro+gZaTLshpZuS37lnrbJL+C/ZEl43/VbBRydP66tQXfNc0PDfO8glCjPxXxwSGNl Gff2b0z7fteaT5Wrz3Je0oe2G7xG0lcsGDKCU5WLNlbb6mU8wd1E4w/ogSsavus4TwBc DdntJo2ET8KjmEjLxMD0zJUVw8alYxxHLSo8DFIEOXS/NJTtVWEgMcyd++uVNzfe0r1m aP8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ge3dORCz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si13056919ejt.569.2021.06.14.22.09.43; Mon, 14 Jun 2021 22:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ge3dORCz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbhFOFKt (ORCPT + 99 others); Tue, 15 Jun 2021 01:10:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:51060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbhFOFKr (ORCPT ); Tue, 15 Jun 2021 01:10:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 795236124B; Tue, 15 Jun 2021 05:08:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623733723; bh=5kFE330+23kMptN9HbNNWQMTPI9CdBPnkIgY+SruPBo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ge3dORCzCE1Dr1+BfbVTPnYwkHlQFN2bAhPJQ3dH4Bbk76TB+BuoUA7wRpThsL+Ea G8zRZQhyrLKUaxNuuAQyGoUnsAC3aT9SpKX/TXjfHHk2rVErA40ESA2V9PTCTUxoZi oWrui0xJYq4EkeoGmAFeyAQu0YDFID3eb+K4ro0T+dFlT+qxH/fKGLYqM42r2yVAn4 yJyF1oRXJUKbM+r3E8U9Yux+mLaOZgfjUc0Bzo7zWjiX+dBXhbbwuFUX43D3PfFWqe HIf+u7x043QzN732HjnjjenJma+R6GjYrOPmrnrjBvTd2aD5FwnyusGynr/i7UUvp6 /uszxz8R/nR1w== Date: Tue, 15 Jun 2021 08:08:39 +0300 From: Leon Romanovsky To: Haakon Bugge Cc: Anand Khoje , OFED mailing list , "linux-kernel@vger.kernel.org" , "dledford@redhat.com" , "jgg@ziepe.ca" Subject: Re: [PATCH v3 3/3] IB/core: Obtain subnet_prefix from cache in IB devices. Message-ID: References: <20210609055534.855-1-anand.a.khoje@oracle.com> <20210609055534.855-4-anand.a.khoje@oracle.com> <30CD8612-2030-44C1-A879-9A1EC668FC9C@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 04:29:09PM +0000, Haakon Bugge wrote: > > > > On 14 Jun 2021, at 09:25, Leon Romanovsky wrote: > > > > On Mon, Jun 14, 2021 at 03:32:39AM +0000, Haakon Bugge wrote: > >> > >> > >>> On 9 Jun 2021, at 12:40, Leon Romanovsky 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." Thanks [1] https://lwn.net/Articles/856044/ - Holes in WiFi > > > Thxs, H?kon >