Article View: linux.kernel.netdev
Article #12258[PATCH v3 1/3] drm/drm_ras: Remove admin-perm flag from list-nodes operation
From: Zack McKevitt
Date: Fri, 06 Nov 2026 18:12
Date: Fri, 06 Nov 2026 18:12
65 lines
13948 bytes
13948 bytes
Drivers may want to avoid requiring CAP_NET_ADMIN for subsequent
drm-ras operations. However, userspace must still be able to access
the list of RAS nodes to determine the node IDs. So, drop the
CAP_NET_ADMIN requirement for dumping RAS nodes so that drivers
with different permission requirements are still able to use the
interface.
Additionally, initialize the return value to zero in
drm_ras_nl_list_nodes_dumpit to avoid leaking uninitialized kernel
memory (especially now that this function no longer requires admin
permissions).
This prepares the interface to be used for telemetry by the qaic
driver.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Zack McKevitt <zachary.mckevitt@oss.qualcomm.com>
---
Documentation/netlink/specs/drm_ras.yaml | 1 -
drivers/gpu/drm/drm_ras.c | 2 +-
drivers/gpu/drm/drm_ras_nl.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Documentation/netlink/specs/drm_ras.yaml b/Documentation/netlink/specs/drm_ras.yaml
index 4c2ac9a1ba3f..a88fdab7a1c7 100644
--- a/Documentation/netlink/specs/drm_ras.yaml
+++ b/Documentation/netlink/specs/drm_ras.yaml
@@ -112,7 +112,6 @@ operations:
the node IDs. These IDs are required for all subsequent
operations on nodes, such as querying error counters.
attribute-set: node-attrs
- flags: [admin-perm]
dump:
reply:
attributes:
diff --git a/drivers/gpu/drm/drm_ras.c b/drivers/gpu/drm/drm_ras.c
index b099eb67836e..4f4777060a4e 100644
--- a/drivers/gpu/drm/drm_ras.c
+++ b/drivers/gpu/drm/drm_ras.c
@@ -130,7 +130,7 @@ int drm_ras_nl_list_nodes_dumpit(struct sk_buff *skb,
struct drm_ras_node *node;
struct nlattr *hdr;
unsigned long id;
- int ret;
+ int ret = 0;
xa_for_each_start(&drm_ras_xa, id, node, ctx->restart) {
hdr = genlmsg_iput(skb, info);
diff --git a/drivers/gpu/drm/drm_ras_nl.c b/drivers/gpu/drm/drm_ras_nl.c
index c9f5e0ceb3b5..ff0dc406c27c 100644
--- a/drivers/gpu/drm/drm_ras_nl.c
+++ b/drivers/gpu/drm/drm_ras_nl.c
@@ -46,7 +46,7 @@ static const struct genl_split_ops drm_ras_nl_ops[] = {
{
.cmd = DRM_RAS_CMD_LIST_NODES,
.dumpit = drm_ras_nl_list_nodes_dumpit,
- .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+ .flags = GENL_CMD_CAP_DUMP,
},
{
.cmd = DRM_RAS_CMD_GET_ERROR_COUNTER,
--
2.43.0
Technical Details
Message-ID:
<20261106181225.3333260-2-zachary.mckevitt@oss.qualcomm.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358098-linux-kernel-netdev=dewy.ruReferences:
<20261106181225.3333260-1-zachary.mckevitt@oss.qualcomm.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358098-linux-kernel-netdev=dewy.ru
From: zachary.mckevitt@oss.qualcomm.com (Zack McKevitt)
Newsgroups: linux.kernel.netdev
Subject: [PATCH v3 1/3] drm/drm_ras: Remove admin-perm flag from list-nodes operation
Date: Fri, 6 Nov 2026 10:12:23 -0800
Organization: Usenet Network
Message-ID: <20261106181225.3333260-2-zachary.mckevitt@oss.qualcomm.com>
References: <20261106181225.3333260-1-zachary.mckevitt@oss.qualcomm.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="3942042"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:i4+j8tWlLzwIh5TaCxHjHT4izh8= sha256:Pe0vbUa6vL1bfwWwej3F3lU/4x6jS7l5pQ1NQO3/eec=
sha1:YD8X63LmdfYnSriycR9a4Bp7xxY= sha256:lagswUMhge376MT5naQx1qpUXVqMYxMifbzf3+7tkXo=
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 B9F481132C9; Fri, 6 Nov 2026 21:16:21 +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=[DKIM_SIGNED=0.1, DKIM_VALID=-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=qualcomm.com
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 8gssY9m9KaSP;
Fri, 6 Nov 2026 21:16:14 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-358098-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=oss.qualcomm.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id B482C1132B0; Fri, 6 Nov 2026 21:16:05 +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 3FE82603939; Fri, 6 Nov 2026 18:13:00 +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=1793988773;
b=SVIwAk22w/NsXRtmfJLaQ0IYHaRIyyrWzwckTfG6Z8t+/qzQeR+ssdW5xjqJIE/8E/bg
IzSIrCFDCAB025UXIlgQlfd4Lm3kmCpj+aKR6O24niHJIiXVAISjqp5lKD111yKVvJpfh
Qnf0Qzp9wumTpj/gt2nzBv0zivJkrEUfHzKIUirDL+9yoZfrwFyvT7SKqr6qXpZHCm58W
AGcAUvC3IPKSmDYnriW8QJKRrMWNGDJZfaVDOdALtSwq1RueEDtAGsTkJJiaUclWzI3wQ
NmxjB89EHy0hI3EKPx5YCLuPacdEJf6Fi5tiqYPcVttErsfp8afyO2vrRt6QbxB3+Pw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793988773;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received:
Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
MIME-Version:Content-Transfer-Encoding:X-Proofpoint-Reinject:
X-QCInternal:X-QCInternal:X-Proofpoint-GUID:
X-Proofpoint-Spam-Details-Enc:X-Proofpoint-ORIG-GUID:
X-Authority-Analysis:X-Proofpoint-Spam-Info:
X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details;
bh=HjDGqDaci2eRrPFVvGFecTGt1syzyMZ+l7OOtX2jdKc=;
b=JGCZaLbd01WbezffF2PpF/2HDSvq+IQSjy99uknW6q0oCokbJEiDwHzxmXzXlv71dcCz
HqNPf3zmUrgcXvN9vng+ry8eyOYD38j0YBRRn+AN2LE6yVsqNO4Dn7I/lOS8NSSaf4Vwt
qbU6OnXPqUxMI/VsuNCQ3Dwg8AgOnRcOKQvtnF17k0g6T6Gnjfa/86HZL7/6jI2hQfDUt
lOX2Zl26RghbbucZTFETDNLpZ/VYJettKq0Bgy2Il4fA06EIqsKybuJUxirEvtvLa9OY+
jj+6Eg/dgIgRBMf1biHIsonOXjJ0Mtuxkp0DNCxcO7WV8ZNTZcoLzBd7/B4lB30pwPQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=auX5tk2z;
dmarc=pass header.from=oss.qualcomm.com;
spf=pass smtp.mailfrom=qualcomm.com;
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 BBA9C606D825;
Fri, 6 Nov 2026 18:12:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=auX5tk2z
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793988772;
b=o1ZocyT3gT0eDR8vomIDIQr5eCtszRwmCbILtLvFc9S/xBy0ZrKjWsYEFmVjPaPP2Uow
e+h9FQc0jPPDIDvi8rIe3Q//5kCyrlx4KUSazAHGe1qVbsUi4rSnLLeCyGqejXezGe1Ts
n4rJ3vp/nbv+Ch8/mgoSBUQBAiBNqhbqnsnacsr7s9FbekF3F8TFL85yo5bCgpucA/wir
TFVZBssSbsYMbrmTvMcn7ifNGklcTTPvUbEBZRcJIDJv0pQoBvvJwoQNdUzTMX9aQcVSy
7XjzA8OIBDFelVkMb2q8EoQ6Gw/m6gj+qD3Vp1i+edUGj5kuZi7AyLDv0dD9CpRwCfQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793988772;
h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
References:MIME-Version:Content-Transfer-Encoding:
X-Proofpoint-Reinject:X-QCInternal:X-QCInternal:X-Proofpoint-GUID:
X-Proofpoint-Spam-Details-Enc:X-Proofpoint-ORIG-GUID:
X-Authority-Analysis:X-Proofpoint-Spam-Info:
X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details;
bh=HjDGqDaci2eRrPFVvGFecTGt1syzyMZ+l7OOtX2jdKc=;
b=L+c/ks72hgU9JxEbPtUglP3pPRNQn3s75kodA4bWwFZgoddvkkf03ZOvfKum0VkpFR0S
J7diIEJ4ayeYN/+1clTZOoSEQKc8ic5QOsEm8IfECiAkLpxBcO4H18wfRfAntML33VuuU
G2HuSh2sxL7HHubVA8QDSvXEjoZiOtPrAA2GRbBccuti+rAQvdcfOfx4BIhFtk4hiep3w
aTj+/p/o9lheIzGfbai2iU8vo9+bhw/uAojGOKbnJF4uTg3QD7VomE8a6cObK4ObXYRkC
1mK/V+EIFABTrPdw2KeMHpZQGFVDbUPB3B9+KDm7aMdAlCLRbAMs1M8wWt8Zi9V/ZQw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=oss.qualcomm.com;
spf=pass smtp.mailfrom=qualcomm.com;
dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=auX5tk2z;
arc=none smtp.remote-ip=205.220.180.131
X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A0FF606D80A
for <netdev@vger.kernel.org>; Fri, 6 Nov 2026 18:12:52 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6A0FF606D80A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com
X-Received: from pps.filterd (m0279872.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A6HtP033570512;
Fri, 6 Nov 2026 18:12:36 GMT
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:date:from:in-reply-to:message-id
:mime-version:references:subject:to; s=qcppdkim1; bh=HjDGqDaci2e
RrPFVvGFecTGt1syzyMZ+l7OOtX2jdKc=; b=auX5tk2zraAlgwz/hQ/9E/WvZ/H
7EsYGt1ZZhrdTwVJQVVbhBpiWzq/0MZrvoaIhu5c90gQYasdP4vyRKNhqB3sYEjj
ka6IOcdX7T8ZQnjTuPKNiYABH+gy+/Ql3XeBjkl4seRfQtJZSznP1KU1vPX91GOo
4zfBCvhQ7q0NIqnSAvsFXkaEBw4RLmvSJ8ccq/LYCXz9djzzOJvL17nq7u2ZK39r
6u9JCFryiDOALpS9NKlV2X1xfmwl66ybjtxNF1guMY9F6OThFD3x0UydtcMCXmgr
FnAlUIjxFhOiVQkB+R5cjZSitkYQ5maVKm/mMnDRZqNL4XMCMqCUm2V9l3w==
X-Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hs3pac1tv-1
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Fri, 06 Nov 2026 18:12:36 +0000 (GMT)
X-Received: from pps.filterd (nalasppmta02.qualcomm.com [127.0.0.1])
by NALASPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 6A6ICZLs752658;
Fri, 6 Nov 2026 18:12:35 GMT
X-Received: from hu-devc-lv-u24-a.qualcomm.com (hu-zmckevit-lv.qualcomm.com [10.81.84.220])
by NALASPPMTA02.qualcomm.com (PPS) with ESMTPS id 6A6ICYED752644
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Fri, 06 Nov 2026 18:12:35 +0000 (GMT)
X-Received: by hu-devc-lv-u24-a.qualcomm.com (Postfix, from userid 4696302)
id CC00C215E7; Fri, 6 Nov 2026 10:12:34 -0800 (PST)
X-Cc: jeff.hugo@oss.qualcomm.com, carl.vanderlip@oss.qualcomm.com,
troy.hanson@oss.qualcomm.com, youssef.abdulrahman@oss.qualcomm.com,
Zack McKevitt <zachary.mckevitt@oss.qualcomm.com>
X-Mailer: git-send-email 2.43.0
X-In-Reply-To: <20261106181225.3333260-1-zachary.mckevitt@oss.qualcomm.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-Proofpoint-Reinject: loops=2 maxloops=12
X-QCInternal: smtphost
X-QCInternal: smtphost
X-Proofpoint-GUID: MziZ_b_AQkE1hLsqK6BOwa0GUabMc6kN
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA2MDA3MiBTYWx0ZWRfX01sjbgADHMNe
ezFjqGQpZxcCujMslUnyhuxF8fMnFW8nVUXsYYYBuhRszvcNjI49xuvBi8sGQbrFtevtWS8AtNj
w6i9ukw1EDri1jkUSAgHH0WoSiXj3blxB+x52Wlk2WSDNsjhX8fyncBYEtg99Dv9AwOUBcC82Ad
HrsTUpTyfJPQoUjQ52c7l0wfOD7BZNHfUBd9mExH730GC8nhO8JI/YAOeQZVxnELRcI4v1A0YBG
g6fbwPfqKrvpfT5Wt5aq3wpDOqV8MXwF5jhoZMiK2nakjJt3fUyZzidTk81L0CcQxe5iyz1Q20O
2euAifAQqBLAWKiNxl86OfdBTR6zKJytGgCRlu0wEnDANXqn1g5eilR5cDFagVI8Yf7Qcf4qG39
eA0slYz8hzBF8qd69f/P5xfKtYYB17kt/dhArU9TpOCGVk6xkf39OTo/YWlUJVYKdok/dqnq6uT
cuyO6qPgoN3fmHEmQPw==
X-Proofpoint-ORIG-GUID: MziZ_b_AQkE1hLsqK6BOwa0GUabMc6kN
X-Authority-Analysis: v=2.4 cv=X7rHu2Te c=1 sm=1 tr=0 ts=6aee1894 cx=c_pps
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22
a=yx91gb_oNiZeI1HMLzn7:22 a=QyXUC8HyAAAA:8 a=EUspDBNiAAAA:8
a=YBg2WiTZAUqtoXgWkzMA:9
X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA2MDA3MiBTYWx0ZWRfX4ABgrLa2Osyc
5n0FCoQlbI+prLZx/DLhlR+3dxrS7m4UWquwEEyeAL4Dku83MTMZxwKAfPcpwUaF3oq39d79Phf
tXio5QFzd3n3nKHfEyJtHHoa8hW8d5M=
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49
definitions=2026-11-06_06,2026-11-06_01,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
suspectscore=0 clxscore=1015 impostorscore=0 phishscore=0 malwarescore=0
bulkscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0
classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0
reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611060072