🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21803

Re: [PATCH V2 rdma-next 21/21] RDMA/core: Report and enforce adversarial mode via GET_CONTEXT

#21803
From: Jason Gunthorpe
Date: Tue, 24 Nov 2026 13:47
39 lines
12812 bytes
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.

Jason
Technical Details
Message-ID: <20261124134751.GJ9566@ziepe.ca>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370392-linux-kernel-netdev=dewy.ru
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>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370392-linux-kernel-netdev=dewy.ru
From: jgg@ziepe.ca (Jason Gunthorpe)
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 09:47:51 -0400
Organization: Usenet Network
Message-ID: <20261124134751.GJ9566@ziepe.ca>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="4147375"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Sv46dBQVHadODGCXCDeqy40yJTA= sha256:UfE7T3WRTU/ha9arwZrrSVKOzsAj99HtCcUaeuQ+ak0= sha1:lFxmfXObBMUqRuCSMiUzyll6dXQ= sha256:bQq+aOdj76tyCggsasXBSSux833vA/jhRkjp0jaHV1U=
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 941EF125E18; Tue, 24 Nov 2026 16:48:17 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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=ziepe.ca
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 8NnD2B8qojWA; Tue, 24 Nov 2026 16:48:10 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370392-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=ziepe.ca
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B85F5125E15; Tue, 24 Nov 2026 16:48:01 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 669B5336EA; Tue, 24 Nov 2026 13:47:56 +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=1795528075; b=G+prwjbHTnuHs3wglulcpLpv+PPmkjP2FXUYItpGQdhPA+6GoA4MtJ7TVBes1LLTEsJA kjCg5mBfQ/6FHLEmIccCc3TLPFXTQEEiFGPCVill2GpZ1b3D2W2uBqWaU2hb9HKHn0/Yc rQnJClMqCwULa8hTshYwdfKA2MF8+zyuWntV6PibinhEbUrVyB0aQQwiI2Ar+s/rxuMfj o2SQmb2vl0pHotOERFeH9RQACOUwoW1ZbEHYbQwHQhv92S6IHQtA6Q+0q+50BNap2QaFD IqHC0vPO8vKX5QXTZXGVJca/fVX+nYkQgFkFFGoikL2zKut1KQuDRql4hs05nVp9slQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795528075; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:Received: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=vMDqbnU1JcZRjV4iBwiOSDccQES6fNfvp7K7cXvvapM=; b=tVtoQ59V163ylFh09710ohzaeb0Bw/Hkr2pzsEya4EOKFFjXCjsnR1K6EuLwU0aSQKyh XC60qJvlyGsWc+9INCDv1AhBZHpqdLAn9zAWBRg1kgjj1+z43Z1SPxqVHgswNow2dXLg8 xzekecC3T/2coWT/Inc1qyi1pOPYzsyGyb93RgGpxQ5yBUrs0lk8DEdcEy0Vj+VyRWho9 21w5+vbmM+2loxz4Jj7+gKqgabPJDHmboYm11MsTN7RGCWMkzbySIaaGMqakhrH4SBh9u GVOOOYmi7wAa6eJc4t5MEcXEDcJXfoENWrDRdppnnzH6OorlYgP/IzVo0tAYe6OlMGA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=NdQ+RUQL; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; 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 4E67C606A327; Tue, 24 Nov 2026 13:47:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=NdQ+RUQL
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.49
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795528074; b=r9LX9mYgw2ze+oLAnyFEBYpvbseTQNgsOjeowKj8T7TFk31d/x4w8yinpsSN/xBKSEkP OmDeWzThQc+ZfgK9ynxyBPBh1d1zzBctkMaCZSEf8WQ2Czea0nr3BOi8ISLsKFCgR2ROe p8TR7N0+/O807tc32BxL4Csa/+UC/taHFkAFg0uOBkO8iV8BWFGigwiK6tds+y3zUnl66 rsL0KAlqzIeSjeTJ+MmdGE9v0CfhwOsMer/C3AkFJpVU0Tqot+PsE4HTSy1FMAY/0+ZFx C8xJpGKlmdqwFMyujXStuHnv7/WFrnYfMv6LGv4BgDVyTOnJU6sj+JJgu7MTN0lT3NQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795528074; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:Content-Transfer-Encoding: In-Reply-To; bh=vMDqbnU1JcZRjV4iBwiOSDccQES6fNfvp7K7cXvvapM=; b=XM5yISIeI0KmxJH839YD1AIfSzngKseCq4jxemJ3mwM8Axw3HO02qwc8TQOcw35sp6rf MvBPN3QdF2oNeIw7N2rFuxRD/UuNcnu5ATBxOfgq8dIaFGTBZ+182OPe1zpqLtRrD1qiM HpZleSWKGY/Akm58mjzH/M0q1hoM8w2/9wqNRltm/AZSi1XHoOnl96cG7Sufy0nDpD+rg Lmd0JMcRT+sKjCrwokHviyON1wrNuawMg66WtAoM1VW2KViifJivfIUYtkp8EJYZ1Fx6l Q6xAAHkn+n+lDi/d8fOoyuaLgDO5qE/pByMMoTpLKdSmVdqP0yoke97UVl3eM/u90lA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=NdQ+RUQL; arc=none smtp.remote-ip=209.85.219.49
X-Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2546B606A335 for <netdev@vger.kernel.org>; Tue, 24 Nov 2026 13:47:54 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2546B606A335
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca
X-Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-91c1f548f87so63270816d6.2 for <netdev@vger.kernel.org>; Tue, 24 Nov 2026 05:47:53 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1795528073; x=1796132873; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=vMDqbnU1JcZRjV4iBwiOSDccQES6fNfvp7K7cXvvapM=; b=NdQ+RUQLLl9NE7pcsTGsPyFo0JDIEwqHUWUTh6FGstCQlXDqQGm4bzmVpn7NrOMNN/ nUmwzw+7AXCwCOB0lNWa/4gs7ETmEy+gpNc4PFSFMZjW/XN/5hCSia7u7LYeQBThBZ1s DiCl/4CxtrHD+AkQegWdE2/heCv5J50ilql3Jbj6NtTeAwCS2NgW2snsnz8shWgS8ORA 4CjgkakkgOFF7v6BRpaIBjQ1evzQr94a4nFlmL3Ecij589zRHBuiOv2HWEgE4nsYg3jw CvQ9uEbdjNe/2RQk5kPtL5ExT9kibh7OEtq6HLk6gebbjDW0HErvE5oB55F0r55nzcPm FDDg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795528073; x=1796132873; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=vMDqbnU1JcZRjV4iBwiOSDccQES6fNfvp7K7cXvvapM=; b=rXo2tpnw2sr8b8qyX5Zp5LyXHlipdCEAV/mO0fEtGV7ptnzTHJwMO0bZUER2qs2So6 9vugg0keL+FaEptwV3fH1ntDelTB6o3zGwmkkzdCBTxPWJyDTLtSD14MWClf5cQVJenv iutIxEJFDQndJzBp5/7PQROKVZcb99dZqty/5UceWZhj3FXwawO6RUxaxvJoBO5/j6Tm WJ2CbUzBd3dW6SM75eAOkoxnt4Z57m2MEygWh1TvdyOLFf11nDYEDWqQdMpvRuKouR09 fdufD4mjRANUOpQkxxweCNuw/rZpthi6jvWUAtoSnMXaXMt5nR4PMyFIEC+OL0kH2Hs6 Vtig==
X-Forwarded-Encrypted: i=1; AL+hErF0iW/3bfWETPSYSSV5QmqOvtDGY5PaVOr3dwWUp6UuEnImm4dGFXR55n2jLxlZO7ETsMXDyOE=@vger.kernel.org
X-Gm-Message-State: APuU4Z+Eew6rCeYZ480n3DuxnfpOej9BjMcMhgB4aH27j8tgp1fVKFyN edv5LSi2MNmafZ2pC7YJE/Dm/mtdYNBCUXALPHCXpGrzwzOmsQXfhr31k8v9B1zwUrQ=
X-Gm-Gg: AZFdTZfSoovQykbiKVpbnv8qsQJjpDOG3LlwAo/C3sTTXr8tmbdypGm2YNmreFA/JQo +bWKXI+Em8AcFsMj9Nv0YYOaiY5a4LRKwmWhWDc6LXQ9aleLeoIujyoT2xYc5CpImRnzTepHl5y mKFdjRA3A9RcObWdng0Ok0Mro93OmgW8YqRQSFITMlJKvyZrIPWmXZ3e5OX50VIcK9kU0pdFVAs pZGg8oVPvgMnO2jzV1trKvTEiWffwJtULuvl9B0KEwyU6qbnp9UHfJEMvD+g6bwAcLPC4QrvTNn HkTAoA/tZs/YfHisb0iKIieqgpzjxBd0ONotJsl9gjcHQLEDMIe8SilMp2n982/XVF2/+vEGeoI tDs/chJyOZfVAFR8YbKDhOhuYCScS8QOgAh4SlUeTJCE+mhmrJcW8KcF8npI8lln/qq4xDehIhH ZJ1/QACcmUJFZv5iyMVcgkpnUgfuhyB2fhRzH4b+XjDRJs0XHd0TNXp+bL4DDy6CBJO3yyzfqF4 s8gGE5Z+Qm7AKW2mYwddQ8HlBmzJjZ6goKGl/0pxmed5HoDL2Sli104ZdAI8eP1K65FRkiOOo78 F9Oohw==
X-Received: by 2002:ad4:5c86:0:b0:921:3a31:64c7 with SMTP id 6a1803df08f44-9213a316546mr238701036d6.13.1795528073118; Tue, 24 Nov 2026 05:47:53 -0800 (PST)
X-Received: from ziepe.ca ([142.177.118.84]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-921349b081csm132608436d6.7.2026.11.24.05.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 05:47:52 -0800 (PST)
X-Received: from jgg by wakko with local (Exim 4.97) (envelope-from <jgg@ziepe.ca>) id 1xVqsB-00000000QLY-46Ib; Tue, 24 Nov 2026 09:47:51 -0400
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: <20261124133353.GT14811@unreal>