[PATCH v2] crypto: LLVMLinux: Remove VLAIS usage from libcrc32c.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 v2] crypto: LLVMLinux: Remove VLAIS usage from crypto/testmgr.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] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.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] mm: Apply the section attribute to the variable, not its type

2014-09-05 Thread behanw
From: Jan-Simon Möller dl...@gmx.de 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] arm: LLVMLinux: Provide __aeabi_* symbols which are needed for clang

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com These symbols are required when compiling the Linux kernel for arch ARM with clang. Author: Mark Charlebois charl...@gmail.com Signed-off-by: Mark Charlebois charl...@gmail.com Signed-off-by: Behan Webster beh...@converseincode.com ---

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

2014-09-05 Thread behanw
From: Mark Charlebois charl...@gmail.com Add missing abort for arch aarch64. This patch makes the aarch64 kernel able to compile with gcc or clang. Signed-off-by: Mark Charlebois charl...@gmail.com Signed-off-by: Behan Webster beh...@converseincode.com --- arch/arm64/kernel/traps.c | 9

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com These symbols are required when compiling the Linux kernel for arch ARM64 with clang. Author: Mark Charlebois charl...@gmail.com Signed-off-by: Mark Charlebois charl...@gmail.com Signed-off-by: Behan Webster beh...@converseincode.com ---

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

2014-09-05 Thread behanw
From: Mark Charlebois charl...@gmail.com Fix variable types for 64-bit inline assembly. This patch 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/include/asm/arch_timer.h | 26

[PATCH] fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL

2014-09-05 Thread behanw
From: Mark Charlebois charl...@gmail.com 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 charl...@gmail.com Signed-off-by: Behan Webster beh...@converseincode.com --- fs/compat_ioctl.c | 2 +- 1 file

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com 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

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com Use the global current_stack_pointer to calculate the end of the stack for current_pt_regs() Signed-off-by: Behan Webster beh...@converseincode.com Signed-off-by: Mark Charlebois charl...@gmail.com Reviewed-by: Jan-Simon Möller dl...@gmx.de ---

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Reviewed-by: Jan-Simon Möller

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-09-05 Thread behanw
From: Mark Charlebois charl...@gmail.com 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 charl...@gmail.com --- arch/arm/include/asm/percpu.h | 4 ++-- 1

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-09-05 Thread behanw
From: Behan Webster beh...@converseincode.com 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

[PATCH v2] apparmor: LLVMLinux: Remove VLAIS

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

[PATCH RFC 5/6] apparmor: LLVMLinux: Remove VLAIS

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

[PATCH RFC 6/6] btrfs: LLVMLinux: Remove VLAIS

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

2014-09-02 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 RFC 1/6] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt

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

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

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

2014-09-02 Thread behanw
From: Behan Webster 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 their appropriate

[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 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 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 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 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 v2] 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 V2 3/6] arm64: LLVMLinux: Calculate current_thread_info from current_stack_pointer

2014-08-26 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 Reviewed-by: Olof Johansson

[PATCH V2 2/6] arm64: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk

2014-08-26 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 Reviewed-by: Olof Johansson

[PATCH V2 5/6] arm64: LLVMLinux: Use global stack register variable for aarch64

2014-08-26 Thread behanw
From: Mark Charlebois To support both Clang and GCC, use the global stack register variable vs a local register variable. Author: Mark Charlebois Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm64/include/asm/percpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH V2 4/6] arm64: LLVMLinux: Use current_stack_pointer in kernel/traps.c

2014-08-26 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: Olof Johansson Acked-by: Will Deacon ---

[PATCH V2 6/6] arm64: LLVMLinux: Use global stack pointer in return_address()

2014-08-26 Thread behanw
From: Behan Webster The global register current_stack_pointer holds the current stack pointer. This change supports being able to compile the kernel with both gcc and clang. Author: Mark Charlebois Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster ---

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

2014-08-26 Thread behanw
From: Behan Webster This patch set moves from using locally defined named registers to access the stack pointer to using a globally defined named register. This allows the code to work both with gcc and clang. The LLVMLinux project aims to fully build the Linux kernel using both gcc and clang

[PATCH V2 1/6] arm64: LLVMLinux: Add current_stack_pointer() for arm64

2014-08-26 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 Reviewed-by: Olof

[PATCH V2 1/6] arm64: LLVMLinux: Add current_stack_pointer() for arm64

2014-08-26 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Reviewed-by: Jan-Simon Möller

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

2014-08-26 Thread behanw
From: Behan Webster beh...@converseincode.com This patch set moves from using locally defined named registers to access the stack pointer to using a globally defined named register. This allows the code to work both with gcc and clang. The LLVMLinux project aims to fully build the Linux kernel

[PATCH V2 4/6] arm64: LLVMLinux: Use current_stack_pointer in kernel/traps.c

2014-08-26 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

[PATCH V2 6/6] arm64: LLVMLinux: Use global stack pointer in return_address()

2014-08-26 Thread behanw
From: Behan Webster beh...@converseincode.com The global register current_stack_pointer holds the current stack pointer. This change supports being able to compile the kernel with both gcc and clang. Author: Mark Charlebois charl...@gmail.com Signed-off-by: Mark Charlebois charl...@gmail.com

[PATCH V2 5/6] arm64: LLVMLinux: Use global stack register variable for aarch64

2014-08-26 Thread behanw
From: Mark Charlebois charl...@gmail.com To support both Clang and GCC, use the global stack register variable vs a local register variable. Author: Mark Charlebois charl...@gmail.com Signed-off-by: Mark Charlebois charl...@gmail.com Signed-off-by: Behan Webster beh...@converseincode.com ---

[PATCH V2 3/6] arm64: LLVMLinux: Calculate current_thread_info from current_stack_pointer

2014-08-26 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

[PATCH V2 2/6] arm64: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk

2014-08-26 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

[PATCH v3] kbuild, LLVMLinux: Supress warnings unless W=1-3

2014-07-31 Thread behanw
From: Behan Webster clang has more warnings enabled by default. Turn them off unless W is set. This patch fixes a logic bug where warnings in clang were disabled when W was set. Signed-off-by: Behan Webster Signed-off-by: Jan-Simon Möller Signed-off-by: Mark Charlebois Cc: mma...@suse.cz

[PATCH v3] kbuild, LLVMLinux: Supress warnings unless W=1-3

2014-07-31 Thread behanw
From: Behan Webster beh...@converseincode.com clang has more warnings enabled by default. Turn them off unless W is set. This patch fixes a logic bug where warnings in clang were disabled when W was set. Signed-off-by: Behan Webster beh...@converseincode.com Signed-off-by: Jan-Simon Möller

[PATCH v2] kbuild, LLVMLinux: Supress warnings unless W=1-3

2014-07-30 Thread behanw
From: Behan Webster clang has more warnings enabled by default. Turn them off unless W is set. This patch fixes a logic bug where warnings in clang were disabled when W was set. Signed-off-by: Behan Webster Signed-off-by: Jan-Simon Möller Signed-off-by: Mark Charlebois Cc: mma...@suse.cz

[PATCH 4/4] arm64: LLVMLinux: Use current_stack_pointer in kernel/traps.c

2014-07-30 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 --- arch/arm64/kernel/traps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH 2/4] arm64: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk

2014-07-30 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 1/4] arm64: LLVMLinux: Add current_stack_pointer() for arm64

2014-07-30 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 3/4] arm64: LLVMLinux: Calculate current_thread_info from current_stack_pointer

2014-07-30 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 0/4] LLVMLinux: Patches to enable the kernel to be compiled with clang/LLVM

2014-07-30 Thread behanw
From: Behan Webster This patch set moves from using locally defined named registers to access the stack pointer to using a globally defined named register. This allows the code to work both with gcc and clang. The LLVMLinux project aims to fully build the Linux kernel using both gcc and clang

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

2014-07-30 Thread behanw
From: Behan Webster beh...@converseincode.com This patch set moves from using locally defined named registers to access the stack pointer to using a globally defined named register. This allows the code to work both with gcc and clang. The LLVMLinux project aims to fully build the Linux kernel

[PATCH 1/4] arm64: LLVMLinux: Add current_stack_pointer() for arm64

2014-07-30 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Reviewed-by: Jan-Simon Möller

[PATCH 3/4] arm64: LLVMLinux: Calculate current_thread_info from current_stack_pointer

2014-07-30 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

[PATCH 2/4] arm64: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk

2014-07-30 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

[PATCH 4/4] arm64: LLVMLinux: Use current_stack_pointer in kernel/traps.c

2014-07-30 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com --- arch/arm64/kernel/traps.c | 3 +--

[PATCH v2] kbuild, LLVMLinux: Supress warnings unless W=1-3

2014-07-30 Thread behanw
From: Behan Webster beh...@converseincode.com clang has more warnings enabled by default. Turn them off unless W is set. This patch fixes a logic bug where warnings in clang were disabled when W was set. Signed-off-by: Behan Webster beh...@converseincode.com Signed-off-by: Jan-Simon Möller

[PATCH] arm: LLVMLinux: use static inline in ARM ftrace.h

2014-07-09 Thread behanw
From: Behan Webster With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the wrong thing (emits code for an externally linkable version of the inline function). In this case using static inline and removing the NULL version of return_address

[PATCH] arm: LLVMLinux: use static inline in ARM ftrace.h

2014-07-09 Thread behanw
From: Behan Webster beh...@converseincode.com With compilers which follow the C99 standard (like modern versions of gcc and clang), extern inline does the wrong thing (emits code for an externally linkable version of the inline function). In this case using static inline and removing the NULL

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

2014-07-08 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 4/6] arm: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk

2014-07-08 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 6/6] arm: LLVMLinux: Use current_stack_pointer in unwind_backtrace

2014-07-08 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 2/6] arm: LLVMLinux: Use current_stack_pointer to calculate pt_regs address

2014-07-08 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 3/6] arm: LLVMLinux: Use current_stack_pointer for return_address

2014-07-08 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 1/6] arm: LLVMLinux: Add global named register current_stack_pointer for ARM

2014-07-08 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 5/6] arm: LLVMLinux: Calculate current_thread_info from current_stack_pointer

2014-07-08 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 5/6] arm: LLVMLinux: Calculate current_thread_info from current_stack_pointer

2014-07-08 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-07-08 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Reviewed-by: Jan-Simon Möller

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

2014-07-08 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-07-08 Thread behanw
From: Behan Webster beh...@converseincode.com Use the global current_stack_pointer to calculate the end of the stack for current_pt_regs() Signed-off-by: Behan Webster beh...@converseincode.com Signed-off-by: Mark Charlebois charl...@gmail.com Reviewed-by: Jan-Simon M??ller dl...@gmx.de ---

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

2014-07-08 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-07-08 Thread behanw
From: Behan Webster beh...@converseincode.com 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 beh...@converseincode.com Signed-off-by: Mark Charlebois

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

2014-07-08 Thread behanw
From: Behan Webster beh...@converseincode.com 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

[PATCH] kbuild, LLVMLinux: only use warnings when using clang

2014-06-30 Thread behanw
From: Behan Webster Only consider clang warnings in Kbuild when using the clang compiler. Signed-off-by: Behan Webster --- scripts/Makefile.extrawarn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index

[PATCH] kbuild, LLVMLinux: only use warnings when using clang

2014-06-30 Thread behanw
From: Behan Webster beh...@converseincode.com Only consider clang warnings in Kbuild when using the clang compiler. Signed-off-by: Behan Webster beh...@converseincode.com --- scripts/Makefile.extrawarn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] mbcache: LLVMLinux: Remove double calculation from mbcache

2014-04-29 Thread behanw
From: Mark Charlebois The call to __builtin_log2 presumes there is a double log2(double x) function defined in the kernel. The call to hash_log is a call to hash_64 which is defined in include/linux/hash.h static __always_inline u64 hash_64(u64 val, unsigned int bits) That means that

[PATCH] mbcache: LLVMLinux: Remove double calculation from mbcache

2014-04-29 Thread behanw
From: Mark Charlebois charl...@gmail.com The call to __builtin_log2 presumes there is a double log2(double x) function defined in the kernel. The call to hash_log is a call to hash_64 which is defined in include/linux/hash.h static __always_inline u64 hash_64(u64 val, unsigned int bits) That

[PATCH] Kbuild arm: LLVMLinux: Add Kbuild support for building arch arm with Clang

2014-04-22 Thread behanw
From: Behan Webster Protect more options for arm with cc-option so that we don't get errors when using clang instead of gcc. Add more or different options when using clang as well. Author: Behan Webster Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster --- arch/arm/Makefile

[PATCH] Kbuild arm: LLVMLinux: Add Kbuild support for building arch arm with Clang

2014-04-22 Thread behanw
From: Behan Webster beh...@converseincode.com Protect more options for arm with cc-option so that we don't get errors when using clang instead of gcc. Add more or different options when using clang as well. Author: Behan Webster beh...@converseincode.com Signed-off-by: Mark Charlebois

[PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option

2014-04-21 Thread behanw
From: Behan Webster Wrap -mno-80387 gcc options with cc-option so they don't break clang. Signed-off-by: Behan Webster --- arch/x86/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index d1b7c37..ce6ad7e 100644 ---

[PATCH] mbcache: LLVMLinux: Remove double calculation from mbcache

2014-04-21 Thread behanw
From: Mark Charlebois The call to __builtin_log2 presumes there is a double log2(double x) function defined in the kernel. The call to hash_log is a call to hash_64 which is defined in include/linux/hash.h static __always_inline u64 hash_64(u64 val, unsigned int bits) That means that

[PATCH] mbcache: LLVMLinux: Remove double calculation from mbcache

2014-04-21 Thread behanw
From: Mark Charlebois charl...@gmail.com The call to __builtin_log2 presumes there is a double log2(double x) function defined in the kernel. The call to hash_log is a call to hash_64 which is defined in include/linux/hash.h static __always_inline u64 hash_64(u64 val, unsigned int bits) That

[PATCH] x86: LLVMLinux: Wrap -mno-80387 with cc-option

2014-04-21 Thread behanw
From: Behan Webster beh...@converseincode.com Wrap -mno-80387 gcc options with cc-option so they don't break clang. Signed-off-by: Behan Webster beh...@converseincode.com --- arch/x86/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/Makefile

[PATCH] crypto: LLVMLinux: aligned-attribute.patch

2014-03-27 Thread behanw
From: Mark Charlebois __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 more readable and

[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

[PATCH v2] arm: LLVMLinux: use static inline in ARM ftrace.h

2014-03-23 Thread behanw
From: Behan Webster With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the wrong thing (emits code for an externally linkable version of the inline function). In this case using static inline and removing the NULL version of return_address

[PATCH v4] LLVMLinux: Remove warning about returning an uninitialized variable

2014-03-23 Thread behanw
From: Behan Webster Fix uninitialized return code in default case in cmpxchg-local.h This patch fixes the code to prevent an uninitialized return value that is detected when compiling with clang. The bug produces numerous warnings when compiling the Linux kernel with clang. Signed-off-by:

[PATCH v4] net: netfilter: LLVMLinux: vlais-netfilter

2014-03-23 Thread behanw
From: Mark Charlebois Replaced non-standard C use of Variable Length Arrays In Structs (VLAIS) in xt_repldata.h with a C99 compliant flexible array member and then calculated offsets to the other struct members. These other members aren't referenced by name in this code, however this patch

[PATCH v4] net: netfilter: LLVMLinux: vlais-netfilter

2014-03-23 Thread behanw
From: Mark Charlebois charl...@gmail.com Replaced non-standard C use of Variable Length Arrays In Structs (VLAIS) in xt_repldata.h with a C99 compliant flexible array member and then calculated offsets to the other struct members. These other members aren't referenced by name in this code,

[PATCH v4] LLVMLinux: Remove warning about returning an uninitialized variable

2014-03-23 Thread behanw
From: Behan Webster beh...@converseincode.com Fix uninitialized return code in default case in cmpxchg-local.h This patch fixes the code to prevent an uninitialized return value that is detected when compiling with clang. The bug produces numerous warnings when compiling the Linux kernel with

[PATCH v2] arm: LLVMLinux: use static inline in ARM ftrace.h

2014-03-23 Thread behanw
From: Behan Webster beh...@converseincode.com With compilers which follow the C99 standard (like modern versions of gcc and clang), extern inline does the wrong thing (emits code for an externally linkable version of the inline function). In this case using static inline and removing the NULL

[PATCH v3] LLVMLinux: Remove warning about returning an uninitialized variable

2014-03-22 Thread behanw
From: Behan Webster Fix uninitialized return code in default case in cmpxchg-local.h This patch fixes the code to prevent an uninitialized return value that is detected when compiling with clang. The bug produces numerous warnings when compiling the Linux kernel with clang. Signed-off-by:

[PATCH] LLVMLinux: Change DWARF flag to support gcc and clang

2014-03-22 Thread behanw
From: Behan Webster Both gcc (well, actually gnu as) and clang support the "-Wa,-gdwarf-2" option (though clang does not support "-Wa,--gdwarf-2"). Since these flags are equivalent in meaning, this patch uses the one which is better supported across compilers. Signed-off-by: Behan Webster ---

[PATCH v2] LLVMLinux: Remove warning about returning an uninitialized variable

2014-03-22 Thread behanw
From: Behan Webster Fix uninitialized return code in default case in cmpxchg-local.h This patch fixes the code to prevent an uninitialized return value that is detected when compiling with clang. The bug produces numerous warnings when compiling the Linux kernel with clang. Signed-off-by:

[PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in glue-cache.h

2014-03-22 Thread behanw
From: Behan Webster With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the wrong thing (emits code for an externally linkable version of the inline function). "static inline" is the correct choice instead. Author: Behan Webster

<    1   2   3   >