Skip to content

COPY_HEADERS causing BTF errors #9

Description

@jmontleon

The COPY_HEADERS lines like below added in Makefiles are breaking BTF.

COPY_HEADERS:=$(shell cp $(ES_DEV_DMA_BUF_HEADER)/*.h include/linux)

To reproduce enable BTF options:

CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
CONFIG_PROBE_EVENTS_BTF_ARGS=y

Then build the kernel and modules.
Copying the headers in place when make Image.gz is run causes vmlinux to get rebuilt when make modules is run and results in errors when loading any modules:

[  403.886685] BPF: [128333] FUNC  
[  403.889941] BPF: type_id=128305
[  403.893098] BPF:  
[  403.895117] BPF: Invalid name
[  403.898094] BPF: 
[  403.900029] failed to validate module [zram] BTF: -22

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions