Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp883237lqb; Fri, 15 Mar 2024 08:57:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzx3uYcdYGcOSliwz34P9QGQbgCImfXquXBvf5L1Otm1VAT9CJyZpmFb73jOtrszktJX0HLS5zRzax1HpeBeBe4M9axgCX3VYQMF0DcQ== X-Google-Smtp-Source: AGHT+IGfRR1PG8HTPA2z/R6i125pSHlCO1XzLpeQFggwNjXPLWeRoad0LMiIwCOWX4uJF9rjkEWl X-Received: by 2002:a05:651c:820:b0:2d4:7363:a45a with SMTP id r32-20020a05651c082000b002d47363a45amr2916339ljb.53.1710518239279; Fri, 15 Mar 2024 08:57:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710518239; cv=pass; d=google.com; s=arc-20160816; b=awxIEdeMmro1SXTLN1Qlq9CVpcVybMkGl1GmeqqjCqggFxX4BqzQ4p3LVR36gouUp0 vhqVd+3OAFX2NsiD3iLjUq8keph6q2h0C5e2r1u8xOdJgdIZP7JYSK2ltcMDId+EU0hi Ex8CvozyVqjkwwd0PmkuGNi6kZpTO5S+0yxx2xGX6GSFGJR8GMOMqGne+D+lYz1Pv9GJ 9X9ShLnDUD+3AnMVfULmYjXDjDEg+7q6DZDeqpqleOvdpb7ZRU/yCTYN+kZ1ykLMc5ll 0LC/Gw4RWNzmjPTGHkMYAij4GAQfkAi3kzXJxE1h/1O8KiS2KdxgXvktTmswbXrNRKHr QOuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+nyiJpF6OQUisyviD/R98K984uW3ROgefCJitjtCC3Y=; fh=K/uDYfemp62/Ebt1NzfuhXKZQUuZk4AqF9HfLsmBPa0=; b=J8OSHt74NfSrGhgW68iLHMX/VGzoDwBwB0xcP0ozaoz44Kqh5kss5kL4gNJN5nVrXH m50YaA4I4/rakdzlu+T3EVpp9Ylf1MWEK7bmEGTycUvzDHoNryOskJ+uwPPJ6UEZjdEz HXOccrgjRrFb3uVuCSkX+TMKl69Nk8iYlXz0Q/NPPHWV0u9XUlx04EwRqckD+IQDvSC4 K304OYCsonnkzIh4UTwMoE44xnBrEEhrJIZfHTC5+pJbge4oKf0vSxKsKETgS9evVKG1 42pe9Te/MdMQXBV06rbsdTB5VEylrrzLfmXwxyA+k1vP0LnehB5f5Eg8b0pGPMD2sRN6 fJbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ceZTRWDN; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-104605-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104605-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id en19-20020a056402529300b0056836f9cffdsi1896602edb.688.2024.03.15.08.57.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 08:57:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104605-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ceZTRWDN; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-104605-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104605-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DB13B1F2447B for ; Fri, 15 Mar 2024 15:57:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0097641238; Fri, 15 Mar 2024 15:57:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ceZTRWDN" 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 EBD893D572; Fri, 15 Mar 2024 15:57: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=1710518227; cv=none; b=VDkkpnkpdaYLvgB3P0BBt88vZwuZWYxm7Py1zxalrDG7jL5Wj2AKus+Ya6X87ceTl4pYd1O00E1+DGxNQJxUEQrAQbzV0GWpzu/2isyzfYB7N4uuxUmZ2stnjOuUI+VHNeQ7diScfOwdY32xD15w4nq3LPDKZ9xYixga7yFC57c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710518227; c=relaxed/simple; bh=grogreiidhzKqAV6xg9uMv/owUhYnmKI3PkZ8cq+HNY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fqGhMIE6Vh/UOnEFGyAhspvPr+/oofFYDLgVQzizxdYFz6Q3X+zQUkUNcgElIfuya8+dXKVKKpv7Gkkp1g1Ek3nnVE7GlWUjhIm/W2JuA43O5pDI/fjqRGFp8EUCTP10kHTz8c89yEc0kiffrsgW++EJ6nLu2qW2RYy5x1yMOB8= 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=ceZTRWDN; 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=1710518215; bh=grogreiidhzKqAV6xg9uMv/owUhYnmKI3PkZ8cq+HNY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ceZTRWDNRvuzxzGijbjZJg3nr9DGsQkjB92AO84nlvcUzm7IvHOfh27MxrgzFvvx9 qOM02fuXEziQhOpP07FWkzvec3WLJBuW8kNYukuK8owgbnYDo0Jy49oEVAU7hfT0Ot P20FWjVcteGLnN1Vvg9j0wWrpyoXRZG0nMLl40yI= Date: Fri, 15 Mar 2024 16:56:54 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Joel Granados Cc: Luis Chamberlain , Kees Cook , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2] sysctl: drop unused argument set_ownership()::table Message-ID: <838812fc-d1ee-4088-a704-8b8f15caab13@t-8ch.de> References: <20240223-sysctl-const-ownership-v2-1-f9ba1795aaf2@weissschuh.net> <20240315154134.5qfq6wucxid5kfmc@joelS2.panther.com> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240315154134.5qfq6wucxid5kfmc@joelS2.panther.com> On 2024-03-15 16:41:34+0100, Joel Granados wrote: > Hey Thomas > > Did you forget to compile? I'm seeing the following error when I > compile: Welp... > ... > ../fs/proc/proc_sysctl.c: In function ‘proc_sys_make_inode’: > ../fs/proc/proc_sysctl.c:483:43: error: passing argument 2 of ‘root->set_ownership’ from incompatible pointer type [-Werror=incompatible-pointer-types] > 483 | root->set_ownership(head, table, &inode->i_uid, &inode->i_gid); > | ^~~~~ > | | > | struct ctl_table * > ../fs/proc/proc_sysctl.c:483:43: note: expected ‘kuid_t *’ but argument is of type ‘struct ctl_table *’ > ../fs/proc/proc_sysctl.c:483:50: error: passing argument 3 of ‘root->set_ownership’ from incompatible pointer type [-Werror=incompatible-pointer-types] > 483 | root->set_ownership(head, table, &inode->i_uid, &inode->i_gid); > | ^~~~~~~~~~~~~ > | | > | kuid_t * > ../fs/proc/proc_sysctl.c:483:50: note: expected ‘kgid_t *’ but argument is of type ‘kuid_t *’ > ../fs/proc/proc_sysctl.c:483:17: error: too many arguments to function ‘root->set_ownership’ > 483 | root->set_ownership(head, table, &inode->i_uid, &inode->i_gid); > | ^~~~ > cc1: some warnings being treated as errors > make[5]: *** [../scripts/Makefile.build:243: fs/proc/proc_sysctl.o] Error 1 > CC fs/xfs/libxfs/xfs_dir2_node.o > make[5]: *** Waiting for unfinished jobs.... > ... > > I'm guessing its just a matter of removing the table arg from > proc_sys_make_inode? Yes, for this error it's correct. There are also new implementors of the set_ownership callback in ipc/ which need to be adapted. I'll send a new revision. Thomas