xsaves support broken?
Hi Fenghua,
I was testing some new MPX code, and realized that MPX had stopped working completely. The prctl() failed to turn it on, which I tracked down to a 0 in "BNDCSR" where we expected to see an enable bit.
I realized that I had managed to remove the "noxsaves" boot option from my kernel. Re-adding "noxsaves" made MPX work again, and the BNDCSR contents were properly passed in to the kernel.
Is it possible that "xsaves" use inside the kernel is simply broken?
Config is here:
http://sr71.net/~dave/intel/config-20150302
Quoted 13 lines
From: Hansen, Dave
Sent: Monday, March 02, 2015 4:00 PMHi Fenghua,
I was testing some new MPX code, and realized that MPX had stopped working completely. The
prctl()failed to turn it on, which I tracked down to a 0 in "BNDCSR" where we expected to see an enable bit.I realized that I had managed to remove the "noxsaves" boot option from my kernel. Re-adding "noxsaves" made MPX work again, and the BNDCSR contents were properly passed in to the kernel.
Quoted 5 lines
Is it possible that "xsaves" use inside the kernel is simply broken?
Config is here:
http://sr71.net/~dave/intel/config-20150302
Xsaves has been tested by QA since 3.17 with or without MPX. I'm not aware of reported issues.
But MPX is the only code to call the get_xsave_addr kernel API. Though it has been tested before on upstream MPX code.
What changes in your new MPX code?
Thanks.
-Fenghua ���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
Quoted 5 lines · Fenghua
Xsaves has been tested by QA since 3.17 with or without MPX. I'm not aware of reported issues.
But MPX is the only code to call the
get_xsave_addrkernel API. Though it has been tested before on upstream MPX code.
Has it? I'm fairly sure I've never explicitly tested it. I'm also doubting now that I've *ever* seen it work without booting with 'noxsaves'.
Quoted 1 line
What changes in your new MPX code?
I just discovered it when adding a new feature. I actually backed out all of my changes before reporting this issue. I'm running a completely untouched 4.0-rc1 kernel with the config I attached a moment ago.
If I boot with 'noxsaves', MPX works fine. If I boot without it, the kernel never sees the values that userspace sets in the "bndcsr" register.
Quoted 10 lines
From: Hansen, Dave
Quoted 5 lines · Fenghua
Xsaves has been tested by QA since 3.17 with or without MPX. I'm not aware of reported issues.
But MPX is the only code to call the
get_xsave_addrkernel API. Though it has been tested before on upstream MPX code.Has it? I'm fairly sure I've never explicitly tested it. I'm also doubting now that I've *ever* seen it work without booting with 'noxsaves'.
QA did test conflict between MPX and xsaves long time before MPX went upstream. But seems the conflict happened again at some point...
Quoted 6 lines
Quoted 2 lines
What changes in your new MPX code?
I just discovered it when adding a new feature. I actually backed out all of my changes before reporting this issue. I'm running a completely untouched 4.0- rc1 kernel with the config I attached a moment ago.
MPX and xsaves are supposed to work well on 4.0-rc1. If not, definitely the code is broken again somehow.
Quoted 2 lines
If I boot with 'noxsaves', MPX works fine. If I boot without it, the kernel never sees the values that userspace sets in the "bndcsr" register.
We are supposed to handle this issue long time ago.
I can try to reproduce the issue with the config.
Thanks.
-Fenghua
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�