Skip to content

fix(probe): return ErrNoKernelConfig when kprobe.multi config unavailable#15

Merged
leodido merged 1 commit into
leodido:mainfrom
fntlnz:fix/kprobe-multi-nil-config
Feb 17, 2026
Merged

fix(probe): return ErrNoKernelConfig when kprobe.multi config unavailable#15
leodido merged 1 commit into
leodido:mainfrom
fntlnz:fix/kprobe-multi-nil-config

Conversation

@fntlnz
Copy link
Copy Markdown
Collaborator

@fntlnz fntlnz commented Feb 17, 2026

In containers or mount namespaces without kernel config (/proc/config.gz, /boot/config-*), probeKprobeMulti silently returned Supported=false with no error, making kprobe.multi appear unsupported rather than unknown.

Return ErrNoKernelConfig when the kernel config is nil so callers can distinguish "unsupported" from "cannot determine".

Example output in such scenario now

Program Types:
  LSM: yes
  kprobe: yes
  kprobe.multi: no (error: no kernel config found)
  tracepoint: yes
  fentry: yes

versus before

Program Types:
  LSM: yes
  kprobe: yes
  kprobe.multi: no
  tracepoint: yes
  fentry: yes

…able

In containers without kernel config (/proc/config.gz, /boot/config-*),
probeKprobeMulti silently returned Supported=false with no error,
making kprobe.multi appear unsupported rather than unknown.

Return ErrNoKernelConfig when the kernel config is nil so callers
can distinguish "unsupported" from "cannot determine".
@fntlnz fntlnz requested a review from leodido February 17, 2026 01:05
@leodido leodido assigned leodido and unassigned leodido Feb 17, 2026
@leodido leodido changed the title fix(probe): return ErrNoKernelConfig when kprobe.multi config unavailable fix(probe): return ErrNoKernelConfig when kprobe.multi config unavailable Feb 17, 2026
Copy link
Copy Markdown
Owner

@leodido leodido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR shifts kprobe.multi probing from silently degrading to explicitly signaling. I like it, grazie.

@leodido leodido merged commit 00f1ff7 into leodido:main Feb 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants