Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp172456rdb; Wed, 21 Feb 2024 23:08:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWUXycHO+vXrPFx4KhgPJsIDmlWtEZm/Xb7Vy8ZjELFr9poeuBrEA+fOUcr4sXNqSjmO2oJFVuOIRM4bnHSaKMK/24mDX2rZm/NjTj9IA== X-Google-Smtp-Source: AGHT+IGgEDwXfbaUoUdYZzGBvhkdiI4rgvatsSg6JUcYbc5vjRsdX+eAmHGtQTwanlG/1PLxYNnf X-Received: by 2002:a05:622a:13cd:b0:42c:7a83:141d with SMTP id p13-20020a05622a13cd00b0042c7a83141dmr22939635qtk.5.1708585735885; Wed, 21 Feb 2024 23:08:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708585735; cv=pass; d=google.com; s=arc-20160816; b=IrRb8nSNAP0oukiF/ktwfuW54mivEwQApZ0aJM4WGUMCWUr4d1DqZjX6cuoC/EqEJ8 /wJuiM+ZG8dkY2T3roz/Pz208ZR7fxr4X5yDCSZ4QOa7DNPztNxyWnwwnE+YO4DMKOkF NSlQfptWLh/T7x3YjPyJQwk5tvGMvnzRuUZGosp9Y3ZWIBMChzGRBkYkvLY3TAQqu2c3 r8xWb4pyRIq0IhHls0O6t0etldvQT/aolg0YeV75XJUC6Vl/07y3FJ8xXiNSHV+F/b9J 0Q9KNXQkvtGDptATTOwVSMKRDVyfMmDoDVUFPy1xBcDJJD7LUQXNRSiXJJdyeeX6Yy8I 3Ncg== 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=nOvxDPv25ZFD7BKdpY9x9O0hbyHRPfedcRn/AD7t/Sc=; fh=bv1xmQMLoUkjMaBG31+T8n2MW2r2VJMdwGgIEDt2AwQ=; b=aorDQ+zXahA5sn7+ll+yquPS4398QlaOJcZ2FvR3QQdzMgQyU+zAZN4FtLPK7pwoXQ 2Kv+m3esK9BS78VeLpzV8TuQiDjoeaY8S1NQeSg07prF4ylM7uQxmhlCjDRn8t/YLEC9 hpbpX2FHFriDYlFb6yyLYwbmufhqr15wOJUe/99OR3s8/neY+VGOVmORV7xh1hSkshlx j1p4/HG0JwlVAeIWqdLa154SJdm/WUicbmYct5XlTs4xCX5RXdTo5KsDc1fqc7Gc3/cw pgTVp2jO8xJXhEJV8aUtY2YpMGAqsDmTNczuq+nc/D9eK6llWBWZfXMt28GTjEXgeZE7 qxng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=aGbX+ctM; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-76001-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76001-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x13-20020ac84a0d000000b0042e42f64e8csi1759158qtq.255.2024.02.21.23.08.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 23:08:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76001-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=aGbX+ctM; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-76001-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76001-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9BFC21C20FD1 for ; Thu, 22 Feb 2024 07:08:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0087F17C73; Thu, 22 Feb 2024 07:08:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="aGbX+ctM" 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 536D0F9F5; Thu, 22 Feb 2024 07:08:21 +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=1708585706; cv=none; b=fjZTRvBB8LlcwDm66+9VdNLmApsWzQG0YEyNRUWOzWk8ggkq1NmSrIku/W+6oZEMYty/rOMP+e9dD0meAqdiKeaxPTuh9WtCTfj0Pcj5+3D8av3VG0wLKcVUCr4t2cq8JUCQNHPbVoAR30y1xsyvdI132kLX6fSqX/GqfKD5t7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708585706; c=relaxed/simple; bh=2soR7KajXwzwQXCP9lWkLt0XwWeWSvqlG2ruurCjAJo=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=nGOoIq9muiBkijVdgstX125wHrdOk/uv9hjd9r6dY09qjAYdRf/ACB003yUW7VojJDrv0jmweCtkrvwm7pYsjR0i4YtG1S5X1ecgnTnuY8ARByYSQFoB0Oz/oWL3pm3XBpHMWd3fPCJKFS2ilQSJoChbDGPivJRbqlLF//OWgAI= 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=aGbX+ctM; 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=1708585697; bh=2soR7KajXwzwQXCP9lWkLt0XwWeWSvqlG2ruurCjAJo=; h=From:Subject:Date:To:Cc:From; b=aGbX+ctM3SscFwnv50+cjuwS33sKTxPhZ88xRVQddaA0CGyfHDABEBpfR4yqRGf1K R1O6oxDmHkYbCIL3naj6c0w248pQB1dFBICKe8r+oY8uxW66m4DcP9bjDx0W1vPnU+ /DS9izTjG9IhRc4M9HLWBw9w6sP60rAsUshWggRs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Subject: [PATCH 0/4] sysctl: move sysctl type to ctl_table_header Date: Thu, 22 Feb 2024 08:07:35 +0100 Message-Id: <20240222-sysctl-empty-dir-v1-0-45ba9a6352e8@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=H4sIALjy1mUC/x3MSwqAMAwA0atI1gZMBQteRVyoTTXgj0bEUry7x eVbzCRQDsIKbZEg8C0qx55BZQHTMuwzo7hsMJWpyVCDGnW6VuTtvCI6CWjJ2aYmb0fPkLMzsJf nX3b9+35pYEbOYgAAAA== 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=1708585698; l=1139; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=2soR7KajXwzwQXCP9lWkLt0XwWeWSvqlG2ruurCjAJo=; b=2A7jBJ3P2WImICv/ZMsnClbTGNvpvDRm9MPeySlCwEKssa8drCitOYc9THSuSI6hKWAifDCSU N3mgsO2Q8rkCn+Awh74jLIZi0/ocv08/Cjbgpa2kEtFEgB1z6pCcD7U 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/ --- Thomas Weißschuh (4): sysctl: drop sysctl_is_perm_empty_ctl_table sysctl: move sysctl type to ctl_table_header sysctl: drop now unnecessary out-of-bounds check sysctl: remove unnecessary sentinel element fs/proc/proc_sysctl.c | 19 ++++++++----------- include/linux/sysctl.h | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 22 deletions(-) --- base-commit: b401b621758e46812da61fa58a67c3fd8d91de0d change-id: 20231216-sysctl-empty-dir-71d7631f7bfe Best regards, -- Thomas Weißschuh