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
  • tools
  • include
  • uapi
  • linux
  • bpf.h
Find file BlameHistoryPermalink
  • Alexei Starovoitov's avatar
    bpf: Pass a set of bpf_core_relo-s to prog_load command. · fbd94c7a
    Alexei Starovoitov authored Dec 01, 2021
    
    
    struct bpf_core_relo is generated by llvm and processed by libbpf.
    It's a de-facto uapi.
    With CO-RE in the kernel the struct bpf_core_relo becomes uapi de-jure.
    Add an ability to pass a set of 'struct bpf_core_relo' to prog_load command
    and let the kernel perform CO-RE relocations.
    
    Note the struct bpf_line_info and struct bpf_func_info have the same
    layout when passed from LLVM to libbpf and from libbpf to the kernel
    except "insn_off" fields means "byte offset" when LLVM generates it.
    Then libbpf converts it to "insn index" to pass to the kernel.
    The struct bpf_core_relo's "insn_off" field is always "byte offset".
    
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20211201181040.23337-6-alexei.starovoitov@gmail.com
    fbd94c7a
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7