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
  • bpf
  • devmap.c
Find file BlameHistoryPermalink
  • Toke Høiland-Jørgensen's avatar
    devmap: Allow map lookups from eBPF · 0cdbb4b0
    Toke Høiland-Jørgensen authored Jun 28, 2019
    
    
    We don't currently allow lookups into a devmap from eBPF, because the map
    lookup returns a pointer directly to the dev->ifindex, which shouldn't be
    modifiable from eBPF.
    
    However, being able to do lookups in devmaps is useful to know (e.g.)
    whether forwarding to a specific interface is enabled. Currently, programs
    work around this by keeping a shadow map of another type which indicates
    whether a map index is valid.
    
    Since we now have a flag to make maps read-only from the eBPF side, we can
    simply lift the lookup restriction if we make sure this flag is always set.
    
    Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
    Acked-by: default avatarJonathan Lemon <jonathan.lemon@gmail.com>
    Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    0cdbb4b0
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7