[PATCH] powerpc/ptrace: Fix out of bounds array access warning

2016-04-24 Thread Khem Raj
fpr[32][0])); ^ check the end of array instead of beginning of next element to fix this Signed-off-by: Khem Raj Cc: Kees Cook Cc: Michael Ellerman --- arch/powerpc/kernel/ptrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kerne

[PATCH V2] powerpc/ptrace: Fix out of bounds array access warning

2016-04-25 Thread Khem Raj
fpr[32][0])); ^ check the end of array instead of beginning of next element to fix this Signed-off-by: Khem Raj Cc: Kees Cook Cc: Michael Ellerman Cc: Segher Boessenkool --- Changes from v1 to v2: - Check for fpr[32] instead of fpr[31][1] arch/powerpc/kernel/ptrace.c | 4 ++-- 1 file changed, 2

[PATCH 1/2] powerpc: Disable attribute-alias warnings from gcc8

2018-05-04 Thread Khem Raj
Fixes alias between functions of incompatible types warnings which are new with gcc8 Signed-off-by: Khem Raj Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel

[PATCH 2/2] powerpc/ptrace: Disable array-bounds warning with gcc8

2018-05-04 Thread Khem Raj
This masks the new gcc8 warning regset.h:270:4: error: 'memcpy' offset [-527, -529] is out of the bounds [0, 16] of object 'vrsave' with type 'union ' Signed-off-by: Khem Raj Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/Mak