[PATCH v2 2/2] mmc, sdhci, bcm-kona, LLVMLinux: Remove use of __initconst

2014-09-23 Thread behanw
From: Behan Webster The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster Reviewed-by: Mark

[PATCH v2 1/2] gpio, bcm-kona, LLVMLinux: Remove use of __initconst

2014-09-23 Thread behanw
From: Behan Webster The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster Reviewed-by: Mark

[PATCH] gpio, bcm-kona, LLVMLinux: Remove use of __initconst

2014-09-23 Thread behanw
From: Behan Webster The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster Reviewed-by: Mark

[PATCH] kbuild, LLVMLinux: Add -Werror to cc-option to support clang

2014-09-23 Thread behanw
From: Mark Charlebois Clang will warn about unknown warnings but will not return false unless -Werror is set. GCC will return false if an unknown warning is passed. Adding -Werror make both compiler behave the same. Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster Reviewed-by:

[PATCH] kbuild, LLVMLinux: Fix asm-offset generation to work with clang

2014-09-23 Thread behanw
From: Behan Webster When using clang with -no-integerated-as clang will use the gnu assembler instead of the integrated assembler. However clang will still perform asm error checking before sending the inline assembly language to gas. The generation of asm-offsets from within C code is

[PATCH] kbuild, LLVMLinux: Fix asm-offset generation to work with clang

2014-09-23 Thread behanw
From: Behan Webster beh...@converseincode.com When using clang with -no-integerated-as clang will use the gnu assembler instead of the integrated assembler. However clang will still perform asm error checking before sending the inline assembly language to gas. The generation of asm-offsets from

[PATCH] kbuild, LLVMLinux: Add -Werror to cc-option to support clang

2014-09-23 Thread behanw
From: Mark Charlebois charl...@gmail.com Clang will warn about unknown warnings but will not return false unless -Werror is set. GCC will return false if an unknown warning is passed. Adding -Werror make both compiler behave the same. Signed-off-by: Mark Charlebois charl...@gmail.com

[PATCH] gpio, bcm-kona, LLVMLinux: Remove use of __initconst

2014-09-23 Thread behanw
From: Behan Webster beh...@converseincode.com The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster

[PATCH v2 2/2] mmc, sdhci, bcm-kona, LLVMLinux: Remove use of __initconst

2014-09-23 Thread behanw
From: Behan Webster beh...@converseincode.com The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster

[PATCH v2 1/2] gpio, bcm-kona, LLVMLinux: Remove use of __initconst

2014-09-23 Thread behanw
From: Behan Webster beh...@converseincode.com The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster

[PATCH v4 06/12] crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c

2014-09-22 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v4 05/12] crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c

2014-09-22 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v4 07/12] crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c

2014-09-22 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v4 02/12] btrfs: LLVMLinux: Remove VLAIS

2014-09-22 Thread behanw
From: Vinícius Tinti Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch instead allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 08/12] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

2014-09-22 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-22 Thread behanw
From: Behan Webster Add a macro which replaces the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This macro instead allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc

[PATCH v4 09/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c

2014-09-22 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 03/12] crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c

2014-09-22 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 10/12] crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c

2014-09-22 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-22 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v4 00/12] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM

2014-09-22 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. These patches allocate the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. There are places in the kernel whose maintainers have previously

[PATCH v4 12/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c

2014-09-22 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 04/12] crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c

2014-09-22 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v4 12/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c

2014-09-22 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 04/12] crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c

2014-09-22 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v4 00/12] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM

2014-09-22 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. These patches allocate the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. There are places in the kernel whose

[PATCH v4 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-22 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v4 10/12] crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c

2014-09-22 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 03/12] crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c

2014-09-22 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 09/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c

2014-09-22 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-22 Thread behanw
From: Behan Webster beh...@converseincode.com Add a macro which replaces the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This macro instead allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang.

[PATCH v4 02/12] btrfs: LLVMLinux: Remove VLAIS

2014-09-22 Thread behanw
From: Vinícius Tinti viniciusti...@gmail.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch instead allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with

[PATCH v4 08/12] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

2014-09-22 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v4 07/12] crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c

2014-09-22 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v4 06/12] crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c

2014-09-22 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v4 05/12] crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c

2014-09-22 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v3 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-15 Thread behanw
From: Behan Webster Add a macro which replaces the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This macro instead allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc

[PATCH v3 03/12] crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c

2014-09-15 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 02/12] btrfs: LLVMLinux: Remove VLAIS

2014-09-15 Thread behanw
From: Vinícius Tinti Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This is the original VLAIS struct. struct { struct shash_desc shash; char ctx[crypto_shash_descsize(tfm)]; } desc; This patch instead allocates the appropriate

[PATCH v3 05/12] crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c

2014-09-15 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v3 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-15 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v3 09/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c

2014-09-15 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 08/12] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

2014-09-15 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 10/12] crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c

2014-09-15 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 07/12] crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c

2014-09-15 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v3 12/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c

2014-09-15 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 04/12] crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c

2014-09-15 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v3 06/12] crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c

2014-09-15 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang. Signed-off-by:

[PATCH v3 00/12] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM

2014-09-15 Thread behanw
From: Behan Webster These patches replace the use of Variable Length Arrays In Structs (VLAIS) in crypto related code with C99 compliant equivalent code. A SHASH_DESC_ON_STACK() macro is added to hash.h which is then used to replace the use of VLAIS in all the other patches. The minimum size and

[PATCH v3 00/12] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM

2014-09-15 Thread behanw
From: Behan Webster beh...@converseincode.com These patches replace the use of Variable Length Arrays In Structs (VLAIS) in crypto related code with C99 compliant equivalent code. A SHASH_DESC_ON_STACK() macro is added to hash.h which is then used to replace the use of VLAIS in all the other

[PATCH v3 12/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c

2014-09-15 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 04/12] crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c

2014-09-15 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v3 06/12] crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c

2014-09-15 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v3 10/12] crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c

2014-09-15 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 07/12] crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c

2014-09-15 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v3 09/12] crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c

2014-09-15 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 08/12] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

2014-09-15 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-15 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v3 05/12] crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c

2014-09-15 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc

[PATCH v3 03/12] crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c

2014-09-15 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using a char array using the SHASH_DESC_ON_STACK macro. The new code can be compiled with both gcc and clang.

[PATCH v3 02/12] btrfs: LLVMLinux: Remove VLAIS

2014-09-15 Thread behanw
From: Vinícius Tinti viniciusti...@gmail.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This is the original VLAIS struct. struct { struct shash_desc shash; char ctx[crypto_shash_descsize(tfm)]; } desc; This patch instead

[PATCH v3 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-15 Thread behanw
From: Behan Webster beh...@converseincode.com Add a macro which replaces the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This macro instead allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang.

[PATCH] arm64: LLVMLinux: Fix inline arm64 assembly for use with clang

2014-09-14 Thread behanw
From: Mark Charlebois Remove '#' from immediate parameter in AARCH64 inline assembly in mmu. This code now works with both gcc and clang. Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm64/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] arm64: LLVMLinux: Fix inline arm64 assembly for use with clang

2014-09-14 Thread behanw
From: Mark Charlebois charl...@gmail.com Remove '#' from immediate parameter in AARCH64 inline assembly in mmu. This code now works with both gcc and clang. Signed-off-by: Mark Charlebois charl...@gmail.com Signed-off-by: Behan Webster beh...@converseincode.com --- arch/arm64/mm/mmu.c | 2 +-

[PATCH] kbuild, LLVMLinux: Add better clang cross build support

2014-09-05 Thread behanw
From: Behan Webster Add cross target to CC if using clang. Also add custom gcc toolchain path for fallback gcc tools. COMPILER is previously set to "clang" if CC=clang was set from the make command line. So -target and -gcc-toolchain can be added to CC, since we already know that it is set.

[PATCH v2 4/7] arm: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk

2014-09-05 Thread behanw
From: Behan Webster Use the global current_stack_pointer to get the value of the stack pointer. This change supports being able to compile the kernel with both gcc and clang. Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Reviewed-by: Jan-Simon Möller ---

[PATCH v2 3/7] arm: LLVMLinux: Use current_stack_pointer for return_address

2014-09-05 Thread behanw
From: Behan Webster Use the global current_stack_pointer to get the value of the stack pointer. This change supports being able to compile the kernel with both gcc and Clang. Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Reviewed-by: Jan-Simon Möller ---

[PATCH v2 6/7] arm: LLVMLinux: Use current_stack_pointer in unwind_backtrace

2014-09-05 Thread behanw
From: Behan Webster Use the global current_stack_pointer to get the value of the stack pointer. This change supports being able to compile the kernel with both gcc and clang. Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Reviewed-by: Jan-Simon Möller ---

[PATCH v2 7/7] arm: LLVMLinux: Use global stack register variable for percpu

2014-09-05 Thread behanw
From: Mark Charlebois Using global current_stack_pointer works on both clang and gcc. current_stack_pointer is an unsigned long and needs to be cast as a pointer to dereference. Signed-off-by: Mark Charlebois --- arch/arm/include/asm/percpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2 5/7] arm: LLVMLinux: Calculate current_thread_info from current_stack_pointer

2014-09-05 Thread behanw
From: Behan Webster Use the global current_stack_pointer to get the value of the stack pointer. This change supports being able to compile the kernel with both gcc and clang. Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Reviewed-by: Jan-Simon Möller ---

[PATCH v2 2/7] arm: LLVMLinux: Use current_stack_pointer to calculate pt_regs address

2014-09-05 Thread behanw
From: Behan Webster Use the global current_stack_pointer to calculate the end of the stack for current_pt_regs() Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Reviewed-by: Jan-Simon Möller --- arch/arm/include/asm/ptrace.h | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH v2 1/7] arm: LLVMLinux: Add global named register current_stack_pointer for ARM

2014-09-05 Thread behanw
From: Behan Webster Define a global named register for current_stack_pointer. The use of this new variable guarantees that both gcc and clang can access this register in C code. Signed-off-by: Behan Webster Reviewed-by: Jan-Simon Möller Reviewed-by: Mark Charlebois ---

[PATCH v2 0/7] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM

2014-09-05 Thread behanw
From: Behan Webster The LLVMLinux project aims to fully build the Linux kernel using both gcc and clang (the C front end for the LLVM compiler infrastructure project). Clang only supports global named registers for non-allocatable registers like the stack pointer. By centralizing the

[PATCH] fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL

2014-09-05 Thread behanw
From: Mark Charlebois cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a warning about an overflow in XFORM. Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- fs/compat_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] arm64: LLVMLinux: Fix inline arm64 assembly for use with clang

2014-09-05 Thread behanw
From: Mark Charlebois Fix variable types for 64-bit inline assembly. This patch now works with both gcc and clang. Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm64/include/asm/arch_timer.h | 26 +++--- arch/arm64/include/asm/uaccess.h| 2 +-

[PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang

2014-09-05 Thread behanw
From: Behan Webster These symbols are required when compiling the Linux kernel for arch ARM64 with clang. Author: Mark Charlebois Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm64/lib/Makefile | 4 arch/arm64/lib/eabi.c | 32

[PATCH] arm64: LLVMLinux: Add missing abort() for AARCH64

2014-09-05 Thread behanw
From: Mark Charlebois Add missing abort for arch aarch64. This patch makes the aarch64 kernel able to compile with gcc or clang. Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm64/kernel/traps.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH] arm: LLVMLinux: Provide __aeabi_* symbols which are needed for clang

2014-09-05 Thread behanw
From: Behan Webster These symbols are required when compiling the Linux kernel for arch ARM with clang. Author: Mark Charlebois Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm/lib/Makefile | 4 arch/arm/lib/eabi.c | 32 2

[PATCH] mm: Apply the section attribute to the variable, not its type

2014-09-05 Thread behanw
From: Jan-Simon Möller This fixes a compilation error in clang in that a linker section attribute can't be added to a type. arch/x86/mm/mmap.c:34:8: error: '__section__' attribute only applies to functions and global variables struct __read_mostly va_alignment va_align = { ^

[PATCH] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-05 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a flexible array member

[PATCH v2] crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c

2014-09-05 Thread behanw
From: Jan-Simon Möller The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This patch instead allocates the appropriate amount of memory using an char array. struct shash_desc

[PATCH v2] crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c

2014-09-05 Thread behanw
From: Jan-Simon Möller The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This patch instead allocates the appropriate amount of memory using an char array. struct shash_desc

[PATCH] bluetooth: LLVMLinux: Remove VLAIS from bluetooth/amp.c

2014-09-05 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a flexible array member

[PATCH v2] crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c

2014-09-05 Thread behanw
From: Jan-Simon Möller The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This patch instead allocates the appropriate amount of memory using an char array. struct shash_desc

[PATCH v2] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

2014-09-05 Thread behanw
From: Jan-Simon Möller The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This patch instead allocates the appropriate amount of memory using an char array. struct shash_desc

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c

2014-09-05 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a flexible array member

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c

2014-09-05 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a flexible array member

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c

2014-09-05 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a flexible array member

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c

2014-09-05 Thread behanw
From: Behan Webster Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a flexible array member

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c

2014-09-05 Thread behanw
From: Jan-Simon Möller Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a flexible array

[PATCH v2] btrfs: LLVMLinux: Remove VLAIS

2014-09-05 Thread behanw
From: Vinícius Tinti Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This is the original VLAIS struct. struct { struct shash_desc shash; char ctx[crypto_shash_descsize(tfm)]; } desc; This patch instead allocates the appropriate

[PATCH v2] btrfs: LLVMLinux: Remove VLAIS

2014-09-05 Thread behanw
From: Vinícius Tinti viniciusti...@gmail.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This is the original VLAIS struct. struct { struct shash_desc shash; char ctx[crypto_shash_descsize(tfm)]; } desc; This patch instead

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/ccp/ccp-crypto-sha.c

2014-09-05 Thread behanw
From: Jan-Simon Möller dl...@gmx.de Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc contains a

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc

[PATCH v2] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

2014-09-05 Thread behanw
From: Jan-Simon Möller dl...@gmx.de The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This patch instead allocates the appropriate amount of memory using an char array.

[PATCH] crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc

[PATCH v2] crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c

2014-09-05 Thread behanw
From: Jan-Simon Möller dl...@gmx.de The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This patch instead allocates the appropriate amount of memory using an char array.

[PATCH] bluetooth: LLVMLinux: Remove VLAIS from bluetooth/amp.c

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This patch allocates the appropriate amount of memory using an char array. The new code can be compiled with both gcc and clang. struct shash_desc

  1   2   3   >