* [PATCH v2] bpf: lirc program type should not require SYS_CAP_ADMIN
@ 2023-04-17 8:17 Sean Young
2023-04-17 20:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Sean Young @ 2023-04-17 8:17 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, John Fastabend,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, bpf,
linux-kernel, linux-media
Make it possible to load lirc program type with just CAP_BPF. There is
nothing exceptional about lirc programs that means they require
SYS_CAP_ADMIN.
In order to attach or detach a lirc program type you need permission to
open /dev/lirc0; if you have permission to do that, you can alter all
sorts of lirc receiving options. Changing the IR protocol decoder is no
different.
Right now on a typical distribution /dev/lirc devices are only
read/write by root. Ideally we would make them group read/write like
other devices so that local users can use them without becoming root.
Signed-off-by: Sean Young <sean@mess.org>
---
kernel/bpf/syscall.c | 1 -
1 file changed, 1 deletion(-)
v2: improved commit message
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 6d575505f89c..822ebc742a6a 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -2463,7 +2463,6 @@ static bool is_net_admin_prog_type(enum bpf_prog_type prog_type)
case BPF_PROG_TYPE_LWT_SEG6LOCAL:
case BPF_PROG_TYPE_SK_SKB:
case BPF_PROG_TYPE_SK_MSG:
- case BPF_PROG_TYPE_LIRC_MODE2:
case BPF_PROG_TYPE_FLOW_DISSECTOR:
case BPF_PROG_TYPE_CGROUP_DEVICE:
case BPF_PROG_TYPE_CGROUP_SOCK:
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] bpf: lirc program type should not require SYS_CAP_ADMIN
2023-04-17 8:17 [PATCH v2] bpf: lirc program type should not require SYS_CAP_ADMIN Sean Young
@ 2023-04-17 20:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-17 20:30 UTC (permalink / raw)
To: Sean Young
Cc: ast, daniel, john.fastabend, andrii, martin.lau, song, yhs,
kpsingh, sdf, haoluo, jolsa, bpf, linux-kernel, linux-media
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Mon, 17 Apr 2023 09:17:48 +0100 you wrote:
> Make it possible to load lirc program type with just CAP_BPF. There is
> nothing exceptional about lirc programs that means they require
> SYS_CAP_ADMIN.
>
> In order to attach or detach a lirc program type you need permission to
> open /dev/lirc0; if you have permission to do that, you can alter all
> sorts of lirc receiving options. Changing the IR protocol decoder is no
> different.
>
> [...]
Here is the summary with links:
- [v2] bpf: lirc program type should not require SYS_CAP_ADMIN
https://git.kernel.org/bpf/bpf-next/c/69a8c792cd95
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-17 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 8:17 [PATCH v2] bpf: lirc program type should not require SYS_CAP_ADMIN Sean Young
2023-04-17 20:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).