[merge] Build failure selftest/powerpc/mm/pkey_exec_prot

Michael Ellerman mpe at ellerman.id.au
Mon Aug 3 21:02:38 AEST 2020


Sachin Sant <sachinp at linux.vnet.ibm.com> writes:
>> On 02-Aug-2020, at 10:58 PM, Sandipan Das <sandipan at linux.ibm.com> wrote:
>> On 02/08/20 4:45 pm, Sachin Sant wrote:
>>> pkey_exec_prot test from linuxppc merge branch (3f68564f1f5a) fails to
>>> build due to following error:
>>> 
>>> gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"v5.8-rc7-1276-g3f68564f1f5a"' -I/home/sachin/linux/tools/testing/selftests/powerpc/include  -m64    pkey_exec_prot.c /home/sachin/linux/tools/testing/selftests/kselftest_harness.h /home/sachin/linux/tools/testing/selftests/kselftest.h ../harness.c ../utils.c  -o /home/sachin/linux/tools/testing/selftests/powerpc/mm/pkey_exec_prot
>>> In file included from pkey_exec_prot.c:18:
>>> /home/sachin/linux/tools/testing/selftests/powerpc/include/pkeys.h:34: error: "SYS_pkey_mprotect" redefined [-Werror]
>>> #define SYS_pkey_mprotect 386
>>> 
>>> In file included from /usr/include/sys/syscall.h:31,
>>>                 from /home/sachin/linux/tools/testing/selftests/powerpc/include/utils.h:47,
>>>                 from /home/sachin/linux/tools/testing/selftests/powerpc/include/pkeys.h:12,
>>>                 from pkey_exec_prot.c:18:
>>> /usr/include/bits/syscall.h:1583: note: this is the location of the previous definition
>>> # define SYS_pkey_mprotect __NR_pkey_mprotect
>>> 
>>> commit 128d3d021007 introduced this error.
>>> selftests/powerpc: Move pkey helpers to headers
>>> 
>>> Possibly the # defines for sys calls can be retained in pkey_exec_prot.c or
>>> 
>> 
>> I am unable to reproduce this on the latest merge branch (HEAD at f59195f7faa4).
>> I don't see any redefinitions in pkey_exec_prot.c either.
>> 
>
> I can still see this problem on latest merge branch.
> I have following gcc version
>
> gcc version 8.3.1 20191121

What libc version? Or just the distro & version?

cheers

> # git show
> commit f59195f7faa4896b7c1d947ac2dba29ec18ad569 (HEAD -> merge, origin/merge)
> Merge: 70ce795dac09 ac3a0c847296
> Author: Michael Ellerman <mpe at ellerman.id.au>
> Date:   Sun Aug 2 23:18:03 2020 +1000
>
>     Automatic merge of 'master', 'next' and 'fixes' (2020-08-02 23:18)
>
> # make -C powerpc
> ……
> …...
> BUILD_TARGET=/home/sachin/linux/tools/testing/selftests/powerpc/mm; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C mm all
> make[1]: Entering directory '/home/sachin/linux/tools/testing/selftests/powerpc/mm'
> gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"v5.8-rc7-1456-gf59195f7faa4"' -I/home/sachin/linux/tools/testing/selftests/powerpc/include  -m64    pkey_exec_prot.c /home/sachin/linux/tools/testing/selftests/kselftest_harness.h /home/sachin/linux/tools/testing/selftests/kselftest.h ../harness.c ../utils.c  -o /home/sachin/linux/tools/testing/selftests/powerpc/mm/pkey_exec_prot
> In file included from pkey_exec_prot.c:18:
> /home/sachin/linux/tools/testing/selftests/powerpc/include/pkeys.h:34: error: "SYS_pkey_mprotect" redefined [-Werror]
>  #define SYS_pkey_mprotect 386
>  
> In file included from /usr/include/sys/syscall.h:31,
>                  from /home/sachin/linux/tools/testing/selftests/powerpc/include/utils.h:47,
>                  from /home/sachin/linux/tools/testing/selftests/powerpc/include/pkeys.h:12,
>                  from pkey_exec_prot.c:18:
> /usr/include/bits/syscall.h:1583: note: this is the location of the previous definition
>  # define SYS_pkey_mprotect __NR_pkey_mprotect


More information about the Linuxppc-dev mailing list