Skip to content

Fail to compile with newer kernels >= 4.19 #31

@netoptimizer

Description

@netoptimizer

The BPF samples/bpf/ in this repo does NOT compile against newer kernel (according to Yoel: kernels >= 4.19).

This is caused by the kernel source changed, and added more use-cases of asm_volatile_goto (ASM GOTO), which is not supported by clang. This was initially worked around in this kernel commit b1ae32dbab50ed, and in this repo commit fca18b6. Unfortunately more ASM GOTO use-cases were added, again causing compile failures.

The upstream kernel address this in commit 6bf3bbe1f4d4c, by creating a include file asm_goto_workaround.h that redefines asm_volatile_goto. This is kind of workaround seems hackish...

TODO: Try to comeup with a better solution...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions