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:   Wed, 1 Feb 2017 13:51:03 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Jason Baron <jbaron@...mai.com>
Cc:     mingo@...nel.org, linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH v3] jump_label: reduce the size of struct static_key

On Tue, 31 Jan 2017 17:00:43 -0500
Jason Baron <jbaron@...mai.com> wrote:

> --- a/kernel/jump_label.c
> +++ b/kernel/jump_label.c
> @@ -236,12 +236,27 @@ void __weak __init_or_module arch_jump_label_transform_static(struct jump_entry
>  
>  static inline struct jump_entry *static_key_entries(struct static_key *key)
>  {
> -	return (struct jump_entry *)((unsigned long)key->entries & ~JUMP_TYPE_MASK);

I wonder if we should add:

	WARN_ON_ONCE(key->type & JUMP_TYPE_LINKED);

> +	return (struct jump_entry *)(key->type & ~JUMP_TYPE_MASK);
>  }
>  

[...]

>  
> +static inline struct static_key_mod *static_key_mod(struct static_key *key)
> +{

	WARN_ON_ONCE(!(key->type & JUMP_TYPE_LINKED));

> +	return (struct static_key_mod *)(key->type & ~JUMP_TYPE_MASK);
> +}
> +

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ