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] [day] [month] [year] [list]
Message-ID: <44BD3EBA.5010002@goop.org>
Date:	Tue, 18 Jul 2006 13:04:10 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Arjan van de Ven <arjan@...radead.org>
CC:	Chris Wright <chrisw@...s-sol.org>, linux-kernel@...r.kernel.org,
	virtualization@...ts.osdl.org, xen-devel@...ts.xensource.com,
	Andi Kleen <ak@...e.de>, Andrew Morton <akpm@...l.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Zachary Amsden <zach@...are.com>,
	Ian Pratt <ian.pratt@...source.com>,
	Christian Limpach <Christian.Limpach@...cam.ac.uk>,
	Jeremy Fitzhardinge <jeremy@...source.com>
Subject: Re: [RFC PATCH 16/33] Add support for Xen to entry.S.

Arjan van de Ven wrote:
> On Tue, 2006-07-18 at 00:00 -0700, Chris Wright wrote:
>   
>> +#ifndef CONFIG_XEN
>>  	movl %cr0, %eax
>>  	testl $0x4, %eax		# EM (math emulation bit)
>> -	jne device_not_available_emulate
>> -	preempt_stop
>> -	call math_state_restore
>> -	jmp ret_from_exception
>> -device_not_available_emulate:
>> +	je device_available_emulate
>>  	pushl $0			# temporary storage for ORIG_EIP
>>  	CFI_ADJUST_CFA_OFFSET 4
>>  	call math_emulate
>>  	addl $4, %esp
>>  	CFI_ADJUST_CFA_OFFSET -4
>> +	jmp ret_from_exception
>> +device_available_emulate:
>> +#endif
>>     
>
>
> Hi,
>
> can you explain what this chunk is for? It appears to be for the non-xen
> case due to the ifndef, yet it seems to visibly change the code for
> that... that deserves an explanation for sure ...
>   

This inverts the logic of the test so that the lines:

	preempt_stop
	call math_state_restore
	jmp ret_from_exception

can be hoisted out of the ifdef and shared in the Xen and non-Xen cases.

    J

-
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