From nobody Mon Sep 28 07:17:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 550423E6DD2; Tue, 25 Aug 2026 08:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787647424; cv=none; b=TuBm+lqR2pK+krl6R55MmhhsxnhZ9WgtR3h6orpCYkmCg0LACFX/BeeZLq/ysNC2HBd7AUe1Rc/9RrY7nmOQT8/Y/zGtzy/IMTsku/+0ZVJAtgQ0SYNUe4H2dFZS5y+kajFIIdbBMQtYydI5r7yAjYfEICHzVX68B/mBXsseXT8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787647424; c=relaxed/simple; bh=OscypHFrJFm+ZYXSCBm6lKLesfyBY4e8glY4nGsqzEo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AlC40fL0qVgrtdLuqfi4E/YxSJXfm17bwIT4/UNspH3HEbHCAN1kAXB5Rb1NENbGWurEkc3BMA+rLkg8SLi0FWglPes+64AqjQzRiCqLoKdwkmoI1Y1Xt8q1cq647YB7HH7hGSfcjGXO77sDTTl5Z+mnmjKLIva0HKCtqR/pqYc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AoH/YwWI; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AoH/YwWI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A3531F00A3A; Tue, 25 Aug 2026 08:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787647422; bh=Q+1vqyZOB06Y8gMGMiT8CtnV3r2AYsSOBSqg94mj4xI=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=AoH/YwWIVKv2Gl6rpEqQdkpvWCqa0BKsMw9vEBwfjz9UgZqPH6/Qz+GFWoqefhUMc LjGbSeOqoUrYA8tfK4u7NXPj8yTnpy8E31wA6N5wkvX8Zbbaxtctk9pNrogCN8pbcv Y9VQHL514cC9Pl1svNkNDlHDm93kZgo+HrsTWe9mWfPSUQfARHfJDbooCL9fI/rvE4 DcF8QE8SWsZvC+wmK1qNrY1f6BtWgbqNGACL0BlJPQ8dT56vvJVDjtIVpHm7j2W6xe U7AfLZJ2jzhVKHucRJR7SO+oeGnE8+ddHvR5eZHkNjEwgahFQooioAiitURaPNyFrp cwmqQUCOy8jYQ== From: Benjamin Tissoires Date: Tue, 25 Aug 2026 10:43:16 +0200 Subject: [PATCH 1/3] HID: bpf: mark struct hid_device as safe BPF pointer Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260825-wip-bpf-safe-v1-1-ab9e0e111c5c@kernel.org> References: <20260825-wip-bpf-safe-v1-0-ab9e0e111c5c@kernel.org> In-Reply-To: <20260825-wip-bpf-safe-v1-0-ab9e0e111c5c@kernel.org> To: Jiri Kosina , Shuah Khan , Daniel Borkmann Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1787647419; l=1265; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=OscypHFrJFm+ZYXSCBm6lKLesfyBY4e8glY4nGsqzEo=; b=D+5pKvfPay7Oj/irQcyyovxl11XdAAiAIqLNHy9bi2plu5RFLyHFb9PxM7n5TjqmLdcM7p0tg ZpPm0cqibtCBXamF4Y3w4WnisRRrHQ7fDdd7DvaKykTJ13+54hFjNB5 X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= Commit ee9ad135b208 ("bpf: Reject a store through a fault prone pointer") in the BPF tree makes the verifier reject any writes to hid_device->{name,uniq,phys}. A simple solution is to mark the struct hid_device as safe from a BPF point of view. Suggested-by: Daniel Borkmann Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/hid_bpf_struct_ops.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/hid/bpf/hid_bpf_struct_ops.c b/drivers/hid/bpf/hid_bpf= _struct_ops.c index 702c22fae136..56c53aca4511 100644 --- a/drivers/hid/bpf/hid_bpf_struct_ops.c +++ b/drivers/hid/bpf/hid_bpf_struct_ops.c @@ -62,6 +62,10 @@ struct hid_bpf_offset_write_range { u32 end; }; =20 +struct hid_bpf_ctx__safe_trusted { + struct hid_device *hid; +}; + static int hid_bpf_ops_btf_struct_access(struct bpf_verifier_log *log, const struct bpf_reg_state *reg, int off, int size) @@ -86,6 +90,8 @@ static int hid_bpf_ops_btf_struct_access(struct bpf_verif= ier_log *log, const char *cur =3D NULL; int i; =20 + BTF_TYPE_EMIT(struct hid_bpf_ctx__safe_trusted); + t =3D btf_type_by_id(reg->btf, reg->btf_id); =20 for (i =3D 0; i < ARRAY_SIZE(write_ranges); i++) { --=20 2.55.0 From nobody Mon Sep 28 07:17:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28C2A3E95A8; Tue, 25 Aug 2026 08:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787647426; cv=none; b=GmqSTplvzSj2eC2Z3BrCrtwZWKxEVeMIs+CdZF0m+vSnHA2xn7BOJq3FBSz2Ox7oeQUgJE53zUxa50TnWFjIDSbBUlDu0b/pl0Xu/S700RR3CIUZ55feEjWGYzXMdyHsSml+HKS2PAaDOW8p6fWrlm621QRVZ/zCvzE+ZZ8LvW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787647426; c=relaxed/simple; bh=VSJ2yx9PJZAUfE7RZbqbWtL/IoEjvWxGntbrZQVqP8A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=j3xh5ISk8c5oHidBaWX6qseh3cEgaZ6a0vEFsJvoeiD2pcvH78ywtgOTZBaEtgMjinXaH+pPXAVSjo3Tth++ebFyIwY6s21Ihdp4D717D32FQMi2Jnq98mynIVPzGEqr4F4Aef/sHuYyrsvXqYvnDiim0wkZxZ5BL3YbBUt+HEw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nziXvaH/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nziXvaH/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EF861F000E9; Tue, 25 Aug 2026 08:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787647424; bh=d9zDo5TwWyhNym1KG6N1Ziqr0ZWASIWk12QkS9d/5R8=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=nziXvaH/Yqwd34J3f6BpPoPsF8v2hMX3Sw9/hx7ffHAUBaJab7/d+hfG4PmHLXtiz ya7lwyps3NZOzq58fIlMqXhx2s2ftfp2WJw8eGJw5mozOE0ch2B5bafvh8TyLh5h3B WRdP4Za/UtKm4qbj/NWsqA4BjU2mc+xDTlAFhc2mwoCEFUOdcWoyXtwR2fi6EDyP6u LiXxPWFLsAnScc0vjYWDd8Rk361TFCrF5b6y2s78WvahUxSHFUP/HPQneUMM/W6hdw GsSqmfIeDJTRFDUs8/dYIZ9EheEbZRAuiKhZNoMnkfVyi6stxt6ZvPXmc8mNhKnGM1 PXhZA1XC5TerA== From: Benjamin Tissoires Date: Tue, 25 Aug 2026 10:43:17 +0200 Subject: [PATCH 2/3] selftests/hid: Add a test to ensure we can write fields in hid_device Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260825-wip-bpf-safe-v1-2-ab9e0e111c5c@kernel.org> References: <20260825-wip-bpf-safe-v1-0-ab9e0e111c5c@kernel.org> In-Reply-To: <20260825-wip-bpf-safe-v1-0-ab9e0e111c5c@kernel.org> To: Jiri Kosina , Shuah Khan , Daniel Borkmann Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1787647419; l=3524; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=VSJ2yx9PJZAUfE7RZbqbWtL/IoEjvWxGntbrZQVqP8A=; b=E5tD9lQgmuxMi3lGXWLizRe9ciYf2Z5P+i8GUNzv2tD43okwEHvXvriAM0S9MlKI4thLDbMrQ AvQzFmk6YifDKGcC71coz1/TDeVV/8pT4mh5Twg3MkVLZbH8vGHHE/E X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= hid_device->{name,uniq,phys} are all writeable fields, we need to have tests for them in case the verifier becomes too much strict. Signed-off-by: Benjamin Tissoires --- tools/testing/selftests/hid/hid_bpf.c | 26 ++++++++++++++++++= ++++ tools/testing/selftests/hid/progs/hid.c | 26 ++++++++++++++++++= ++++ .../testing/selftests/hid/progs/hid_bpf_helpers.h | 3 +++ 3 files changed, 55 insertions(+) diff --git a/tools/testing/selftests/hid/hid_bpf.c b/tools/testing/selftest= s/hid/hid_bpf.c index b851339308c2..069ebdbb4d1c 100644 --- a/tools/testing/selftests/hid/hid_bpf.c +++ b/tools/testing/selftests/hid/hid_bpf.c @@ -909,6 +909,32 @@ TEST_F(hid_bpf, test_rdesc_fixup_get_data_overflow) ASSERT_EQ(self->skel->bss->get_data_overflow_check, 1); } =20 +TEST_F(hid_bpf, test_rdesc_fixup_change_uniq_name_phys) +{ + const struct test_program progs[] =3D { + { .name =3D "hid_rdesc_fixup_change_uniq_name_phys" }, + }; + char expected[256], buf[256] =3D {}; + int err; + + LOAD_PROGRAMS(progs); + + err =3D ioctl(self->hidraw_fd, HIDIOCGRAWNAME(sizeof(buf)), buf); + ASSERT_GE(err, 0) TH_LOG("HIDIOCGRAWNAME"); + ASSERT_STREQ("name coming from bpf", buf); + + snprintf(expected, sizeof(expected), "%d phys:coming:from:bpf", self->hid= .dev_id); + + err =3D ioctl(self->hidraw_fd, HIDIOCGRAWPHYS(sizeof(buf)), buf); + ASSERT_GE(err, 0) TH_LOG("HIDIOCGRAWPHYS"); + ASSERT_STREQ(expected, buf); + + err =3D ioctl(self->hidraw_fd, HIDIOCGRAWUNIQ(sizeof(buf)), buf); + ASSERT_GE(err, 0) TH_LOG("HIDIOCGRAWUNIQ"); + ASSERT_STREQ("uniq:coming:from:bpf", buf); + +} + static int libbpf_print_fn(enum libbpf_print_level level, const char *format, va_list args) { diff --git a/tools/testing/selftests/hid/progs/hid.c b/tools/testing/selfte= sts/hid/progs/hid.c index b21fbb13c926..b5d9aea1bda1 100644 --- a/tools/testing/selftests/hid/progs/hid.c +++ b/tools/testing/selftests/hid/progs/hid.c @@ -255,6 +255,32 @@ struct hid_bpf_ops rdesc_fixup_get_data_overflow =3D { .hid_rdesc_fixup =3D (void *)hid_rdesc_fixup_get_data_overflow, }; =20 +SEC("?struct_ops.s/hid_rdesc_fixup") +int BPF_PROG(hid_rdesc_fixup_change_uniq_name_phys, struct hid_bpf_ctx *hi= d_ctx) +{ +#define HID_BPF_MEMCPY(target, str) \ + __builtin_memcpy(target, str, sizeof(str)) + + HID_BPF_MEMCPY(hid_ctx->hid->name, "name coming from bpf"); + HID_BPF_MEMCPY(hid_ctx->hid->uniq, "uniq:coming:from:bpf"); + /* hid_bpf relies on a phys being a rand % 1024 */ + for (int i =3D 0; i < 4; i++) { + if (!hid_ctx->hid->phys[i]) { + HID_BPF_MEMCPY(hid_ctx->hid->phys + i, " phys:coming:from:bpf"); + break; + } + } + +#undef HID_BPF_CONCAT + + return 0; +} + +SEC(".struct_ops.link") +struct hid_bpf_ops rdesc_fixup_change_uniq_name_phys =3D { + .hid_rdesc_fixup =3D (void *)hid_rdesc_fixup_change_uniq_name_phys, +}; + SEC("?struct_ops/hid_device_event") int BPF_PROG(hid_test_insert1, struct hid_bpf_ctx *hid_ctx, enum hid_repor= t_type type) { diff --git a/tools/testing/selftests/hid/progs/hid_bpf_helpers.h b/tools/te= sting/selftests/hid/progs/hid_bpf_helpers.h index cdca912f3afd..05698793762a 100644 --- a/tools/testing/selftests/hid/progs/hid_bpf_helpers.h +++ b/tools/testing/selftests/hid/progs/hid_bpf_helpers.h @@ -61,6 +61,9 @@ enum hid_report_type { =20 struct hid_device { unsigned int id; + char name[128]; + char phys[64]; + char uniq[64]; } __attribute__((preserve_access_index)); =20 struct bpf_wq { --=20 2.55.0 From nobody Mon Sep 28 07:17:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3663C3E5EDB; Tue, 25 Aug 2026 08:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787647428; cv=none; b=YHUL4AJlBpq84S5tR8aNW+FU/zeuy1Q0INxVGQUXWOhKiQA6fd3IbXjE9BzWrtnWei0SCls0Slzn4ryzSNVH/fTmCBl1+fY4pynFznTDJeibMPAD/YCPNFtJVWiAPwFOh/gOl8c/kdzfZWFHcO83skEdzB4wiOVh8FSKjsxi6Vk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787647428; c=relaxed/simple; bh=eSEf0NJ/FDzTZdK6KbIhOnTFJmviX53xcLE5mdfpiqM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gNT0hZvi/VUIVqhFLVWxqC8pcvEsJGw7FTKr3BW7YqmW/VOFkXx89qaMKG0DqONPrv8/VA2pFTk8/B54Li3JTF+PlzyCXLlceUbSgkGKJlEymF6H/fhGZo3x6FwDjMtH1qok0UVY07In2aQuye8AQSqt8Mq0xEkQNexwGrO+BfM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CAJSZ5UB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CAJSZ5UB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 521151F00A3A; Tue, 25 Aug 2026 08:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787647426; bh=WZC2dlrRslY57zHDt+VshR3khc8bqhpzVRl64eOUUiw=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=CAJSZ5UBNLE8/NBP0SDCBYiXubYo2DLQjNcYn1387Re/HCw1TkNmH6crwy2yWmcjz GZj98GaQuHp7ZAJPOQkQ0NOG5us7c4z5zF+1BqxYagfH5n85y6xN9M5SzJGUX0C26R Y76UprMAdFfl/UUPAf23Mz73ZCB9dwooTe0++fOmn92fUycq5LiPpvU/MaFsg2T/8L OyaZNe8/ITGmUXmkbzsIJd8pXAUBQ35tiY2SqrbmWV/Y5W+eskAy7GfQiu5L94y6PL b8k2R5og6HQYQMJp7B3RM8JBw45y7nDiy7Th/2faq6vO8Aqwwd3Q1LA5el+xcyAth9 I4x2a/+3cWPZQ== From: Benjamin Tissoires Date: Tue, 25 Aug 2026 10:43:18 +0200 Subject: [PATCH 3/3] selftests/hid: prepare test_rdesc_fixup_get_data_overflow for the new verifier Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260825-wip-bpf-safe-v1-3-ab9e0e111c5c@kernel.org> References: <20260825-wip-bpf-safe-v1-0-ab9e0e111c5c@kernel.org> In-Reply-To: <20260825-wip-bpf-safe-v1-0-ab9e0e111c5c@kernel.org> To: Jiri Kosina , Shuah Khan , Daniel Borkmann Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1787647419; l=2813; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=eSEf0NJ/FDzTZdK6KbIhOnTFJmviX53xcLE5mdfpiqM=; b=qoXOgQf22fImftlD6UPF3E9x+s7ffrNVxWAB0aOAstymIsKUz41rUcAZjwfwGOYnKMv3X1NKO 4DX7RHE1etqC7HGcZJLCe5rjEo72R7jCDA8G95FX9fqEYJigBjLjwDN X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= The new verifier in the bpf-next branch is now capable of detecting the overflow that was triggered by test_rdesc_fixup_get_data_overflow. This is better in terms of UI, but now the test is failing and should be marked as expected to fail. Add a new parameter to load_programs() when we expect the test to fail, and dynamically validate the test by checkcing if it loads (it should fail to load with new verifier), but if it still loads, HID-BPF should detect the overflow itself and return an error in hid_bpf_get_data(). Signed-off-by: Benjamin Tissoires --- tools/testing/selftests/hid/hid_bpf.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/hid/hid_bpf.c b/tools/testing/selftest= s/hid/hid_bpf.c index 069ebdbb4d1c..7ab86296ff23 100644 --- a/tools/testing/selftests/hid/hid_bpf.c +++ b/tools/testing/selftests/hid/hid_bpf.c @@ -67,14 +67,17 @@ struct test_program { int insert_head; }; #define LOAD_PROGRAMS(progs) \ - load_programs(progs, ARRAY_SIZE(progs), _metadata, self, variant) + load_programs(progs, ARRAY_SIZE(progs), false, _metadata, self, variant) +#define LOAD_PROGRAMS_MAY_FAIL(progs) \ + load_programs(progs, ARRAY_SIZE(progs), true, _metadata, self, variant) #define LOAD_BPF \ - load_programs(NULL, 0, _metadata, self, variant) -static void load_programs(const struct test_program programs[], - const size_t progs_count, - struct __test_metadata *_metadata, - FIXTURE_DATA(hid_bpf) * self, - const FIXTURE_VARIANT(hid_bpf) * variant) + load_programs(NULL, 0, false, _metadata, self, variant) +static int load_programs(const struct test_program programs[], + const size_t progs_count, + bool load_may_fail, + struct __test_metadata *_metadata, + FIXTURE_DATA(hid_bpf) * self, + const FIXTURE_VARIANT(hid_bpf) * variant) { struct bpf_map *iter_map; int err =3D -EINVAL; @@ -128,6 +131,9 @@ static void load_programs(const struct test_program pro= grams[], } =20 err =3D hid__load(self->skel); + if (err && load_may_fail) + return err; + ASSERT_OK(err) TH_LOG("hid_skel_load failed: %d", err); =20 for (int i =3D 0; i < progs_count; i++) { @@ -147,6 +153,7 @@ static void load_programs(const struct test_program pro= grams[], =20 self->hidraw_fd =3D open_hidraw(&self->hid); ASSERT_GE(self->hidraw_fd, 0) TH_LOG("open_hidraw"); + return 0; } =20 /* @@ -904,7 +911,9 @@ TEST_F(hid_bpf, test_rdesc_fixup_get_data_overflow) { .name =3D "hid_rdesc_fixup_get_data_overflow" }, }; =20 - LOAD_PROGRAMS(progs); + /* newer verifier can detect the overflow at load time */ + if (LOAD_PROGRAMS_MAY_FAIL(progs)) + return; =20 ASSERT_EQ(self->skel->bss->get_data_overflow_check, 1); } --=20 2.55.0