From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f100.google.com (mail-ej1-f100.google.com [209.85.218.100]) (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 0AED72BE035 for ; Wed, 31 Dec 2025 17:37:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767202648; cv=none; b=ThCS7cLPOlNlv1dDhvJWaGd4UD0KfKHamvUzCV26HCv2tChm6o2fe1rPhhyz+OoGzX5IZhQ8Kqg+oY7qtmP2kY9RYHO+Y75edTdfwIA9vFI9bHjfiZxhcr8+gaNh2d17IXuffgjMXgVdnQJI9+5pU7kHY/0Mx2GtTWj8SQg4la8= 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.218.100 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-ej1-f100.google.com with SMTP id a640c23a62f3a-b7ffc1e6042so24601766b.3 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=dC7+bPhAddsCAeyeiuAkXIGfcHRZKiMoBH94G0gzHboAiEzVarINh4+AOwCMZS7ufm SaqqMDY54kfM9cXYcBZl9qf902XMolktf21pHAUtynmabaHr89wr/fsgNTyX52efac6u 23CA0BMWaNtLd+EkhI7urifTuqRwvtqvbryDxU5zup6c31fvJ79AoFmS8t9sNUoDSv75 tdrFHHJqzCMS+upNFQY6+uQjiAcW9ZFbpiFvuuRfMywglvqlPodDiQi+K6Zy5o2HMWYC OeG3tLIgeTOfF0tRouA/u36DtJHlh/F14vV6GdvLd1p2L0v8i37dFrSxyTIHx2OqH4m0 euTg== X-Forwarded-Encrypted: i=1; AJvYcCWYBFGW+Ik1mRUtemKMaaCuObQKUp7dgq4TLcgaW1xAQOYnHVA0rkMT7wLLBUNE9luAo4Pn9eYeQyI3@vger.kernel.org X-Gm-Message-State: AOJu0YwtqRPO2AHr1UKTddQg0cxt+XzthFnaGBXEVnJf9CIENXBtt+sE WFGpVZoSVKb06O7aZ7aFpOUCrxbQR2QSswRWC+TDFhq4e6Vcwcp7Z2glWKndL2OJk7Cu1rOJ37t ooNPB6gYOHm8nfb+/jXrk9uFcRNm+6ALM1kNY X-Gm-Gg: AY/fxX7VLXeRPBHXRWVMVOT+ckBXUSCSBtTdYADu47U0BXeMZ/gpJGl1GrumQ5B2Lip WyBJE9CDCLWdkct8GerJ/Y8O30qI8vCU52/mZbGEm9RLeqEI3/4d3I7fZWU+TdwiUydj0xVRtUC +a1G3jgY9nemxIYNQ8X0D6EREX7a2Wu+SxY40ZXERw4F3pSJEZBlWpO6yrybzwrVuMdtLLx2RRE ovx4imPhS0/6CK6nzNx5xUnl06G93WRDeC4YOVhiXj5ao7F+ugwkbyuEXMPOLaV2TIxnseaQowI iCUjQ6Fmaw6QNITftacYetUhA638MhyQsm+MLnAaWV+1rXC1zzCA7/T+dPpYjqT9Cxe/dy99leV 4SI3fjNfV2xPL0N3dhvGhdNNenMbDTan9qcE7rLmBow== 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-s390@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 *ctx, unsigned char reportnum static int __hid_bpf_hw_output_report(struct hid_bpf_ctx *ctx, u64 source) { return 0; } -static struct hid_bpf_ops __bpf_hid_bpf_ops = { +static const struct hid_bpf_ops __bpf_hid_bpf_ops = { .hid_device_event = __hid_bpf_device_event, .hid_rdesc_fixup = __hid_bpf_rdesc_fixup, .hid_hw_request = __hid_bpf_hw_request, .hid_hw_output_report = __hid_bpf_hw_output_report, }; -- 2.45.2