Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3964129rdh; Fri, 29 Sep 2023 07:30:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOd4A4TrDAr0igKVcu9glNXxGU5/n+x3JA8H6mYum2DBGJn8F/c/3gV2i/UK+QDhxAaS8t X-Received: by 2002:a17:90a:8903:b0:268:553f:1938 with SMTP id u3-20020a17090a890300b00268553f1938mr4120637pjn.4.1695997826022; Fri, 29 Sep 2023 07:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695997826; cv=none; d=google.com; s=arc-20160816; b=DV6ilqUtog3n2cXMZYz+uJ9TRH7jsXgyzSIErGhAzunLSSNjxfNED0RLHg8oa6A38H UY85gIdhz5hTG2+krtbNOEUQpXQ2ObTNpG5Ib8CCPR/yqyw7ulX74As/UZmNcG7qmrfo vuDvisdzStAmo46KsnaK2qSg28IZVLaAdRj8kLMWtOzqw2TWu8s8xJoCu1TEjQvAKz9m q1+p6vkvCigKCGdgMUGXGJQNb8Ye26jxmHqKyhB0nQdzURzt44fnUQj2Qbkpkvl560YE VjBsCHjQtyQIU9cDAGZc8lEoG9/FcnIM0iOs3LH2GFLg1fbybMQbbmP1U0pjpJWMPCcW 5crA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=O6AGwXiXnrUMPXklIL5nmsijRotoMkC208+2TMbjvG0=; fh=IcUN1wZcU7OKWd84D/eCHuc8z94MJfoCDAiu89TKMO4=; b=U0egk6Xy9lKFpKhUtZlFX5gzbxUjMWmTgoahGBamn8pDE8RxosSsKrSJhq1+1SpRgc zIUqTX+XG4g5LPzPxpUyuOl0a932DiIMrfGw39gJ4n0i12pqNvSQ2X7IxEgm8n913lBF 18OE2FYH6tmkkaUKGnebkA9gpyBGaO+anKv2SqkyDKHuWSqeFhLQY4L46/EVQQ1M/J4I zJXqRbZ/pqed7+WuFcIb7LmDFMwgVIbUURD4PzCkRNt2QL9WJeai1PbUbLULWzXBpyPt +8WZ7bYtLDtPEXUU1d15FV4ZGtV069p95ZPgjXyqnU0PDb1dRe1MU+C0bh3f+9W8PwwU dtkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RBxcuYGI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id p24-20020a17090ad31800b0027748734bb9si1612401pju.148.2023.09.29.07.30.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 07:30:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RBxcuYGI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5725C829F98D; Fri, 29 Sep 2023 05:12:37 -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 S233192AbjI2MM2 (ORCPT + 99 others); Fri, 29 Sep 2023 08:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232818AbjI2MM1 (ORCPT ); Fri, 29 Sep 2023 08:12:27 -0400 Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com [IPv6:2607:f8b0:4864:20::e32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA8661AB; Fri, 29 Sep 2023 05:12:24 -0700 (PDT) Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-4526d872941so6692454137.1; Fri, 29 Sep 2023 05:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695989544; x=1696594344; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=O6AGwXiXnrUMPXklIL5nmsijRotoMkC208+2TMbjvG0=; b=RBxcuYGI1dv7jxQE9x20eY7D2XBeEyKX+eOQlUVeHfhGNW6j5272xeruDLqzWsxmcG pNQdEYcS5YDWSA9tF5hlmxQzIWbjk6OHZAfbFyoZMUUC6OftT3x8RNUcXL46gfV0YPJh iAUfGHY8WeZ43vGw9UPzRAKFDpQ2gATQ0UxlkFNry78m1MCTeeJ66YwUZdUqECNHsAKe okxM5KVvCano5BNaPaeoLWwUdsj6y0MYYR63ocSsz76Kv0+QaU6o2JU8Lf9UqoNd8Jov jpCFfNHGYp9fge/3fiKRHR07sNd70UXstiTEZMNP2EeckFTI/hvGOZ42YgxrMxjbZraG ROng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695989544; x=1696594344; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O6AGwXiXnrUMPXklIL5nmsijRotoMkC208+2TMbjvG0=; b=ea0BYpCgOXTkmWQpSsv36usDuLbvdjnSuHkylz82SLVVG49eGjJ1wxBvLJEww/wCVw xDwDDmbuj1RmU1oeEQ/D8/nLLSb7yM+UabBqXTvGWnhhF3Y7rPmg0rUPrxwMQ227Wys2 Pylg9nuMdtM1oHpntvtSQZmp+ol4oqeFGXN4aXH6VkNhiJPbczH+t/JoiDbgaJ1Z4C6t HYzxjIO+n+FxcCY8jxXISYO8Y9Ru+iMdWKi4JKjetvl6+ZbtiAjXhTk8j5J5HcrX9rPK +76xbX+lRFvX54uxc/HnN5d9vH5BLELzVSw7j9YQvkw5Nbb9EivJMrDwI5d84WfnkyQ7 lt/Q== X-Gm-Message-State: AOJu0Yyt0DYVsqbNcJ4pFuSsT9yi3Rj3T0Ou5491BbpbB9i7IukYba5G gh/8E7XhQzUTyd5jPST8jzjgrE7h9DUdzot5bSU= X-Received: by 2002:a67:ffc7:0:b0:44d:3bc0:f1bc with SMTP id w7-20020a67ffc7000000b0044d3bc0f1bcmr3884563vsq.18.1695989543918; Fri, 29 Sep 2023 05:12:23 -0700 (PDT) MIME-Version: 1.0 References: <20230929031716.it.155-kees@kernel.org> <20230929032435.2391507-4-keescook@chromium.org> In-Reply-To: <20230929032435.2391507-4-keescook@chromium.org> From: Pedro Falcato Date: Fri, 29 Sep 2023 13:12:13 +0100 Message-ID: Subject: Re: [PATCH v4 4/6] binfmt_elf: Use elf_load() for library To: Kees Cook Cc: Eric Biederman , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Sebastian Ott , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Andrew Morton , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 05:12:37 -0700 (PDT) On Fri, Sep 29, 2023 at 4:24=E2=80=AFAM Kees Cook w= rote: > > 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? --=20 Pedro