🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8699

[PATCH v2 1/3] drm/drm_ras: Remove admin-perm flag from list-nodes operation

#8699
From: Zack McKevitt
Date: Thu, 29 Oct 2026 20:29
64 lines
13941 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 (especailly 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>
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: <20261029203000.1763447-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-353470-linux-kernel-netdev=dewy.ru
References: <20261029203000.1763447-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-353470-linux-kernel-netdev=dewy.ru
From: zachary.mckevitt@oss.qualcomm.com (Zack McKevitt)
Newsgroups: linux.kernel.netdev
Subject: [PATCH v2 1/3] drm/drm_ras: Remove admin-perm flag from list-nodes operation
Date: Thu, 29 Oct 2026 13:29:58 -0700
Organization: Usenet Network
Message-ID: <20261029203000.1763447-2-zachary.mckevitt@oss.qualcomm.com>
References: <20261029203000.1763447-1-zachary.mckevitt@oss.qualcomm.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2093001"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:WcmR0ubXt/BCBHerqawOxyMoHVY= sha256:TzP3cWGkm3u7TDnb7ZzNDx/SPL9C5I6r+KksopNZ4u0=
	sha1:XF1+mVj+hawTIRiyeAU20xIikXs= sha256:kMruVRxnwnnNFxBgP3+yVJKrkyoKXCpE8F1eg+7ybVE=
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 9645F125C74; Thu, 29 Oct 2026 23:31:19 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.949
X-Spam-Status: No, score=-2.949 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=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 hMJIeWm-lLMM;
	Thu, 29 Oct 2026 23:31:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353470-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 086B1125C72; Thu, 29 Oct 2026 23:31:09 +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 5BE472935A; Thu, 29 Oct 2026 20:30:33 +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=1793305833;
	b=46H44GmCg1qcj/H/kpIj1BaRZlrek4ZqeWMDuFCYgoU6sOJXAU2ZGo7LHbL4oAeY+M3e
	 ba1ku+mfk80wWZ+no/pwoaIaDsuOi509nCaHJhgWKUj3AI02Rm6iY9V1o6Z8BW2M64GxH
	 Fx5k87r/SC5vkoteSzWAyE4uOJpOE2YyILpSjRNh0Ka2dluzjJkz/a5GoSrdgTQi9FUS8
	 QYG2N178pz3WLBtMDTlQ9KZOxDiuv2MJTZ5RHekktlEo/IAcsDaY629wLbC3ivJQwi2cR
	 L9FB1oATDQA9qMKDl1GCPTuDkuBWGW9FdLdP9WWkH2nHDQTIsxKbO5rdZ1KIFaGSQYQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793305833;
	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-Spam-Details-Enc:
	 X-Authority-Analysis:X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:
	 X-Proofpoint-GUID:X-Proofpoint-Virus-Version:
	 X-Proofpoint-Spam-Details;
	bh=Qylvyd3LbkDZI/YijqDemVIF+I1Y3GPXLKPWYRaVXZE=;
	b=wM9jC6yMM8/ZbpUduioD0zHCAduwa0XPCrHlFouynQgWUrAmfceLB/d82HcDh7xcPbp4
	 gWyPIrLLZ5Cb3m6Dp4NqQvibRMTeGtuWfJl35kgt6OKGHS9fI7wRLvuPLV83VEAMck+xv
	 3JyE98L96PlbVD3kbf8mOCnhYQe0CPfqEdISR5HtnZNSTKbFNOlfG+wWqTsfZU4Nf29dg
	 vCvCgnVWL2HJNfAvkv26psHT1bC/oJt9ZUptV89vTfoOcc693xQA1qdAo51DD8QzeWLar
	 mruA3AFth99TRvsyhNafY7tgxJHf7XPaGYWilNXp9aRsq4zm0gKx/wm3CpwB7HNyCww==
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=RgJL8IhN;
	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 2F8B1606A326;
	Thu, 29 Oct 2026 20:30:33 +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=RgJL8IhN
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793305832;
	b=Qct4EHA5gNyQcTEwv0LiVXjbROv0T172BNZ25v8GfFrM4srcDXNh9ZuXDINKYw7VAc5b
	 H3d4ntikr4oVzVM43KEe0HKPzMRD5koAkgRMVUbm5oqJ34yjMes+SMxHPCFYioymHghSG
	 hkTaTwQ5DirXul9GW85yHbnNx8+0INqevyVLDP6fx5c1GlstU+DqnAP4e2fdEHkxGRx6H
	 rxPAYfcOcQRRDv9rbzrQxx3moPo96OQuBfeLhA5Hfq+RUpwjsWH/6JArt3iOB12Ek2iD7
	 MaJUh5aOiOSKQU9O3uGDT0w2mFrNkAZ/zmQKcGaknv4GVwMcdPKoUgsGuANJYpTyyAA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793305832;
	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-Spam-Details-Enc:X-Authority-Analysis:
	 X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:
	 X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details;
	bh=Qylvyd3LbkDZI/YijqDemVIF+I1Y3GPXLKPWYRaVXZE=;
	b=E+wJRyGlw1SxRyN/SNQ6zxyoyjj0S81fROnUAeb+fLtxyAklSEZKkvMkveHzMrHMoZCE
	 m8vUwbSucB6GtLQVXvnQ3PyF8PEc8HAkBB5Lccny9HbDYFT25DMMX21pduWWMizwe1h2u
	 qJ8EUPdR2tN3V52iVN/CCuPy/OdjAQolEHAnPzY48IxxI6S0nnc+ENcu7G/if2l9gkdaQ
	 ewjk5m99CGyTRZrzUBcDNj7c8dVczCvIGda0PCDjIyy18jmRHht7kY0lFMHqbAXgOeKlU
	 Iv0k8aQPlhK0RS8dzPK0Z1Fmnay21K4mxUYXwu7IixSrgs3BynXjg4yZZDbVrii2v7g==
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=RgJL8IhN;
	arc=none smtp.remote-ip=205.220.168.131
X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 D0303606A31C
	for <netdev@vger.kernel.org>; Thu, 29 Oct 2026 20:30:31 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D0303606A31C
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 (m0279865.ppops.net [127.0.0.1])
	by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69TJjY0f2138527;
	Thu, 29 Oct 2026 20:30:15 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=Qylvyd3LbkD
	ZI/YijqDemVIF+I1Y3GPXLKPWYRaVXZE=; b=RgJL8IhNjYvEKkzOOnmz/JYffVJ
	RK/PKKw8jJ28VmNZGcIsy3P93rXzEGFa4QdQ4WEzNKrpRoV4pzztIW22Sj0kgrWQ
	tzwKB4uiC5mIGycv1IAFgWa+YAAeJV6yk7UvesDopkAcUpx2Ax6VEKbzrVOCQnjp
	Bua5Pppb+ELMyoLka0mOoAQrY7igax6GpkEtPQBkAdVBRI2UFywiOtsB9m2ZB7zm
	snw5E6fupwKpqyx1gbu+w36RFJH7WvcC81Hi0BGmaqKoWr+opOxlDHrQyyRos+gG
	j8n+vp/ft3kK46Yx0BrkMV9u1f6fGIJYqHPd8Xcl4E+8fDdA375igt2evxg==
X-Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20])
	by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hm4a22nxn-1
	(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
	Thu, 29 Oct 2026 20:30:15 +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 69TKUEJt2912025;
	Thu, 29 Oct 2026 20:30:14 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 69TKUD832911998
	(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
	Thu, 29 Oct 2026 20:30:14 +0000 (GMT)
X-Received: by hu-devc-lv-u24-a.qualcomm.com (Postfix, from userid 4696302)
	id D042421A84; Thu, 29 Oct 2026 13:30:13 -0700 (PDT)
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: <20261029203000.1763447-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-Spam-Details-Enc: AW1haW4tMjYxMDI5MDA4MCBTYWx0ZWRfXzlREBVT6OWVZ
 NODQe+SpyE+J0giwPxYdvYLQA1DzgcRQzs5hfyecUI5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MLib:17.12.100.49
 definitions=2026-10-29_06,2026-10-21_02,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
 lowpriorityscore=0 bulkscore=0 clxscore=1015 impostorscore=0
 priorityscore=1501 adultscore=0 malwarescore=0 spamscore=0 phishscore=0
 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc=
 route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000
 definitions=main-2610290080