public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] x86: entry_32.S fix compiling warnings
@ 2009-03-14  6:38 Jaswinder Singh Rajput
  2009-03-14  7:14 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jaswinder Singh Rajput @ 2009-03-14  6:38 UTC (permalink / raw)
  To: Ingo Molnar, Frederic Weisbecker, Steven Rostedt, H. Peter Anvin,
	x86 maintainers, LKML

Hello Ingo,

Are these looks OK to you:

Subject: [PATCH] x86: entry_32.S fix compiling warnings

Fixed:
 arch/x86/kernel/entry_32.S:446: Warning: 00000000080001d1 shortened to 00000000000001d1
 arch/x86/kernel/entry_32.S:457: Warning: 000000000800feff shortened to 000000000000feff
 arch/x86/kernel/entry_32.S:527: Warning: 00000000080001d1 shortened to 00000000000001d1
 arch/x86/kernel/entry_32.S:541: Warning: 000000000800feff shortened to 000000000000feff
 arch/x86/kernel/entry_32.S:676: Warning: 0000000008000091 shortened to 0000000000000091

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/kernel/entry_32.S |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 899e893..82cf555 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -442,8 +442,7 @@ sysenter_past_esp:
 
 	GET_THREAD_INFO(%ebp)
 
-	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
-	testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
+	testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
 	jnz sysenter_audit
 sysenter_do_call:
 	cmpl $(nr_syscalls), %eax
@@ -454,7 +453,7 @@ sysenter_do_call:
 	DISABLE_INTERRUPTS(CLBR_ANY)
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $_TIF_ALLWORK_MASK, %cx
+	testl $_TIF_ALLWORK_MASK, %ecx
 	jne sysexit_audit
 sysenter_exit:
 /* if something modifies registers it must also disable sysexit */
@@ -468,7 +467,7 @@ sysenter_exit:
 
 #ifdef CONFIG_AUDITSYSCALL
 sysenter_audit:
-	testw $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
+	testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
 	jnz syscall_trace_entry
 	addl $4,%esp
 	CFI_ADJUST_CFA_OFFSET -4
@@ -485,7 +484,7 @@ sysenter_audit:
 	jmp sysenter_do_call
 
 sysexit_audit:
-	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
+	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
 	jne syscall_exit_work
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)
@@ -498,7 +497,7 @@ sysexit_audit:
 	DISABLE_INTERRUPTS(CLBR_ANY)
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
+	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %ecx
 	jne syscall_exit_work
 	movl PT_EAX(%esp),%eax	/* reload syscall return value */
 	jmp sysenter_exit
@@ -523,8 +522,7 @@ ENTRY(system_call)
 	SAVE_ALL
 	GET_THREAD_INFO(%ebp)
 					# system call tracing in operation / emulation
-	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
-	testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
+	testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
 	jnz syscall_trace_entry
 	cmpl $(nr_syscalls), %eax
 	jae syscall_badsys
@@ -538,7 +536,7 @@ syscall_exit:
 					# between sampling and the iret
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $_TIF_ALLWORK_MASK, %cx	# current->work
+	testl $_TIF_ALLWORK_MASK, %ecx	# current->work
 	jne syscall_exit_work
 
 restore_all:
@@ -673,7 +671,7 @@ END(syscall_trace_entry)
 	# perform syscall exit tracing
 	ALIGN
 syscall_exit_work:
-	testb $_TIF_WORK_SYSCALL_EXIT, %cl
+	testl $_TIF_WORK_SYSCALL_EXIT, %ecx
 	jz work_pending
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)	# could let syscall_trace_leave() call
-- 
1.6.0.6




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

* Re: [PATCH -tip] x86: entry_32.S fix compiling warnings
  2009-03-14  6:38 [PATCH -tip] x86: entry_32.S fix compiling warnings Jaswinder Singh Rajput
@ 2009-03-14  7:14 ` Ingo Molnar
  2009-03-14  7:18 ` [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width Jaswinder Singh Rajput
  2009-03-14  8:45 ` Jaswinder Singh Rajput
  2 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2009-03-14  7:14 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Frederic Weisbecker, Steven Rostedt, H. Peter Anvin,
	x86 maintainers, LKML


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> Hello Ingo,
> 
> Are these looks OK to you:
> 
> Subject: [PATCH] x86: entry_32.S fix compiling warnings
> 
> Fixed:
>  arch/x86/kernel/entry_32.S:446: Warning: 00000000080001d1 shortened to 00000000000001d1
>  arch/x86/kernel/entry_32.S:457: Warning: 000000000800feff shortened to 000000000000feff
>  arch/x86/kernel/entry_32.S:527: Warning: 00000000080001d1 shortened to 00000000000001d1
>  arch/x86/kernel/entry_32.S:541: Warning: 000000000800feff shortened to 000000000000feff
>  arch/x86/kernel/entry_32.S:676: Warning: 0000000008000091 shortened to 0000000000000091

ah, indeed - that's TIF_SYSCALL_FTRACE.

It's in fact faster to check 32 bit mask not a 16 bit mask.

Applied, thanks.

	Ingo

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

* [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width
  2009-03-14  6:38 [PATCH -tip] x86: entry_32.S fix compiling warnings Jaswinder Singh Rajput
  2009-03-14  7:14 ` Ingo Molnar
@ 2009-03-14  7:18 ` Jaswinder Singh Rajput
  2009-03-14  8:13   ` Cyrill Gorcunov
  2009-03-14  8:45 ` Jaswinder Singh Rajput
  2 siblings, 1 reply; 6+ messages in thread
From: Jaswinder Singh Rajput @ 2009-03-14  7:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, jaswinder, jaswinderrajput, fweisbec,
	hpa, rostedt, tglx, mingo

Commit-ID:  95baa1a17ff80183317d815189fe1f12fdb653bc
Gitweb:     http://git.kernel.org/tip/95baa1a17ff80183317d815189fe1f12fdb653bc
Author:     Jaswinder Singh Rajput <jaswinder@kernel.org>
AuthorDate: Sat, 14 Mar 2009 12:08:13 +0530
Commit:     Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 14 Mar 2009 08:16:01 +0100

x86: entry_32.S fix compile warnings - fix work mask bit width

Fix:

 arch/x86/kernel/entry_32.S:446: Warning: 00000000080001d1 shortened to 00000000000001d1
 arch/x86/kernel/entry_32.S:457: Warning: 000000000800feff shortened to 000000000000feff
 arch/x86/kernel/entry_32.S:527: Warning: 00000000080001d1 shortened to 00000000000001d1
 arch/x86/kernel/entry_32.S:541: Warning: 000000000800feff shortened to 000000000000feff
 arch/x86/kernel/entry_32.S:676: Warning: 0000000008000091 shortened to 0000000000000091

TIF_SYSCALL_FTRACE is 0x08000000 and until now we checked the
first 16 bits of the work mask - bit 27 falls outside of that.

Update the entry_32.S code to check the full 32-bit mask.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "H. Peter Anvin" <hpa@kernel.org>
LKML-Reference: <1237012693.18733.3.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/kernel/entry_32.S |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 899e893..82cf555 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -442,8 +442,7 @@ sysenter_past_esp:
 
 	GET_THREAD_INFO(%ebp)
 
-	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
-	testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
+	testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
 	jnz sysenter_audit
 sysenter_do_call:
 	cmpl $(nr_syscalls), %eax
@@ -454,7 +453,7 @@ sysenter_do_call:
 	DISABLE_INTERRUPTS(CLBR_ANY)
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $_TIF_ALLWORK_MASK, %cx
+	testl $_TIF_ALLWORK_MASK, %ecx
 	jne sysexit_audit
 sysenter_exit:
 /* if something modifies registers it must also disable sysexit */
@@ -468,7 +467,7 @@ sysenter_exit:
 
 #ifdef CONFIG_AUDITSYSCALL
 sysenter_audit:
-	testw $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
+	testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
 	jnz syscall_trace_entry
 	addl $4,%esp
 	CFI_ADJUST_CFA_OFFSET -4
@@ -485,7 +484,7 @@ sysenter_audit:
 	jmp sysenter_do_call
 
 sysexit_audit:
-	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
+	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
 	jne syscall_exit_work
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)
@@ -498,7 +497,7 @@ sysexit_audit:
 	DISABLE_INTERRUPTS(CLBR_ANY)
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
+	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %ecx
 	jne syscall_exit_work
 	movl PT_EAX(%esp),%eax	/* reload syscall return value */
 	jmp sysenter_exit
@@ -523,8 +522,7 @@ ENTRY(system_call)
 	SAVE_ALL
 	GET_THREAD_INFO(%ebp)
 					# system call tracing in operation / emulation
-	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
-	testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
+	testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
 	jnz syscall_trace_entry
 	cmpl $(nr_syscalls), %eax
 	jae syscall_badsys
@@ -538,7 +536,7 @@ syscall_exit:
 					# between sampling and the iret
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $_TIF_ALLWORK_MASK, %cx	# current->work
+	testl $_TIF_ALLWORK_MASK, %ecx	# current->work
 	jne syscall_exit_work
 
 restore_all:
@@ -673,7 +671,7 @@ END(syscall_trace_entry)
 	# perform syscall exit tracing
 	ALIGN
 syscall_exit_work:
-	testb $_TIF_WORK_SYSCALL_EXIT, %cl
+	testl $_TIF_WORK_SYSCALL_EXIT, %ecx
 	jz work_pending
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)	# could let syscall_trace_leave() call

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

* Re: [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width
  2009-03-14  7:18 ` [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width Jaswinder Singh Rajput
@ 2009-03-14  8:13   ` Cyrill Gorcunov
  2009-03-14  8:29     ` Jaswinder Singh Rajput
  0 siblings, 1 reply; 6+ messages in thread
From: Cyrill Gorcunov @ 2009-03-14  8:13 UTC (permalink / raw)
  To: mingo, hpa, linux-kernel, jaswinder, jaswinderrajput, fweisbec,
	hpa, rostedt, tglx, mingo
  Cc: linux-tip-commits

[Jaswinder Singh Rajput - Sat, Mar 14, 2009 at 07:18:32AM +0000]
| Commit-ID:  95baa1a17ff80183317d815189fe1f12fdb653bc
| Gitweb:     http://git.kernel.org/tip/95baa1a17ff80183317d815189fe1f12fdb653bc
| Author:     Jaswinder Singh Rajput <jaswinder@kernel.org>
| AuthorDate: Sat, 14 Mar 2009 12:08:13 +0530
| Commit:     Ingo Molnar <mingo@elte.hu>
| CommitDate: Sat, 14 Mar 2009 08:16:01 +0100
| 
| x86: entry_32.S fix compile warnings - fix work mask bit width
| 
| Fix:
| 
|  arch/x86/kernel/entry_32.S:446: Warning: 00000000080001d1 shortened to 00000000000001d1
|  arch/x86/kernel/entry_32.S:457: Warning: 000000000800feff shortened to 000000000000feff
|  arch/x86/kernel/entry_32.S:527: Warning: 00000000080001d1 shortened to 00000000000001d1
|  arch/x86/kernel/entry_32.S:541: Warning: 000000000800feff shortened to 000000000000feff
|  arch/x86/kernel/entry_32.S:676: Warning: 0000000008000091 shortened to 0000000000000091
| 
| TIF_SYSCALL_FTRACE is 0x08000000 and until now we checked the
| first 16 bits of the work mask - bit 27 falls outside of that.
| 
| Update the entry_32.S code to check the full 32-bit mask.
| 
| Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
| Cc: Frederic Weisbecker <fweisbec@gmail.com>
| Cc: Steven Rostedt <rostedt@goodmis.org>
| Cc: "H. Peter Anvin" <hpa@kernel.org>
| LKML-Reference: <1237012693.18733.3.camel@ht.satnam>
| Signed-off-by: Ingo Molnar <mingo@elte.hu>
| 
| 
| ---
|  arch/x86/kernel/entry_32.S |   18 ++++++++----------
|  1 files changed, 8 insertions(+), 10 deletions(-)
| 
...  
|  sysexit_audit:
| -	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
| +	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
							^^^^^
Better to point ecx here? :)

	- Cyrill -

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

* Re: [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width
  2009-03-14  8:13   ` Cyrill Gorcunov
@ 2009-03-14  8:29     ` Jaswinder Singh Rajput
  0 siblings, 0 replies; 6+ messages in thread
From: Jaswinder Singh Rajput @ 2009-03-14  8:29 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: mingo, hpa, linux-kernel, jaswinderrajput, fweisbec, hpa, rostedt,
	tglx, mingo, linux-tip-commits

On Sat, 2009-03-14 at 11:13 +0300, Cyrill Gorcunov wrote:
> [Jaswinder Singh Rajput - Sat, Mar 14, 2009 at 07:18:32AM +0000]
> | Commit-ID:  95baa1a17ff80183317d815189fe1f12fdb653bc
> | Gitweb:     http://git.kernel.org/tip/95baa1a17ff80183317d815189fe1f12fdb653bc
> | Author:     Jaswinder Singh Rajput <jaswinder@kernel.org>
> | AuthorDate: Sat, 14 Mar 2009 12:08:13 +0530
> | Commit:     Ingo Molnar <mingo@elte.hu>
> | CommitDate: Sat, 14 Mar 2009 08:16:01 +0100
> | 
> | x86: entry_32.S fix compile warnings - fix work mask bit width
> | 
> | Fix:
> | 
> |  arch/x86/kernel/entry_32.S:446: Warning: 00000000080001d1 shortened to 00000000000001d1
> |  arch/x86/kernel/entry_32.S:457: Warning: 000000000800feff shortened to 000000000000feff
> |  arch/x86/kernel/entry_32.S:527: Warning: 00000000080001d1 shortened to 00000000000001d1
> |  arch/x86/kernel/entry_32.S:541: Warning: 000000000800feff shortened to 000000000000feff
> |  arch/x86/kernel/entry_32.S:676: Warning: 0000000008000091 shortened to 0000000000000091
> | 
> | TIF_SYSCALL_FTRACE is 0x08000000 and until now we checked the
> | first 16 bits of the work mask - bit 27 falls outside of that.
> | 
> | Update the entry_32.S code to check the full 32-bit mask.
> | 
> | Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> | Cc: Frederic Weisbecker <fweisbec@gmail.com>
> | Cc: Steven Rostedt <rostedt@goodmis.org>
> | Cc: "H. Peter Anvin" <hpa@kernel.org>
> | LKML-Reference: <1237012693.18733.3.camel@ht.satnam>
> | Signed-off-by: Ingo Molnar <mingo@elte.hu>
> | 
> | 
> | ---
> |  arch/x86/kernel/entry_32.S |   18 ++++++++----------
> |  1 files changed, 8 insertions(+), 10 deletions(-)
> | 
> ...  
> |  sysexit_audit:
> | -	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
> | +	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
> 							^^^^^
> Better to point ecx here? :)
> 

Thanks Cyrill :-)

Subject: [PATCH] x86: entry_32.S fix compile warnings - fix work mask bit width - v2

Replace cx with ecx

Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/kernel/entry_32.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 82cf555..c929add 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -484,7 +484,7 @@ sysenter_audit:
 	jmp sysenter_do_call
 
 sysexit_audit:
-	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
+	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %ecx
 	jne syscall_exit_work
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)
-- 
1.6.0.6




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

* [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width
  2009-03-14  6:38 [PATCH -tip] x86: entry_32.S fix compiling warnings Jaswinder Singh Rajput
  2009-03-14  7:14 ` Ingo Molnar
  2009-03-14  7:18 ` [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width Jaswinder Singh Rajput
@ 2009-03-14  8:45 ` Jaswinder Singh Rajput
  2 siblings, 0 replies; 6+ messages in thread
From: Jaswinder Singh Rajput @ 2009-03-14  8:45 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, jaswinder, jaswinderrajput, fweisbec,
	hpa, rostedt, tglx, mingo

Commit-ID:  88200bc28da38bcda1cb1bd218216e83b426d8a8
Gitweb:     http://git.kernel.org/tip/88200bc28da38bcda1cb1bd218216e83b426d8a8
Author:     Jaswinder Singh Rajput <jaswinder@kernel.org>
AuthorDate: Sat, 14 Mar 2009 12:08:13 +0530
Commit:     Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 14 Mar 2009 09:42:51 +0100

x86: entry_32.S fix compile warnings - fix work mask bit width

Fix:

 arch/x86/kernel/entry_32.S:446: Warning: 00000000080001d1 shortened to 00000000000001d1
 arch/x86/kernel/entry_32.S:457: Warning: 000000000800feff shortened to 000000000000feff
 arch/x86/kernel/entry_32.S:527: Warning: 00000000080001d1 shortened to 00000000000001d1
 arch/x86/kernel/entry_32.S:541: Warning: 000000000800feff shortened to 000000000000feff
 arch/x86/kernel/entry_32.S:676: Warning: 0000000008000091 shortened to 0000000000000091

TIF_SYSCALL_FTRACE is 0x08000000 and until now we checked the
first 16 bits of the work mask - bit 27 falls outside of that.

Update the entry_32.S code to check the full 32-bit mask.

[ %cx => %ecx fix from Cyrill Gorcunov <gorcunov@gmail.com> ]

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "H. Peter Anvin" <hpa@kernel.org>
LKML-Reference: <1237012693.18733.3.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/kernel/entry_32.S |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 899e893..c929add 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -442,8 +442,7 @@ sysenter_past_esp:
 
 	GET_THREAD_INFO(%ebp)
 
-	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
-	testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
+	testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
 	jnz sysenter_audit
 sysenter_do_call:
 	cmpl $(nr_syscalls), %eax
@@ -454,7 +453,7 @@ sysenter_do_call:
 	DISABLE_INTERRUPTS(CLBR_ANY)
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $_TIF_ALLWORK_MASK, %cx
+	testl $_TIF_ALLWORK_MASK, %ecx
 	jne sysexit_audit
 sysenter_exit:
 /* if something modifies registers it must also disable sysexit */
@@ -468,7 +467,7 @@ sysenter_exit:
 
 #ifdef CONFIG_AUDITSYSCALL
 sysenter_audit:
-	testw $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
+	testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
 	jnz syscall_trace_entry
 	addl $4,%esp
 	CFI_ADJUST_CFA_OFFSET -4
@@ -485,7 +484,7 @@ sysenter_audit:
 	jmp sysenter_do_call
 
 sysexit_audit:
-	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
+	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %ecx
 	jne syscall_exit_work
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)
@@ -498,7 +497,7 @@ sysexit_audit:
 	DISABLE_INTERRUPTS(CLBR_ANY)
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
+	testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %ecx
 	jne syscall_exit_work
 	movl PT_EAX(%esp),%eax	/* reload syscall return value */
 	jmp sysenter_exit
@@ -523,8 +522,7 @@ ENTRY(system_call)
 	SAVE_ALL
 	GET_THREAD_INFO(%ebp)
 					# system call tracing in operation / emulation
-	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
-	testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
+	testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
 	jnz syscall_trace_entry
 	cmpl $(nr_syscalls), %eax
 	jae syscall_badsys
@@ -538,7 +536,7 @@ syscall_exit:
 					# between sampling and the iret
 	TRACE_IRQS_OFF
 	movl TI_flags(%ebp), %ecx
-	testw $_TIF_ALLWORK_MASK, %cx	# current->work
+	testl $_TIF_ALLWORK_MASK, %ecx	# current->work
 	jne syscall_exit_work
 
 restore_all:
@@ -673,7 +671,7 @@ END(syscall_trace_entry)
 	# perform syscall exit tracing
 	ALIGN
 syscall_exit_work:
-	testb $_TIF_WORK_SYSCALL_EXIT, %cl
+	testl $_TIF_WORK_SYSCALL_EXIT, %ecx
 	jz work_pending
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)	# could let syscall_trace_leave() call

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

end of thread, other threads:[~2009-03-14  8:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-14  6:38 [PATCH -tip] x86: entry_32.S fix compiling warnings Jaswinder Singh Rajput
2009-03-14  7:14 ` Ingo Molnar
2009-03-14  7:18 ` [tip:tracing/syscalls] x86: entry_32.S fix compile warnings - fix work mask bit width Jaswinder Singh Rajput
2009-03-14  8:13   ` Cyrill Gorcunov
2009-03-14  8:29     ` Jaswinder Singh Rajput
2009-03-14  8:45 ` Jaswinder Singh Rajput

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox