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:	Wed, 16 Oct 2013 10:13:13 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Jan Beulich <JBeulich@...e.com>
CC:	mingo@...e.hu, tglx@...utronix.de,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH, RFC] x86-64: properly handle FPU code/data selectors

On 10/16/2013 09:07 AM, Jan Beulich wrote:
> 
>> Furthermore, you define X86_FEATURE_NO_FPU_SEL, but you don't set it
>> anywhere.  At least that bit needs to be factored out into a separate patch.
> 
> That's already being done in get_cpu_cap(), as it's part of
> x86_capability[9].
> 

Ah, sorry, my bad.  For some reason I thought you added it to word 3,
but this is a hardware-provided CPUID bit.  I, if anyone, should have
known :)

>> +	if (config_enabled(CONFIG_IA32_EMULATION) &&
>> +	    test_tsk_thread_flag(tsk, TIF_IA32))
>>
>> is_ia32_task()?
> 
> That'd imply that "tsk == current" in all cases, which I don't
> think is right here.

True.  It wold be good to have an equivalent predicate function for
another task, though.

This assumes the process doesn't switch modes on us, which it is allowed
to do.  For that it really would be better to look at the CS.L bit,
which can be done with the LAR instruction for the current task;
otherwise we'd have to walk the descriptor tables.

	-hpa

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ