Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5258456pxu; Tue, 22 Dec 2020 12:08:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8QWpObrQy7FPD7z7XkGlFZROVamcHriM8q+qVnnnGuPOWHD/47LjoXq8n7rJVBC6vto/B X-Received: by 2002:a50:d4d9:: with SMTP id e25mr21927262edj.243.1608667682394; Tue, 22 Dec 2020 12:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608667682; cv=none; d=google.com; s=arc-20160816; b=Ghl1eyggHP8kDw9UaWId0r9VOGWKDF98jXTy49bYhAbpTEA1Mx42Ro4LGE45ApWI6l tBPymwpdVi0/6sYis+CaJRy136rAXuKHRrQjqjqVlQ5hMy8bC31PJLKj1yRaozjvewGL xNUCG0qsjAU4ufEL2rDHiGXFI8XeWh6aSPztrX66hw8Cz4jUhKa7f6XsTlju0uL0nthg fpDNIWEbqhIM9ce/fi1ezEFVIqKoKfCMTk9PgkFOgRiUYlEohSls1GTVAkRmMuZhBLED ZcQYLW+zEjYdFgUlpokwgcmk6ovWGsuJ2q8mFHsyb7LlOv7jemTHJ175jecR7HxzXnvY KUOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=BCuEaRBCYXgXTgxHUb5UQ2ZAjY5SsoIcDsdw6trDtbU=; b=hv9gfMdjTjApuURPnCRPmZOUOU266Cu6Svkd9qN6x3yzzpz+sk/pY3ozxpQUePUmmF 7KWZFwVnATaTs1s+E0SEMELyawJzErgqAUVIiinOmNBsfphn4nNJHokwIcvzd8XjJ22a oDrXhpF2fsgsjTWdGxLpjJUEtalG0/K9QCCp025zNVgzE7ZK/i+hG0Kv5GM4vUZUAstb UL/o2NOjzuSUVCQJEgOrYLS1MIXh4dYtiU81VZ9qkObBG6pm0dibNHUfokOK8aJ6yYc7 WxYZ46GWE7hWqoXgpX9Nlnw7JqxkEjBkSW0eqEfG/sDThJom7VDdYio2N4yApQWk/Oq9 BfFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si12022958edt.499.2020.12.22.12.07.39; Tue, 22 Dec 2020 12:08:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727404AbgLVUFU (ORCPT + 99 others); Tue, 22 Dec 2020 15:05:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbgLVUFT (ORCPT ); Tue, 22 Dec 2020 15:05:19 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37238C061793; Tue, 22 Dec 2020 12:04:39 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1krntX-003JZt-E3; Tue, 22 Dec 2020 20:04:31 +0000 Date: Tue, 22 Dec 2020 20:04:31 +0000 From: Al Viro To: "Maciej W. Rozycki" Cc: Linus Torvalds , Thomas Bogendoerfer , Linux Kernel Mailing List , the arch/x86 maintainers , linux-mips@vger.kernel.org, Randy Dunlap Subject: Re: [PATCHSET] saner elf compat Message-ID: <20201222200431.GT3579531@ZenIV.linux.org.uk> References: <20201203214529.GB3579531@ZenIV.linux.org.uk> <20201203230336.GC3579531@ZenIV.linux.org.uk> <20201216030154.GL3579531@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 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.