Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1192709rdd; Wed, 10 Jan 2024 11:24:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuH5Wor0CSW7p4Dja+MatIaUUxI4T7eksCcfRXjiUVXziajLzCtJkCHWruVVjINlOSW6f+ X-Received: by 2002:a17:90a:598a:b0:28c:21f0:cdfd with SMTP id l10-20020a17090a598a00b0028c21f0cdfdmr738687pji.15.1704914676710; Wed, 10 Jan 2024 11:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704914676; cv=none; d=google.com; s=arc-20160816; b=R/HEkj/0t4k+ka7d23muCz82TC5FBHpZs8qEi3xDQ1Q8x9B2Tg00quhoU64K8lorH+ 5ZAEOfO8QlheXSnPb+j2DexVP9tumAtB3DqCwip8pWFqAvZFmXALTzH0M/fphsEEuFkD SvjJ7CRWAmNt2FMpZiUkG1hqyF6ujztrsqvHa3TRtMjXp+z6XK8QhfV6NPwz13c3Vd9X 1jWR8FUehx4HGuR1vXWI+4yBxMmxCwv5SH75JfpRTrLSNgeDG1jW4xvPbs05fczVH1SW FuUgclgGEvXyirCE/rSitK9ucy+PqPnI+aTvobnGaomG2FZndHS0ByB64YYOniy1HGRC wCuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ksBpub1lP/jvDFiUMw2x/JKCWlBs10qSrtIRra9tdmQ=; fh=jimO+Osq/rciYLBYDmVUb0yPsVxN9KYN5AvCb+O9+/o=; b=jEy7hbmtCYqVz+ToPI108mrb10RZrJDJuXBlmT6D2MTt0nfaqIYN0hPyiO2bWZ3gsK x69jgFI+xaN8GE5PnBgACk48R+zhki9cMq6hl89dTqHJKJ/x+Lv1QfYgXADwNG/pNfYq aIbvgvJPhfmYOyinJhjtJjzHrkOFYfTIa75oBD6nZOXMNZFHSdifWJTseFWuTezCRfpp e3dcwaS1rxohOccuzdo2KWaENy7CVFzjT8DVlQu1akSAp+GDsCmoVQeEuDmxN3Mt3/lu EyddDrm2MoHHlJupu5lPIqpN5ekesYGM3LfrLQNNT2Qc/GQd48/u9k3icrwF75yNrfdX AZNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Oi6m1TVl; spf=pass (google.com: domain of linux-kernel+bounces-22656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x34-20020a17090a6c2500b0028daaadb31dsi1983935pjj.68.2024.01.10.11.24.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:24:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Oi6m1TVl; spf=pass (google.com: domain of linux-kernel+bounces-22656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 36B1C28173E for ; Wed, 10 Jan 2024 19:24:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73F4A4EB2A; Wed, 10 Jan 2024 19:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Oi6m1TVl" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B99B4EB23 for ; Wed, 10 Jan 2024 19:24:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1d427518d52so33413095ad.0 for ; Wed, 10 Jan 2024 11:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704914665; x=1705519465; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ksBpub1lP/jvDFiUMw2x/JKCWlBs10qSrtIRra9tdmQ=; b=Oi6m1TVleG89Cst6zzK5CxOVuXZloQGT7lq+5DTWTuv8O8e+xPmh501QVIjxzq/dKt NipVtkG3VftPAz2J3U0l8l8vr5cNEWvHBz8j3gTfvT/z8Q+mu6Ov62ZuS46BzCdhKJou UOBNaiQP3Zx62wS5dOfbREF0O/xtj31lJgJ14= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704914665; x=1705519465; h=in-reply-to: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=ksBpub1lP/jvDFiUMw2x/JKCWlBs10qSrtIRra9tdmQ=; b=ReZADqTD/kWPUp0tYmf9H6wv5AuKVcpM7iroIdur/DLEIUeHXDXbRpWnGymfY8qjQs Gm7urs+p6w8CAz7dXt6BpWg7B7ieYs8UilIuxcMZcTM383uP4VrnxVk1B4osMmspY4/F p0xvctx5i4iNBEQLecipheds/GSeRYB1F29VkFlE8ff2ZgxTa9FMWkhWxiPY4h7H3Jr/ FF38uJcs4vHyAFKU7HjX57viF+vIFcUejiOvY3PyKF3E9uXLA7c6ksVnYQSn81XDtOEz REcidase39MtVT65vaQdHbJ525UY5Iif04Lvxk1MOPqUotkjv2NoSK5a7zfO0A1ERCQn bZZQ== X-Gm-Message-State: AOJu0YxTfb/96n2uDKu3JEDIs5taPFMxgZM4iPJM0twLkjCJmJRvtSUg 3XzxFvabcF4Y1F83LHx42nLtZYzs3/qU X-Received: by 2002:a17:902:b413:b0:1d5:731a:ac7e with SMTP id x19-20020a170902b41300b001d5731aac7emr751304plr.35.1704914665736; Wed, 10 Jan 2024 11:24:25 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id b4-20020a170902d50400b001d46274b533sm3990904plg.138.2024.01.10.11.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:24:25 -0800 (PST) Date: Wed, 10 Jan 2024 11:24:24 -0800 From: Kees Cook To: Josh Triplett Cc: Linus Torvalds , Kees Cook , linux-kernel@vger.kernel.org, Alexey Dobriyan Subject: Re: [GIT PULL] execve updates for v6.8-rc1 Message-ID: <202401101120.68DCE0F@keescook> References: <202401081028.0E908F9E0A@keescook> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jan 09, 2024 at 06:21:26PM -0800, Josh Triplett wrote: > With Linus's fastpath patch ("no patch" with Linus's applied, and the > followup -ENOMEM fix applied): > > === With only PATH === > 0.28user 2.44system 0:02.80elapsed 97%CPU (0avgtext+0avgdata 1152maxresident)k > 0inputs+0outputs (0major+694706minor)pagefaults 0swaps > > === With 64 extra environment variables === > 0.29user 2.68system 0:03.06elapsed 97%CPU (0avgtext+0avgdata 1152maxresident)k > 0inputs+0outputs (0major+712431minor)pagefaults 0swaps Thanks for digging into this! I've been trying to figure out how to measure only the execve portion of a workload (with perf)[1] to get a more real-world measurement, but the above does show improvements for the "open once early". I'll get the behavior landed in -next after the merge window closes, and we can continue examining if we can make do_filp_open() better... -Kees [1] https://lore.kernel.org/linux-perf-users/ZZ32p0LRSt5-vFPX@kernel.org/ -- Kees Cook