Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1804579lqm; Fri, 3 May 2024 07:07:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmGHITxDYTilFdjFq5c1/ujnQxMFbSlBH6B99f0SCi7DxwabllSSF5wBtwxjeY77m3bPXtNao5DDZoZiQVSJpGc7iA2Bg/pAkB2Q+0MA== X-Google-Smtp-Source: AGHT+IEUQ67r5FlhUHYmLEEqp3sIYaWnzEwO7oKoFFR3d/KAms7j2EeEC+AERQaeLJb0M9q/IHkC X-Received: by 2002:a17:906:d146:b0:a59:3331:1b with SMTP id br6-20020a170906d14600b00a593331001bmr2007238ejb.0.1714745226870; Fri, 03 May 2024 07:07:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714745226; cv=pass; d=google.com; s=arc-20160816; b=m7xt/IbGkMaDJeqS4+1nDOMku3fUPh90L9moOC5myMBURwA3eCFA3RnIWndjWhKRxb JmQHS4R7Gd/DxWvhLrs0Pfwcene1mZNSn3UJqQe55bLFAC6sQsc1E96qRu+QFE84acMy vQUH9WkfENU43g6CfovsWODkxeDFrBxlmiCvsXrQc/TFLlIki0HsYruZdFHIuMEHt2JS oyNNQI2AE+uw7LYQa7b6fpAs2PguSdd5RMFvcLsxadlkLs+LewK4wk3iH3E49DBkXjZZ 4YG4F613fAG4vdS2Bm/OhUqm9Cf1iheQ6XXFNWHCZY9UyhE/X7pnbkBfPil8eyOh6yFN c+5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=209j5NHS7dsYfwuQMBB8LNTkfds+nbdFRIYToPwGUzc=; fh=UfvMCphFc+XpZgfkdG8QIAbJNNuTzp35SfLBZB0jwa0=; b=pg1lKpk1OSwOQ4hrpI/RWgNJ23V+USR4+s3rJJa+DHjJ3i1Okymw/m3pio7qJJgvoL qCg1Wz+tnOA6HxsU0idcKkt5pkQ2f2uyUEXpcsLH1kL03qXrhCZEhydZveubbnA2cLoJ C477Pf2hpWRjNXZwU85+euaU9G7Ci+nwuM4VazB2fNY+6L5yg0SPPDaL4y14s2Iz0TLc rh7b9+vGw1F6lGP8x7anPhoOFKNBA8fCArGjvJbWDm2y/jYgii0XR5akjqTI7B6JePT8 Ad/sZBZJaUioz/G44R8l8agw8NO522oMdeRbauAs3x+E259J0xdXFEbiopNCzy7YAv9c fG4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b=n2VzZcnA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="GXE4/VPN"; arc=pass (i=1 spf=pass spfdomain=tycho.pizza dkim=pass dkdomain=tycho.pizza dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-167737-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167737-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bi9-20020a170906a24900b00a59066bba98si1708755ejb.377.2024.05.03.07.07.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 07:07:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167737-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b=n2VzZcnA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="GXE4/VPN"; arc=pass (i=1 spf=pass spfdomain=tycho.pizza dkim=pass dkdomain=tycho.pizza dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-167737-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167737-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B83641F234E4 for ; Fri, 3 May 2024 13:58:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2D66154446; Fri, 3 May 2024 13:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b="n2VzZcnA"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GXE4/VPN" Received: from wfout1-smtp.messagingengine.com (wfout1-smtp.messagingengine.com [64.147.123.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC25C1DA21; Fri, 3 May 2024 13:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714744706; cv=none; b=sJdekg2OoGOHHJ+8lJyRLI62F4VolabWzAuQIaVV/q5HtYIOi9AqeQAHaUfLZTgWNy/2jpKLcbQzMVMo7lM/FUTx9nBJBuGxL73/fh7N/3Hwa95DFJWFZC0fEANXu7p86iGebTHmTZXS1lIzXFpTgdC2UKtLb+sf0tH3R9HV7Ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714744706; c=relaxed/simple; bh=BOJZM66K3VGN4oJNOKqKgSsV8u5CZQXA9q6/C9fnzpw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ieDdXe8fWecMY7g+Qh9c603cbHoERkCoM5zR+4tfIBicnQBpMFoEBUb3w0rG0Am9+WhvCqcuV8l0DcxW6joPb1r0amEBmcH+wF5jnJQWzGiVElETMD28CmLaHbpDeiYw7M97i8/S+gklDfdcBzbKS/FQ05zR9OkGA0NEHhfswhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tycho.pizza; spf=pass smtp.mailfrom=tycho.pizza; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b=n2VzZcnA; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GXE4/VPN; arc=none smtp.client-ip=64.147.123.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tycho.pizza Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tycho.pizza Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 999981C000D9; Fri, 3 May 2024 09:58:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 03 May 2024 09:58:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.pizza; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1714744702; x=1714831102; bh=209j5NHS7dsYfwuQMBB8LNTkfds+nbdFRIYToPwGUzc=; b= n2VzZcnAj8bFrXyR+kPN0xG7cePpzcLoeVi0de8nypF4TLmnSHBQNpE2TLkeQeUT Fa2u8hM7UmS0Z3fIyI69vDyVROv64/d8Yn5LWCn3djYJ2+89XJj5iZ2lrxrxKLnd nC3hgl3uUMHWlT+MWtAf+RCkWahhjU9tefekyAE5WRTtZIXsJHuuVUDbABeMdUGy R4Wiby1qHFNTT1wHO/YGzMF1+vhH3iQmqil85IogO5xn2SgpmaRBj9Acb4ySE9tf s+608kxjaKDPD0dwumBinvPnX+jW8/YOnKeLNG16YaidO41NYnm8I2NNU025NI3J MGp8Z3QEUTNNyiXQ78Zfpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714744702; x= 1714831102; bh=209j5NHS7dsYfwuQMBB8LNTkfds+nbdFRIYToPwGUzc=; b=G XE4/VPNIdHovH6MOVM5M/B2v9SVujBRBOsmI+sZ9aLrmRktsOdt+T7BiETMaNrRT +DEytVQlpzwp8nCG07QrxdxIcF9KUBIL2ebgLhGY8fCcYAV9/xKpMMOhYZZVOgmL O+TYWWbr1CFjx+nJ22nHhsYUuH1DO6aqWDzewPCrkiKpw6HOOPFPEtRPuAVm5OJ9 Lv2SQB854vdWqTVfjeVpWVbVS4CY66wJOL0aRD2rIMfA7qwBdH18E9njJA0n0oPl wLcKI670ANS416nuG/wZj3yoXB55sETDdaHnoKIE/LmSdKyW1yDAo5U1EL0DFy8f lyXRjj9If7eBFfSPAJStQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvtddgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtkeortddttddunecuhfhrohhmpefvhigt hhhoucetnhguvghrshgvnhcuoehthigthhhosehthigthhhordhpihiiiigrqeenucggtf frrghtthgvrhhnpeevffehhfetteeffeelgefhffetueefhedtieekleefgeegtedutddt lefhhfetieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthigthhhosehthigthhhordhpihiiiigr X-ME-Proxy: Feedback-ID: i21f147d5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 May 2024 09:58:19 -0400 (EDT) Date: Fri, 3 May 2024 07:58:16 -0600 From: Tycho Andersen To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Kees Cook , Alexander Popov , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Luis Chamberlain , Joel Granados Subject: Re: [PATCH] stackleak: don't modify ctl_table argument Message-ID: References: <20240503-sysctl-const-stackleak-v1-1-603fecb19170@weissschuh.net> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240503-sysctl-const-stackleak-v1-1-603fecb19170@weissschuh.net> On Fri, May 03, 2024 at 03:44:09PM +0200, Thomas Wei?schuh wrote: > Sysctl handlers are not supposed to modify the ctl_table passed to them. > Adapt the logic to work with a temporary > variable, similar to how it is done in other parts of the kernel. > > This is also a prerequisite to enforce the immutability of the argument > through the callbacks prototy. > > Fixes: 964c9dff0091 ("stackleak: Allow runtime disabling of kernel stack erasing") Reviewed-by: Tycho Andersen Tycho