mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Burton <paul.burton@mips.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <pburton@wavecomp.com>,
	James Hogan <jhogan@kernel.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Aurelien Jarno <aurelien@aurel32.net>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>
Subject: Re: [PATCH] MIPS: scall64-o32: Fix indirect syscall number load
Date: Mon, 15 Apr 2019 17:36:58 +0000	[thread overview]
Message-ID: <MWHPR2201MB12779DF3BC8AEC1203A65065C12B0@MWHPR2201MB1277.namprd22.prod.outlook.com> (raw)
In-Reply-To: <20190409145355.25842-1-aurelien@aurel32.net>

Hello,

Aurelien Jarno wrote:
> Commit 4c21b8fd8f14 (MIPS: seccomp: Handle indirect system calls (o32))
> added indirect syscall detection for O32 processes running on MIPS64,
> but it did not work correctly for big endian kernel/processes. The
> reason is that the syscall number is loaded from ARG1 using the lw
> instruction while this is a 64-bit value, so zero is loaded instead of
> the syscall number.
> 
> Fix the code by using the ld instruction instead. When running a 32-bit
> processes on a 64 bit CPU, the values are properly sign-extended, so it
> ensures the value passed to syscall_trace_enter is correct.
> 
> Recent systemd versions with seccomp enabled whitelist the getpid
> syscall for their internal  processes (e.g. systemd-journald), but call
> it through syscall(SYS_getpid). This fix therefore allows O32 big endian
> systems with a 64-bit kernel to run recent systemd versions.
> 
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> Cc: <stable@vger.kernel.org> # v3.15+
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

      parent reply	other threads:[~2019-04-15 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 14:53 Aurelien Jarno
2019-04-14 20:31 ` Philippe Mathieu-Daudé
2019-04-15 17:36 ` Paul Burton [this message]

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=MWHPR2201MB12779DF3BC8AEC1203A65065C12B0@MWHPR2201MB1277.namprd22.prod.outlook.com \
    --to=paul.burton@mips.com \
    --cc=aurelien@aurel32.net \
    --cc=jhogan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=pburton@wavecomp.com \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®