Skip to content

Instantly share code, notes, and snippets.

View theihor's full-sized avatar

Ihor Solodrai theihor

View GitHub Profile
--- clean_func.txt 2025-07-15 16:58:36.947245306 -0700
+++ out_func.txt 2025-07-15 16:58:52.838479153 -0700
@@ -1,4 +1,3 @@
-FUNC 'BIT_initDStream'
FUNC 'BUG_func'
FUNC 'CPU_FREQ_GOV_CONSERVATIVE_exit'
FUNC 'CPU_FREQ_GOV_CONSERVATIVE_init'
@@ -30,7 +29,6 @@
FUNC 'FSE_writeNCount_generic'
FUNC 'FUA_show'
@theihor
theihor / gist:e0002c119414e6b40e2192bd7ced01b1
Created May 6, 2025 23:38
BPF verification log of intentionally broken BPF rbtree selftest
PROCESSING rbtree.bpf.o/rbtree_first_and_remove, DURATION US: 842, VERDICT: failure, VERIFIER LOG:
arg#0 reference type('UNKNOWN ') size cannot be determined: -22
0: R1=ctx() R10=fp0
; n = bpf_obj_new(typeof(*n)); @ rbtree.c:198
0: (18) r1 = 0x11 ; R1_w=17
2: (b7) r2 = 0 ; R2_w=0
3: (85) call bpf_obj_new_impl#54651 ; R0_w=ptr_or_null_node_data(id=2,ref_obj_id=2) refs=2
4: (bf) r6 = r0 ; R0_w=ptr_or_null_node_data(id=2,ref_obj_id=2) R6_w=ptr_or_null_node_data(id=2,ref_obj_id=2) refs=2
5: (b7) r7 = 1 ; R7_w=1 refs=2
; if (!n) @ rbtree.c:199
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 6.14.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24200
@theihor
theihor / gist:3c84d2f7544a24caeaa79f95b5539823
Created April 4, 2025 15:40
Minimal Linux kconfig (6.14)
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 6.14.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="arm-linux-gnueabi-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24200
@theihor
theihor / pyperf600-v1.log
Created March 20, 2025 22:37
BPF verifier log (level1) for pyperf600 selftest
This file has been truncated, but you can view the full file.
Processing 'pyperf600.bpf.o'...
PROCESSING pyperf600.bpf.o/on_event, DURATION US: 96495, VERDICT: failure, VERIFIER LOG:
0: R1=ctx() R10=fp0
; int on_event(struct bpf_raw_tracepoint_args* ctx) @ pyperf.h:349
0: (7b) *(u64 *)(r10 -344) = r1 ; R1=ctx() R10=fp0 fp-344_w=ctx()
; uint64_t pid_tgid = bpf_get_current_pid_tgid(); @ pyperf.h:224
1: (85) call bpf_get_current_pid_tgid#14 ; R0_w=scalar()
2: (bf) r6 = r0 ; R0_w=scalar(id=1) R6_w=scalar(id=1)
; pid_t pid = (pid_t)(pid_tgid >> 32); @ pyperf.h:225
3: (bf) r1 = r6 ; R1_w=scalar(id=1) R6_w=scalar(id=1)
@theihor
theihor / selftests-build.log
Created January 3, 2025 23:41
GCC BPF selftests/bpf successful build log
+ source /ci/actions/build-selftests/../helpers.sh
+ TARGET_ARCH=x86_64
+ TOOLCHAIN=gcc
++ realpath /ci/workspace
+ KERNEL_ROOT=/ci/workspace
+ export KBUILD_OUTPUT=/ci/workspace/kbuild-output
+ KBUILD_OUTPUT=/ci/workspace/kbuild-output
+ export VMLINUX_BTF=/ci/workspace/kbuild-output/vmlinux
+ VMLINUX_BTF=/ci/workspace/kbuild-output/vmlinux
+ export VMLINUX_H=
@theihor
theihor / gcc_bpf_verifier_bpf_fastcall_uninitialized.log
Created January 3, 2025 23:03
gcc_bpf_verifier_bpf_fastcall_uninitialized.log
+ source /ci/actions/build-selftests/../helpers.sh
+ TARGET_ARCH=x86_64
+ TOOLCHAIN=gcc
++ realpath /ci/workspace
+ KERNEL_ROOT=/ci/workspace
+ export KBUILD_OUTPUT=/ci/workspace/kbuild-output
+ KBUILD_OUTPUT=/ci/workspace/kbuild-output
+ export VMLINUX_BTF=/ci/workspace/kbuild-output/vmlinux
+ VMLINUX_BTF=/ci/workspace/kbuild-output/vmlinux
+ export VMLINUX_H=
@theihor
theihor / vmlinux.h
Created December 31, 2024 17:57
vmlinux.h with __btf_type_tag__*
This file has been truncated, but you can view the full file.
#ifndef __VMLINUX_H__
#define __VMLINUX_H__
#ifndef BPF_NO_PRESERVE_ACCESS_INDEX
#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
#endif
#ifndef __ksym
#define __ksym __attribute__((section(".ksyms")))
#endif
+ source /ci/actions/build-selftests/../helpers.sh
+ TARGET_ARCH=x86_64
+ TOOLCHAIN=gcc
++ realpath /ci/workspace
+ KERNEL_ROOT=/ci/workspace
+ export KBUILD_OUTPUT=/ci/workspace/kbuild-output
+ KBUILD_OUTPUT=/ci/workspace/kbuild-output
+ export VMLINUX_BTF=/ci/workspace/kbuild-output/vmlinux
+ VMLINUX_BTF=/ci/workspace/kbuild-output/vmlinux
+ export VMLINUX_H=
@theihor
theihor / vmlinux.h
Created December 31, 2024 00:56
vmlinux.h with conditioned bool defs
This file has been truncated, but you can view the full file.
#ifndef __VMLINUX_H__
#define __VMLINUX_H__
#ifndef BPF_NO_PRESERVE_ACCESS_INDEX
#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
#endif
#ifndef __ksym
#define __ksym __attribute__((section(".ksyms")))
#endif