lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <838812fc-d1ee-4088-a704-8b8f15caab13@t-8ch.de>
Date: Fri, 15 Mar 2024 16:56:54 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Joel Granados <j.granados@...sung.com>
Cc: Luis Chamberlain <mcgrof@...nel.org>, 
	Kees Cook <keescook@...omium.org>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, 
	netdev@...r.kernel.org
Subject: Re: [PATCH v2] sysctl: drop unused argument set_ownership()::table

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ