Re: [PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-18 Thread Michael Ellerman
Meelis Roos writes: >> Rather than relying on that we can pass an explict end_pos based on >> the sizeof(vrsave). The result should be exactly the same but it's >> more obviously not over-reading/writing the stack and it avoids the >> compiler warning. > > It works on my PowerMac G4 with

Re: [PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-16 Thread Meelis Roos
Rather than relying on that we can pass an explict end_pos based on the sizeof(vrsave). The result should be exactly the same but it's more obviously not over-reading/writing the stack and it avoids the compiler warning. It works on my PowerMac G4 with Debian-ports unstable with gcc 8. --

Re: [PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-15 Thread Michael Ellerman
Mathieu Malaterre writes: > On Fri, Feb 15, 2019 at 7:14 AM Michael Ellerman wrote: >> >> GCC 8 warns about the logic in vr_get/set(), which with -Werror breaks >> the build: >> >> In function ‘user_regset_copyin’, >> inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:628:9: >>

Re: [PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-15 Thread Mathieu Malaterre
On Fri, Feb 15, 2019 at 7:14 AM Michael Ellerman wrote: > > GCC 8 warns about the logic in vr_get/set(), which with -Werror breaks > the build: > > In function ‘user_regset_copyin’, > inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:628:9: > include/linux/regset.h:295:4: error:

[PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-14 Thread Michael Ellerman
GCC 8 warns about the logic in vr_get/set(), which with -Werror breaks the build: In function ‘user_regset_copyin’, inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:628:9: include/linux/regset.h:295:4: error: ‘memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object