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>] [day] [month] [year] [list]
Message-ID: <CACVxJT_eXRNjp-2sEfuxYmzTMPvu7U1R2bsKYjadVfR-W691og@mail.gmail.com>
Date: Tue, 1 Apr 2025 14:18:55 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: Christian Brauner <brauner@...nel.org>, Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, 
	Linux Kernel <linux-kernel@...r.kernel.org>, 
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 1/2] proc: add a helper for marking files as permanent by
 external consumers

>  static int __init proc_filesystems_init(void)
>  {
> - proc_create_single("filesystems", 0, NULL, filesystems_proc_show);
> + struct proc_dir_entry *pde;
> +
> + pde = proc_create_single("filesystems", 0, NULL, filesystems_proc_show);
> + proc_make_permanent(pde);

The only function which should be used is pde_make_permanent()
so that the flag is silently turned off when the code is modular.

Code is fine as-is in this very case but when people start copying it
to real modules
they will start mark PDEs as permanent when it is not true!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ