lkml.org 
[lkml]   [2018]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFD] x86: The future of MPX

* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Sat, Apr 28, 2018 at 2:18 AM Ingo Molnar <mingo@kernel.org> wrote:
>
> > I just tried the MPX testcases with the latest kernel:
>
> > deimos:~/tip/tools/testing/selftests/x86> ./mpx-mini-test_64
>
> They need to be run as root. They try to access
>
> /sys/kernel/debug/tracing/set_ftrace_pid
> /sys/kernel/debug/tracing/trace
>
> and that's root-only.

Indeed - but note that they are crashing as root as well here:

root@deimos:/home/mingo/tip/tools/testing/selftests/x86# ./mpx-mini-test_64
[...]
Aborted (core dumped)

... because I don't even have /sys/kernel/debug/tracing/set_ftrace_pid... :-/

That's despite having ftrace enabled.

After some digging I found out that 'set_ftrace_pid' is dependent on
CONFIG_FUNCTION_TRACING=y (not just CONFIG_TRACING=y), which I didn't
have enabled on this kernel.

After enabling it I got the 64-bit testcase to work:

#
...
./mpx-mini-test_64 completed successfully

But the 32-bit testcase is erroring out:

root@deimos:/home/mingo/tip/tools/testing/selftests/x86# ./mpx-mini-test_32
XSAVE is supported by HW & OS
XSAVE processor supported state mask: 0x21f
XSAVE OS supported state mask: 0x21f
BNDREGS: size: 64 user: 1 supervisor: 0 aligned: 0
BNDCSR: size: 64 user: 1 supervisor: 0 aligned: 0
executing unmaptest
mpx dig ( 1) complete, SUCCESS ( 0 / 0)
#BR status == 2, missing bounds table,kernel should have handled!!

v4.17-rc2 based kernel, so it should have the latest MPX code.

Thanks,

Ingo

\
 
 \ /
  Last update: 2018-04-28 19:51    [W:0.152 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site