Repository navigation
wprof v0.7.1
Bug fix and security proofing release.
Security
- New
--seal KINDoption. For runners that run wprof with elevated privileges and append arguments from a less trusted user. Each--sealrestricts the options that appear after it; options before it are unaffected. It is a hidden option and can be repeated:file-output: reject-D,-Tand-J.--seal-outputremains as an alias for backwards compat.file-input: reject the@FILEform of-U,-n,-N,--thread-nameand--no-thread-name. These read the file with wprof's privileges, and its contents could end up in the capture or in error output.uprobe-args: reject argument capture (arg:...) onu:,uret:anduspan:probes. These probes can still be used withoutarg:, including withstackandpid:/path:/comm:filters. Argument capture on all other probe types is unaffected.
# Runner-controlled options, then seals, then user-supplied options.
$ sudo wprof --record -D out.data -T out.pb \
--seal file-output --seal file-input --seal uprobe-args \
<user options>- Stack buffer overflow fixed. A word of 256 or more characters in a
-n/-N/--thread-name/--no-thread-name@FILEoverflowed a stack buffer and crashed wprof. Linues up to 4095 characters are now read intact; longer ones are split.
PMU Counters
- AMD event selects above 0xff are programmed correctly. AMD's 12-bit event select was encoded into the wrong bits, so such events silently counted a different event with a corrupted umask. This also affected the kernel's own
cpu/ref-cycles/alias on AMD (event=0x120). - PMU fields are encoded from sysfs.
pmu/field=value/specs are now encoded from/sys/bus/event_source/devices/<pmu>/format/, matchingperf. Split fields such asamd_df's 14-bit event and 12-bit umask are encoded correctly, and every declared field is accepted (for exampleamd_l3threadmask/sliceidandamd_iommufilters). Rawconfig=,config1=andconfig2=are combined with other fields as in perf. - Stricter validation. A value wider than its field, or a field the PMU doesn't declare, is now an error. As a result,
pc=is rejected on AMD, which doesn't declare it.
Full Changelog: v0.7...v0.7.1