From: Al Viro <viro@zeniv.linux.org.uk>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
the arch/x86 maintainers <x86@kernel.org>,
linux-mips@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCHSET] saner elf compat
Date: Tue, 22 Dec 2020 20:04:31 +0000 [thread overview]
Message-ID: <20201222200431.GT3579531@ZenIV.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.21.2012160924010.2104409@eddie.linux-mips.org>
On Wed, Dec 16, 2020 at 09:44:53AM +0000, Maciej W. Rozycki wrote:
> On Wed, 16 Dec 2020, Al Viro wrote:
>
> > > It may be worth pushing through GDB's gdb.threads/tls-core.exp test case,
> > > making sure no UNSUPPORTED results have been produced due to resource
> > > limits preventing a core from being dumped (and no FAILs, of course), with
> > > o32/n32 native GDB. This should guarantee our output is still as expected
> > > by an interpreter. Sadly I'm currently not set up for such testing though
> > > eventually I mean to.
> >
> > Umm... What triple does one use for n32 gdb?
>
> I don't think there's a standardised one, just configure with CC/CXX set
> for n32 compilation, e.g.:
>
> $ /path/to/configure CC="gcc -mabi=n32" CXX="g++ -mabi=n32"
>
> (and any other options set as usually). This has to be with CC/CXX rather
> than CFLAGS/CXXFLAGS so that it is guaranteed to be never overridden with
> any logic that might do any fiddling with compilation options. This will
> set up the test suite accordingly.
>
> NB this may already be the compiler's default, depending on how it was
> configured, i.e. if `--with-abi=n32' was used, in which case no extra
> options will be required. I don't know if any standard MIPS distribution
> does it though; 64-bit MIPS/Debian might. This will be reported with `gcc
> --help -v', somewhere along the way.
>
> Let me know if there are issues with this approach.
FWIW, on debian/mips64el (both stretch and buster) the test fails with the
distro kernels (4.9- and 4.19-based) as well as with 5.10-rc1 and
5.10-rc1+that series, all in the same way:
[Current thread is 1 (LWP 4154)]
(gdb) p/x foo
Cannot find thread-local storage for LWP 4154, executable file <pathname>
Cannot find thread-local variables on this target
buster has libc6-2.28, so that should be fine for the test in question
(libthread_db definitely recent enough). That was n32 gdb; considering
how much time it had taken to build that sucker I hadn't tried o32
yet.
Note that it's not just with native coredumps - gcore-produced ones give
the same result. That was gdb from binutils-gdb.git; I'm not familiar
with gdb guts to start debugging it, so if you have any suggestions
in that direction that do not include a full rebuild... In any case,
I won't get around to that until the next week.
Incidentally, build time is bloody awful - 3 days, with qemu-3.1 on
3.5GHz amd64 host, all spent pretty much entirely in userland (both
from guest and host POV). g++-8 is atrociously slow...
That said, I don't see what in that series could possibly mess the
things up for tls, while leaving the registers working; the only
thing that realistically might've been fucked up is prstatus layout
(and possibly size), and that would've screwed the registers as
well.
next prev parent reply other threads:[~2020-12-22 20:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 21:45 [PATCHSET] saner elf compat Al Viro
2020-12-03 21:46 ` [PATCH 01/10] binfmt_elf: partially sanitize PRSTATUS_SIZE and SET_PR_FPVALID Al Viro
2020-12-03 21:46 ` [PATCH 02/10] elf_prstatus: collect the common part (everything before pr_reg) into a struct Al Viro
2020-12-03 21:46 ` [PATCH 03/10] [elfcore-compat][amd64] clean PRSTATUS_SIZE/SET_PR_FPVALID up properly Al Viro
2020-12-03 21:46 ` [PATCH 04/10] mips binfmt_elf*32.c: use elfcore-compat.h Al Viro
2020-12-03 21:46 ` [PATCH 05/10] mips: kill unused definitions in binfmt_elf[on]32.c Al Viro
2020-12-03 21:46 ` [PATCH 06/10] mips: KVM_GUEST makes no sense for 64bit builds Al Viro
2020-12-03 21:46 ` [PATCH 07/10] mips compat: don't bother with ELF_ET_DYN_BASE Al Viro
2020-12-03 21:46 ` [PATCH 08/10] mips: don't bother with ELF_CORE_EFLAGS Al Viro
2020-12-03 21:46 ` [PATCH 09/10] mips compat: switch to compat_binfmt_elf.c Al Viro
2020-12-03 21:46 ` [PATCH 10/10] Kconfig: regularize selection of CONFIG_BINFMT_ELF Al Viro
2020-12-03 22:09 ` [PATCHSET] saner elf compat Linus Torvalds
2020-12-03 23:03 ` Al Viro
2020-12-06 3:23 ` Al Viro
2020-12-07 3:36 ` hpa
2020-12-07 18:01 ` Maciej W. Rozycki
2020-12-16 3:01 ` Al Viro
2020-12-16 9:44 ` Maciej W. Rozycki
2020-12-22 20:04 ` Al Viro [this message]
2020-12-22 21:38 ` Al Viro
2020-12-22 22:57 ` Al Viro
2020-12-23 7:03 ` Al Viro
2020-12-23 7:12 ` Al Viro
2020-12-24 19:44 ` [RFC][PATCH] NT_FILE/NT_SIGINFO breakage on mips compat coredumps Al Viro
2020-12-29 15:09 ` Thomas Bogendoerfer
2020-12-15 19:54 ` [PATCHSET] saner elf compat Thomas Bogendoerfer
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=20201222200431.GT3579531@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=rdunlap@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=tsbogend@alpha.franken.de \
--cc=x86@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