lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Apr 2020 16:02:32 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V6 13/15] perf intel-pt: Add support for text poke events

On 21/04/20 3:50 pm, Jiri Olsa wrote:
> On Sun, Apr 05, 2020 at 11:13:25PM +0300, Adrian Hunter wrote:
>> Select text poke events when available and the kernel is being traced.
>> Process text poke events to invalidate entries in Intel PT's instruction
>> cache.
>>
>> Example:
>>
>>   The example requires kernel config:
>>     CONFIG_PROC_SYSCTL=y
>>     CONFIG_SCHED_DEBUG=y
>>     CONFIG_SCHEDSTATS=y
>>
>>   Before:
>>
>>     # perf record -o perf.data.before --kcore -a -e intel_pt//k -m,64M &
>>     # cat /proc/sys/kernel/sched_schedstats
>>     0
>>     # echo 1 > /proc/sys/kernel/sched_schedstats
>>     # cat /proc/sys/kernel/sched_schedstats
>>     1
>>     # echo 0 > /proc/sys/kernel/sched_schedstats
>>     # cat /proc/sys/kernel/sched_schedstats
>>     0
>>     # kill %1
>>     [ perf record: Woken up 1 times to write data ]
>>     [ perf record: Captured and wrote 3.341 MB perf.data.before ]
>>     [1]+  Terminated                 perf record -o perf.data.before --kcore -a -e intel_pt//k -m,64M
>>     # perf script -i perf.data.before --itrace=e >/dev/null
>>     Warning:
>>     474 instruction trace errors
>>
>>   After:
>>
>>     # perf record -o perf.data.after --kcore -a -e intel_pt//k -m,64M &
>>     # cat /proc/sys/kernel/sched_schedstats
>>     0
>>     # echo 1 > /proc/sys/kernel/sched_schedstats
>>     # cat /proc/sys/kernel/sched_schedstats
>>     1
>>     # echo 0 > /proc/sys/kernel/sched_schedstats
>>     # cat /proc/sys/kernel/sched_schedstats
>>     0
>>     # kill %1
>>     [ perf record: Woken up 1 times to write data ]
>>     [ perf record: Captured and wrote 2.646 MB perf.data.after ]
>>     [1]+  Terminated                 perf record -o perf.data.after --kcore -a -e intel_pt//k -m,64M
>>     # perf script -i perf.data.after --itrace=e >/dev/null
> 
> 
> I'm still seeing some, probably I'm missing some CONFIG, will check
> 
> 	# ./perf record -o perf.data.after --kcore -a -e intel_pt//k -m,64M &
> 	[1] 5880
> 	# cat /proc/sys/kernel/sched_schedstats
> 	0
> 	# echo 1 > /proc/sys/kernel/sched_schedstats
> 	# cat /proc/sys/kernel/sched_schedstats
> 	1
> 	# echo 0 > /proc/sys/kernel/sched_schedstats
> 	# kill %1
> 	# [ perf record: Woken up 1 times to write data ]
> 	[ perf record: Captured and wrote 6.181 MB perf.data.after ]
> 	[1]+  Terminated              ./perf record -o perf.data.after --kcore -a -e intel_pt//k -m,64M
> 	# ./perf script --itrace=e -i perf.data.after > /dev/null
> 	Warning:
> 	18837 instruction trace errors
> 
> 	# ./perf script --itrace=e -i perf.data.after | head
> 	instruction trace error type 1 time 9274.420582345 cpu 9 pid 845 tid 845 ip 0xffffffff814e6cf2 code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422229726 cpu 39 pid 5880 tid 5880 ip 0xffffffffa030a320 code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422231972 cpu 39 pid 5880 tid 5880 ip 0xffffffffa0315c1c code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422236141 cpu 39 pid 5880 tid 5880 ip 0xffffffff81143263 code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422237424 cpu 39 pid 5880 tid 5880 ip 0xffffffff8115c388 code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422239028 cpu 39 pid 5880 tid 5880 ip 0xffffffff811428c9 code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422239028 cpu 39 pid 5880 tid 5880 ip 0xffffffffa13279fb code 5: Failed to get instruction
> 	instruction trace error type 1 time 9274.422242556 cpu 39 pid 5880 tid 5880 ip 0xffffffff814e9c73 code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422258915 cpu 39 pid 5880 tid 5880 ip 0xffffffff810d7da2 code 6: Trace doesn't match instruction
> 	instruction trace error type 1 time 9274.422258915 cpu 39 pid 5880 tid 5880 ip 0xffffffffa030a0b2 code 6: Trace doesn't match instruction

I don't think it can be CONFIG.  Can you share the branch you are using?
Then I can test it.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ