From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C84118631 for ; Fri, 29 Sep 2023 15:33:11 +0000 (UTC) Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E737B4; Fri, 29 Sep 2023 08:33:09 -0700 (PDT) Received: from in01.mta.xmission.com ([166.70.13.51]:59108) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1qmFUK-00FzWn-ET; Fri, 29 Sep 2023 09:33:08 -0600 Received: from ip68-227-168-167.om.om.cox.net ([68.227.168.167]:57062 helo=email.froward.int.ebiederm.org.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1qmFUI-009b5s-TR; Fri, 29 Sep 2023 09:33:08 -0600 From: "Eric W. Biederman" To: Pedro Falcato Cc: Kees Cook , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Sebastian Ott , Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Andrew Morton , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20230929031716.it.155-kees@kernel.org> <20230929032435.2391507-4-keescook@chromium.org> Date: Fri, 29 Sep 2023 10:32:59 -0500 In-Reply-To: (Pedro Falcato's message of "Fri, 29 Sep 2023 13:12:13 +0100") Message-ID: <87y1gp6llg.fsf@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-XM-SPF: eid=1qmFUI-009b5s-TR;;;mid=<87y1gp6llg.fsf@email.froward.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.168.167;;;frm=ebiederm@xmission.com;;;spf=pass X-XM-AID: U2FsdGVkX18dXVfN1YAEePbYpFJoWWbpYNcqcNqjTNI= X-SA-Exim-Connect-IP: 68.227.168.167 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Virus: No X-Spam-DCC: XMission; sa02 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Pedro Falcato X-Spam-Relay-Country: X-Spam-Timing: total 939 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 4.5 (0.5%), b_tie_ro: 3.0 (0.3%), parse: 1.18 (0.1%), extract_message_metadata: 11 (1.2%), get_uri_detail_list: 1.00 (0.1%), tests_pri_-2000: 9 (1.0%), tests_pri_-1000: 2.1 (0.2%), tests_pri_-950: 1.09 (0.1%), tests_pri_-900: 0.82 (0.1%), tests_pri_-200: 0.68 (0.1%), tests_pri_-100: 2.9 (0.3%), tests_pri_-90: 47 (5.0%), check_bayes: 46 (4.9%), b_tokenize: 4.5 (0.5%), b_tok_get_all: 6 (0.7%), b_comp_prob: 1.43 (0.2%), b_tok_touch_all: 31 (3.3%), b_finish: 0.59 (0.1%), tests_pri_0: 163 (17.4%), check_dkim_signature: 0.38 (0.0%), check_dkim_adsp: 4.9 (0.5%), poll_dns_idle: 683 (72.7%), tests_pri_10: 1.70 (0.2%), tests_pri_500: 690 (73.5%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v4 4/6] binfmt_elf: Use elf_load() for library X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Pedro Falcato writes: > On Fri, Sep 29, 2023 at 4:24=E2=80=AFAM Kees Cook = wrote: >> >> While load_elf_library() is a libc5-ism, we can still replace most of >> its contents with elf_load() as well, further simplifying the code. > > While I understand you want to break as little as possible (as the ELF > loader maintainer), I'm wondering if we could axe CONFIG_USELIB > altogether? Since CONFIG_BINFMT_AOUT also got axed. Does this have > users anywhere? As I recall: - libc4 was a.out and used uselib. - libc5 was elf and used uselib. - libc6 is elf and has never used uselib. Anything using libc5 is extremely rare. It is an entire big process to see if there are any users in existence. In the meantime changing load_elf_library to use elf_load removes any maintenance burden. Eric