[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2301182211400.1734@cbobk.fhfr.pm>
Date: Wed, 18 Jan 2023 22:12:15 +0100 (CET)
From: Jiri Kosina <jikos@...nel.org>
To: Benjamin Tissoires <benjamin.tissoires@...hat.com>
cc: Greg KH <gregkh@...uxfoundation.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Tero Kristo <tero.kristo@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
netdev@...r.kernel.org, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH HID for-next v2 0/9] HID-BPF LLVM fixes, no more hacks
On Fri, 13 Jan 2023, Benjamin Tissoires wrote:
> Hi,
>
> So this is the fix for the bug that actually prevented me to integrate
> HID-BPF in v6.2.
>
> While testing the code base with LLVM, I realized that clang was smarter
> than I expected it to be, and it sometimes inlined a function or not
> depending on the branch. This lead to segfaults because my current code
> in linux-next is messing up the bpf programs refcounts assuming that I
> had enough observability over the kernel.
>
> So I came back to the drawing board and realized that what I was missing
> was exactly a bpf_link, to represent the attachment of a bpf program to
> a HID device. This is the bulk of the series, in patch 6/9.
>
> The other patches are cleanups, tests, and also the addition of the
> vmtests.sh script I run locally, largely inspired by the one in the bpf
> selftests dir. This allows very fast development of HID-BPF, assuming we
> have tests that cover the bugs :)
>
>
> changes in v2:
> - took Alexei's remarks into account and renamed the indexes into
> prog_table_index and hid_table_index
> - fixed unused function as reported by the Intel kbuild bot
I've now applied this on top of the previous work in
hid.git#for-6.3/hid-bpf
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists