public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86-64: invalidate sysenter
@ 2005-05-06 13:16 Jan Beulich
  2005-05-06 13:43 ` H. J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2005-05-06 13:16 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]

sysenter not being supported in 64-bit mode was overlooked in the previous
cleanup rounds...

Built and tested on i686-pc-linux-gnu and x86_64-unknown-linux-gnu.

Jan

gas/testsuite/
2005-05-06  Jan Beulich  <jbeulich@novell.com>

	* x86-64-inval.s: Also check sysenter.
	* x86-64-inval.l: Adjust.

include/opcode/
2005-05-06  Jan Beulich  <jbeulich@novell.com>

	* i386.h (i386_optab): Invalidate sysenter for 64-bit mode.

--- /home/jbeulich/src/binutils/mainline/2005-05-06/gas/testsuite/gas/i386/x86-64-inval.l	2004-11-23 10:15:20.000000000 +0100
+++ 2005-05-06/gas/testsuite/gas/i386/x86-64-inval.l	2005-05-06 11:46:07.734921528 +0200
@@ -48,6 +48,7 @@
 .*:49: Error: .*
 .*:50: Error: .*
 .*:51: Error: .*
+.*:52: Error: .*
 GAS LISTING .*
 
 
@@ -102,3 +103,4 @@ GAS LISTING .*
   49 [ 	]*pushfl		# can't have 32-bit stack operands
   50 [ 	]*popfl		# can't have 32-bit stack operands
   51 [ 	]*retl		# can't have 32-bit stack operands
+  52 [ 	]*sysenter	# illegal
--- /home/jbeulich/src/binutils/mainline/2005-05-06/gas/testsuite/gas/i386/x86-64-inval.s	2004-11-23 10:13:30.000000000 +0100
+++ 2005-05-06/gas/testsuite/gas/i386/x86-64-inval.s	2005-05-06 11:46:07.735921376 +0200
@@ -49,3 +49,4 @@ foo:	jcxz foo	# No prefix exists to sele
         pushfl		# can't have 32-bit stack operands
 	popfl		# can't have 32-bit stack operands
 	retl		# can't have 32-bit stack operands
+	sysenter	# illegal
--- /home/jbeulich/src/binutils/mainline/2005-05-06/include/opcode/i386.h	2005-04-19 08:42:12.000000000 +0200
+++ 2005-05-06/include/opcode/i386.h	2005-05-06 11:46:07.741920464 +0200
@@ -912,7 +914,7 @@ static const template i386_optab[] =
 {"cmpxchg8b",1,0x0fc7, 1, Cpu586, q_Suf|Modrm,		{ LLongMem, 0, 0} },
 
 /* Pentium II/Pentium Pro extensions.  */
-{"sysenter",0, 0x0f34, X, Cpu686, NoSuf,		{ 0, 0, 0} },
+{"sysenter",0, 0x0f34, X, Cpu686|CpuNo64, NoSuf,	{ 0, 0, 0} },
 {"sysexit", 0, 0x0f35, X, Cpu686, NoSuf,		{ 0, 0, 0} },
 {"fxsave",  1, 0x0fae, 0, Cpu686, q_Suf|Modrm,		{ LLongMem, 0, 0} },
 {"fxrstor", 1, 0x0fae, 1, Cpu686, q_Suf|Modrm,		{ LLongMem, 0, 0} },



[-- Attachment #2: binutils-mainline-x86_64-sysenter.patch --]
[-- Type: text/plain, Size: 2081 bytes --]

sysenter not being supported in 64-bit mode was overlooked in the previous
cleanup rounds...

Built and tested on i686-pc-linux-gnu and x86_64-unknown-linux-gnu.

Jan

gas/testsuite/
2005-05-06  Jan Beulich  <jbeulich@novell.com>

	* x86-64-inval.s: Also check sysenter.
	* x86-64-inval.l: Adjust.

include/opcode/
2005-05-06  Jan Beulich  <jbeulich@novell.com>

	* i386.h (i386_optab): Invalidate sysenter for 64-bit mode.

--- /home/jbeulich/src/binutils/mainline/2005-05-06/gas/testsuite/gas/i386/x86-64-inval.l	2004-11-23 10:15:20.000000000 +0100
+++ 2005-05-06/gas/testsuite/gas/i386/x86-64-inval.l	2005-05-06 11:46:07.734921528 +0200
@@ -48,6 +48,7 @@
 .*:49: Error: .*
 .*:50: Error: .*
 .*:51: Error: .*
+.*:52: Error: .*
 GAS LISTING .*
 
 
@@ -102,3 +103,4 @@ GAS LISTING .*
   49 [ 	]*pushfl		# can't have 32-bit stack operands
   50 [ 	]*popfl		# can't have 32-bit stack operands
   51 [ 	]*retl		# can't have 32-bit stack operands
+  52 [ 	]*sysenter	# illegal
--- /home/jbeulich/src/binutils/mainline/2005-05-06/gas/testsuite/gas/i386/x86-64-inval.s	2004-11-23 10:13:30.000000000 +0100
+++ 2005-05-06/gas/testsuite/gas/i386/x86-64-inval.s	2005-05-06 11:46:07.735921376 +0200
@@ -49,3 +49,4 @@ foo:	jcxz foo	# No prefix exists to sele
         pushfl		# can't have 32-bit stack operands
 	popfl		# can't have 32-bit stack operands
 	retl		# can't have 32-bit stack operands
+	sysenter	# illegal
--- /home/jbeulich/src/binutils/mainline/2005-05-06/include/opcode/i386.h	2005-04-19 08:42:12.000000000 +0200
+++ 2005-05-06/include/opcode/i386.h	2005-05-06 11:46:07.741920464 +0200
@@ -912,7 +914,7 @@ static const template i386_optab[] =
 {"cmpxchg8b",1,0x0fc7, 1, Cpu586, q_Suf|Modrm,		{ LLongMem, 0, 0} },
 
 /* Pentium II/Pentium Pro extensions.  */
-{"sysenter",0, 0x0f34, X, Cpu686, NoSuf,		{ 0, 0, 0} },
+{"sysenter",0, 0x0f34, X, Cpu686|CpuNo64, NoSuf,	{ 0, 0, 0} },
 {"sysexit", 0, 0x0f35, X, Cpu686, NoSuf,		{ 0, 0, 0} },
 {"fxsave",  1, 0x0fae, 0, Cpu686, q_Suf|Modrm,		{ LLongMem, 0, 0} },
 {"fxrstor", 1, 0x0fae, 1, Cpu686, q_Suf|Modrm,		{ LLongMem, 0, 0} },

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86-64: invalidate sysenter
  2005-05-06 13:16 [PATCH] x86-64: invalidate sysenter Jan Beulich
@ 2005-05-06 13:43 ` H. J. Lu
  2005-05-06 14:57   ` H. J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: H. J. Lu @ 2005-05-06 13:43 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Fri, May 06, 2005 at 02:04:43PM +0200, Jan Beulich wrote:
> sysenter not being supported in 64-bit mode was overlooked in the previous
> cleanup rounds...
> 

I will doublc check if sysenter is supported on EM64T.


H.J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86-64: invalidate sysenter
  2005-05-06 13:43 ` H. J. Lu
@ 2005-05-06 14:57   ` H. J. Lu
  0 siblings, 0 replies; 8+ messages in thread
From: H. J. Lu @ 2005-05-06 14:57 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Fri, May 06, 2005 at 06:35:50AM -0700, H. J. Lu wrote:
> On Fri, May 06, 2005 at 02:04:43PM +0200, Jan Beulich wrote:
> > sysenter not being supported in 64-bit mode was overlooked in the previous
> > cleanup rounds...
> > 
> 
> I will doublc check if sysenter is supported on EM64T.
> 

sysenter is supported on EM64T. Don't apply it.


H.J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86-64: invalidate sysenter
@ 2005-05-12  6:37 Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2005-05-12  6:37 UTC (permalink / raw)
  To: hjl; +Cc: binutils

>>> "H. J. Lu" <hjl@lucon.org> 12.05.05 00:57:38 >>>
>On Fri, May 06, 2005 at 06:15:00PM +0200, Jan Beulich wrote:
>> >> >sysenter is supported on EM64T. Don't apply it.
>> >> 
>> >> It can't (in 64-bit more) because it doesn't add new MSRs to support that...
>> >> 
>> >
>> >It is documented in EM64T manual. Are you saying the manual is
>> >wrong?
>> 
>> I suppose so (there are very many inconsistencies in these manuals).
>> 
>
>I checked with our people. sysenter is valid instruction in 64bit
>mode on EM64T although today's Linux doesn't support it for system
>calls.
>
>Please don't apply the patch.

Would you mind sharing how this is supposed to work? As said before, there must be at least one new MSR to actually support this, and there's none documented.

Thanks, Jan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86-64: invalidate sysenter
       [not found] <s27ba5ee.016@emea1-mh.id2.novell.com>
@ 2005-05-11 23:01 ` H. J. Lu
  0 siblings, 0 replies; 8+ messages in thread
From: H. J. Lu @ 2005-05-11 23:01 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Fri, May 06, 2005 at 06:15:00PM +0200, Jan Beulich wrote:
> >> >sysenter is supported on EM64T. Don't apply it.
> >> 
> >> It can't (in 64-bit more) because it doesn't add new MSRs to support that...
> >> 
> >
> >It is documented in EM64T manual. Are you saying the manual is
> >wrong?
> 
> I suppose so (there are very many inconsistencies in these manuals).
> 

I checked with our people. sysenter is valid instruction in 64bit
mode on EM64T although today's Linux doesn't support it for system
calls.

Please don't apply the patch.


H.J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86-64: invalidate sysenter
@ 2005-05-06 16:32 Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2005-05-06 16:32 UTC (permalink / raw)
  To: hjl; +Cc: binutils

>> >sysenter is supported on EM64T. Don't apply it.
>> 
>> It can't (in 64-bit more) because it doesn't add new MSRs to support that...
>> 
>
>It is documented in EM64T manual. Are you saying the manual is
>wrong?

I suppose so (there are very many inconsistencies in these manuals).

Jan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86-64: invalidate sysenter
       [not found] <s27ba3cd.063@emea1-mh.id2.novell.com>
@ 2005-05-06 16:10 ` H. J. Lu
  0 siblings, 0 replies; 8+ messages in thread
From: H. J. Lu @ 2005-05-06 16:10 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Fri, May 06, 2005 at 06:05:53PM +0200, Jan Beulich wrote:
> >>> "H. J. Lu" <hjl@lucon.org> 06.05.05 16:56:12 >>>
> >On Fri, May 06, 2005 at 06:35:50AM -0700, H. J. Lu wrote:
> >> On Fri, May 06, 2005 at 02:04:43PM +0200, Jan Beulich wrote:
> >> > sysenter not being supported in 64-bit mode was overlooked in the previous
> >> > cleanup rounds...
> >> > 
> >> 
> >> I will doublc check if sysenter is supported on EM64T.
> >> 
> >
> >sysenter is supported on EM64T. Don't apply it.
> 
> It can't (in 64-bit more) because it doesn't add new MSRs to support that...
> 

It is documented in EM64T manual. Are you saying the manual is
wrong?


H.J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86-64: invalidate sysenter
@ 2005-05-06 16:08 Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2005-05-06 16:08 UTC (permalink / raw)
  To: hjl; +Cc: binutils

>>> "H. J. Lu" <hjl@lucon.org> 06.05.05 16:56:12 >>>
>On Fri, May 06, 2005 at 06:35:50AM -0700, H. J. Lu wrote:
>> On Fri, May 06, 2005 at 02:04:43PM +0200, Jan Beulich wrote:
>> > sysenter not being supported in 64-bit mode was overlooked in the previous
>> > cleanup rounds...
>> > 
>> 
>> I will doublc check if sysenter is supported on EM64T.
>> 
>
>sysenter is supported on EM64T. Don't apply it.

It can't (in 64-bit more) because it doesn't add new MSRs to support that...

Jan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-05-12  6:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-06 13:16 [PATCH] x86-64: invalidate sysenter Jan Beulich
2005-05-06 13:43 ` H. J. Lu
2005-05-06 14:57   ` H. J. Lu
2005-05-06 16:08 Jan Beulich
     [not found] <s27ba3cd.063@emea1-mh.id2.novell.com>
2005-05-06 16:10 ` H. J. Lu
2005-05-06 16:32 Jan Beulich
     [not found] <s27ba5ee.016@emea1-mh.id2.novell.com>
2005-05-11 23:01 ` H. J. Lu
2005-05-12  6:37 Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).