Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2548028rdb; Sun, 3 Dec 2023 23:53:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrykanUyPKuEr2r5i1NJha01EybH5erFd/Q21wAIbFMAxNe84ptL2alMsIh8PcR1BCuVCv X-Received: by 2002:a17:90b:4f86:b0:286:b853:e67d with SMTP id qe6-20020a17090b4f8600b00286b853e67dmr667218pjb.15.1701676415680; Sun, 03 Dec 2023 23:53:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701676415; cv=none; d=google.com; s=arc-20160816; b=gdpNVm+wlAO48iLSX6GJJKV4V3GkBV5tzQUDs/Fz84kRIWZJi5/1FbJG896pIhBHzv PstR0zDbIpymmL61cAqKnBjvzFD8Dc1sQOGRUPx7NKGQSUGlEZXsRPREKCQ6/3175k1v UUnxydzc4aweiEDRVFU1EGkiBQG4SY3HTrkZqsGyZctGMm9EDfjwS1rCxUheCcuIbDy+ CDfR2rzLD05eTeSgaPihFoUIo0kdFAMxjz/oKNkB6D2tDN7PPKM2JEtDLJxvWaJm2uJr zAwHZbCrKUyV+XFjmA9iFu14Xhz8MWfUkMNTOLR0mVNsIHi3GoayA2Uit2iPlR9OmsTV xDCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=KyHa/AYMKZll/TVxkxSDL00xlMlnsKt2iad2QVJKay8=; fh=1v5zqbO9sIGUc9bsdyhYE0zxdK1knZz2xnJYWUWMFKo=; b=yETb2mRGfkvvjyQqQAroTLdUi1KjutAxYKAYJAJIk61J/D3igMdxs9UKrKyCAkBP8g 4rUDjYCkdeRUlVIclmXMVbqReCxG0V/Tx38Sg/GpgFHWQfakoe1zDFf011sxnWpWgjVV YSFSBfknTatqzxztJ8YXoG5lOIh0/cNnnR/3i09UhyxHXKWc3ujozTVGnDDSsuskP4A5 0BuWUkKm7BXlC2b0EyX+xDst8/b3HAXASmut21y3uKR5wrlNpHnoNA5fQ48Pi1AZlq3n YCbc2PePf1HHqsCbezwJFJKO0FbyGOnNpMlD5HuJn0KxSn1xoaDxYYLCs1hJIl/cMN1Q M2vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Az7F8rfS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id i9-20020a17090ad34900b00285a62cc148si2329654pjx.134.2023.12.03.23.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 23:53:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Az7F8rfS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id AB56480597A5; Sun, 3 Dec 2023 23:53:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343549AbjLDHw7 (ORCPT + 99 others); Mon, 4 Dec 2023 02:52:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234769AbjLDHwq (ORCPT ); Mon, 4 Dec 2023 02:52:46 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79B79136; Sun, 3 Dec 2023 23:52:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1701676352; bh=TZdNqn1SiSNc5YcuC4mCIk7Ynn2gUU/Or228atMtaJs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Az7F8rfSpThZ1n25BdEvJp2p9E/AzY0X3wozV/MY1/PAa1/Qj0RAhj7z6fiRqI7kK 7HDAJXx5XOu/S6imHwuojXsRcbfmd6OiQSZzb0GGBpHVT+IA2v6TKvAaAa/d2HWf+4 /NehtYiQxYEIopU8YBWhQpz/RtDsgc+T9zG7k1jA= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 04 Dec 2023 08:52:18 +0100 Subject: [PATCH v2 05/18] seccomp: constify ctl_table arguments of utility functions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231204-const-sysctl-v2-5-7a5060b11447@weissschuh.net> References: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> In-Reply-To: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701676350; l=1238; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=TZdNqn1SiSNc5YcuC4mCIk7Ynn2gUU/Or228atMtaJs=; b=+bb7R1dzvflk2V91q1B3apYuSZNzsswX5hsEfkK3Q7Bi6c2nVr2JfTll1pVlMP5bZS2K4J5GB XaPAF3lxcvpDah0XCW1ntvvsW9fI5ifFd/kDIevoOjVDZbSHl4zCMEZ X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 03 Dec 2023 23:53:28 -0800 (PST) In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- kernel/seccomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 255999ba9190..a23672674ff6 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -2334,7 +2334,7 @@ static bool seccomp_actions_logged_from_names(u32 *actions_logged, char *names) return true; } -static int read_actions_logged(struct ctl_table *ro_table, void *buffer, +static int read_actions_logged(const struct ctl_table *ro_table, void *buffer, size_t *lenp, loff_t *ppos) { char names[sizeof(seccomp_actions_avail)]; @@ -2352,7 +2352,7 @@ static int read_actions_logged(struct ctl_table *ro_table, void *buffer, return proc_dostring(&table, 0, buffer, lenp, ppos); } -static int write_actions_logged(struct ctl_table *ro_table, void *buffer, +static int write_actions_logged(const struct ctl_table *ro_table, void *buffer, size_t *lenp, loff_t *ppos, u32 *actions_logged) { char names[sizeof(seccomp_actions_avail)]; -- 2.43.0