From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 335FF14D6F9; Thu, 9 Jan 2025 15:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736437915; cv=none; b=d9ztAOH0Zjh0rdtneZoSzI5RZMwyxkw3a+pN0Cr0ABmJC3Ho39865ogbb+lkmcGeTvq5Gah6lDuFTbPSv4ylR6yWormBwItXVUkr9vR/maMRRDScB/X/fzncEbbiShMkk0a+hHdiK1EHKwZMWSLEZTvrGwQ461ddE55WVV5QreU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736437915; c=relaxed/simple; bh=4PNW5U1RCpwSI6ed5qCmkDfjxSB39XjXAAnaje7o+L4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YgSL0Pd1nJaFdW1GYTicH/Ycjm7wc6v4pyxm1j4g2r5erQdKrVE5oZ1LR1g8lyXY1/k4fS1BxUXKDh7bo6FvvhgUXId5cuRly7PLukaUcgfAOCrvM5b6uc2hYuvspIeaWnmbm4XPghEv2r3h9eDCfNT3Gr4OaqAfx1vGvdzM2aA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F9BSlQcx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F9BSlQcx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E5AC4CED2; Thu, 9 Jan 2025 15:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736437915; bh=4PNW5U1RCpwSI6ed5qCmkDfjxSB39XjXAAnaje7o+L4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F9BSlQcxUU/kvrDz8ezVoOO+s/YBhBI99DBGbLdRbteRKBcsdBNKhfA6NIrkjDYkC 9GtrmQ7VK0dv7qDBCLFFprwhk5flkxmRl+V2FYyKWlDlaQk5dy/y43RuJc1rAObSVE sl7FszvwCJ3ZWmJ3LwoRXHehBmq48TqQ4/nOFcPMPAGWGxlPfP39p5Evt4580Qxykh T6IreW5JxdI40u2aiQRRvDdYRS5jpPoTlnD0T3RTnaN10Mg41YwaqUaSESqRhF+j/w 8yWPU7z9RguVCtFoKzz3OeFzncyxzknkL/0P6P7tlQkSO/uCgw6CAfTy6ch0j+etXR 6KWhdTwfzx9bw== Date: Thu, 9 Jan 2025 07:51:54 -0800 From: "Darrick J. Wong" To: Joel Granados Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Kees Cook , Luis Chamberlain , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org, openipmi-developer@lists.sourceforge.net, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-hyperv@vger.kernel.org, linux-rdma@vger.kernel.org, linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org, linux-serial@vger.kernel.org, xen-devel@lists.xenproject.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netfs@lists.linux.dev, codalist@coda.cs.cmu.edu, linux-mm@kvack.org, linux-nfs@vger.kernel.org, ocfs2-devel@lists.linux.dev, fsverity@lists.linux.dev, linux-xfs@vger.kernel.org, io-uring@vger.kernel.org, bpf@vger.kernel.org, kexec@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org Subject: Re: [PATCH] treewide: const qualify ctl_tables where applicable Message-ID: <20250109155154.GP1306365@frogsfrogsfrogs> References: <20250109-jag-ctl_table_const-v1-1-622aea7230cf@kernel.org> Precedence: bulk X-Mailing-List: bpf@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: <20250109-jag-ctl_table_const-v1-1-622aea7230cf@kernel.org> On Thu, Jan 09, 2025 at 02:16:39PM +0100, Joel Granados wrote: > Add the const qualifier to all the ctl_tables in the tree except the > ones in ./net dir. The "net" sysctl code is special as it modifies the > arrays before passing it on to the registration function. > > Constifying ctl_table structs will prevent the modification of > proc_handler function pointers as the arrays would reside in .rodata. > This is made possible after commit 78eb4ea25cd5 ("sysctl: treewide: > constify the ctl_table argument of proc_handlers") constified all the > proc_handlers. Sounds like a good idea, Reviewed-by: "Darrick J. Wong" # xfs --D 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 72027E77197 for ; Thu, 9 Jan 2025 15:53:18 +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=3jxBecHNC0jkOyGL5E5va6a8tZbhKAuc5rXRmlZ2q+k=; b=qj/1wIUA4vwrF0 APdJSAQEzmSBc8tux4/gTVFksGUevKIFHE57Bu2B/ZvU7WcM/TWZthNmp7P0Xnf+i9n/mwHBAzwAt sw/GJrLcz8VQfgC4SHrZ4HiqloxGfifmXT3ZL6piodXdVDbYPTtA7eznDXXMnIKt0H6/9U3lJpZWw bu3w20y1rHStChfpQlX0TjQhaGSPS+avRTKfe+uOj9onN88TfQPiPZWJAbNxFPfn1pmiYOy/e44GM T0uG8M3ZgLqcoBSx6KKHixjgY6afLZ9zFEC+YNob7pkuhHjhvM1xtc6/dI34NdJaPRnGwYmoNuIl1 3QiLFVQkktVjGuf+lzWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tVuqO-0000000CYWo-1RXO; Thu, 09 Jan 2025 15:53:12 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tVupA-0000000CY9H-0m32; Thu, 09 Jan 2025 15:51:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id D378CA420AB; Thu, 9 Jan 2025 15:50:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E5AC4CED2; Thu, 9 Jan 2025 15:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736437915; bh=4PNW5U1RCpwSI6ed5qCmkDfjxSB39XjXAAnaje7o+L4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F9BSlQcxUU/kvrDz8ezVoOO+s/YBhBI99DBGbLdRbteRKBcsdBNKhfA6NIrkjDYkC 9GtrmQ7VK0dv7qDBCLFFprwhk5flkxmRl+V2FYyKWlDlaQk5dy/y43RuJc1rAObSVE sl7FszvwCJ3ZWmJ3LwoRXHehBmq48TqQ4/nOFcPMPAGWGxlPfP39p5Evt4580Qxykh T6IreW5JxdI40u2aiQRRvDdYRS5jpPoTlnD0T3RTnaN10Mg41YwaqUaSESqRhF+j/w 8yWPU7z9RguVCtFoKzz3OeFzncyxzknkL/0P6P7tlQkSO/uCgw6CAfTy6ch0j+etXR 6KWhdTwfzx9bw== Date: Thu, 9 Jan 2025 07:51:54 -0800 From: "Darrick J. Wong" To: Joel Granados Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Kees Cook , Luis Chamberlain , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org, openipmi-developer@lists.sourceforge.net, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-hyperv@vger.kernel.org, linux-rdma@vger.kernel.org, linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org, linux-serial@vger.kernel.org, xen-devel@lists.xenproject.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netfs@lists.linux.dev, codalist@coda.cs.cmu.edu, linux-mm@kvack.org, linux-nfs@vger.kernel.org, ocfs2-devel@lists.linux.dev, fsverity@lists.linux.dev, linux-xfs@vger.kernel.org, io-uring@vger.kernel.org, bpf@vger.kernel.org, kexec@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org Subject: Re: [PATCH] treewide: const qualify ctl_tables where applicable Message-ID: <20250109155154.GP1306365@frogsfrogsfrogs> References: <20250109-jag-ctl_table_const-v1-1-622aea7230cf@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250109-jag-ctl_table_const-v1-1-622aea7230cf@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250109_075156_281679_0F1D4C85 X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Jan 09, 2025 at 02:16:39PM +0100, Joel Granados wrote: > Add the const qualifier to all the ctl_tables in the tree except the > ones in ./net dir. The "net" sysctl code is special as it modifies the > arrays before passing it on to the registration function. > > Constifying ctl_table structs will prevent the modification of > proc_handler function pointers as the arrays would reside in .rodata. > This is made possible after commit 78eb4ea25cd5 ("sysctl: treewide: > constify the ctl_table argument of proc_handlers") constified all the > proc_handlers. Sounds like a good idea, Reviewed-by: "Darrick J. Wong" # xfs --D _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv