[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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] 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/.../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] 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: 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 RFC 0/6] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM

2014-09-02 Thread behanw
From: Behan Webster beh...@converseincode.com These patches remove the use of Variable Length Arrays In Structs (VLAIS) in crypto related code. Presented here for comments as a whole (since they all do the same thing in the same way). Once everyone is happy I will submit them individually to

[PATCH RFC 4/6] crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.c

2014-09-02 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 RFC 3/6] crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.c

2014-09-02 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 RFC 6/6] btrfs: LLVMLinux: Remove VLAIS

2014-09-02 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 RFC 2/6] crypto: LLVMLinux: Remove VLAIS usage from crypto/hmac.c

2014-09-02 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 RFC 5/6] apparmor: LLVMLinux: Remove VLAIS

2014-09-02 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(apparmor_tfm)]; } desc; This patch

[PATCH RFC 1/6] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

2014-09-02 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: aligned-attribute.patch

2014-03-27 Thread behanw
From: Mark Charlebois charl...@gmail.com __attribute__((aligned)) applies the default alignment for the largest scalar type for the target ABI. gcc allows it to be applied inline to a defined type. Clang only allows it to be applied to a type definition (PR11071). Making it into 2 lines makes it