Commit Graph

6 Commits

Author SHA1 Message Date
Friday Ortiz
ab38afe95d perf_event: support hardware breakpoints
Implement `PerfEventConfig::Breakpoint`, allowing users to attach
hardware breakpoints. Generate `HW_BREAKPOINT_*` and `struct
bpf_perf_event_data` in support of this feature and update the type of
`PerfEventContext` accordingly.

Add a test exercising R, W, RW, and X breakpoints. Note that R
breakpoints are unsupported on x86, and this is asserted in the test.

Extend the VM integration test harness and supporting infrastructure
(e.g. `download_kernel_images.sh`) to download kernel debug packages and
mount `System.map` in initramfs. This is needed (at least) on the aarch
6.1 Debian kernel which was not compiled with `CONFIG_KALLSYMS_ALL=y`
for some reason, and the locations of globals are not available in
kallsyms. To attach breakpoints to these symbols in the test pipeline,
we need to read them from System.map and apply the KASLR offset to get
their real address. The `System.map` file is not provided in the kernel
package by default, so we need to extract it from the corresponding
debug package. The KASLR offset is computed using `gunzip` which appears
in kallsyms on all Debian kernels tested.

Co-authored-by: Tamir Duberstein <tamird@gmail.com>
2025-11-10 16:33:54 -05:00
Tamir Duberstein
9996f7a300 Allow +debN kernels
Seems 6.12 is now being marked `+deb13`.
2025-08-11 16:20:33 -04:00
Tamir Duberstein
e692e5ffc5 Remove stale comments
Upstream isn't planning to do this.
2025-04-08 07:59:35 -04:00
Tamir Duberstein
f26ccde136 Allow +bpo kernels
Seems 6.10 is now being marked `+bpo`.

Improve error handling while I'm here.
2024-12-30 11:46:35 -05:00
Tamir Duberstein
d1457acc6d ci: cache downloads
We're seeing 429 from Github trying to download gen_init_cpio, so cache
it using actions cache. Since I'm here add this for kernel images as
well to save time waiting on slow Debian servers.
2024-12-23 06:43:18 +01:00
Tamir Duberstein
fbbc2ec050 ci: automatically download latest kernel revs
Let's get off the treadmill.

Switch (almost) all wget usages to curl.
2024-11-11 14:36:35 -05:00