From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (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 7AAA5145B18 for ; Mon, 13 May 2024 02:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715569086; cv=none; b=AFcfXqM3k/pHmX+qMvSkvVtMHjgdZING7PfX/GZmnPBb9mtgJVKmC53kQGmp3a9u+qUqDTPB9Sjosw7Io7P4jGnjc8tjp0ExWAPpvn0bX59CmxEytwF0EQ6xnVlnnxjM9RLbJC2o2Sevfj3x9L68pdm274HB+F3dAHKm5reBMX0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715569086; c=relaxed/simple; bh=5/Wrwj94XGzMh/USGtQK2NQHsvhIlya9spYECq7GesU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SS0kvKT8oM6SnFJgwKHpHKjl8TtxD66ZQffHVNdARsxt79SR41p7yeVidBcazIUX3/D2mM7CiD6nBfDuJPIQ+aaU5jOfAgxq+rOi2ASWgQ+WbVisxu+iYmAUqlobHLEMijvW9bz7fVXcAKm4BAV5CszKgLMTc3yMjtbTIaXiPRI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=cKQHOIMx; arc=none smtp.client-ip=209.85.210.182 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="cKQHOIMx" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6f4302187c0so3319573b3a.1 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=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=Y/lu5TaLovMBUI69zhtefvoAbFIExvkJe/gVrMPa9Rs=; b=cKQHOIMxV78kC1JWKtcW80dRgdB66xbP0vf8dHiMTk2wRECFhIL+vO5Tq5bphu3oa5 fe2qdkchDkYkUTXPTMpn+DAmNH0SoCsezfwHGGg/tqTTzJC1wot+R1jQnIXmoZSIFxHX ZKgx13sjqPUHQT1PV04bFxtlUQwIkvEsyIyRA= 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=BhbA35/uev56mchynw2FnQH7NZ4gPWKLyjWr2RidCWUMETwe94gwHBreKHdIz1d6q5 5TTgwhxKgfyatB3UqHHsnWP/Y1iO5huOdENDOvbCQtyHrjy/lz24AulrY0U09+z3E0CQ gsGElsgmHS92fr/MUNjAlUUlGM8DPgk21lUUbfnUoMPRD5a5skIQ45AgyAUEOYEY7KT9 vhHt8cmp3gnTpfFfW2BSPsbRw3nrf8xRp/5vVkiQrsic4iLFqeb1Zfzfl4XLfDHLGdME VG+bN0iC79d7hvCkPd2yfZJMFhHi52/OaX9dJ6oztkc3UwVnwqJeiMqeO1wrsPIr14p2 hW9g== X-Forwarded-Encrypted: i=1; AJvYcCUs17iDVXpnnTszlAF2/PJl0NTycfcne0ORjuADFGsKUioweZLb2rp6TfG2HcGrc4/pT0QHyYl3ikuIWhm1VffmGZnJ X-Gm-Message-State: AOJu0YxTY4C5Gj/2KXLjXnXJzM6/auNyrrqaJs9t5Nxh5qacab+Kvdor EK18aZqVV/tDfMqy6eqrxylEwVXizhA6seSLf6ZA6noul7ZCyewurZyP4IWNmQ== 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> Precedence: bulk X-Mailing-List: bpf@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: <20240512193240.kholmilosdqjb52p@joelS2.panther.com> 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E9B0C25B77 for ; Mon, 13 May 2024 02:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K7vEFEjpbIsnU30LxNmcFxJDPd1VDetK+Ql+edNjCAI=; b=eO9fprlFxnA4CM IBrBC+Mn6lvRp0HECGZHdPxTv5oygXQW3WXdr8Ku0AJMPMDiVc4Mw8tpUD8uQ2Ga0NeJLyEdCmabk LCO3e0Zfa6A99Wgzu2VuqCdUAfjrC5A/QnJ6wT9HQv1AZXcjK73vRPczHdxpazv4+BzOJQJcwust/ gTGXzXBJTLERCCGl1IbnCU05YY7I9zLVSetYnPrjgrbTe23N76ruNF/5/rrqzm3U6Lwxpuj9oDxrY OO2cDcFq0lp2hHuxe1bqg9ak+NIJUXlZqGU8Ukk2MIEOnqfqyAS4QherfZNQ6SVihbtd5/kfxVFd0 GWa0cNDTsVpDz3MxXUDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6Lt9-0000000BRyB-2R4P; Mon, 13 May 2024 02:58:07 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6Lt6-0000000BRwX-3N5S for kexec@lists.infradead.org; Mon, 13 May 2024 02:58:06 +0000 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6f457853950so3241469b3a.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=lists.infradead.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=d3R5/kNAul4804cuCdvk2Di3wQQuvjX0fvfHnrM2xzxCD3IXHi4n0co0mV6QG1W3J3 VBl/ZnKk40lQduh2bSYtrpww5gTCYLluXmC/HtO9GBw4c1n3OKFz1e6zg0YP0eX/kTAh WIVHUwkFLsyAeSpkB9mX2VLZE9khgZj6v87bU= 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=KoxjXvEbbQ3DSovS2KWORiCXXlA82IHjd7xzIaLtksZtCtBmjnyxxnrZHYJ/r873ir 1KNn0lHc1aIn8PqJJG3sdg7blRNEa/krrJjofM+OU6Zzuljb2Xs3J7wf4zeIe5nY8KvC 1+FeEKC39fGOAFR7tWuCJeP5x4HuPEsB2d4PuS6PkM+FEzqnZ5Sz4GMER5/KOy6ai4LN J7wVRHp4WKmf0ZEfWl3lOZGBrJvt4JbazIIYMgNvnS84O2qLHMUmhMTO5sOf7b0YIRiw mnyT/nOqQX1Uf5+B5Wee7oa+XLicdLK32cIiddOHr2H0u3cRDZBIyKemg8XtJOtTNS4c hyBA== X-Forwarded-Encrypted: i=1; AJvYcCVREiPX+ABenh1NIun2ESC5yzleUOetHjUR+VpPGBuakBEJ6JiKVmT73OetXmPmcEDnq8MFz73F2FUneQsvUQbmELmPYy6oZ74i X-Gm-Message-State: AOJu0YzNlazvlySrJwFEsawYAzcOyC2G97xFUalxpSIHrhm1VYW8VmzH +uAVGxEuTvDXu0+763o4/vNgdlhfNyjmgKTf+WZcifH3Y+k53mu+SleQrSj4jQ== 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-Disposition: inline In-Reply-To: <20240512193240.kholmilosdqjb52p@joelS2.panther.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240512_195805_029166_E7552CAC X-CRM114-Status: GOOD ( 32.24 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org 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=DFschuh 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=DFschuh 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 th= ink > > > patch 11 easily qualifies. Linus should be able to run the same Cocci= nelle > > > script and get nearly the same results, etc. And all the other changes > > > need to have landed. This change also has no "silent failure" conditi= ons: > > > 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 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F252DC25B4F for ; Mon, 13 May 2024 02:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/fIZodoHmtL2a/p5J4oP6ckqDcYa9QEFpjNbjj90rVg=; b=Vg+Y/odQ4qli9o jodoSdaQEPgGOWmEX5Ov0YyjiwXxvVxtLCs0hExoZxLJ++44yh3IewLgxC9Lr9DorEFeKgfp6n7t5 wiO/WnwEzf4vYwvoQ4Yq7iXJh6jh1voFz2yW2tq52KSwDWDjW4+L/8aYZC/kIdYvkhURVNPmRCQnB g58EH5XRjB4uKWl90Ex+LtdM5TQ0PNkC63WPyZG1WLQkZ5VDNz4HyXSFmqyd7BzD4DsujNsD4gSIy dCbjfotoScm0VCsSMfzHK7uueg/m5v+yPwdrwfJoZflyBzLpEQZIQik+39aNwnz8v6Mirv+R934JS Vjk4Yx89RNL6lUYiqBig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6LtA-0000000BRyp-3Q58; Mon, 13 May 2024 02:58:08 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6Lt6-0000000BRwW-3NFn for linux-riscv@lists.infradead.org; Mon, 13 May 2024 02:58:07 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6f4302187c0so3319572b3a.1 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=lists.infradead.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=d3R5/kNAul4804cuCdvk2Di3wQQuvjX0fvfHnrM2xzxCD3IXHi4n0co0mV6QG1W3J3 VBl/ZnKk40lQduh2bSYtrpww5gTCYLluXmC/HtO9GBw4c1n3OKFz1e6zg0YP0eX/kTAh WIVHUwkFLsyAeSpkB9mX2VLZE9khgZj6v87bU= 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=wSHX4uVVgVSKd2oIXbouE5AAG8NId3imUldI6tWjmKxotKxJkpwpvPLn/y1NkzL6Fy VROo52FvS3h6xuzRIUgs4Gc92Jkh9becZAJOyA18v8ZLAuEJ73DsNp696yQmABfxnPP6 1Hx1FkgYT469WDV0PHG3if8VzlascXuj0Bj+19VfmpBsMbXK60EwhqcqQxh27LlCSfiu 6l8ZZkyHd2aQABdkJK0YSx8mMiZRYhd/O0ismqgU0qJjCZKyZsookFilqQ/YI5Ui95bz PMb/j8u15knnsTPJ5OrGzg9nlpnhCvIepdL5hmkoab1tLLT9BUG6Z7RY53z/TnumhWfa QcyA== X-Forwarded-Encrypted: i=1; AJvYcCXvLbejijrKMFL/wmXasqfNeY9JdnjWLKP7PwNl69yd2fS2F8i9roOdRZSPOeHSnkOWf9++lDMqfEPyilhJsUWCp+TXd1esQrilh6vbyZQN X-Gm-Message-State: AOJu0YyVQiKOxAEfG9R2IMnJN4sJ/S2tgnLEWto0D4xYL38oHjMWakyR 5XJFWH5fKsS1msqBum8MfUq+oPgajSYgMaCBi58uhHXPtkOreRSxi09WLNJR5Q== 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-Disposition: inline In-Reply-To: <20240512193240.kholmilosdqjb52p@joelS2.panther.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240512_195805_034062_009ABF22 X-CRM114-Status: GOOD ( 31.89 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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=DFschuh 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=DFschuh 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 th= ink > > > patch 11 easily qualifies. Linus should be able to run the same Cocci= nelle > > > script and get nearly the same results, etc. And all the other changes > > > need to have landed. This change also has no "silent failure" conditi= ons: > > > 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 193C5C25B4F for ; Mon, 13 May 2024 02:58:58 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=LwsipTT5; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Vd4284dZfz3cVf for ; Mon, 13 May 2024 12:58:56 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=LwsipTT5; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::435; helo=mail-pf1-x435.google.com; envelope-from=keescook@chromium.org; receiver=lists.ozlabs.org) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Vd41J3cc4z30TQ for ; Mon, 13 May 2024 12:58:10 +1000 (AEST) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6f457853950so3241480b3a.0 for ; Sun, 12 May 2024 19:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715569083; x=1716173883; darn=lists.ozlabs.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=LwsipTT5BhmRps7R7glMWvdabYTshASAx64lezTpo3qy0t4lEMh+hqquhdYYmWoMCr Y822Wom/e3BxKYuAl6lWeawlyHRrnAX0bqVjndBqLC4UWEnM/7ODyYuWLnW89Wn2Yns4 7aCYxqFO+Eyc4kKxVW+dlXBfk74Ld2YKxXb1Y= 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=ZjRbD0orsIC5bQUWtiopEosHd0yafHD4FsiZ5NvNanXdIEyMul3byaiB3fODhwRTUL xWC3X6WyQnAg9tgYQxYi7fRHYe+bX3kg2rc/CCvOYSEvccs1q0OKgAqV1v6sH2funSoJ uTgXyBGCa9Ch4hSxj3RrdGV3ddvERffq7fN0WXqgNra8iZ+RxyxRf82iONmXfdzpv/dw cFehcWQ/3WOwHFmmwG1gnc9r2EHD5kA1oodQKD6IkpLA+7Q1q/3ks8NK/CsNhSn7+rV4 suf34IRJHSx91sG7gFoM3Mxx2MyyDFCtM0v76XJWnmJGpj1lB6xnhyHdf+zReIXJZ/p9 tHag== X-Forwarded-Encrypted: i=1; AJvYcCUx60GoDAYvXypWSk7skNzR4gJIYn4HuKtdH/cranS6bP/o3rQARkMELDe9XO9LQIVjoil6P/HEHP5yA55eZCASCDmg2E2y13Wkmv/PmA== X-Gm-Message-State: AOJu0YxeLBBlyKyFu4/q/f+N1NApzURGiIcNPE43TMdoBHurt36xnSCW HD+WaD8gusRUFOsGB+xD+X7qF5B9QgoLGdLFmfwVhnJ2Gy6+g+SiZtCjQ+Uebg== 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 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Chinner , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Eric Dumazet , linux-hardening@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, rds-devel@oss.oracle.com, linux-rdma@vger.kernel.org, Luis Chamberlain , linux-sctp@vger.kernel.org, lvs-devel@vger.kernel.org, coreteam@netfilter.org, Jakub Kicinski , linux-trace-kernel@vger.kernel.org, bridge@lists.linux.dev, apparmor@lists.ubuntu.com, linux-xfs@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-nfs@vger.kernel.org, netdev@vger.kernel.org, kexec@lists.infradead.org, Thomas =?iso-8859-1?Q?Wei=DFschuh?= , linux-perf-users@vger.kernel.org, linux-security-module@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FB90C25B5F for ; Mon, 13 May 2024 02:58:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CIE/fhZ3Dt4J5Eu3/kZb90GGFE51Yt7Cft9dx+icmDg=; b=FV52cMCpDu963o UHOcZCW+CxtTx802B2k2qViZDWnvX9ymRfRYBkFRRIFuZEDN9TjXMcdqT0T0XEDdCILD696J4rG3K fUFqePqt0xgYVzBnVgq01/6V2kvB5QVo6Cq4LakkGEK4aArGcqubZpp/G9Ug9hTNSdYXAJbsk70eL ztbop5SA3WyqbefvAURuM6LZst9UTcbbDuoUpem7jc0jAklgI3pYJvuiQdFmeDwDOpU7juZJzZzkx 5nhD1X3qtDk1R8XEV1nw4b5h6NxzJp8R8fD3lvv3jLZnw5i88cikYsS8EO7JHiE8IgUhup+MQyUGx aSCDutfzwD0u617Wbdzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6LtA-0000000BRyU-0Wn4; Mon, 13 May 2024 02:58:08 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6Lt6-0000000BRwa-3OK0 for linux-arm-kernel@lists.infradead.org; Mon, 13 May 2024 02:58:06 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6f457853950so3241485b3a.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=lists.infradead.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=d3R5/kNAul4804cuCdvk2Di3wQQuvjX0fvfHnrM2xzxCD3IXHi4n0co0mV6QG1W3J3 VBl/ZnKk40lQduh2bSYtrpww5gTCYLluXmC/HtO9GBw4c1n3OKFz1e6zg0YP0eX/kTAh WIVHUwkFLsyAeSpkB9mX2VLZE9khgZj6v87bU= 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=RdmAKQRPx1KdJlAtWRl29X+8xWxqAQF0JIr4Pvx+Y/LjZ9+CWvwWpompUqsPfQoDEP abvH0EgSJxMIifvSJl6hip+lB6rYr4K9K0N5YsWbrSL+f4Lu+Y1rIDEpbmtwKg7Z+PXD GQgBDvaHVittzf2StwOJxf4L5+HBBqJDVk3+cb+KkLmWwtHThlSts2L7FduDCP93WzXs MjAX2RCmHn4vkN2GA2MJIIQdhUzKVl6QG7NkheEj4tpJng/4nE98m1aSOhwP7Duo9qmJ XhJGr+GMnuvZHEsyQp8zzzFhHgjbPkaVoqdxx/DQFj13b+QUcofvId9vDDoqyuT39e3h uceA== X-Forwarded-Encrypted: i=1; AJvYcCW0/HnIpT38/yBdkJwttJkVDp59CjJm7WRlizq2/Xk1LRE78dNjtnvSsooOx+3HvW9yHabCFLAExt73sYsKvbhyIVYhe8SrVmnN6QBu9I6onxQXL1c= X-Gm-Message-State: AOJu0Yx9+XJkj5PtY3BAm0DvFkf4hFX/udbyXkcARJGRmm5lLmRUsn9C 9MjY89flKLMPYr6G6hmmKtaWW9gkFKFSAV2rj0lt+D3UI3xo/TGa7bAuDUKQ+g== 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-Disposition: inline In-Reply-To: <20240512193240.kholmilosdqjb52p@joelS2.panther.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240512_195805_007849_46EF0E66 X-CRM114-Status: GOOD ( 33.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=DFschuh 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=DFschuh 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 th= ink > > > patch 11 easily qualifies. Linus should be able to run the same Cocci= nelle > > > script and get nearly the same results, etc. And all the other changes > > > need to have landed. This change also has no "silent failure" conditi= ons: > > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel