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  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:	Thu, 24 Jul 2014 05:23:54 +0000
From:	"Ren, Qiaowei" <qiaowei.ren@...el.com>
To:	"Hansen, Dave" <dave.hansen@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>
CC:	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: RE: [PATCH v7 03/10] x86, mpx: add macro cpu_has_mpx



On 2014-07-24, Hansen, Dave wrote:
> On 07/23/2014 05:56 PM, Ren, Qiaowei wrote:
>> On 2014-07-24, Hansen, Dave wrote:
>>> On 07/22/2014 07:35 PM, Ren, Qiaowei wrote:
>>>> The checking about MPX feature should be as follow:
>>>> 
>>>>         if (pcntxt_mask & XSTATE_EAGER) {
>>>>                 if (eagerfpu == DISABLE) {
>>>>                         pr_err("eagerfpu not present, disabling
> some
>>> xstate features: 0x%llx\n",
>>>>                                         pcntxt_mask &
>>> XSTATE_EAGER);
>>>>                         pcntxt_mask &= ~XSTATE_EAGER; } else {
>>>>                         eagerfpu = ENABLE;
>>>>                 }
>>>>         }
>>>> This patch was merged into kernel the ending of last year
>>>> (https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/c
>>>> om
>>>> mi
>>>> t/?id=e7d820a5e549b3eb6c3f9467507566565646a669 )
>>> 
>>> Should we be doing a clear_cpu_cap(X86_FEATURE_MPX) in here?
>>> 
>>> This isn't major, but I can't _ever_ imagine a user being able to
>>> track down why MPX is not working from this message. Should we
>>> spruce it up somehow?
>> 
>> Maybe. If the error log "disabling some xstate features:" is changed
>> to "disabling MPX xstate features:", do you think it is OK?
> 
> That's better.  Is it really disabling MPX, though?
> 
> And shouldn't we clear the cpu feature bit too?

I am not sure. I am suspecting whether this checking should be moved before xstate_enable().

Peter, what do you think of it?

Thanks,
Qiaowei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists