Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1278020lqp; Fri, 22 Mar 2024 10:07:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnmsKCb7LhtFLVYTQlVCC+qd+UjhqnQR9S9sTVuVr6FMCDQjbn7iDMIo2R2ux4BRO8tlQ5JLr/RsWg+6XxMllQjAySBBbQBIs3eBa7hw== X-Google-Smtp-Source: AGHT+IExAw8sEQ1DF82iGt59751ltUeOy+C/rPUm1NWnUNexxzPcTpgjJYk6dFGypR3i/Kl1R1IL X-Received: by 2002:a05:6a00:1829:b0:6e6:1f10:9ead with SMTP id y41-20020a056a00182900b006e61f109eadmr338340pfa.27.1711127256158; Fri, 22 Mar 2024 10:07:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711127256; cv=pass; d=google.com; s=arc-20160816; b=HduOa1X7An8ReogfLJX9gpZfSxJ+ZhlN6wCakJc2YTO2dBfbLbj+9gEF1jfsurdQeW 7L5iolUSsATEZ8UJL0X1Y/zTmJEil+cW65k6i5YP7hy4n2lvU/ahjky0prhv5VU+pNuT rmb38dlRqhLmqKbQgf4S/mqCuw+ysT9349skKZ+vy9XsksOFrFL3soYsLRyv7GUCqaun cmFPmEYtb9rA5Mhx0RSHfSNhbWiGVfd+x8iJsnZD1f4m7FU1UIJw0gSKPqQr1yhBMqnJ eqGCfgSbWOb6SJ+3Jj8mmNvgG9f+QiT+NHOpLOXALkWG9XNHxN+lUHFiur4QJQYGGtsb txJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=VtK9WJL+92atfBKYcsItOmHF+K/iwaMGioaVXWWm570=; fh=bv1xmQMLoUkjMaBG31+T8n2MW2r2VJMdwGgIEDt2AwQ=; b=kx1IrqjXazWGmzN2Hhu8fdreBpIYMcmgIPdo94Zp4W6ET1ZT1GJgQI9uHDEDJ7XUp4 lWC7IDYFNsM7cMHU2/8LuJDn6kTlDVWXZGU4ktsxT4mi1YHcuxRxuXQhZAOqFWFt0jPV 04ZLZGYchp+3vPsZwComUM+ONPht8dQcUhwtk+YgFT+6gbplU6BeT6hrlxmr8xE+QPkQ HWRgsNxJ1BNUsGqKvmoPJf9UTbs1Vt33jefiZRaQB/wr15lwnIu4KdU8vg3k0Bl5R3Nl yOEv4MtL/T0dBUIQAa/FUqc10/OxKgnLL1ytAEnz3zp0wUtNsHCm3aTpDWXQzfWhWok/ luNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="TZ/tkMVc"; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-111843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111843-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id eg21-20020a056a00801500b006ea7e74b130si77299pfb.121.2024.03.22.10.07.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 10:07:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="TZ/tkMVc"; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-111843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111843-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 451E7282CE6 for ; Fri, 22 Mar 2024 17:06:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8D935FDC9; Fri, 22 Mar 2024 17:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="TZ/tkMVc" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 E757B5D752; Fri, 22 Mar 2024 17:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711127167; cv=none; b=Pr9CpeixvMMXmh3Q+fmdYzwGXdlMBi9u3RKSOMMig/PTlZr6ak9mQGgSOXKGf6eaI2hlamvFO54A9iSVlzaa+5GOLThzblBS81aQZ6Nl7bChNI4HeJ6cws9uKGPd7m3+1XkTObR9/eJwVn2aVuS8OWp1vewNjvF4l4nuHlql6Bc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711127167; c=relaxed/simple; bh=xfu3y4QYAgn5H7+B8mfCPDTjeXUxu85jQuuNI/0GZag=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=CoIY1kFNNlCArdz4L/TpmBPIsqyqEUO+jvvtCw9IOdL4UZdk+G+1ASGKj56L59fdT/myFkOuYyhO+dOMtoaVWjP7V2BczDXZmhXz2p9yV5WN5GgSGXcesNbQ1jZuK+LrQ3S+QnBxYKXgMBMgSu693P2XpYF7QyPV4Q8Zx1b7WMM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=TZ/tkMVc; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1711127160; bh=xfu3y4QYAgn5H7+B8mfCPDTjeXUxu85jQuuNI/0GZag=; h=From:Subject:Date:To:Cc:From; b=TZ/tkMVcIsrPODIhl7kLOqJPmZDhdRfN8YqM75QXBEaRswNXWWx1Z2pAKgxEJeWll v2vgp1ZNmUIDKzFSb606LiFPaYA8PV5Nsx/WDDYeiZCnraW27aXtUB9tCq4xgpmd6d GI6UfAw+dJCrUCG1q9Rgxcx9A7f+eK/dYRfXIFes= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Subject: [PATCH v2 0/3] sysctl: move sysctl type to ctl_table_header Date: Fri, 22 Mar 2024 18:05:55 +0100 Message-Id: <20240322-sysctl-empty-dir-v2-0-e559cf8ec7c0@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="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAHO6/WUC/2WNSw6CQBAFr0J6bRum+Skr72FY8GmcThTI9IgSw t0d2LqsSl69FZSdsEIZreB4FpVxCECnCFpbDw9G6QIDxZQYMjnqoq1/Ir8mv2AnDgvTFXli+qL pGcJsctzL90jeq8BW1I9uOR5ms9s9lsZE9B+bDcaYZk19rfMkI77cPiyq2tq3PQ/sodq27QfpV +F8tQAAAA== To: "Eric W. Biederman" , Luis Chamberlain , Kees Cook , Joel Granados Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1711127159; l=1342; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=xfu3y4QYAgn5H7+B8mfCPDTjeXUxu85jQuuNI/0GZag=; b=KuaG1JDkxSMsUgB3vh72Zf9SMWssHzNMLmc6o3LiNi04YbgX97I5qIPWeAwFaZNVutwWnTFOW AoAawNQWPXnCldm0bnTkTwD74upFB3J3j0GLWOewBPTqV7OY3mjTeau X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Praparation series to enable constification of struct ctl_table further down the line. No functional changes are intended. These changes have been split out and reworked from my original const sysctl patchset [0]. I'm resubmitting the patchset in smaller chunks for easier review. Each split-out series is meant to be useful on its own. Changes since the original series: * Explicit initializartion of header->type in init_header() * Some additional cleanups [0] https://lore.kernel.org/lkml/20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net/ --- Changes in v2: - Rebase onto next-20240322 without changes - Squash patch 4 into patch 3 (Joel) - Rework commit messages as per Joels requests - Link to v1: https://lore.kernel.org/r/20240222-sysctl-empty-dir-v1-0-45ba9a6352e8@weissschuh.net --- Thomas Weißschuh (3): sysctl: drop sysctl_is_perm_empty_ctl_table sysctl: move sysctl type to ctl_table_header sysctl: drop now unnecessary out-of-bounds check fs/proc/proc_sysctl.c | 19 ++++++++----------- include/linux/sysctl.h | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 22 deletions(-) --- base-commit: 13ee4a7161b6fd938aef6688ff43b163f6d83e37 change-id: 20231216-sysctl-empty-dir-71d7631f7bfe Best regards, -- Thomas Weißschuh