* 32-bit poweroc compile failure in v4.19-rc7-166-g7ec21823634d
@ 2018-10-13 20:38 Meelis Roos
2018-10-15 10:33 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: Meelis Roos @ 2018-10-13 20:38 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev
I tried to test the fix to 32-bit poweroc boot hang but found that current git does not compile on 32bit poweroc at all for me:
CC arch/powerpc/kernel/ptrace.o
In file included from ./include/linux/bitmap.h:9,
from ./include/linux/cpumask.h:12,
from ./include/linux/rcupdate.h:44,
from ./include/linux/rculist.h:11,
from ./include/linux/pid.h:5,
from ./include/linux/sched.h:14,
from arch/powerpc/kernel/ptrace.c:19:
In function ‘memcpy’,
inlined from ‘user_regset_copyin’ at ./include/linux/regset.h:295:4,
inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:619:9:
./include/linux/string.h:345:9: error: ‘__builtin_memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union <anonymous>’ [-Werror=array-bounds]
return __builtin_memcpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/ptrace.c: In function ‘vr_set’:
arch/powerpc/kernel/ptrace.c:614:5: note: ‘vrsave’ declared here
} vrsave;
^~~~~~
In file included from ./include/linux/bitmap.h:9,
from ./include/linux/cpumask.h:12,
from ./include/linux/rcupdate.h:44,
from ./include/linux/rculist.h:11,
from ./include/linux/pid.h:5,
from ./include/linux/sched.h:14,
from arch/powerpc/kernel/ptrace.c:19:
In function ‘memcpy’,
inlined from ‘user_regset_copyout’ at ./include/linux/regset.h:270:4,
inlined from ‘vr_get’ at arch/powerpc/kernel/ptrace.c:572:9:
./include/linux/string.h:345:9: error: ‘__builtin_memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union <anonymous>’ [-Werror=array-bounds]
return __builtin_memcpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/ptrace.c: In function ‘vr_get’:
arch/powerpc/kernel/ptrace.c:567:5: note: ‘vrsave’ declared here
} vrsave;
^~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:306: arch/powerpc/kernel/ptrace.o] Error 1
make: *** [Makefile:1052: arch/powerpc/kernel] Error 2
--
Meelis Roos <mroos@linux.ee>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 32-bit poweroc compile failure in v4.19-rc7-166-g7ec21823634d
2018-10-13 20:38 32-bit poweroc compile failure in v4.19-rc7-166-g7ec21823634d Meelis Roos
@ 2018-10-15 10:33 ` Michael Ellerman
2018-10-15 12:20 ` Meelis Roos
0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2018-10-15 10:33 UTC (permalink / raw)
To: Meelis Roos, linux-kernel, linuxppc-dev
Meelis Roos <mroos@linux.ee> writes:
> I tried to test the fix to 32-bit poweroc boot hang but found that current git does not compile on 32bit poweroc at all for me:
That's GCC 8 I think?
I have seen that but couldn't work out what the hell GCC is thinking.
I don't think there's an actual bug, the size of the copy is bounded by
the count parameter, which *doesn't* come from user space, it's hard
coded.
I suspect the logic is just to convoluted for GCC.
We should fix it somehow, but I haven't worked out what's the best option.
cheers
> CC arch/powerpc/kernel/ptrace.o
> In file included from ./include/linux/bitmap.h:9,
> from ./include/linux/cpumask.h:12,
> from ./include/linux/rcupdate.h:44,
> from ./include/linux/rculist.h:11,
> from ./include/linux/pid.h:5,
> from ./include/linux/sched.h:14,
> from arch/powerpc/kernel/ptrace.c:19:
> In function ‘memcpy’,
> inlined from ‘user_regset_copyin’ at ./include/linux/regset.h:295:4,
> inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:619:9:
> ./include/linux/string.h:345:9: error: ‘__builtin_memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union <anonymous>’ [-Werror=array-bounds]
> return __builtin_memcpy(p, q, size);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/kernel/ptrace.c: In function ‘vr_set’:
> arch/powerpc/kernel/ptrace.c:614:5: note: ‘vrsave’ declared here
> } vrsave;
> ^~~~~~
> In file included from ./include/linux/bitmap.h:9,
> from ./include/linux/cpumask.h:12,
> from ./include/linux/rcupdate.h:44,
> from ./include/linux/rculist.h:11,
> from ./include/linux/pid.h:5,
> from ./include/linux/sched.h:14,
> from arch/powerpc/kernel/ptrace.c:19:
> In function ‘memcpy’,
> inlined from ‘user_regset_copyout’ at ./include/linux/regset.h:270:4,
> inlined from ‘vr_get’ at arch/powerpc/kernel/ptrace.c:572:9:
> ./include/linux/string.h:345:9: error: ‘__builtin_memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object ‘vrsave’ with type ‘union <anonymous>’ [-Werror=array-bounds]
> return __builtin_memcpy(p, q, size);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/kernel/ptrace.c: In function ‘vr_get’:
> arch/powerpc/kernel/ptrace.c:567:5: note: ‘vrsave’ declared here
> } vrsave;
> ^~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [scripts/Makefile.build:306: arch/powerpc/kernel/ptrace.o] Error 1
> make: *** [Makefile:1052: arch/powerpc/kernel] Error 2
>
> --
> Meelis Roos <mroos@linux.ee>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 32-bit poweroc compile failure in v4.19-rc7-166-g7ec21823634d
2018-10-15 10:33 ` Michael Ellerman
@ 2018-10-15 12:20 ` Meelis Roos
0 siblings, 0 replies; 3+ messages in thread
From: Meelis Roos @ 2018-10-15 12:20 UTC (permalink / raw)
To: Michael Ellerman, linux-kernel, linuxppc-dev
>> I tried to test the fix to 32-bit poweroc boot hang but found that current git does not compile on 32bit poweroc at all for me:
>
> That's GCC 8 I think?
Yes, gcc version 8.2.0 (Debian 8.2.0-7).
> I have seen that but couldn't work out what the hell GCC is thinking.
>
> I don't think there's an actual bug, the size of the copy is bounded by
> the count parameter, which *doesn't* come from user space, it's hard
> coded.
>
> I suspect the logic is just to convoluted for GCC.
>
> We should fix it somehow, but I haven't worked out what's the best option.
>
> cheers
--
Meelis Roos <mroos@linux.ee>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-15 12:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13 20:38 32-bit poweroc compile failure in v4.19-rc7-166-g7ec21823634d Meelis Roos
2018-10-15 10:33 ` Michael Ellerman
2018-10-15 12:20 ` Meelis Roos
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.