[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1k9Ms8EBD-KxsGWY8LxzWqLh-E6ZaemcTMeYoRKBaQUg@mail.gmail.com>
Date: Fri, 25 Sep 2020 16:08:31 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc: Christoph Hellwig <hch@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-arch <linux-arch@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH v2 0/9] ARM: remove set_fs callers and implementation
On Sat, Sep 19, 2020 at 10:19 AM Russell King - ARM Linux admin
<linux@...linux.org.uk> wrote:
>
> On Fri, Sep 18, 2020 at 02:46:15PM +0200, Arnd Bergmann wrote:
> > Hi Christoph, Russell,
> >
> > Here is an updated series for removing set_fs() from arch/arm,
> > based on the previous feedback.
> >
> > I have tested the oabi-compat changes using the LTP tests for the three
> > modified syscalls using an Armv7 kernel and a Debian 5 OABI user space,
> > and I have lightly tested the get_kernel_nofault infrastructure by
> > loading the test_lockup.ko module after setting CONFIG_DEBUG_SPINLOCK.
>
> I'm not too keen on always saving the syscall number, but for the gain
> of getting rid of set_fs() I think it's worth it. However...
>
> I think there are some things to check - what value do you end up
> with as the first number in /proc/self/syscall when you do:
>
> strace cat /proc/self/syscall
>
> ?
> It should be 3, not 0x900003. I suspect you're getting the latter
> with these changes. IIRC, task_thread_info(task)->syscall needs to
> be the value _without_ the offset, otherwise tracing will break.
It seems broken in different ways, depending on the combination
of kernel and userland:
1. EABI armv5-versatile kernel, EABI Debian 5:
$ cat /proc/self/syscall
0 0x1500000000003 0x1500000000400 0x1500000000400 0x60000013c7800480
0xc0008668c0112f8c 0xc0112d14c68e1f68 0xbeab06f8 0xb6e80d4c
$ strace -f cat /proc/self/syscall
execve("/bin/cat", ["cat", "/proc/self/syscall"], [/* 16 vars */]) =
-1 EINTR (Interrupted system call)
dup(2) = -1 EINTR (Interrupted system call)
write(2, "strace: exec: Interrupted system "..., 38) = -1 EINTR
(Interrupted system call)
exit_group(1) = ?
2. EABI kernel, OABI Debian 5:
$ cat /proc/self/syscall
3 0x1500000000003 0x13ccc00000400 0x1500000000400 0x60000013c7800480
0xc0008de0c0112f8c 0xc0112d14c7313f68 0xbeed27d0 0xb6eab324
$ strace cat /proc/self/syscall
execve("/bin/cat", ["cat", "/proc/self/syscall"], [/* 16 vars */]) = -1090648236
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL +++
3. OABI kernel, OABI Debian 5:
cat /proc/self/syscall
9437187 0x1500000000003 0x13ccc00000400 0x1500000000400 0x100060000013
0x15000c72cff6c 0xc72cfe9000000000 0xbece27d0 0xb6f2f324
$ strace cat /proc/self/syscall
execve("/bin/cat", ["cat", "/proc/self/syscall"], [/* 16 vars */]) = -1095141548
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL +++
I suspect the OABI strace in Debian is broken since it crashes on
both kernels. I'll look into fixing the output without strace first then.
Arnd
Powered by blists - more mailing lists