Article View: linux.kernel.netdev
Article #21828Re: [PATCH V2 rdma-next 21/21] RDMA/core: Report and enforce adversarial mode via GET_CONTEXT
From: Leon Romanovsky
Date: Tue, 24 Nov 2026 14:09
Date: Tue, 24 Nov 2026 14:09
52 lines
10372 bytes
10372 bytes
On Tue, Nov 24, 2026 at 09:47:51AM -0400, Jason Gunthorpe wrote: > On Tue, Nov 24, 2026 at 03:33:53PM +0200, Leon Romanovsky wrote: > > On Tue, Nov 24, 2026 at 08:59:50AM -0400, Jason Gunthorpe wrote: > > > > > RDMA/core: Report and enforce adversarial mode via GET_CONTEXT > > > > > > > > > > In adversarial mode the NIC is not trusted. As the kernel protects its > > > > > own code from it, user space has to protect its own area, e.g. the data > > > > > path that polls CQEs directly from the HW. > > > > > > > > > > Hardened user space might use a different data path, with extra checks, > > > > > and support a smaller surface. This isn't needed for a trusted NIC, so user > > > > > space must know when a device is in adversarial mode. > > > > > > > > This information is part of trust level series. Why is this a “must” in RDMA UAPI? > > > > > > Userspace has to work differently if the kernel driver is in the > > > adversarial mode, and the kernel should not permit an old non-supporting > > > rdma-core from loading to prevent a security downgrade. > > > > I understand the first part of the sentence above, but the second part is > > unclear. Why should this prevent it? In adversarial mode, the kernel simply > > isolates that device from the others. > > Userspace needs to do it too or it is not a complete defense. > > > Moreover, the kernel cannot determine whether rdma-core has actually been > > adapted. A locally cloned version of rdma-core can set the new adversarial > > flag without changing the old, legacy version. > > > > Once that flag is set, the kernel allows the patched rdma-core to proceed. > > Therefore, saying that it “should not permit” this makes no sense. > > If someone makes a non-official version of rdma-core that doesn't work > securely then I don't care one bit. > > I care that the official versions are not improperly mismtached to > give something insecure. You explain why rdma-core needs to know about adversarial mode, which is fine. However, you also say that rdma-core MUST send this new flag back to justify the statement, “The kernel should not permit an old, non-supporting ...”. However, in your last reply, you said that the kernel does not actually care about the rdma-core mode. Thanks > > Jason >
Technical Details
Message-ID:
<20261124140906.GU14811@unreal>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370420-linux-kernel-netdev=dewy.ruReferences:
<20261117170914.27410-1-yishaih@nvidia.com> <20261117170914.27410-22-yishaih@nvidia.com> <20261122073156.GA12665@unreal> <761ca80e-a772-41f3-b8e9-cc332e4ba5d9@nvidia.com> <20261124125327.GR14811@unreal> <20261124125950.GC9566@ziepe.ca> <20261124133353.GT14811@unreal> <20261124134751.GJ9566@ziepe.ca>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370420-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH V2 rdma-next 21/21] RDMA/core: Report and enforce adversarial mode via GET_CONTEXT Date: Tue, 24 Nov 2026 16:09:06 +0200 Organization: Usenet Network Message-ID: <20261124140906.GU14811@unreal> References: <20261117170914.27410-1-yishaih@nvidia.com> <20261117170914.27410-22-yishaih@nvidia.com> <20261122073156.GA12665@unreal> <761ca80e-a772-41f3-b8e9-cc332e4ba5d9@nvidia.com> <20261124125327.GR14811@unreal> <20261124125950.GC9566@ziepe.ca> <20261124133353.GT14811@unreal> <20261124134751.GJ9566@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4152714"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:BVk4RoHKRH0vAYb9Y2FvC5fYSCg= sha256:dP6jzP+fXATN/HsrCfrrGeqmW5OpcZOyG4r813yltQ0= sha1:7y6imVyAeF+A29cecLAkLstE4WQ= sha256:gB/Jgk/ebjIwZ8B7yC5+keZwM+ANMdTBA89ZsPSnLBU= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 991B1125E1B; Tue, 24 Nov 2026 17:10:56 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TNPNzMU3uohU; Tue, 24 Nov 2026 17:10:53 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-370420-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 77683125E1A; Tue, 24 Nov 2026 17:10:45 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 9FD85607E6A; Tue, 24 Nov 2026 14:10:44 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795529354; b=mAvsPE5T95kiJtWsMNxocgfdkOOTgmcQAVgX1KcUgFC7APPUKEHLRmE+n3wGD1uKOPSz sgluw34Dy2d08r+MlGa6/RzXSCX15a9GfAq7BcgqSkFsjhG32BZXNSMBewnMBwbmgeWpY qn+oOLYUafZn2D8/ftyCQDOAKJu7rlKvdjCSZg4ZI3IrtImiT4Lzq2x9oVGI7RvbJIJKf g07Dg/fj/LWfWeSW4ofVtGyq1n4OIAf9vgEJtYIUdT3hEp//tldyBnprq4HvNACo9GcxQ XwJnqVpMsnu82L+mxrgf+EVVn6iCNLWWYXhNEJ2LrOOtHKUhJCGP+UWkPF6b7TbQfEg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795529354; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=aEKRkCZACHzceBkoblP2azxF4A1wSUzhMP5SkMMBDpk=; b=eUtsJO4TDkWS7iLqLtzxrq9vq+dm7T/U1ebnb2ikMWuhS5UsIz71oSnEaLC019sWDtEE lNMWPMxHnFtk8XvZxRuCdyqzjlUiZQItgxAuTUf11LB+FW2ogETEKFNxiPpRCHAn327P0 oa1G7/sAgvh/uoaafrfKCamZcFc4DxeiR6By2LfFNVwoli7dSHyElfnGVq7S3QSKsEnp0 gKnKlq6dNqo93f76C/kwcYYEMw2ZZ7nIvUoWnt4rerryYAH5Bsj9Dq//pIaL4IaOXiqe1 HrdKJm7iGZX0EnvA6BE4X1wA/XROHxJAp9JDldOTMUzww1yK6rF3P2PuMOUqfL34tvQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="A5wtGxY/"; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF494606A69D; Tue, 24 Nov 2026 14:09:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=A5wtGxY/ X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795529353; b=FO90ESoDg+fx3BfPoggt65+266zq22zP+7pP3UsrBauAv2CO8FHNTQT5dH8mZjItcQRH GhLRz3whOIk2T7ujZAE3W6lWvL9D2mAeiHypaB5fd7di+ECcjxxCyzJpTnvTSE6p0zBAB hDZrz4y4oOVEY4OtrrriZ4QW2lNjhxjKgi6d+fEDoHTl+zBObjlYEBEFFpM7hyd7qkNqS uLQ71oPDXGIrHwIRFjbchL3JUi99m8EST6EW4IisKZm6v8uIdrN4QSbjDTBcECf1wuoag 653LvbomN8/m+Bzpgi+2gh8GWlBh1bGfAuWpETTH7evSb/4ZHqCoiv3rdn8XwW9kI4A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795529353; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=aEKRkCZACHzceBkoblP2azxF4A1wSUzhMP5SkMMBDpk=; b=0pdUsonUcwi7wbnKH+onmxU2YXtKtewWer5CGEz0Renr4sU/lim7nckutDBbSoCOhTYW +ipNW5yB3o2rOtTkTME3RyuQQ+357bALNZfuMh0FIRAPJeMRV9oKwfguC5coWOoFluXa3 nx9PQ6tecoB6gdnta1bkPZRjHNEplUjvsBX0CiPrAy+3Grbpo5n0DTV2sc9J3pmGiLLio Ie/HEeh3gurffUainqSUgPZvwM7nIgTXJMDxuFBzpwAof4NsRSjZ8Lzos6GebKmFi9VPw y+e1C9HmDh5CqyrbkpMaOOXbMUiGLIq/QcoKb0FgOAS8mNQbFx8qHwC+tU5u5Nl576w== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="A5wtGxY/"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CAED606A330; Tue, 24 Nov 2026 14:09:12 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C77B31F000C4; Tue, 24 Nov 2026 14:09:11 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795529352; bh=aEKRkCZACHzceBkoblP2azxF4A1wSUzhMP5SkMMBDpk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=A5wtGxY/gzbCZyw2JK0u1Zz5AF3vUHKBczaHqF5pbM3N4gPSSXnCtILS1BQu36VtM HsylVIwckeZi8EtgHQjG46i97HZzMPeimTD8V8Vn3Hx6xs7AG+VXKZntFhPSyPN9R4 AFwNrZJBRTUkz9k6msBF/RcfjCo0LFGhc/TUZvUwTS4xcxxUnCFi7wJ/EgSXIjSUPy nFFlQbSfXf4xnMnF1zbKQERfZjWYX49LAjqevrGQe+66g+fdUA+wvDPzPm49rufPSI Urq3cmUZKt0PkNqcEYZF/oYT12RNLfqBJPutypGDC1Dmorw7R1dkqd1NESpU2Jng32 JryMSsNSfo1ug== X-Cc: Yishai Hadas <yishaih@nvidia.com>, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, davem@davemloft.net, andrew+netdev@lunn.ch, dtatulea@nvidia.com, moshe@nvidia.com, maorg@nvidia.com X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261124134751.GJ9566@ziepe.ca>