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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CF73E728CA for ; Fri, 29 Sep 2023 17:06:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233286AbjI2RGT (ORCPT ); Fri, 29 Sep 2023 13:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232748AbjI2RGS (ORCPT ); Fri, 29 Sep 2023 13:06:18 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1C8E1A7 for ; Fri, 29 Sep 2023 10:06:16 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-68fb85afef4so12257347b3a.1 for ; Fri, 29 Sep 2023 10:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696007176; x=1696611976; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=rxYI9ulX5XzPX5XOXonON+SMQGYguOvm0R6V5aclg6A=; b=bu1AoD1MBVuaFoU4Kuqjuqz5JwkYDxAb/pFXZk9XNWc31UlGWoURxzrRJKID/C5YQq GEenO95S0XOakk+8QV8UB7b5BzrBZ6AmxiUv10KSb1orI0GOiPELysEe8Wuk5eVnd8pN qcXdvyBgGUXe5HqINyWSntdWcpSuTAG/sM+cA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696007176; x=1696611976; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rxYI9ulX5XzPX5XOXonON+SMQGYguOvm0R6V5aclg6A=; b=dE3l4+bM+amgC3YmMZBPVY5c/XFafRlVYm2oEox1doUBLK7lfIYcgMXtIvjWq0E0l9 YLwKUzYigdpgCIzGyF5NS7V7jUb9yTwFlAhRcpdzauqpi7NPOlljmYWTaMTODeRiC9Vs vpUE5szne5wvTo2POTizctBlAXNUe7IVo5d7hkoqIylzPdb8dxuuqGfptOZi9OZ9HVAo JdpxmeYjCryyAZz8lPGBM6SnXcwAytMThqj05CO2L6G4oOd5Vb3Uu0rtHM6BXvWad3vp Q3SMc/zhqHAaOAstb8I83B6eiILLxKz4ZBLBOBg97yLsBBNNHHjVBQWfqkV0yvTermIm RfCw== X-Gm-Message-State: AOJu0YxsY3DlmQWF2KHYrSNjcoQ9ktvGKhf1nxZHwrtrQ/uy9hnG1Zp0 olO3M7LOom6z+ks8AJyTvuTHNw== X-Google-Smtp-Source: AGHT+IEEm0cgYM95RhBy+hVCohyjsNc4BHxivmWx4iHFGWyTUfY+kiazqEJ0Uju7DJ50x2sjMqjMDA== X-Received: by 2002:a05:6a20:3d04:b0:153:7978:4faa with SMTP id y4-20020a056a203d0400b0015379784faamr5859933pzi.37.1696007176255; Fri, 29 Sep 2023 10:06:16 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id fk1-20020a056a003a8100b00682868714fdsm15810970pfb.95.2023.09.29.10.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 10:06:15 -0700 (PDT) Date: Fri, 29 Sep 2023 10:06:14 -0700 From: Kees Cook To: Pedro Falcato Cc: Eric Biederman , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Sebastian Ott , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Andrew Morton , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v4 4/6] binfmt_elf: Use elf_load() for library Message-ID: <202309291005.80DD5F55E9@keescook> References: <20230929031716.it.155-kees@kernel.org> <20230929032435.2391507-4-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Sep 29, 2023 at 01:12:13PM +0100, Pedro Falcato wrote: > 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? I can't even find a libc5 image I can test. :P I made it non-default in '22: 7374fa33dc2d ("init/Kconfig: remove USELIB syscall by default") I'm not sure we can drop it entirely, though. -- Kees Cook