From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid
Date: Thu, 12 Apr 2018 15:49:28 +0300 [thread overview]
Message-ID: <20180412124928.GA29458@altlinux.org> (raw)
In-Reply-To: <20180412121949.GD16141@n2100.armlinux.org.uk>
[-- Attachment #1: Type: text/plain, Size: 3569 bytes --]
On Thu, Apr 12, 2018 at 01:19:49PM +0100, Russell King - ARM Linux wrote:
> On Thu, Apr 12, 2018 at 02:03:14PM +0300, Dmitry V. Levin wrote:
> > On Thu, Apr 12, 2018 at 10:58:11AM +0100, Russell King - ARM Linux wrote:
> > > On Thu, Apr 12, 2018 at 04:34:35AM +0300, Dmitry V. Levin wrote:
> > > > A similar commit v4.16-rc1~159^2~37
> > > > ("signal/arm: Document conflicts with SI_USER and SIGFPE") must have
> > > > introduced a similar ABI regression to compat arm.
> > >
> > > So, could you explain how can this change cause a regression?
> > >
> > > +#define FPE_FIXME 0
> > > - vfp_raise_sigfpe(0, regs);
> > > + vfp_raise_sigfpe(FPE_FIXME, regs);
> >
> > No, this hunk hasn't caused the regression, but another one did:
> >
> > diff --git a/arch/arm/include/uapi/asm/siginfo.h b/arch/arm/include/uapi/asm/siginfo.h
> > new file mode 100644
> > index 0000000..d051388
> > --- /dev/null
> > +++ b/arch/arm/include/uapi/asm/siginfo.h
> > @@ -0,0 +1,13 @@
> > +#ifndef __ASM_SIGINFO_H
> > +#define __ASM_SIGINFO_H
> > +
> > +#include <asm-generic/siginfo.h>
> > +
> > +/*
> > + * SIGFPE si_codes
> > + */
> > +#ifdef __KERNEL__
> > +#define FPE_FIXME 0 /* Broken dup of SI_USER */
> > +#endif /* __KERNEL__ */
> > +
> > +#endif
> >
> > This is due to FPE_FIXME handling in kernel/signal.c
>
> Building strace 4.22 on ARM and running the test suite reveals no
> problems with the signal_receive test, tested on both 4.14 and 4.16
> kernels - there's no "KERNEL BUG" reports in any of the test results.
https://build.opensuse.org/public/build/home:ldv_alt/openSUSE_Factory_ARM/armv7l/strace/_log
- the test just fails there with
[ 50s] + uname -a
[ 50s] Linux armbuild01 4.16.0-1-lpae #1 SMP PREEMPT Wed Apr 4 13:35:56 UTC 2018 (e16f96d) armv7l armv7l armv7l GNU/Linux
...
[ 570s] FAIL: signal_receive.gen
[ 570s] ---- SIGFPE {si_signo=SIGFPE, si_code=SI_USER, si_pid=25332, si_uid=399} ---
[ 570s] +--- SIGFPE {si_signo=SIGFPE, si_code=SI_USER, si_pid=25332, si_uid=0} ---
[ 570s] signal_receive.gen.test: failed test: ../../strace -a16 -e trace=kill ../signal_receive output mismatch
> However, stock strace 4.22 source doesn't appear to contain the
> "KERNEL BUG" string anywhere, so this may be a Suse specific addition
> to the test:
The "KERNEL BUG" diagnostics I was talking about was added to strace yesterday
as a part of workaround commit, see
https://github.com/strace/strace/commit/34c7794cc16e2511eda7b1d5767c655a83b17309
Before that change the test just failed.
[...]
> Any ideas where the "KERNEL BUG" in Suse builds is coming from?
strace developers use OBS to test strace.git for regressions.
The build environment is provided by OBS, all the rest comes from strace.git.
> Any ideas how to test it on other architectures (iow, where can we get
> source that contains this test?)
Just use master branch of https://github.com/strace/strace
or https://gitlab.com/strace/strace (they are the same).
> Based on previous experience, unfortunately folk don't tend to report
> user ABI regressions to kernel developers, so we'd probably never know
> that there's a problem - I do think the safer thing would've been to
> leave it well alone, and just accept that we'll end up copying more
> words to userspace than is actually intended.
Well, these changes caused visible regressions in strace test suite on arm, ppc,
and sparc - this is the reason why I have reported them to kernel developers.
--
ldv
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2018-04-12 12:49 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 15:22 ppc compat v4.16 regression: sending SIGTRAP or SIGFPE via kill() returns wrong values in si_pid and si_uid Dmitry V. Levin
2018-04-12 1:34 ` sparc/ppc/arm compat siginfo ABI regressions: sending " Dmitry V. Levin
2018-04-12 1:45 ` Linus Torvalds
2018-04-12 9:58 ` Russell King - ARM Linux
2018-04-12 11:03 ` Dmitry V. Levin
2018-04-12 12:19 ` Russell King - ARM Linux
2018-04-12 12:49 ` Dmitry V. Levin [this message]
2018-04-12 13:14 ` Russell King - ARM Linux
2018-04-12 16:50 ` Linus Torvalds
2018-04-12 17:20 ` Russell King - ARM Linux
2018-04-12 17:22 ` Linus Torvalds
2018-04-13 9:42 ` Russell King - ARM Linux
2018-04-13 16:33 ` Linus Torvalds
2018-04-13 17:08 ` Dave Martin
2018-04-13 17:54 ` Russell King - ARM Linux
2018-04-13 18:23 ` Linus Torvalds
2018-04-13 18:45 ` Dave Martin
2018-04-13 19:53 ` Linus Torvalds
2018-04-15 13:12 ` Russell King - ARM Linux
2018-04-15 15:22 ` Eric W. Biederman
2018-04-15 15:56 ` [RFC PATCH 0/3] Dealing with the aliases of SI_USER Eric W. Biederman
2018-04-15 15:57 ` [RFC PATCH 1/3] signal: Ensure every siginfo we send has all bits initialized Eric W. Biederman
2018-04-17 13:23 ` Dave Martin
2018-04-17 19:37 ` Eric W. Biederman
2018-04-18 12:47 ` Dave Martin
2018-04-18 14:22 ` Eric W. Biederman
2018-04-19 8:26 ` Dave Martin
2018-04-15 15:58 ` [RFC PATCH 2/3] signal: Reduce copy_siginfo_to_user to just copy_to_user Eric W. Biederman
2018-04-15 15:59 ` [RFC PATCH 3/3] signal: Stop special casing TRAP_FIXME and FPE_FIXME in siginfo_layout Eric W. Biederman
2018-04-15 18:16 ` [RFC PATCH 0/3] Dealing with the aliases of SI_USER Linus Torvalds
2018-04-16 2:03 ` Eric W. Biederman
2018-04-18 17:58 ` Eric W. Biederman
2018-04-19 9:28 ` Dave Martin
2018-04-19 14:40 ` Eric W. Biederman
2018-04-13 18:35 ` sparc/ppc/arm compat siginfo ABI regressions: sending SIGFPE via kill() returns wrong values in si_pid and si_uid Dave Martin
2018-04-13 18:50 ` Russell King - ARM Linux
2018-04-13 18:56 ` Dave Martin
2018-04-12 17:35 ` Dmitry V. Levin
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=20180412124928.GA29458@altlinux.org \
--to=ldv@altlinux.org \
--cc=ebiederm@xmission.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sparclinux@vger.kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).