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, 29 Jul 2015 10:53:55 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Jason Baron <jbaron@...mai.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org, bp@...en8.de,
	luto@...capital.net, tglx@...utronix.de, rostedt@...dmis.org,
	will.deacon@....com, liuj97@...il.com, rabin@....in,
	ralf@...ux-mips.org, ddaney@...iumnetworks.com,
	benh@...nel.crashing.org, michael@...erman.id.au,
	heiko.carstens@...ibm.com, davem@...emloft.net, vbabka@...e.cz
Subject: Re: [PATCH -v2 7/8] jump_label: Add selftest

On Tue, Jul 28, 2015 at 05:46:40PM -0400, Jason Baron wrote:
> On 07/28/2015 09:21 AM, Peter Zijlstra wrote:

> In order to get the !CONFIG_JUMP_LABEL to work I needed,
> the following:
> 
> diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
> index c033595..27b335a 100644
> --- a/include/linux/jump_label.h
> +++ b/include/linux/jump_label.h
> @@ -183,10 +183,10 @@ static inline int jump_label_apply_nops(struct module *mod)
>      return 0;
>  }
>  
> -#define STATIC_KEY_INIT_TRUE ((struct static_key) \
> -        { .enabled = ATOMIC_INIT(1) })
> -#define STATIC_KEY_INIT_FALSE ((struct static_key) \
> -        { .enabled = ATOMIC_INIT(0) })
> +#define STATIC_KEY_INIT_TRUE    \
> +        { .enabled = ATOMIC_INIT(1) }
> +#define STATIC_KEY_INIT_FALSE    \
> +        { .enabled = ATOMIC_INIT(0) }
>  
>  #endif    /* HAVE_JUMP_LABEL */
>  

Right, I still need to figure out why GCC thinks its not a constant
with that typecast present.

Thanks.

> Other than that, everything seems to be working fine for me
> with -v2.
> 
> We probably should also update Documentation/static-keys.txt.
> I can take a stab at that, if needed.

Ah, yes please. Also the blob at the top of jump_label.h needs some TLC.

> Module selftest is below.
> 

You put a _lot_ more effort in it than me, and it does indeed cover
more, so sure we can do that.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ