Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5352635pxu; Tue, 22 Dec 2020 15:02:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3Ll+0l05cSHXsVAaAdhKspOAuOOeQWLwTsFpsRXXP/LzVcjBK3JGQdf0GREoUHw+u45lO X-Received: by 2002:a17:907:9627:: with SMTP id gb39mr22066002ejc.267.1608678127369; Tue, 22 Dec 2020 15:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608678127; cv=none; d=google.com; s=arc-20160816; b=uQ9dRufIzDPcwPT2grv1oC9k03OScxLws5gp80LbEqGlcUBk+4/MNb3MtH6aUDbpTA 8Rv/ktp/oH/dBzWr44ZfHe5CYFvSV67xHRwEvwdva8yrgGwlhwZJyMEb4GFnxnqiSXQO xnB7936XGtj1Zm6pzrZJBD6bTXdNsozhx7QiaUY4f0NQ6fG0tYh2N6st3UKv2psUs6TU ZKiB42aBiAvRv7KRR3T6iE3+i7cyNYPDeh6ClLGN+qvd+594JGX6es9T9BwJhJExN9Mg jAkgINfEw+lRXsRb8GzOcuDwEkqizQlmOBoZxT7jqt6OEFUn8FjY6nG76UhN65JJPfV8 jXxg== 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=GvZuIG8vntp+8mVqkji5+Fl3qCa2xN7tPK7dM7lLiEw=; b=dm18hMt4A2TZSoMo6skTXwdtiplLl/+anjo36Sf+fBZKRgXn4ibBYvy78IkYz2BiFT kBbTtrVNsyH/Z3tctGOY4iUITC9rm2yarcpY5rHn+iCrLTIOlS0h2HT+wOO6hIJ2Y7RH aYGAWZhehkzE+tGuQGKzVYGSEosEww7epAdfJM7AYyZeI6WuU5KSJTBDCXJEnjA/BnXT KwurAv3i7ccG+tm6YbyGl9lWKmDNdGPrixF3ekn4yEQR/C47Te7oVN/wU9ml4ej4LtcN PFXNdNVXFj34pMa/P37VllRXvOUINoTaSTyd7fvAOmq9IdAEKWuJr+l8qV9fjSNlR/41 fzkw== 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 l8si10534664ejp.707.2020.12.22.15.01.44; Tue, 22 Dec 2020 15:02:07 -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 S1726617AbgLVW6t (ORCPT + 99 others); Tue, 22 Dec 2020 17:58:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbgLVW6t (ORCPT ); Tue, 22 Dec 2020 17:58:49 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A6DFC0613D3; Tue, 22 Dec 2020 14:58:09 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1krqbM-003Lzr-T3; Tue, 22 Dec 2020 22:57:57 +0000 Date: Tue, 22 Dec 2020 22:57:56 +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: <20201222225756.GV3579531@ZenIV.linux.org.uk> References: <20201203214529.GB3579531@ZenIV.linux.org.uk> <20201203230336.GC3579531@ZenIV.linux.org.uk> <20201216030154.GL3579531@ZenIV.linux.org.uk> <20201222200431.GT3579531@ZenIV.linux.org.uk> <20201222213835.GU3579531@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201222213835.GU3579531@ZenIV.linux.org.uk> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 22, 2020 at 09:38:35PM +0000, Al Viro wrote: > On Tue, Dec 22, 2020 at 08:04:31PM +0000, Al Viro wrote: > > > 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. > > ... and it smells like the damn thing needs n32 debug info from libthread_db.so > and/or libpthread.so. Which is not packaged by debian libc6 mips64el build. > Sorry, any debugging of that crap is going to happen in January ;-/ Cute... Completely unrelated, but there's a fun bug in mainline o32 coredumps - say readelf -a core and watch NT_FILE section dump. Compare that for dumps done on mips32 and mips64 hosts (for the same o32 binaries, obviously). Or to gcore(1) results on such processes, for that matter. What happens there is that 2aa362c49c31 ("coredump: extend core dump note section to contain file names of mapped files") that has introduced that section has added #define user_long_t compat_long_t to fs/compat_binfmt_elf.c, but not to arch/mips/kernel/binfmt_elfo32.c, resulting in default (long) being used by fill_files_note().