All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Cowgill <James.Cowgill@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>, <linux-mips@linux-mips.org>
Subject: Re: [PATCH 2/2] MIPS: Remove pt_regs adjustments in indirect syscall handler
Date: Mon, 17 Jul 2017 15:27:01 +0100	[thread overview]
Message-ID: <86263466-443d-475b-a927-9df38af9f732@imgtec.com> (raw)
In-Reply-To: <20170331160959.3192-3-James.Cowgill@imgtec.com>


[-- Attachment #1.1: Type: text/plain, Size: 1067 bytes --]

On 31/03/17 17:09, James Cowgill wrote:
> If a restartable syscall is called using the indirect o32 syscall
> handler - eg: syscall(__NR_waitid, ...), then it is possible for the
> incorrect arguments to be passed to the syscall after it has been
> restarted. This is because the syscall handler tries to shift all the
> registers down one place in pt_regs so that when the syscall is restarted,
> the "real" syscall is called instead. Unfortunately it only shifts the
> arguments passed in registers, not the arguments on the user stack. This
> causes the 4th argument to be duplicated when the syscall is restarted.
> 
> Fix by removing all the pt_regs shifting so that the indirect syscall
> handler is called again when the syscall is restarted. The comment "some
> syscalls like execve get their arguments from struct pt_regs" is long
> out of date so this should now be safe.
> 
> Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>

Ping? The first patch in this series has been applied, but this patch
has not been.

Thanks,
James


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: James Cowgill <James.Cowgill@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH 2/2] MIPS: Remove pt_regs adjustments in indirect syscall handler
Date: Mon, 17 Jul 2017 15:27:01 +0100	[thread overview]
Message-ID: <86263466-443d-475b-a927-9df38af9f732@imgtec.com> (raw)
Message-ID: <20170717142701.XdBXOUtbvqS4691qjE9010UTn48y6dU6Jc7_Z4uAOeI@z> (raw)
In-Reply-To: <20170331160959.3192-3-James.Cowgill@imgtec.com>


[-- Attachment #1.1: Type: text/plain, Size: 1067 bytes --]

On 31/03/17 17:09, James Cowgill wrote:
> If a restartable syscall is called using the indirect o32 syscall
> handler - eg: syscall(__NR_waitid, ...), then it is possible for the
> incorrect arguments to be passed to the syscall after it has been
> restarted. This is because the syscall handler tries to shift all the
> registers down one place in pt_regs so that when the syscall is restarted,
> the "real" syscall is called instead. Unfortunately it only shifts the
> arguments passed in registers, not the arguments on the user stack. This
> causes the 4th argument to be duplicated when the syscall is restarted.
> 
> Fix by removing all the pt_regs shifting so that the indirect syscall
> handler is called again when the syscall is restarted. The comment "some
> syscalls like execve get their arguments from struct pt_regs" is long
> out of date so this should now be safe.
> 
> Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>

Ping? The first patch in this series has been applied, but this patch
has not been.

Thanks,
James


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-07-17 14:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 16:09 [PATCH 0/2] Fix indirect syscall handler for syscalls with > 4 args James Cowgill
2017-03-31 16:09 ` James Cowgill
2017-03-31 16:09 ` [PATCH 1/2] MIPS: opt into HAVE_COPY_THREAD_TLS James Cowgill
2017-03-31 16:09   ` James Cowgill
2017-04-10 11:19   ` Ralf Baechle
2017-03-31 16:09 ` [PATCH 2/2] MIPS: Remove pt_regs adjustments in indirect syscall handler James Cowgill
2017-03-31 16:09   ` James Cowgill
2017-07-17 14:27   ` James Cowgill [this message]
2017-07-17 14:27     ` James Cowgill
2017-07-28 14:03   ` James Hogan
2017-07-28 14:03     ` James Hogan

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=86263466-443d-475b-a927-9df38af9f732@imgtec.com \
    --to=james.cowgill@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@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 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.