From: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>,
Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: PowerPC: sleftests/powerpc fails to compile linux-next
Date: Fri, 7 Mar 2025 13:48:40 +0530 [thread overview]
Message-ID: <b52834e9-6611-46a0-b036-42f6e9fa202c@linux.ibm.com> (raw)
In-Reply-To: <7d61512d-6dd1-4c09-b408-67bc16340237@linux.ibm.com>
On 07/03/25 12:32 pm, Madhavan Srinivasan wrote:
>
> On 3/6/25 10:30 PM, Venkat Rao Bagalkote wrote:
>> Greetings!!
>>
>> I see selftests/powerpc fails to compile on next-20250306.
>>
>> This error has been introduced in next-20250218. Make is successful on next-20250217.
>>
>>
>> Attached is the .config used.
>>
>>
>> If you fix this, please add below tag.
>>
>> Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>>
>>
>> Errors:
>>
>> make -C powerpc/
>> make: Entering directory '/root/venkat/linux-next/tools/testing/selftests/powerpc'
>> Makefile:60: warning: overriding recipe for target 'emit_tests'
>> ../lib.mk:182: warning: ignoring old recipe for target 'emit_tests'
>> BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/alignment; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C alignment all
>> make[1]: Nothing to be done for 'all'.
>> BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/benchmarks; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C benchmarks all
>> make[1]: Nothing to be done for 'all'.
>> BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/cache_shape; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C cache_shape all
>> make[1]: Nothing to be done for 'all'.
>> BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/copyloops; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C copyloops all
>> make[1]: Nothing to be done for 'all'.
>> BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/dexcr; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C dexcr all
>> make[1]: Nothing to be done for 'all'.
>> BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/dscr; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C dscr all
>> make[1]: Nothing to be done for 'all'.
>> BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/mm; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C mm all
>> CC pkey_exec_prot
>> In file included from pkey_exec_prot.c:18:
>> /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h: In function ‘pkeys_unsupported’:
>> /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h:96:34: error: ‘PKEY_UNRESTRICTED’ undeclared (first use in this function)
>> 96 | pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED);
>> | ^~~~~~~~~~~~~~~~~
> Commit 6d61527d931ba ('mm/pkey: Add PKEY_UNRESTRICTED macro') added a macro PKEY_UNRESTRICTED to handle implicit literal
> value of 0x0 (which is "unrestricted"). belore patch add the same to powerpc/mm selftest.
>
> Can you try with this patch to check whether it fixes the build break for you
>
>
> diff --git a/tools/testing/selftests/powerpc/include/pkeys.h b/tools/testing/selftests/powerpc/include/pkeys.h
> index c6d4063dd4f6..d6deb6ffa1b9 100644
> --- a/tools/testing/selftests/powerpc/include/pkeys.h
> +++ b/tools/testing/selftests/powerpc/include/pkeys.h
> @@ -24,6 +24,9 @@
> #undef PKEY_DISABLE_EXECUTE
> #define PKEY_DISABLE_EXECUTE 0x4
>
> +#undef PKEY_UNRESTRICTED
> +#define PKEY_UNRESTRICTED 0x0
> +
> /* Older versions of libc do not define this */
> #ifndef SEGV_PKUERR
> #define SEGV_PKUERR 4
>
>
> Maddy
/Responding to all/
/
/
Tested with the above patch and it fixes the issue.
Please add below tag.
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Regards,
Venkat.
>
>
>> /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h:96:34: note: each undeclared identifier is reported only once for each function it appears in
>> pkey_exec_prot.c: In function ‘segv_handler’:
>> pkey_exec_prot.c:75:53: error: ‘PKEY_UNRESTRICTED’ undeclared (first use in this function)
>> 75 | pkey_set_rights(fault_pkey, PKEY_UNRESTRICTED);
>> | ^~~~~~~~~~~~~~~~~
>> make[1]: *** [../../lib.mk:222: /root/venkat/linux-next/tools/testing/selftests/powerpc/mm/pkey_exec_prot] Error 1
>> CC pkey_siginfo
>> In file included from pkey_siginfo.c:22:
>> /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h: In function ‘pkeys_unsupported’:
>> /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h:96:34: error: ‘PKEY_UNRESTRICTED’ undeclared (first use in this function)
>> 96 | pkey = sys_pkey_alloc(0, PKEY_UNRESTRICTED);
>> | ^~~~~~~~~~~~~~~~~
>> /root/venkat/linux-next/tools/testing/selftests/powerpc/include/pkeys.h:96:34: note: each undeclared identifier is reported only once for each function it appears in
>> pkey_siginfo.c: In function ‘segv_handler’:
>> pkey_siginfo.c:86:39: error: ‘PKEY_UNRESTRICTED’ undeclared (first use in this function)
>> 86 | pkey_set_rights(pkey, PKEY_UNRESTRICTED);
>> | ^~~~~~~~~~~~~~~~~
>> make[1]: *** [../../lib.mk:222: /root/venkat/linux-next/tools/testing/selftests/powerpc/mm/pkey_siginfo] Error 1
>> make[1]: Target 'all' not remade because of errors.
>> make: *** [Makefile:40: mm] Error 2
>> make: Leaving directory '/root/venkat/linux-next/tools/testing/selftests/powerpc'
>>
>>
>> Regards,
>>
>> Venkat.
prev parent reply other threads:[~2025-03-07 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 17:00 PowerPC: sleftests/powerpc fails to compile linux-next Venkat Rao Bagalkote
2025-03-07 7:02 ` Madhavan Srinivasan
2025-03-07 8:17 ` Venkat Rao Bagalkote
2025-03-07 8:18 ` Venkat Rao Bagalkote [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b52834e9-6611-46a0-b036-42f6e9fa202c@linux.ibm.com \
--to=venkat88@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox