Enable Landlock LSM support (CONFIG_SECURITY_LANDLOCK) in default kernel configs
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c, linux
调研方向
Start by comparing the Raspberry Pi kernel defconfigs named in the issue, such as bcm2711_defconfig and bcm2712_defconfig, with upstream Debian’s Landlock configuration. The issue asks whether to enable CONFIG_SECURITY_LANDLOCK by default or compile it in for opt-in through lsm=landlock; review the footprint and LSM ordering implications across the supported configurations. Done when the maintainers choose a policy and the relevant default configurations reflect it.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Summary
Please consider enabling Landlock (CONFIG_SECURITY_LANDLOCK=y) in the default Raspberry Pi OS kernel configurations, so software relying on Landlock can run without requiring users to build and maintain a custom kernel.
Forum discussion: https://forums.raspberrypi.com/viewtopic.php?t=401959
Motivation
Landlock is a mainline Linux Security Module (since Linux 5.13) that lets unprivileged processes sandbox themselves (restricting filesystem and network access) without needing root privileges, namespaces, or system-wide AppArmor/SELinux policies.
It is enabled by default in upstream Debian (since kernel 5.18), Ubuntu, Fedora, and Arch Linux, and is increasingly used across the Linux ecosystem:
- Sandboxing & agent runtimes: tools like NVIDIA OpenShell, Firejail,
landrun, and CLI coding agents (e.g., Codex CLI / Gemini CLI) use Landlock to isolate untrusted or autonomous workloads at the kernel level. - Everyday tools & services: projects such as
xz, GNOME LocalSearch, Suricata, Cloud Hypervisor,zathura, and emergingsystemdintegrations use Landlock for lightweight defense-in-depth.
Current vs. Requested Configuration
Currently, the default defconfigs (e.g., bcm2712_defconfig, bcm2711_defconfig) include:
CONFIG_SECURITY=y
CONFIG_SECURITY_APPARMOR=y
CONFIG_LSM=""
Depending on what trade-offs make the most sense for Raspberry Pi OS, there are two options:
-
Enabled out of the box (matches upstream Debian):
CONFIG_SECURITY_LANDLOCK=y CONFIG_LSM="landlock"(Keeps AppArmor opt-in as today, while allowing Landlock-aware applications to work immediately.)
-
Compiled in, opt-in via
cmdline.txt(matching how AppArmor is currently configured):CONFIG_SECURITY_LANDLOCK=yKeeping
CONFIG_LSM=""so users who need it can enable it withlsm=landlockincmdline.txtwithout compiling a custom kernel.
Footprint & Trade-offs
- Since LSMs must be built in (
=y) rather than as loadable modules, there are trade-offs to weigh regarding kernel image size, boot/startup impact, and runtime memory usage. - If the small per-object LSM memory overhead is a concern on memory-constrained 32-bit models, one option would be to only enable it on the 64-bit / newer defconfigs (
bcm2711_defconfig,bcm2712_defconfig), or keep it opt-in vialsm=landlock.
Steps to reproduce the behaviour
Device (s)
Raspberry Pi 5, Raspberry Pi 4 Mod. B
System
Logs
No response
Additional context
No response
- 主要语言
- C
- 星标
- 13.4k
- 派生
- 5.5k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 37
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
raspberrypi/linux 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
raspberrypi/linux#7822 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
raspberrypi/linux#7415 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app未关闭
难度 2/5 1-3 小时 新手友好度 72/100
raspberrypi/linux#7399 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
raspberrypi/linux#7357 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
raspberrypi/linux#7054 · 2 条评论 ·
维护者通常 1 天内回复
查看 raspberrypi/linux 的全部 Issue
相似的 Issue
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBuffer未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
needs triage
难度 2/5 1-3 小时 新手友好度 72/100
389ds/389-ds-base#8251 ·
维护者通常 1 天内回复
-
ColumnDecimal::Append(Int128) stores a value outside the Decimal(P, S) range with no error: cut to 32/64 bits, or with too many digits可能已有人在做 @RUSHIT305 今天认领。 未关闭bug data-types
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/clickhouse-cpp#645 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ROCm/hrx-system#3628 ·
维护者通常 1 天内回复