Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • kernel
  • sysctl.c
Find file BlameHistoryPermalink
  • Daniel Borkmann's avatar
    bpf: Add kconfig knob for disabling unpriv bpf by default · 08389d88
    Daniel Borkmann authored May 11, 2021
    
    
    Add a kconfig knob which allows for unprivileged bpf to be disabled by default.
    If set, the knob sets /proc/sys/kernel/unprivileged_bpf_disabled to value of 2.
    
    This still allows a transition of 2 -> {0,1} through an admin. Similarly,
    this also still keeps 1 -> {1} behavior intact, so that once set to permanently
    disabled, it cannot be undone aside from a reboot.
    
    We've also added extra2 with max of 2 for the procfs handler, so that an admin
    still has a chance to toggle between 0 <-> 2.
    
    Either way, as an additional alternative, applications can make use of CAP_BPF
    that we added a while ago.
    
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/bpf/74ec548079189e4e4dffaeb42b8987bb3c852eee.1620765074.git.daniel@iogearbox.net
    08389d88
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7