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:   Tue, 21 Mar 2023 21:53:23 -0700
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     x86@...nel.org
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Mark Rutland <mark.rutland@....com>,
        Jason Baron <jbaron@...mai.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Will McVicker <willmcvicker@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 01/11] static_call: Improve key type abstraction

On Tue, Mar 21, 2023 at 09:00:07PM -0700, Josh Poimboeuf wrote:
> diff --git a/kernel/static_call_inline.c b/kernel/static_call_inline.c
> index 639397b5491c..41f6bda6773a 100644
> --- a/kernel/static_call_inline.c
> +++ b/kernel/static_call_inline.c
> @@ -112,15 +112,21 @@ static inline void static_call_sort_entries(struct static_call_site *start,
>  
>  static inline bool static_call_key_has_mods(struct static_call_key *key)
>  {
> -	return !(key->type & 1);
> +	return !!(key->type & 1);
>  }
>  
> -static inline struct static_call_mod *static_call_key_next(struct static_call_key *key)
> +static inline struct static_call_mod *static_call_key_mods(struct static_call_key *key)
>  {
>  	if (!static_call_key_has_mods(key))
>  		return NULL;
>  
> -	return key->mods;
> +	return (struct static_call_mod *)(key->type & ~1);
> +}
> +

Oops, these parts belonged in the next patch.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ