Re: [linus:master] [x86/bugs] a3af84b0fa: stress-ng.seccomp.ops_per_sec 95.7% regression

From: Chengfeng Lin

Date: Thu Nov 12 2026 - 11:11:45 EST


Hi Dave, Pawan,

Following up on the Redis result, libMicro 0.4.3 [1] provides a smaller
reproducer: single-threaded loopback TCP. In an unmodified
parent / a3af84b0fa00 / parent comparison, native time/op increased
29.84% for 1 byte and 28.76% for 4 KiB. Each condition had nine
unprofiled runs per boot; the TCP baselines differed by less than 0.10%.
The pipe control was essentially unchanged.

To exclude kernel code changes, the following diagnostics used three
boots of the same unmodified parent, 96cce16e26dd, on the i7-12700KF
(microcode 0x3e). Using the per-CPU helpers attached to the original
report, the pre-test sequence was sham / protection trigger / sham.
All helpers exited before testing; the benchmark did not inherit their
speculation-control setting. The test cgroup was restricted to CPU2,
one P-core.

Inside that cgroup, the original 30-second command was:

./pipe -E -C 0 -D 30000 -B 10000 -L -S -W \
-N pipe_tst1 -s 1 -x tcp -m st

Despite the executable name, -x tcp selects TCP. Each operation writes
then reads one byte; connection setup is outside the native timed loop.
The control uses -x pipe instead.

These are means of three separate counter runs per boot. Per-operation
values divide each run's totals by all completed TCP operations,
including executed batches excluded by libMicro's timing statistics.
CPU time and counters cover the whole test cgroup, including setup,
cleanup and wrapper overhead, not just the TCP loop; instructions
include user and kernel execution.

Sham A Trigger Sham B
Cgroup CPU time, us/TCP op 1.68762 2.19800 1.68571
Cycles/op 8233.34 10728.11 8225.14
Instructions/op 20291.04 20243.49 20307.35
Kernel near returns/op 442.537 442.379 442.556
Kernel return miss rate 0.471% 13.111% 0.454%

Relative to the two sham means, CPU time/op increased 30.32%, while
instructions/op changed by -0.27%. Pipe CPU time/op changed by -0.18%.

Separate branch-stack samples showed mispredicted returns at
__do_softirq(), net_rx_action() and __dev_queue_xmit() after the trigger;
both sham boots sampled the same return source/target pairs as correctly
predicted. The samples identify locations; the 13.11% rate comes from
event counts, not sample proportions. This supports a return-prediction
cost, but does not explain all extra cycles or its persistence after
the helpers exit.

Would this smaller reproducer and these counters help investigate the
persistent effect?

Thanks,
Chengfeng

[1] https://github.com/gormanm/libMicro/tree/976d502afaa2d9b919564d7fa8a08fec286dfc89