Skip to content

Commit 92be523

Browse files
committed
kernel: generate BTF
Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
1 parent 34a7f8d commit 92be523

File tree

4 files changed

+84
-4
lines changed

4 files changed

+84
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
_output
2+
kernel/*.old

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RUN echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.con
4545
# Install build dependencies
4646
RUN --mount=type=cache,sharing=locked,id=kernel-aptlib,target=/var/lib/apt \
4747
--mount=type=cache,sharing=locked,id=kernel-aptcache,target=/var/cache/apt \
48-
apt-get update && apt-get install -y build-essential libncurses-dev flex bison libssl-dev libelf-dev bc cpio git wget xz-utils
48+
apt-get update && apt-get install -y build-essential libncurses-dev flex bison libssl-dev libelf-dev bc cpio git wget xz-utils pahole
4949

5050
ARG KERNEL_VERSION="6.12.44"
5151
ARG KERNEL_ARCH="x86_64"

kernel/config-6.12.44-arm64

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y
1919
CONFIG_CC_HAS_ASM_INLINE=y
2020
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
2121
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
22-
CONFIG_PAHOLE_VERSION=0
22+
CONFIG_PAHOLE_VERSION=124
2323
CONFIG_IRQ_WORK=y
2424
CONFIG_BUILDTIME_TABLE_SORT=y
2525
CONFIG_THREAD_INFO_IN_TASK=y
@@ -3253,6 +3253,9 @@ CONFIG_DEBUG_INFO_DWARF4=y
32533253
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
32543254
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
32553255
# CONFIG_DEBUG_INFO_SPLIT is not set
3256+
CONFIG_DEBUG_INFO_BTF=y
3257+
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
3258+
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
32563259
# CONFIG_GDB_SCRIPTS is not set
32573260
CONFIG_FRAME_WARN=2048
32583261
# CONFIG_STRIP_ASM_SYMS is not set

kernel/config-6.12.44-x86_64

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y
1919
CONFIG_CC_HAS_ASM_INLINE=y
2020
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
2121
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
22-
CONFIG_PAHOLE_VERSION=0
22+
CONFIG_PAHOLE_VERSION=124
2323
CONFIG_IRQ_WORK=y
2424
CONFIG_BUILDTIME_TABLE_SORT=y
2525
CONFIG_THREAD_INFO_IN_TASK=y
@@ -191,6 +191,7 @@ CONFIG_CGROUP_CPUACCT=y
191191
CONFIG_CGROUP_PERF=y
192192
CONFIG_CGROUP_BPF=y
193193
# CONFIG_CGROUP_MISC is not set
194+
# CONFIG_CGROUP_DEBUG is not set
194195
CONFIG_SOCK_CGROUP_DATA=y
195196
CONFIG_NAMESPACES=y
196197
CONFIG_UTS_NS=y
@@ -242,13 +243,15 @@ CONFIG_RSEQ=y
242243
CONFIG_CACHESTAT_SYSCALL=y
243244
CONFIG_KALLSYMS=y
244245
# CONFIG_KALLSYMS_SELFTEST is not set
246+
# CONFIG_KALLSYMS_ALL is not set
245247
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
246248
CONFIG_HAVE_PERF_EVENTS=y
247249

248250
#
249251
# Kernel Performance Events And Counters
250252
#
251253
CONFIG_PERF_EVENTS=y
254+
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
252255
# end of Kernel Performance Events And Counters
253256

254257
# CONFIG_PROFILING is not set
@@ -1430,6 +1433,7 @@ CONFIG_PCIEASPM_DEFAULT=y
14301433
# CONFIG_PCIE_PTM is not set
14311434
CONFIG_PCI_MSI=y
14321435
CONFIG_PCI_QUIRKS=y
1436+
# CONFIG_PCI_DEBUG is not set
14331437
# CONFIG_PCI_STUB is not set
14341438
CONFIG_PCI_ATS=y
14351439
# CONFIG_PCI_IOV is not set
@@ -1519,6 +1523,9 @@ CONFIG_EXTRA_FIRMWARE=""
15191523
# end of Firmware loader
15201524

15211525
CONFIG_ALLOW_DEV_COREDUMP=y
1526+
# CONFIG_DEBUG_DRIVER is not set
1527+
# CONFIG_DEBUG_DEVRES is not set
1528+
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
15221529
CONFIG_GENERIC_CPU_DEVICES=y
15231530
CONFIG_GENERIC_CPU_AUTOPROBE=y
15241531
CONFIG_GENERIC_CPU_VULNERABILITIES=y
@@ -2815,6 +2822,7 @@ CONFIG_CRYPTO_MANAGER=y
28152822
CONFIG_CRYPTO_MANAGER2=y
28162823
# CONFIG_CRYPTO_USER is not set
28172824
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
2825+
# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set
28182826
# CONFIG_CRYPTO_NULL is not set
28192827
# CONFIG_CRYPTO_PCRYPT is not set
28202828
CONFIG_CRYPTO_CRYPTD=y
@@ -3115,25 +3123,42 @@ CONFIG_PRINTK_TIME=y
31153123
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
31163124
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
31173125
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
3126+
# CONFIG_BOOT_PRINTK_DELAY is not set
31183127
# CONFIG_DYNAMIC_DEBUG is not set
31193128
# CONFIG_DYNAMIC_DEBUG_CORE is not set
31203129
# CONFIG_SYMBOLIC_ERRNAME is not set
31213130
CONFIG_DEBUG_BUGVERBOSE=y
31223131
# end of printk and dmesg options
31233132

3124-
# CONFIG_DEBUG_KERNEL is not set
3133+
CONFIG_DEBUG_KERNEL=y
3134+
CONFIG_DEBUG_MISC=y
31253135

31263136
#
31273137
# Compile-time checks and compiler options
31283138
#
3139+
CONFIG_DEBUG_INFO=y
31293140
CONFIG_AS_HAS_NON_CONST_ULEB128=y
3141+
# CONFIG_DEBUG_INFO_NONE is not set
3142+
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
3143+
CONFIG_DEBUG_INFO_DWARF4=y
3144+
# CONFIG_DEBUG_INFO_DWARF5 is not set
3145+
# CONFIG_DEBUG_INFO_REDUCED is not set
3146+
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
3147+
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
3148+
# CONFIG_DEBUG_INFO_SPLIT is not set
3149+
CONFIG_DEBUG_INFO_BTF=y
3150+
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
3151+
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
3152+
# CONFIG_GDB_SCRIPTS is not set
31303153
CONFIG_FRAME_WARN=2048
31313154
# CONFIG_STRIP_ASM_SYMS is not set
3155+
# CONFIG_READABLE_ASM is not set
31323156
# CONFIG_HEADERS_INSTALL is not set
31333157
# CONFIG_DEBUG_SECTION_MISMATCH is not set
31343158
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
31353159
CONFIG_ARCH_WANT_FRAME_POINTERS=y
31363160
CONFIG_FRAME_POINTER=y
3161+
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
31373162
# end of Compile-time checks and compiler options
31383163

31393164
#
@@ -3145,6 +3170,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y
31453170
# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
31463171
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
31473172
CONFIG_HAVE_ARCH_KGDB=y
3173+
# CONFIG_KGDB is not set
31483174
CONFIG_ARCH_HAS_UBSAN=y
31493175
# CONFIG_UBSAN is not set
31503176
CONFIG_HAVE_KCSAN_COMPILER=y
@@ -3153,27 +3179,40 @@ CONFIG_HAVE_KCSAN_COMPILER=y
31533179
#
31543180
# Networking Debugging
31553181
#
3182+
# CONFIG_NET_DEV_REFCNT_TRACKER is not set
3183+
# CONFIG_NET_NS_REFCNT_TRACKER is not set
3184+
# CONFIG_DEBUG_NET is not set
31563185
# end of Networking Debugging
31573186

31583187
#
31593188
# Memory Debugging
31603189
#
31613190
# CONFIG_PAGE_EXTENSION is not set
3191+
# CONFIG_DEBUG_PAGEALLOC is not set
31623192
CONFIG_SLUB_DEBUG=y
31633193
# CONFIG_SLUB_DEBUG_ON is not set
3194+
# CONFIG_PAGE_OWNER is not set
31643195
# CONFIG_PAGE_TABLE_CHECK is not set
31653196
# CONFIG_PAGE_POISONING is not set
31663197
# CONFIG_DEBUG_RODATA_TEST is not set
31673198
CONFIG_ARCH_HAS_DEBUG_WX=y
31683199
# CONFIG_DEBUG_WX is not set
31693200
CONFIG_GENERIC_PTDUMP=y
3201+
# CONFIG_PTDUMP_DEBUGFS is not set
31703202
CONFIG_HAVE_DEBUG_KMEMLEAK=y
3203+
# CONFIG_DEBUG_KMEMLEAK is not set
31713204
# CONFIG_PER_VMA_LOCK_STATS is not set
3205+
# CONFIG_DEBUG_OBJECTS is not set
31723206
# CONFIG_SHRINKER_DEBUG is not set
3207+
# CONFIG_DEBUG_STACK_USAGE is not set
3208+
# CONFIG_SCHED_STACK_END_CHECK is not set
31733209
CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y
3210+
# CONFIG_DEBUG_VM is not set
31743211
# CONFIG_DEBUG_VM_PGTABLE is not set
31753212
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
3213+
# CONFIG_DEBUG_VIRTUAL is not set
31763214
CONFIG_DEBUG_MEMORY_INIT=y
3215+
# CONFIG_DEBUG_PER_CPU_MAPS is not set
31773216
# CONFIG_MEM_ALLOC_PROFILING is not set
31783217
CONFIG_HAVE_ARCH_KASAN=y
31793218
CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y
@@ -3187,18 +3226,26 @@ CONFIG_HAVE_ARCH_KFENCE=y
31873226
# CONFIG_KFENCE is not set
31883227
# end of Memory Debugging
31893228

3229+
# CONFIG_DEBUG_SHIRQ is not set
3230+
31903231
#
31913232
# Debug Oops, Lockups and Hangs
31923233
#
31933234
# CONFIG_PANIC_ON_OOPS is not set
31943235
CONFIG_PANIC_ON_OOPS_VALUE=0
31953236
CONFIG_PANIC_TIMEOUT=0
3237+
# CONFIG_SOFTLOCKUP_DETECTOR is not set
31963238
CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y
3239+
# CONFIG_HARDLOCKUP_DETECTOR is not set
3240+
# CONFIG_DETECT_HUNG_TASK is not set
3241+
# CONFIG_WQ_WATCHDOG is not set
3242+
# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
31973243
# end of Debug Oops, Lockups and Hangs
31983244

31993245
#
32003246
# Scheduler Debugging
32013247
#
3248+
CONFIG_SCHED_DEBUG=y
32023249
CONFIG_SCHED_INFO=y
32033250
# CONFIG_SCHEDSTATS is not set
32043251
# end of Scheduler Debugging
@@ -3207,26 +3254,53 @@ CONFIG_SCHED_INFO=y
32073254
# Lock Debugging (spinlocks, mutexes, etc...)
32083255
#
32093256
CONFIG_LOCK_DEBUGGING_SUPPORT=y
3257+
# CONFIG_PROVE_LOCKING is not set
3258+
# CONFIG_LOCK_STAT is not set
3259+
# CONFIG_DEBUG_RT_MUTEXES is not set
3260+
# CONFIG_DEBUG_SPINLOCK is not set
3261+
# CONFIG_DEBUG_MUTEXES is not set
3262+
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
3263+
# CONFIG_DEBUG_RWSEMS is not set
3264+
# CONFIG_DEBUG_LOCK_ALLOC is not set
3265+
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
3266+
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
3267+
# CONFIG_LOCK_TORTURE_TEST is not set
32103268
# CONFIG_WW_MUTEX_SELFTEST is not set
3269+
# CONFIG_SCF_TORTURE_TEST is not set
3270+
# CONFIG_CSD_LOCK_WAIT_DEBUG is not set
32113271
# end of Lock Debugging (spinlocks, mutexes, etc...)
32123272

32133273
# CONFIG_DEBUG_IRQFLAGS is not set
32143274
CONFIG_STACKTRACE=y
32153275
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
3276+
# CONFIG_DEBUG_KOBJECT is not set
32163277

32173278
#
32183279
# Debug kernel data structures
32193280
#
3281+
# CONFIG_DEBUG_LIST is not set
3282+
# CONFIG_DEBUG_PLIST is not set
3283+
# CONFIG_DEBUG_SG is not set
3284+
# CONFIG_DEBUG_NOTIFIERS is not set
3285+
# CONFIG_DEBUG_MAPLE_TREE is not set
32203286
# end of Debug kernel data structures
32213287

32223288
#
32233289
# RCU Debugging
32243290
#
3291+
# CONFIG_RCU_SCALE_TEST is not set
3292+
# CONFIG_RCU_TORTURE_TEST is not set
3293+
# CONFIG_RCU_REF_SCALE_TEST is not set
32253294
CONFIG_RCU_CPU_STALL_TIMEOUT=21
32263295
CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0
32273296
# CONFIG_RCU_CPU_STALL_CPUTIME is not set
3297+
# CONFIG_RCU_TRACE is not set
3298+
# CONFIG_RCU_EQS_DEBUG is not set
32283299
# end of RCU Debugging
32293300

3301+
# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
3302+
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
3303+
# CONFIG_LATENCYTOP is not set
32303304
CONFIG_USER_STACKTRACE_SUPPORT=y
32313305
CONFIG_HAVE_FUNCTION_TRACER=y
32323306
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
@@ -3253,6 +3327,8 @@ CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y
32533327
# Kernel Testing and Coverage
32543328
#
32553329
# CONFIG_KUNIT is not set
3330+
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
3331+
# CONFIG_FAULT_INJECTION is not set
32563332
CONFIG_ARCH_HAS_KCOV=y
32573333
CONFIG_CC_HAS_SANCOV_TRACE_PC=y
32583334
# CONFIG_KCOV is not set

0 commit comments

Comments
 (0)