Bug 4367 - bug: segment fault in perf_event__synthesize_one_bpf_prog
Summary: bug: segment fault in perf_event__synthesize_one_bpf_prog
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: bpf (show other bugs) bpf
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: maqiao
QA Contact: shuming
URL:
Whiteboard:
Keywords: Bugfix
Depends on:
Blocks:
 
Reported: 2023-03-06 14:39 UTC by 小杨
Modified: 2023-03-06 15:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 小杨 2023-03-06 14:39:27 UTC
Description of problem:
when /proc/sys/kernel/kptr_restrict is set to 2 and there are some ebpf progs loaded on the system, executing 'perf top' may cause segment fault.

Version-Release number of selected component (if applicable):
both 5.10 and 4.19

How reproducible:

Stable reproduction

Steps to Reproduce:
1.load 'sched_cls' ebpf prog 
2.echo 2 > /proc/sys/kernel/kptr_restrict
3.perf top

Actual results:
perf: segmentation fault

Expected results:


Additional info:
Comment 1 小杨 2023-03-06 15:46:16 UTC
sorry ,there is a mistake.
this problem not found on 4.19