Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inform users about /proc/sys/kernel/perf_event_paranoid value in docs #1424

Open
kangtegong opened this issue Apr 27, 2022 · 1 comment · May be fixed by #1847
Open

inform users about /proc/sys/kernel/perf_event_paranoid value in docs #1424

kangtegong opened this issue Apr 27, 2022 · 1 comment · May be fixed by #1847

Comments

@kangtegong
Copy link
Contributor

According to this document[1] below,
in order to get kernel profiling, raw and ftrace function tracepoint access, etc,
/proc/sys/kernel/perf_event_paranoid value should be considered.

However, /proc/sys/kernel/perf_event_paranoid in most systems are set (more than) 3 as default,
so I think it's better to inform users about this in docs like:

Note that /proc/sys/kernel/perf_event_paranoid should be set as 1 in order to do "this in uftrace" ...

[1] https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/tools/perf/Documentation/security.txt#L142-L150

@namhyung
Copy link
Owner

Good point, please go ahead.

Yeah, it's unfortunate that most distro now set it to 3 as default. But I think I managed it can do the job with the value of 2 (excluding kernel profiling) instead of 1.

@kangtegong kangtegong changed the title inform user about /proc/sys/kernel/perf_event_paranoid value in docs inform users about /proc/sys/kernel/perf_event_paranoid value in docs Apr 28, 2022
kangtegong added a commit to kangtegong/uftrace that referenced this issue Nov 15, 2023
In order to get kenrel information with uftrace without any problem,
I think /proc/sys/kernel/perf_event_paranoid should be 2 or less.
But many distros nowadays set this value to more than 3 as default.

I wanted to inform users about this in the docs, but it's
so general that it's unclear which docs to leave this information in.

So this commit suggests checking this information
when configuring uftrace.

Closes: namhyung#1424

Signed-off-by: Kang Minchul <[email protected]>
kangtegong added a commit to kangtegong/uftrace that referenced this issue Nov 15, 2023
In order to get kernel information with uftrace without any problem,
I think /proc/sys/kernel/perf_event_paranoid should be 2 or less.
But many distros nowadays set this value to more than 3 as default.

I wanted to inform users about this in the docs, but it's
so general that it's unclear which docs to leave this information in.

So this commit suggests checking this information
when configuring uftrace.

Closes: namhyung#1424

Signed-off-by: Kang Minchul <[email protected]>
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 a pull request may close this issue.

2 participants