Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: linux-mips <linux-mips@linux-mips.org>
Cc: "Malov, Vlad" <Vlad.Malov@caviumnetworks.com>
Subject: Re: [PATCH] MIPS: Check the range of the syscall number for o32 syscall on 64bit kernel.
Date: Thu, 30 Oct 2008 17:47:46 -0700	[thread overview]
Message-ID: <490A55B2.5080300@caviumnetworks.com> (raw)
In-Reply-To: <490A4D3F.10700@caviumnetworks.com>

David Daney wrote:
[...]
> diff --git a/arch/mips/kernel/scall64-o32.S 
> b/arch/mips/kernel/scall64-o32.S
> index 6c7ef83..d8b3cb1 100644
> --- a/arch/mips/kernel/scall64-o32.S
> +++ b/arch/mips/kernel/scall64-o32.S
> @@ -174,14 +174,14 @@ not_o32_scall:
>     END(handle_sys)
> 
> LEAF(sys32_syscall)
> -    sltu    v0, a0, __NR_O32_Linux + __NR_O32_Linux_syscalls + 1
> +    .set    noreorder
> +    subu    t0, a0, __NR_O32_Linux    # check syscall number
> +    beqz    t0, einval        # do not recurse
> +    sltu    v0, t0, __NR_O32_Linux_syscalls + 1
> +    dsll    t1, t0, 3
>     beqz    v0, einval
> -
> -    dsll    v0, a0, 3
> -    ld    t2, (sys_call_table - (__NR_O32_Linux * 8))(v0)
> -
> -    li    v1, 4000        # indirect syscall number
> -    beq    a0, v1, einval        # do not recurse
> +    .set    reorder
> +    lw    t2, sys_call_table(t1)        # syscall routine
> 

        ^^^ Clearly that should be ld not lw.  Not sure how that slipped 
in, Vlad's original patch had it correct.  Re-testing...


David Daney

  reply	other threads:[~2008-10-31  0:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31  0:11 [PATCH] MIPS: Check the range of the syscall number for o32 syscall on 64bit kernel David Daney
2008-10-31  0:47 ` David Daney [this message]
2008-10-31 14:17 ` Maciej W. Rozycki

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=490A55B2.5080300@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=Vlad.Malov@caviumnetworks.com \
    --cc=linux-mips@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox