Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp62559rdd; Mon, 8 Jan 2024 17:54:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlSdDYa6hVxEOtBAmDabDMnm/MstY9U8GeFGV3j+B3QNXAdqNptw8MCoAPfEWNeVu6Dj4n X-Received: by 2002:a17:902:6e17:b0:1d3:f363:b489 with SMTP id u23-20020a1709026e1700b001d3f363b489mr3892858plk.138.1704765260918; Mon, 08 Jan 2024 17:54:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704765260; cv=none; d=google.com; s=arc-20160816; b=O4RwdYmIgePwO5sWmNI6W0Gncd7nsZyNDirp9i8JWfEwg2wRUmqbDFdcsVFqgaG19h 9O9yQKyEgmuQI23vUZgLVtGUkQ2KvwYZDENcBVRXEMCmmMhiUbuLlobFc8WH3Q/2J5yV FF73jJ5NZlcW+JgIZ8SjuLAnLpaHldzMYKXyx8b5FDljcL949QlkFjo4fu4buhI9PasJ zvYeIuDXnGkSw1Q1kexdanztJc4kk4Gp+Pc2gEB5bo5MvpM+Smi2pJ1mQQtKq3pMZA+Q kR/GoOpDOODNHxhyfXuc9I2T5yRPBpfBhq8iUCA2zZgFQzHd43sN03+JIHNq9QwyjEfY Vouw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=INEVilcVOIiCkbe5/NRvOP8Bp+cgU+a660cL/Y+5uIM=; fh=VKQasrpBGlye5s90cs9XD7dfiItSKjCnDADCRpCqpSo=; b=WyO+ZjVqSfh1iKQ64gl2DYyoP6QzS7gukG/u2tO8w06+HyAkcyEQw8v3KLvhS6G8t2 DOQfFlFBkhDarIOgS8bG2dlGpeVjNKDIx/NZhxD7cv3N4m32QWEjTQDH4Noh9xg2JgFA Osf0iDfYLrgl2OoyRZDa2Fo6iq7orSUOt+e4tKQ9MeVRkyTRCvVIKDq+dRwaGma5P09a g51eXQsdJUNrZfbyBsU6kdOfh142raKbfbGqmChSpNeSY324fDBHme/L4w4sD0OpjhAa lDuAULUy6nEIrBNELv/qxV6xOLm/DSaU23u+LJ7EJCxcbpii3anapCKQK7H95QVO1NU6 dEQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=NZke+FNT; spf=pass (google.com: domain of linux-kernel+bounces-20266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20266-linux.lists.archive=gmail.com@vger.kernel.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 z10-20020a170903018a00b001d4891f73f0si720410plg.549.2024.01.08.17.54.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 17:54:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20266-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=@linux-foundation.org header.s=google header.b=NZke+FNT; spf=pass (google.com: domain of linux-kernel+bounces-20266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20266-linux.lists.archive=gmail.com@vger.kernel.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 564822853FC for ; Tue, 9 Jan 2024 01:54:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0C061C2F; Tue, 9 Jan 2024 01:54:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="NZke+FNT" Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 481CE17D3 for ; Tue, 9 Jan 2024 01:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40e4d778e5eso3703395e9.1 for ; Mon, 08 Jan 2024 17:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1704765250; x=1705370050; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=INEVilcVOIiCkbe5/NRvOP8Bp+cgU+a660cL/Y+5uIM=; b=NZke+FNT/mkPiE3vdb2P6mFnhuo2IglVjBBopmtv5YsJPZxpefMEoNfRL3MesXaxs7 dQj7Wtm5SZTwHg1kVUxvYFS/NBWkW0Yd0QBXRU9S0TxhSbST7D9OVeJeDZOOOPu3Jw++ pGBt50xHegl7XW70eNPan8FDNFTr8zAXHI/0A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704765250; x=1705370050; h=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=INEVilcVOIiCkbe5/NRvOP8Bp+cgU+a660cL/Y+5uIM=; b=CpB37AtjMAmoAaC4/MFZch+L0s5wl0BPye/GZTkzH1J1M8NozNnQj31HdKBRC9zsDT VDirYk5JD7S6q7jvAH8JOYnLq6QiW0dsmjZVpEGI1RzokzSzV7rn8IClOiW9MRw3i/sJ T3bEQzfW5+cK4baR2ZatMywbIG5wn6Kg2xukaP18Ftskl6W/Kei1t4VxEYy5ve98QN0c IWXyUz+DwzwutISFXTyZHbsS6vmsCdceUw4nolqgwkVIx5coaKFluT1bRMwHIgjS5XFH QwnkjsYbP31Wg8GAzjP5f4rMUADX9cX/qf0ovAfsv+Mo0Ti4pdsts+MibLcWmFvKr1Hm 1I5w== X-Gm-Message-State: AOJu0YzlJvcaUBVZumtJP+ZynIGc4B/k37j6ZRugflvTG88KoiJfBOPH arIcH2vMq5XTPPpDlWSQek8SpDiTnaitENoPqMYvj2l/K2X9PBCw X-Received: by 2002:a05:600c:214d:b0:40c:416c:d99b with SMTP id v13-20020a05600c214d00b0040c416cd99bmr2391807wml.47.1704765249744; Mon, 08 Jan 2024 17:54:09 -0800 (PST) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com. [209.85.218.54]) by smtp.gmail.com with ESMTPSA id fx15-20020a170906b74f00b00a26f22dca5asm482098ejb.0.2024.01.08.17.54.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jan 2024 17:54:09 -0800 (PST) Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a2adc52f213so135794066b.0 for ; Mon, 08 Jan 2024 17:54:09 -0800 (PST) X-Received: by 2002:a17:907:bd8:b0:a28:1fab:cfab with SMTP id ez24-20020a1709070bd800b00a281fabcfabmr101140ejc.33.1704765248901; Mon, 08 Jan 2024 17:54:08 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <202401081028.0E908F9E0A@keescook> In-Reply-To: From: Linus Torvalds Date: Mon, 8 Jan 2024 17:53:51 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] execve updates for v6.8-rc1 To: Kees Cook Cc: Kees Cook , linux-kernel@vger.kernel.org, Alexey Dobriyan , Josh Triplett Content-Type: text/plain; charset="UTF-8" On Mon, 8 Jan 2024 at 17:48, Kees Cook wrote: > > This was exactly the feedback I had originally and wrote almost what you suggest: > > https://lore.kernel.org/lkml/202209161637.9EDAF6B18@keescook/ > > But the perf testing of my proposed "look it up once" patch showed a > net loss to the successful execs which no one could explain. In the > end we went with the original proposal. Basing things one one random benchmark which must clearly have some very particular cache effects or something is not ok. End result: I'm not taking a random "look up filename twice because we can't understand what is going on". Because I *guarantee* that we can trivially write another benchmark that shows that looking up the pathname twice is worse. Linus