* Re: [uClinux-dev] [PATCH] m68knommu : Fix strace support for 68328/68360
2010-08-17 15:11 Philippe De Muyter
@ 2010-08-17 15:14 ` Mike Frysinger
2010-08-17 15:39 ` Philippe De Muyter
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-08-17 15:14 UTC (permalink / raw)
To: uClinux development list; +Cc: linux-kernel
On Tue, Aug 17, 2010 at 11:11 AM, Philippe De Muyter wrote:
> do_trace:
> - movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/
> + movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/
> subql #4,%sp
>
> -1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */
> +1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */
> subql #4,%sp /* dummy return address */
> /* save top of frame*/
> - pea %sp@
> - jbsr set_esp0
> - addql #4,%sp
> + pea %sp@
> + jbsr set_esp0
> + addql #4,%sp
> jbsr %a0@
> - movel %d0,%sp@(PT_OFF_D0) /* save the return value*/
> + movel %d0,%sp@(PT_OFF_D0) /* save the return value*/
>
> ret_from_exception:
> - btst #5,%sp@(PT_OFF_SR) /* check if returning to kernel*/
> + btst #5,%sp@(PT_OFF_SR) /* check if returning to kernel*/
> jeq Luser_return /* if so, skip resched, signals*/
unless i'm missing something, you're only changing whitespace here.
and these account for more than half the patch. please keep
whitespace changes separate from real changes.
-mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uClinux-dev] [PATCH] m68knommu : Fix strace support for 68328/68360
2010-08-17 15:14 ` [uClinux-dev] " Mike Frysinger
@ 2010-08-17 15:39 ` Philippe De Muyter
2010-08-17 16:20 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Philippe De Muyter @ 2010-08-17 15:39 UTC (permalink / raw)
To: uClinux development list; +Cc: linux-kernel
On Tue, Aug 17, 2010 at 11:14:32AM -0400, Mike Frysinger wrote:
>
> unless i'm missing something, you're only changing whitespace here.
That's true,
> and these account for more than half the patch. please keep
> whitespace changes separate from real changes.
but that makes comparing the resulting files 68328/entry.S and 68360/entry.S
easier.
Philippe
--
Philippe De Muyter phdm at macqel dot be Tel +32 27029044
Macq Electronique SA rue de l'Aeronef 2 B-1140 Bruxelles Fax +32 27029077
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uClinux-dev] [PATCH] m68knommu : Fix strace support for 68328/68360
2010-08-17 15:39 ` Philippe De Muyter
@ 2010-08-17 16:20 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2010-08-17 16:20 UTC (permalink / raw)
To: uClinux development list; +Cc: linux-kernel
On Tue, Aug 17, 2010 at 17:39, Philippe De Muyter <phdm@macqel.be> wrote:
> On Tue, Aug 17, 2010 at 11:14:32AM -0400, Mike Frysinger wrote:
>>
>> unless i'm missing something, you're only changing whitespace here.
>
> That's true,
>
>> and these account for more than half the patch. please keep
>> whitespace changes separate from real changes.
>
> but that makes comparing the resulting files 68328/entry.S and 68360/entry.S
> easier.
Hence please create two patches:
- The first one to fix up the whitespace,
- The second one to fix the bugs.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] m68knommu : Fix strace support for 68328/68360
@ 2010-08-17 16:58 Philippe De Muyter
2010-08-19 3:04 ` [uClinux-dev] " Greg Ungerer
0 siblings, 1 reply; 5+ messages in thread
From: Philippe De Muyter @ 2010-08-17 16:58 UTC (permalink / raw)
To: linux-kernel, uclinux-dev
m68knommu : Fix strace support for 68328/68360
strace enabled is marked using the `flags' field of the `thread_info' struct.
68360 version of entry.S did test a wrong bit in a wrong structure
(task_struct).
68328 version of entry.S did test the right bit in the right structure,
but wrongly, because the `flags' field is 32 bit wide, while the used
assembler insn (btst) only accesses a 8 bit byte in memory.
Fix both using code already used in the coldfire version of entry.S
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
---
diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S
index 9d80d2c..74229f7 100644
--- a/arch/m68knommu/platform/68328/entry.S
+++ b/arch/m68knommu/platform/68328/entry.S
@@ -80,7 +80,7 @@ ENTRY(system_call)
movel %sp,%d1 /* get thread_info pointer */
andl #-THREAD_SIZE,%d1
movel %d1,%a2
- btst #TIF_SYSCALL_TRACE,%a2@(TI_FLAGS)
+ btst #(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
jne do_trace
cmpl #NR_syscalls,%d0
jcc badsys
diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S
index 6d3460a..d5ad408 100644
--- a/arch/m68knommu/platform/68360/entry.S
+++ b/arch/m68knommu/platform/68360/entry.S
@@ -71,7 +71,12 @@ ENTRY(system_call)
jbsr set_esp0
addql #4,%sp
- btst #PF_TRACESYS_BIT,%a2@(TASK_FLAGS+PF_TRACESYS_OFF)
+ movel %sp@(PT_OFF_ORIG_D0),%d0
+
+ movel %sp,%d1 /* get thread_info pointer */
+ andl #-THREAD_SIZE,%d1
+ movel %d1,%a2
+ btst #(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
jne do_trace
cmpl #NR_syscalls,%d0
jcc badsys
--
Philippe De Muyter phdm at macqel dot be Tel +32 27029044
Macq Electronique SA rue de l'Aeronef 2 B-1140 Bruxelles Fax +32 27029077
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [uClinux-dev] [PATCH] m68knommu : Fix strace support for 68328/68360
2010-08-17 16:58 [PATCH] m68knommu : Fix strace support for 68328/68360 Philippe De Muyter
@ 2010-08-19 3:04 ` Greg Ungerer
0 siblings, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2010-08-19 3:04 UTC (permalink / raw)
To: uClinux development list; +Cc: linux-kernel
Hi Philippe,
Philippe De Muyter wrote:
> m68knommu : Fix strace support for 68328/68360
>
> strace enabled is marked using the `flags' field of the `thread_info' struct.
> 68360 version of entry.S did test a wrong bit in a wrong structure
> (task_struct).
> 68328 version of entry.S did test the right bit in the right structure,
> but wrongly, because the `flags' field is 32 bit wide, while the used
> assembler insn (btst) only accesses a 8 bit byte in memory.
>
> Fix both using code already used in the coldfire version of entry.S
>
> Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Thanks. I add that to the m68knommu git tree.
Regards
Greg
> ---
> diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S
> index 9d80d2c..74229f7 100644
> --- a/arch/m68knommu/platform/68328/entry.S
> +++ b/arch/m68knommu/platform/68328/entry.S
> @@ -80,7 +80,7 @@ ENTRY(system_call)
> movel %sp,%d1 /* get thread_info pointer */
> andl #-THREAD_SIZE,%d1
> movel %d1,%a2
> - btst #TIF_SYSCALL_TRACE,%a2@(TI_FLAGS)
> + btst #(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
> jne do_trace
> cmpl #NR_syscalls,%d0
> jcc badsys
> diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S
> index 6d3460a..d5ad408 100644
> --- a/arch/m68knommu/platform/68360/entry.S
> +++ b/arch/m68knommu/platform/68360/entry.S
> @@ -71,7 +71,12 @@ ENTRY(system_call)
> jbsr set_esp0
> addql #4,%sp
>
> - btst #PF_TRACESYS_BIT,%a2@(TASK_FLAGS+PF_TRACESYS_OFF)
> + movel %sp@(PT_OFF_ORIG_D0),%d0
> +
> + movel %sp,%d1 /* get thread_info pointer */
> + andl #-THREAD_SIZE,%d1
> + movel %d1,%a2
> + btst #(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
> jne do_trace
> cmpl #NR_syscalls,%d0
> jcc badsys
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-08-19 3:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 16:58 [PATCH] m68knommu : Fix strace support for 68328/68360 Philippe De Muyter
2010-08-19 3:04 ` [uClinux-dev] " Greg Ungerer
-- strict thread matches above, loose matches on Subject: below --
2010-08-17 15:11 Philippe De Muyter
2010-08-17 15:14 ` [uClinux-dev] " Mike Frysinger
2010-08-17 15:39 ` Philippe De Muyter
2010-08-17 16:20 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox