Re: [PATCH v2] perf/x86: Check data address for IBS software filter

Ravi Bangoria
2025-03-21T16:19:24Z

Hi Namhyung, Ingo,

>>> We have two options:
>>> 1) Restrict IBS + PERF_SAMPLE_RAW to privilege users.
>>> 2) Remove all sensitive information from raw register dump before
>>> passing it to userspace. (Kernel data addresses and all physical
>>> addresses are the only sensitive info I suppose?).
>>>
>>> 2 is better IMO since it will allow unprivileged user to use IBS
>>> with full potential. wdyt?
>>
>> I'm slightly inclined to #1 for simplicity and safety, but #2 is fine
>> to me as well.
>
> I'd prefer #2 for superior usability, if it doesn't get too
> complicated.

Thank you for your opinion.

I've posted a v3 based on 2nd option:
https://lore.kernel.org/r/20250321161251.1033-1-ravi.bangoria@amd.com

@Ingo, can you please revert v2 and apply v3? (provided @Namhyung is okay
with it).

Thanks,
Ravi