diff options
| author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-09-04 10:43:19 +0200 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-09-04 07:58:36 -0700 |
| commit | 6668ed271eaefaa63e686bdfbedaeb7b8e492722 (patch) | |
| tree | 58e8288fead484f6755ad0815fc74c3742663761 /Documentation/admin-guide/media/remote-controller.rst | |
| download | linux-stable-6668ed271eaefaa63e686bdfbedaeb7b8e492722.tar.gz linux-stable-6668ed271eaefaa63e686bdfbedaeb7b8e492722.zip | |
selftests/bpf: Reject graph kptr use after RCU unlockgrafted
Add a sleepable verifier test that loads a graph-node local kptr in an
explicit RCU read-side critical section, then passes its node to
bpf_rbtree_remove() after the section ends.
Before the verifier fix, the stale NON_OWN_REF flag makes the node look like
a live borrowed reference and the program is accepted. After the fix, the
pointer is demoted without NON_OWN_REF and the graph kfunc argument is
rejected.
Also exercise a graph kptr loaded while a spin lock provides implicit RCU
protection. The pointer must be invalidated when the lock is released, which
guards the required ordering between non-owning-reference invalidation and
RCU demotion.
Update the existing fault-protected load test state description. The
post-unlock pointer no longer carries NON_OWN_REF, but remains readable
because the load is rewritten to use BPF_PROBE_MEM.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20260904084325.52250-7-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'Documentation/admin-guide/media/remote-controller.rst')
| -rw-r--r-- | Documentation/admin-guide/media/remote-controller.rst | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Documentation/admin-guide/media/remote-controller.rst b/Documentation/admin-guide/media/remote-controller.rst new file mode 100644 index 000000000..188944b00 --- /dev/null +++ b/Documentation/admin-guide/media/remote-controller.rst @@ -0,0 +1,76 @@ +.. SPDX-License-Identifier: GPL-2.0 + +====================================================== +Infrared remote control support in video4linux drivers +====================================================== + +Authors: Gerd Hoffmann, Mauro Carvalho Chehab + +Basics +====== + +Most analog and digital TV boards support remote controllers. Several of +them have a microprocessor that receives the IR carriers, convert into +pulse/space sequences and then to scan codes, returning such codes to +userspace ("scancode mode"). Other boards return just the pulse/space +sequences ("raw mode"). + +The support for remote controller in scancode mode is provided by the +standard Linux input layer. The support for raw mode is provided via LIRC. + +In order to check the support and test it, it is suggested to download +the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_. It provides +two tools to handle remote controllers: + +- ir-keytable: provides a way to query the remote controller, list the + protocols it supports, enable in-kernel support for IR decoder or + switch the protocol and to test the reception of scan codes; + +- ir-ctl: provide tools to handle remote controllers that support raw mode + via LIRC interface. + +Usually, the remote controller module is auto-loaded when the TV card is +detected. However, for a few devices, you need to manually load the +ir-kbd-i2c module. + +How it works +============ + +The modules register the remote as keyboard within the linux input +layer, i.e. you'll see the keys of the remote as normal key strokes +(if CONFIG_INPUT_KEYBOARD is enabled). + +Using the event devices (CONFIG_INPUT_EVDEV) it is possible for +applications to access the remote via /dev/input/event<n> devices. +The udev/systemd will automatically create the devices. If you install +the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_, it may also +automatically load a different keytable than the default one. Please see +`v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ ir-keytable.1 +man page for details. + +The ir-keytable tool is nice for trouble shooting, i.e. to check +whenever the input device is really present, which of the devices it +is, check whenever pressing keys on the remote actually generates +events and the like. You can also use any other input utility that changes +the keymaps, like the input kbd utility. + + +Using with lircd +---------------- + +The latest versions of the lircd daemon supports reading events from the +linux input layer (via event device). It also supports receiving IR codes +in lirc mode. + + +Using without lircd +------------------- + +Xorg recognizes several IR keycodes that have its numerical value lower +than 247. With the advent of Wayland, the input driver got updated too, +and should now accept all keycodes. Yet, you may want to just reassign +the keycodes to something that your favorite media application likes. + +This can be done by setting +`v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ to load your own +keytable in runtime. Please read ir-keytable.1 man page for details. |
