From nobody Mon Feb 9 06:25:38 2026 Received: from mail-ed1-f99.google.com (mail-ed1-f99.google.com [209.85.208.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEC222BDC3D for ; Wed, 31 Dec 2025 17:37:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.99 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767202648; cv=none; b=WLu40SEBvoHxJNhOQfEHIvlUUigrr3m5i9DK5pNq2tnM1NfquOH9f4RpdpPSKN76sitOnI3dyVts6zbbT/O/cCezKhCwiLJqj0t9CIdlK+hc0tBHZ98oMRvA2JJt8I4BxIa7G+7XX2ongPqLy1r43Bo8bRseB5pdNEhVH+W4gkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767202648; c=relaxed/simple; bh=WVYQGhpSvliDxHIS3oLwubflGM55eX6MoNuxuho0+Uc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dU4PeM+S9GxLOfHxOiGRqytSW5ntsGRG2FaEDoGBVVBy9QzI6qbU+I9uAe3t/QnbMbjpjEK0tGgP8eSn5bL3InhIrqUchoMdH6C++xApyOwaI+nnT8W5H8U4VmxDdDmz73feGuFcHkyQkzzP7dZq6CFdKMflGTxfPhPk/T11wUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=PeLjBzk6; arc=none smtp.client-ip=209.85.208.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="PeLjBzk6" Received: by mail-ed1-f99.google.com with SMTP id 4fb4d7f45d1cf-64b5eb14e88so2484215a12.2 for ; Wed, 31 Dec 2025 09:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1767202643; x=1767807443; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CPtJoM4BdsW1AWCT74nIdjccEavCkJ/nIFp8Za4jgwE=; b=PeLjBzk6HD/l348HM8MLW1j5beEB21RZ112O4uvyZIZLMA55gblkaKZ2+Mb91hFnY5 3xyXEyfKbkFaEORoDTeGujBGvo9Mgde/bR0k4fKNzUS85UwkKgp3W5G4IWKl/0Yt8686 aGl8ymFQekBTdTHyUb7uPi+WekMbyjU8IfBgsPor4YDI1E+PS5EKR5VYt4xEARUdsEG6 Cb2SRjHTdMhPk5pvMjOOO25PIByS+KZaJmPUfT8OTpglbwB7dzhmMz9mcJNd0PEjCHyK ETY4LqgN3btjlMPs9EUGii6evKaTJ36XHobXs1b3Ubn4MCXySU0QB2d2dDRgXN3fWOaH r36w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767202643; x=1767807443; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CPtJoM4BdsW1AWCT74nIdjccEavCkJ/nIFp8Za4jgwE=; b=Whoup/6LXgpeZlsFfJp4thavsN4sRKXfmkcctqXUuLcGwOAvQ4N1CJC4NX3epL0sVH 1h7NbqCpIUSwIcFb/GN0Bv2RrQRNssewu8DwZL9JLu+WlLunO/31PzsnRKIq61oNpcYi +Y+K7MnzoUWn6NCsZPpXPSw2N3KCl5+NwZZzIsVQysFn2DCSPhgDlTjbBZBKAnwNZroX jBf4WXm0/DF8fMcv+Wjime5z0RV/FB8odOSULnpsCsld832CnR0QNtZsSp2rgJ5UYa3w iW7nqZuUc5dBGJX7+u+W7YflDohHrVotkhE8/JBeg6rykvCuQxhYgNMO2HR5cVRKbbh0 zouA== X-Forwarded-Encrypted: i=1; AJvYcCXee12IxJGw2m+h2Lki4LIKA1U6/fsnYirgH9BgUx2gDuKMaJwqHuuhxoFbCB2J4vEgdvKJke/VXp7iO20=@vger.kernel.org X-Gm-Message-State: AOJu0YwGtsoGEebOaF0Dx0xXIUJ0MrfgAxvdk715FFBkb7G3UuH/h5LH /EryiGj+vXB7Vpic5IdlT7OuT2/iCezPaOv4Y6ETigmugzU9nmSUVo6p44XtSuCqLsD+Zr62f9Z 1t/Dtnxm61QLwMu4w6iFgDvhSOEanqFcF1/mf X-Gm-Gg: AY/fxX7VOB5UGWlH4+VwGDBIofbKUTPhVSjOd9CtFddhguUT7EBF9qtA52PrxCzetpC IAu5QmxiJdrrSSPSOWZA4a15B+JjvYdgw2SDvEr11eHC1q04f+AfL/cLfBMxT+ULG9XdYAxxM5d 6knTxxj9dBASvmLSyYHym7C5iYpB1QjfxL5he0T/+yVAlm9TrD6DGmBWFdZDjVKSbCuEY/gi4dv c8kNSm5ysDm0I6qdQWThPQWBoU5BGeMiz8YzcGUX6eXrzjgSvay8salPHhoWtx62c8srZi7v9It Oincz4RyJ1t01nCgR3CMtwFf+RRKFdnR1MFZVXb2n95JVcJXMO/Qg883lj6Yz1Swra/lfbU2a3d MPTGVhKvOcmCw0cUa/KUwYWTBjrb0xl4VwKq9Z9ItbA== X-Google-Smtp-Source: AGHT+IEi03ZQZjXAnQiEZTFYKeIsY3RuVDBYnomwpJqWJlLI46xo1bUhyzXBcQMLZiL4Tr8s0Id0tWh610wS X-Received: by 2002:a17:907:7209:b0:b76:3548:c34c with SMTP id a640c23a62f3a-b80372602eamr1981571766b.8.1767202643158; Wed, 31 Dec 2025 09:37:23 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.129]) by smtp-relay.gmail.com with ESMTPS id a640c23a62f3a-b8037d637fasm499254166b.58.2025.12.31.09.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Dec 2025 09:37:23 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.49.34.222]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id CA50C34076F; Wed, 31 Dec 2025 10:37:21 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id C307BE4234A; Wed, 31 Dec 2025 10:37:21 -0700 (MST) From: Caleb Sander Mateos To: Jiri Kosina , Benjamin Tissoires , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Tejun Heo , David Vernet , Andrea Righi , Changwoo Min , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , David Ahern , Jamal Hadi Salim , Cong Wang , Jiri Pirko , "D. Wythe" , Dust Li , Sidraya Jayagond , Wenjia Zhang , Mahanta Jambigi , Tony Lu , Wen Gu , Shuah Khan , Maxime Coquelin , Alexandre Torgue Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, sched-ext@lists.linux.dev, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Caleb Sander Mateos Subject: [PATCH 2/5] HID: bpf: make __bpf_hid_bpf_ops const Date: Wed, 31 Dec 2025 10:36:30 -0700 Message-ID: <20251231173633.3981832-3-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251231173633.3981832-1-csander@purestorage.com> References: <20251231173633.3981832-1-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now that struct bpf_struct_ops's cfi_stubs field is a const pointer, declare the __bpf_hid_bpf_ops global variable it points to as const. This allows the global variable to be placed in readonly memory. Signed-off-by: Caleb Sander Mateos --- drivers/hid/bpf/hid_bpf_struct_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/bpf/hid_bpf_struct_ops.c b/drivers/hid/bpf/hid_bpf= _struct_ops.c index 702c22fae136..30ddcf78e0ea 100644 --- a/drivers/hid/bpf/hid_bpf_struct_ops.c +++ b/drivers/hid/bpf/hid_bpf_struct_ops.c @@ -286,11 +286,11 @@ static int __hid_bpf_hw_request(struct hid_bpf_ctx *c= tx, unsigned char reportnum static int __hid_bpf_hw_output_report(struct hid_bpf_ctx *ctx, u64 source) { return 0; } =20 -static struct hid_bpf_ops __bpf_hid_bpf_ops =3D { +static const struct hid_bpf_ops __bpf_hid_bpf_ops =3D { .hid_device_event =3D __hid_bpf_device_event, .hid_rdesc_fixup =3D __hid_bpf_rdesc_fixup, .hid_hw_request =3D __hid_bpf_hw_request, .hid_hw_output_report =3D __hid_bpf_hw_output_report, }; --=20 2.45.2