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: <20150107113004.GJ7485@arm.com>
Date:	Wed, 7 Jan 2015 11:30:05 +0000
From:	Will Deacon <will.deacon@....com>
To:	Anton Blanchard <anton@...ba.org>
Cc:	"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
	"paulus@...ba.org" <paulus@...ba.org>,
	"mpe@...erman.id.au" <mpe@...erman.id.au>,
	"mmarek@...e.cz" <mmarek@...e.cz>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"jbaron@...mai.com" <jbaron@...mai.com>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"liuj97@...il.com" <liuj97@...il.com>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"mgorman@...e.de" <mgorman@...e.de>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	Catalin Marinas <Catalin.Marinas@....com>,
	"ralf@...ux-mips.org" <ralf@...ux-mips.org>,
	"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
	"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"hpa@...or.com" <hpa@...or.com>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] jump_label: Allow asm/jump_label.h to be included in
 assembly

On Wed, Jan 07, 2015 at 10:35:56AM +0000, Anton Blanchard wrote:
> Wrap asm/jump_label.h for all archs with #ifndef __ASSEMBLY__.
> Since these are kernel only headers, we don't need #ifdef __KERNEL__
> so can simplify things a bit.
> 
> If an architecture wants to use jump labels in assembly, it
> will still need to define a macro to create the __jump_table
> entries (see ARCH_STATIC_BRANCH in the powerpc asm/jump_label.h
> for an example).
> 
> Signed-off-by: Anton Blanchard <anton@...ba.org>
> ---
>  arch/arm/include/asm/jump_label.h   | 5 ++---
>  arch/arm64/include/asm/jump_label.h | 8 ++++----
>  arch/mips/include/asm/jump_label.h  | 7 +++----
>  arch/s390/include/asm/jump_label.h  | 3 +++
>  arch/sparc/include/asm/jump_label.h | 5 ++---
>  arch/x86/include/asm/jump_label.h   | 5 ++---
>  6 files changed, 16 insertions(+), 17 deletions(-)

[...]

> diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h
> index 076a1c7..c0e5165 100644
> --- a/arch/arm64/include/asm/jump_label.h
> +++ b/arch/arm64/include/asm/jump_label.h
> @@ -18,11 +18,12 @@
>   */
>  #ifndef __ASM_JUMP_LABEL_H
>  #define __ASM_JUMP_LABEL_H
> +
> +#ifndef __ASSEMBLY__
> +
>  #include <linux/types.h>
>  #include <asm/insn.h>
>  
> -#ifdef __KERNEL__
> -
>  #define JUMP_LABEL_NOP_SIZE		AARCH64_INSN_SIZE
>  
>  static __always_inline bool arch_static_branch(struct static_key *key)
> @@ -39,8 +40,6 @@ l_yes:
>  	return true;
>  }
>  
> -#endif /* __KERNEL__ */
> -
>  typedef u64 jump_label_t;
>  
>  struct jump_entry {
> @@ -49,4 +48,5 @@ struct jump_entry {
>  	jump_label_t key;
>  };
>  
> +#endif  /* __ASSEMBLY__ */
>  #endif	/* __ASM_JUMP_LABEL_H */

The arm64 bit looks fine to me:

  Acked-by: Will Deacon <will.deacon@....com>

Will
--
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