Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp4021007rdh; Fri, 29 Sep 2023 08:58:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhmpAnFjTQCbuCfdSHvEGVH1lj181B3KGxgDp8NWzOZ72XczDgOgltJVjZQFS/je16J63O X-Received: by 2002:a05:6a20:7289:b0:14d:e075:fc5d with SMTP id o9-20020a056a20728900b0014de075fc5dmr4755799pzk.40.1696003089085; Fri, 29 Sep 2023 08:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696003089; cv=none; d=google.com; s=arc-20160816; b=fQPFHaI5LaT/OA8C4WUgUu5HngLWGQRWqiPghzThvy+elzlTUbnEfJ+nsWzMHCojRq sB3/DpCeGwwS1zjQ7iMjovi6WrVIRc+OnZZgyGgPo5CZLTYrDPF8UdI26m2fa7gjYeb4 IzyICRFU/J96ORVZ/kshht9z4xawgBX8dhXjZVdpkltbU2HQ9gJVMjHnnPwtBJrDRaxP 7MNJk3e9iXaQ8qY4aFKL3dUb1jAAGJibc1/ZEFSlfz8CbmpMoubK6wVp20+9X/EEnp7A gJriKfCxLkOddRNDO35yhknZjPxrtgJdKxzZpcU11e40rG5FMXDw0oHbP3QIjod66NAN 2Rdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:cc:to:from; bh=1AbYLAA2VVmBOTxYt1fieIRGBy3UEaCl9e/aFIfB05g=; fh=5/Dqmcbtkjq07fz/UJgPx9Qv1GkwIau0DcjITCQXBnM=; b=wZpwPqYdfCfKWabhU/Pbk2nK3LzJ38CA4lNKV1mYaOlaUx/XtA65773XE4mz3qId/+ mIkLXxrVnB3D3LrpzwwUrgpjBOBUzfy2ORr+U/cIcyOvgObeC4/67s8JouOLZuyv4+ZB brfjYO07+luKn6t6CBkCeo20HZ+vkGSni3rTh8JYsVVpAC8XjCasjQY+wrEtfeigW2ax bGbjGku1oxVkdOY469YBps697UeyVqGLG+PPmjYjp33M9nQ7LISGluLRdrLR4/Sbi1KH mq6/GIeizQT8deJz6Oohxm/Xd7THSYS2PuU2iWA4k3KYehc64XGpfHIo1EyZnJrpL0e3 E19w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bt11-20020a17090af00b00b0026d4adee541si1711999pjb.150.2023.09.29.08.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 08:58:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3BB36829F9A4; Fri, 29 Sep 2023 08:33:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233665AbjI2PdM convert rfc822-to-8bit (ORCPT + 99 others); Fri, 29 Sep 2023 11:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233517AbjI2PdL (ORCPT ); Fri, 29 Sep 2023 11:33:11 -0400 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) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT 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 lipwig.vger.email X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 29 Sep 2023 08:33:29 -0700 (PDT) Pedro Falcato writes: > On Fri, Sep 29, 2023 at 4:24 AM 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