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: <257aa5c0-144b-b157-0270-0a7f470c195b@canonical.com>
Date:   Thu, 2 Mar 2023 14:58:28 -0800
From:   John Johansen <john.johansen@...onical.com>
To:     Luis Chamberlain <mcgrof@...nel.org>, ebiederm@...ssion.com,
        keescook@...omium.org, yzaikin@...gle.com, paul@...l-moore.com,
        jmorris@...ei.org, serge@...lyn.com, luto@...capital.net,
        wad@...omium.org, dverkamp@...omium.org, paulmck@...nel.org,
        baihaowen@...zu.com, frederic@...nel.org, jeffxu@...gle.com,
        ebiggers@...nel.org, tytso@....edu, guoren@...nel.org
Cc:     j.granados@...sung.com, zhangpeng362@...wei.com,
        tangmeng@...ontech.com, willy@...radead.org, nixiaoming@...wei.com,
        sujiaxun@...ontech.com, patches@...ts.linux.dev,
        linux-fsdevel@...r.kernel.org, apparmor@...ts.ubuntu.com,
        linux-security-module@...r.kernel.org, linux-csky@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/11] loadpin: simplify sysctls use with
 register_sysctl()

On 3/2/23 12:28, Luis Chamberlain wrote:
> register_sysctl_paths() is not required, we can just use
> register_sysctl() with the required path specified.
> 
> Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
Reviewed-by: John Johansen <john.johansen@...onical.com>

> ---
>   security/loadpin/loadpin.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c
> index d73a281adf86..c971464b4ad5 100644
> --- a/security/loadpin/loadpin.c
> +++ b/security/loadpin/loadpin.c
> @@ -52,12 +52,6 @@ static bool deny_reading_verity_digests;
>   #endif
>   
>   #ifdef CONFIG_SYSCTL
> -static struct ctl_path loadpin_sysctl_path[] = {
> -	{ .procname = "kernel", },
> -	{ .procname = "loadpin", },
> -	{ }
> -};
> -
>   static struct ctl_table loadpin_sysctl_table[] = {
>   	{
>   		.procname       = "enforce",
> @@ -262,7 +256,7 @@ static int __init loadpin_init(void)
>   		enforce ? "" : "not ");
>   	parse_exclude();
>   #ifdef CONFIG_SYSCTL
> -	if (!register_sysctl_paths(loadpin_sysctl_path, loadpin_sysctl_table))
> +	if (!register_sysctl("kernel/loadpin", loadpin_sysctl_table))
>   		pr_notice("sysctl registration failed!\n");
>   #endif
>   	security_add_hooks(loadpin_hooks, ARRAY_SIZE(loadpin_hooks), "loadpin");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ