From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C31CC433E0 for ; Wed, 6 Jan 2021 00:31:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DADFC22D71 for ; Wed, 6 Jan 2021 00:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbhAFAbF (ORCPT ); Tue, 5 Jan 2021 19:31:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbhAFAbE (ORCPT ); Tue, 5 Jan 2021 19:31:04 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EE2EC061793 for ; Tue, 5 Jan 2021 16:30:24 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwwiO-007DEZ-VN; Wed, 06 Jan 2021 00:30:17 +0000 Date: Wed, 6 Jan 2021 00:30:16 +0000 From: Al Viro To: "Eric W. Biederman" Cc: Andy Lutomirski , David Laight , Christoph Hellwig , linux-kernel@vger.kernel.org, X86 ML Subject: Re: in_compat_syscall() on x86 Message-ID: <20210106003016.GZ3579531@ZenIV.linux.org.uk> References: <091174F9-F6E4-468E-83F5-93706D83F9D2@amacapital.net> <87mtxodxat.fsf@x220.int.ebiederm.org> <20210105005700.GR3579531@ZenIV.linux.org.uk> <878s97aq4c.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878s97aq4c.fsf@x220.int.ebiederm.org> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 05, 2021 at 06:03:15PM -0600, Eric W. Biederman wrote: > > Yes, the current mainline is bloody awful in that area (PRSTATUS_SIZE and > > SET_PR_FPVALID are not for weak stomach), but that's really not hard to > > get into sane shape - -next had that done in last cycle and I'm currently > > testing (well, building the test kernel) of port of that to 5.11-rc1. > > That does sound interesting. Anytime we can clean up arch specific > weirdness so that it simply becomes generic weirdness and it can be > tested and maintained by more people is always nice. vfs.git #work.elf-compat, and AFAICS it works. arch/Kconfig | 3 ++ arch/arm64/Kconfig | 1 - arch/ia64/kernel/crash.c | 2 +- arch/mips/Kconfig | 8 ++---- arch/mips/include/asm/elf.h | 56 +++++++++++++----------------------- arch/mips/include/asm/elfcore-compat.h | 29 +++++++++++++++++++ arch/mips/kernel/Makefile | 4 +-- arch/mips/kernel/binfmt_elfn32.c | 106 -------------------------------------------------------------------- arch/mips/kernel/binfmt_elfo32.c | 109 ---------------------------------------------------------------------- arch/mips/kernel/scall64-n64.S | 2 +- arch/parisc/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/powerpc/platforms/powernv/opal-core.c | 6 ++-- arch/s390/Kconfig | 1 - arch/s390/kernel/crash_dump.c | 2 +- arch/sparc/Kconfig | 1 - arch/x86/Kconfig | 2 +- arch/x86/include/asm/compat.h | 11 ------- arch/x86/include/asm/elf.h | 2 +- arch/x86/include/asm/elfcore-compat.h | 31 ++++++++++++++++++++ fs/Kconfig.binfmt | 2 +- fs/binfmt_elf.c | 19 ++++++------- fs/binfmt_elf_fdpic.c | 22 ++++---------- fs/compat_binfmt_elf.c | 7 +---- include/linux/elfcore-compat.h | 15 ++++++++-- include/linux/elfcore.h | 7 ++++- kernel/kexec_core.c | 2 +- 28 files changed, 128 insertions(+), 324 deletions(-) create mode 100644 arch/mips/include/asm/elfcore-compat.h delete mode 100644 arch/mips/kernel/binfmt_elfn32.c delete mode 100644 arch/mips/kernel/binfmt_elfo32.c create mode 100644 arch/x86/include/asm/elfcore-compat.h