---
title: "Graceful feature probing"
---

> Documentation Index
> Fetch the complete documentation index at: https://example.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Graceful feature probing

What if a field does not exist yet on an older kernel—like `kfree_skb.reason`, added in Linux 5.17? `bpf_core_field_exists(ctx->reason)` evaluates to `0` at load time, and the verifier prunes the unused branch.

Loaders can also query `btf__load_vmlinux_btf()` for enum bit positions (such as `___GFP_HIGH_BIT`) and hydrate `.rodata` before load, avoiding fragile `#ifdef` ladders.

> **Key idea:** One CO-RE binary can read kfree_skb drop reasons on Linux 6.17 and fall back cleanly to NOT_SPECIFIED on RHEL 5.14 with zero code forks.

Source: https://example.com/ebpf-field-guide/portability-and-toolchain/btf-and-core/probing/index.mdx
