Skip to content
Snippets Groups Projects
  • Andrii Nakryiko's avatar
    68e5ab1f
    kbuild: handle old pahole more gracefully when generating BTF · 68e5ab1f
    Andrii Nakryiko authored
    
    When CONFIG_DEBUG_INFO_BTF is enabled but available version of pahole is too
    old to support BTF generation, build script is supposed to emit warning and
    proceed with the build. Due to using exit instead of return from BASH function,
    existing handling code prematurely exits exit code 0, not completing some of
    the build steps. This patch fixes issue by correctly returning just from
    gen_btf() function only.
    
    Fixes: e83b9f55 ("kbuild: add ability to generate BTF type info for vmlinux")
    Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Daniel Borkmann <daniel@iogearbox.net>
    Cc: Alexei Starovoitov <ast@fb.com>
    Cc: Yonghong Song <yhs@fb.com>
    Cc: Martin KaFai Lau <kafai@fb.com>
    Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
    Acked-by: default avatarSong Liu <songliubraving@fb.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    68e5ab1f
    History
    kbuild: handle old pahole more gracefully when generating BTF
    Andrii Nakryiko authored
    
    When CONFIG_DEBUG_INFO_BTF is enabled but available version of pahole is too
    old to support BTF generation, build script is supposed to emit warning and
    proceed with the build. Due to using exit instead of return from BASH function,
    existing handling code prematurely exits exit code 0, not completing some of
    the build steps. This patch fixes issue by correctly returning just from
    gen_btf() function only.
    
    Fixes: e83b9f55 ("kbuild: add ability to generate BTF type info for vmlinux")
    Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Daniel Borkmann <daniel@iogearbox.net>
    Cc: Alexei Starovoitov <ast@fb.com>
    Cc: Yonghong Song <yhs@fb.com>
    Cc: Martin KaFai Lau <kafai@fb.com>
    Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
    Acked-by: default avatarSong Liu <songliubraving@fb.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
link-vmlinux.sh 6.56 KiB