All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: uClinux development list <uclinux-dev@uclinux.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [uClinux-dev] [PATCH] m68knommu : Fix strace support for 68328/68360
Date: Thu, 19 Aug 2010 13:04:20 +1000	[thread overview]
Message-ID: <4C6C9F34.8010207@snapgear.com> (raw)
In-Reply-To: <20100817165829.GA17086@frolo.macqel>


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

  reply	other threads:[~2010-08-19  3:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 16:58 [PATCH] m68knommu : Fix strace support for 68328/68360 Philippe De Muyter
2010-08-19  3:04 ` Greg Ungerer [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6C9F34.8010207@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dev@uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.