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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2074BC25B4F for ; Mon, 13 May 2024 02:58:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B8586B016D; Sun, 12 May 2024 22:58:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7F2976B0171; Sun, 12 May 2024 22:58:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66C3C6B016F; Sun, 12 May 2024 22:58:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 453BE6B024C for ; Sun, 12 May 2024 22:58:06 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E5B01160270 for ; Mon, 13 May 2024 02:58:05 +0000 (UTC) X-FDA: 82111863330.25.6327C59 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by imf24.hostedemail.com (Postfix) with ESMTP id F102318000D for ; Mon, 13 May 2024 02:58:03 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="Ws6C/AX4"; spf=pass (imf24.hostedemail.com: domain of keescook@chromium.org designates 209.85.210.180 as permitted sender) smtp.mailfrom=keescook@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715569084; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Y/lu5TaLovMBUI69zhtefvoAbFIExvkJe/gVrMPa9Rs=; b=dWLSvTOFI9j95kRh2FxeKIFzewYzc1k85ZuPMJk6NRPtenPptcsRmArBhBv80Gp+9ki06u MVq4m7RpQmarph9zDFiDIo/mnY1t4zVWP/fA2X6+Q7VTilox3JmYPfY2GGk5Y/b5zMtyjz KafsSvgMse9JrsGs0PTMOq07ObM9lBE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715569084; a=rsa-sha256; cv=none; b=7AN1pHZlwuRVNA/vtw8sUOEC5sm3ImLajCfYdZMXBonBkup0pc/e1+MLTo6/1qFBvf2lZI wfk248L9Vi2pboTISuIKkUfFVs6aFpYv3sMNl3fqHySMJJLZQo1NNMtXW4ennF/ZWqX+rj LyxD7dBKNYUbFTRy6UsUwI60emsKdGo= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="Ws6C/AX4"; spf=pass (imf24.hostedemail.com: domain of keescook@chromium.org designates 209.85.210.180 as permitted sender) smtp.mailfrom=keescook@chromium.org; dmarc=pass (policy=none) header.from=chromium.org Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6f457853950so3241479b3a.0 for ; Sun, 12 May 2024 19:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715569083; x=1716173883; darn=kvack.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=Y/lu5TaLovMBUI69zhtefvoAbFIExvkJe/gVrMPa9Rs=; b=Ws6C/AX47dlKM7sgEaLJqnikZ03fyG3N902XjWjya0fLZqOBhZS0yvJ6GqM1yRxveF bYRy+Q+Rrb1kLcI9fVOlIk0FtFcvBnGQzlxAhjoH4h76haKkdZOnhmQXkMkBpYJB4wRS o6uqKjRGb9pA+8btQfRAvBtXlEDaCIQxUzrRw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715569083; x=1716173883; 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=Y/lu5TaLovMBUI69zhtefvoAbFIExvkJe/gVrMPa9Rs=; b=meQsg5fu0/ljiMn2JESxTthkkJYT7GKWgiqFcLNxox5pKstvMtHPL11K+exHB5uvyU xPGwIRfkhU8kdjVi44DNDy9WluHXZNyBhRaOzGsx+iBuWehOMQHM2RZ6dXr3yZQ5JXfB oSLaw/tcV21kVq3Azkn/o6mdd0wCq4QdfQEqYevn+lX3qfWJpDC8LmG57LWZxcU3Ju+O yIdNe+woHAdeP4Sqk6fCRiKBU7u4G/BwdAdWgv9wy0xLqj6TfZ8x5vMJq6NHbR8piQ5J 9rfLN4f/aAidsG60roWA5BPH95ZpjC5siRhSqOlU3W+AZaEoNzkX6sBWY76xYpGl8IyS OCug== X-Forwarded-Encrypted: i=1; AJvYcCWQPd8aYAK6kr08DPcOabrCP93SgOBK6JGYBxPPpmVGN+accXVqT9gqomk74oE+qd+7Avp6rq2SG3bPySI9yWcgA8w= X-Gm-Message-State: AOJu0YxBYrFzp27EwtYtmnRv4XFHKWCqt2g+ETVuShNAcCOLaZc5aaNO YwduntGHH3cC3hUQJ+Wo1w+uH5vDOzGPEj1FoJXiKdC7uNmNEjq4lURNnXl5cw== X-Google-Smtp-Source: AGHT+IEKZ/LshmwPejdGxanAmq+x/Okf3LXGs+1GNXJLM4QWlBn90rXQR1Oeyq1KkYKRq0CgAkrYow== X-Received: by 2002:a05:6a21:1505:b0:1ad:7e68:570c with SMTP id adf61e73a8af0-1afde07d801mr12977761637.4.1715569082704; Sun, 12 May 2024 19:58:02 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2b2fa86sm6335827b3a.213.2024.05.12.19.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 19:58:00 -0700 (PDT) Date: Sun, 12 May 2024 19:57:58 -0700 From: Kees Cook To: Joel Granados Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Jakub Kicinski , Luis Chamberlain , Eric Dumazet , Dave Chinner , linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-xfs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, kexec@lists.infradead.org, linux-hardening@vger.kernel.org, bridge@lists.linux.dev, lvs-devel@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-sctp@vger.kernel.org, linux-nfs@vger.kernel.org, apparmor@lists.ubuntu.com Subject: Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers Message-ID: <202405121955.BC922680BA@keescook> References: <20240423-sysctl-const-handler-v3-0-e0beccb836e2@weissschuh.net> <20240424201234.3cc2b509@kernel.org> <202405080959.104A73A914@keescook> <8d1daa64-3746-46a3-b696-127a70cdf7e7@t-8ch.de> <20240512193240.kholmilosdqjb52p@joelS2.panther.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240512193240.kholmilosdqjb52p@joelS2.panther.com> X-Rspam-User: X-Stat-Signature: u4aqbo8c1rb9gdgzmnenmbkr3f51miw4 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: F102318000D X-HE-Tag: 1715569083-803978 X-HE-Meta: U2FsdGVkX1+9kvx4H1Gf47fEvf+iLuL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qBH5HlyosfNU0E4Hx1JmhLK41ja9dqjBBGG9NEflDxwDNBzMXSJCklf+nijmFbcm6zR4OW+tF/aNy6sZz204SC0UnKKQk33txtPZUaFtjj1h9eZ8acIY7qo4PCDd4exwCtefi4ZTu0aYwuuOTzv0bJk12PrZhguKHF6VnbsESbPgEtZz8tVDaC6ziA0GN5BXtHuJcfEpwzrfzyYwWpkpeKsq/gZpMm2BbaGREjpUKyq8KVH/ImHvGrCOKNxbeCCe/IZGiARGR6xI3dSDxF68VtSPf2Wlk8tbtBNIOTSGu58lcCoqBI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sun, May 12, 2024 at 09:32:40PM +0200, Joel Granados wrote: > On Sat, May 11, 2024 at 11:51:18AM +0200, Thomas Weißschuh wrote: > > Hi Kees, > > > > On 2024-05-08 10:11:35+0000, Kees Cook wrote: > > > On Wed, Apr 24, 2024 at 08:12:34PM -0700, Jakub Kicinski wrote: > > > > On Tue, 23 Apr 2024 09:54:35 +0200 Thomas Weißschuh wrote: > > > > > The series was split from my larger series sysctl-const series [0]. > > > > > It only focusses on the proc_handlers but is an important step to be > > > > > able to move all static definitions of ctl_table into .rodata. > > > > > > > > Split this per subsystem, please. > > > > > > I've done a few painful API transitions before, and I don't think the > > > complexity of these changes needs a per-subsystem constification pass. I > > > think this series is the right approach, but that patch 11 will need > > > coordination with Linus. We regularly do system-wide prototype changes > > > like this right at the end of the merge window before -rc1 comes out. > > > > That sounds good. > > > > > The requirements are pretty simple: it needs to be a obvious changes > > > (this certainly is) and as close to 100% mechanical as possible. I think > > > patch 11 easily qualifies. Linus should be able to run the same Coccinelle > > > script and get nearly the same results, etc. And all the other changes > > > need to have landed. This change also has no "silent failure" conditions: > > > anything mismatched will immediately stand out. > > > > Unfortunately coccinelle alone is not sufficient, as some helpers with > > different prototypes are called by handlers and themselves are calling > > handler and therefore need to change in the same commit. > > But if I add a diff for those on top of the coccinelle script to the > > changelog it should be obvious. > Judging by Kees' comment on "100% mechanical", it might be better just > having the diff and have Linus apply than rather than two step process? > Have not these types of PRs, so am interested in what folks think. I tried to soften it a little with my "*close* to 100%" modifier, and I think that patch basically matched that requirement, and where it had manual changes it was detailed in the commit log. I only split out the seccomp part because it could actually stand alone. So yeah, let's get the last of the subsystem specific stuff landed after -rc1, and it should be possible to finish it all up for 6.11. Yay! :) -Kees -- Kees Cook