Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3570750ybk; Tue, 19 May 2020 07:52:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwYrm+lmPSp/TTSsAya+rvCRQhu4/jOltU0khws5VUhDB/hGDIktR+ki53DZiKhzTVOnku X-Received: by 2002:a17:906:13ca:: with SMTP id g10mr968979ejc.433.1589899927808; Tue, 19 May 2020 07:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589899927; cv=none; d=google.com; s=arc-20160816; b=CWOl1Dspwd3JHbQOk5rEXQV/G8fd9ZVMaelYVXBFu9B7NiALbcC15SfLWPCRBg2qgk hm7IeLPUlMf3hfYlSGsFCV3IS7QnstEIvoq7kmHIOzzSLT50Fl4qZTgdC3VrXpbIvppv taka7NfiMGI0tKJqudgU9a/oLV5lOp7D/IoWPQ9WZLMHd6IdrXuUknzzvdtiexDbuEmQ /swVyebooZwsBUmliuGpGd4ai95xhYKa9kN8DTWFAj6eWumTalq2KtjUbuCJ6nGKL6T6 Q5mIQvGn3mhjgIkVgYgADK9xuMHrXgEG5WnT7nuUt6ol6CQVbKQ7bwFld5GU7yQw9rvH 9mwQ== 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=vBch/OOtYeXEdhxX/s3qEYoSVWsiMe6JGHqJNZfD0yI=; b=LiRzAlpLgsFoLS5tB3TngH8JNHqFubIu7s+EgBVpox1rkQ3de3wNsaFB3H/9bq7oWC SSnho3RCgT/lnGWcLpbpmO9rlpuD0CPrCmvE+Ta0Q5tJlhCl6LvkdqolegOiYZ2bNHdN lS0bEfEODrJUbrj48W0WxGC35T6iczKhVSQlYwhd3JZ5SqhmhzsCk40cAVG4t6yJSeTC wdnovzyQQAyO8IJv1swTx0NO/DxMQLrxrh9mEuqUEaDZwnLN5HGhT8/pSsmpTQU9CjA6 MujgYAx3IlZDmAGqTo41xRWTDCAMwcYKmTv9iiHMwT/YWicKt/UMdCDiTDOaUoRp1s/M U+SQ== 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 oy11si184ejb.386.2020.05.19.07.51.43; Tue, 19 May 2020 07:52:07 -0700 (PDT) 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 S1729110AbgESOrr (ORCPT + 99 others); Tue, 19 May 2020 10:47:47 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50826 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbgESOrr (ORCPT ); Tue, 19 May 2020 10:47:47 -0400 Received: from ip5f5af183.dynamic.kabel-deutschland.de ([95.90.241.131] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jb3Wj-0007aE-1m; Tue, 19 May 2020 14:47:29 +0000 Date: Tue, 19 May 2020 16:47:27 +0200 From: Christian Brauner To: Geert Uytterhoeven Cc: "Eric W. Biederman" , Andreas Schwab , Jann Horn , Kees Cook , Al Viro , Andrew Morton , Tetsuo Handa , Eric Biggers , Dmitry Vyukov , linux-fsdevel , linux-security-module , Linux API , kernel list Subject: Re: [PATCH 1/4] exec: Change uselib(2) IS_SREG() failure to EACCES Message-ID: <20200519144727.lgj2wc7srrix7gyd@wittgenstein> References: <20200518055457.12302-1-keescook@chromium.org> <20200518055457.12302-2-keescook@chromium.org> <20200518130251.zih2s32q2rxhxg6f@wittgenstein> <20200518144627.sv5nesysvtgxwkp7@wittgenstein> <87blmk3ig4.fsf@x220.int.ebiederm.org> <87mu64uxq1.fsf@igel.home> <87sgfwuoi3.fsf@x220.int.ebiederm.org> <20200519131341.qiysndpmj75zfjtz@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 04:32:38PM +0200, Geert Uytterhoeven wrote: > Hi Christian, > > On Tue, May 19, 2020 at 3:15 PM Christian Brauner > wrote: > > On Tue, May 19, 2020 at 06:56:36AM -0500, Eric W. Biederman wrote: > > > Andreas Schwab writes: > > > > On Mai 18 2020, Eric W. Biederman wrote: > > > >> If it was only libc4 and libc5 that used the uselib system call then it > > > >> can probably be removed after enough time. > > > > > > > > Only libc4 used it, libc5 was already ELF. > > > > > > binfmt_elf.c supports uselib. In a very a.out ish way. Do you know if > > > that support was ever used? > > > > > > If we are truly talking a.out only we should be able to make uselib > > > conditional on a.out support in the kernel which is strongly mostly > > > disabled at this point. > > > > The only ones that even allow setting AOUT: > > > > arch/alpha/Kconfig: select HAVE_AOUT > > arch/m68k/Kconfig: select HAVE_AOUT if MMU > > > > and x86 deprecated it March 2019: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eac616557050737a8d6ef6fe0322d0980ff0ffde > > Quoting myself (for the second time this month): > "I think it's safe to assume no one still runs a.out binaries on m68k." > http://lore.kernel.org/r/CAMuHMdW+m0Q+j3rsQdMXnrEPm+XB5Y2AQrxW5sD1mZAKgmEqoA@mail.gmail.com Well, it's just a great thing to hear. :) Fyi, I once tried to give a demo with a Slackware version in a container which pre-dated ELF on a x86 kernel with AOUT. It didn't go well... Christian