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]
Date:   Fri, 18 Feb 2022 14:07:26 -0500
From:   Jason Baron <jbaron@...mai.com>
To:     Masahiro Yamada <masahiroy@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>
Cc:     linux-kernel@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 2/2] jump_label: refactor #ifdef of struct static_key

On 2/13/22 11:57, Masahiro Yamada wrote:
> Move #ifdef CONFIG_JUMP_LABEL inside the struct static_key.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
>  include/linux/jump_label.h | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
> index 6924e6837e6d..107751cc047b 100644
> --- a/include/linux/jump_label.h
> +++ b/include/linux/jump_label.h
> @@ -82,10 +82,9 @@ extern bool static_key_initialized;
>  				    "%s(): static key '%pS' used before call to jump_label_init()", \
>  				    __func__, (key))
>  
> -#ifdef CONFIG_JUMP_LABEL
> -
>  struct static_key {
>  	atomic_t enabled;
> +#ifdef CONFIG_JUMP_LABEL
>  /*
>   * Note:
>   *   To make anonymous unions work with old compilers, the static
> @@ -104,13 +103,9 @@ struct static_key {
>  		struct jump_entry *entries;
>  		struct static_key_mod *next;
>  	};
> +#endif	/* CONFIG_JUMP_LABEL */
>  };
>  
> -#else
> -struct static_key {
> -	atomic_t enabled;
> -};
> -#endif	/* CONFIG_JUMP_LABEL */
>  #endif /* __ASSEMBLY__ */
>  
>  #ifdef CONFIG_JUMP_LABEL


These two cleanups look fine to me.

Acked-by: Jason Baron <jbaron@...mai.com>>

Thanks,

-Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ