<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 11, 2022 at 6:57 PM Jan Stancek <<a href="mailto:jstancek@redhat.com">jstancek@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Apr 11, 2022 at 11:41 AM Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>> wrote:<br>
><br>
> Reference: <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e9506394a159" rel="noreferrer" target="_blank">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e9506394a159</a><br>
><br>
> Signed-off-by: Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>><br>
> ---<br>
>  testcases/kernel/syscalls/pkeys/pkey.h | 7 +++++++<br>
>  1 file changed, 7 insertions(+)<br>
><br>
> diff --git a/testcases/kernel/syscalls/pkeys/pkey.h b/testcases/kernel/syscalls/pkeys/pkey.h<br>
> index 6e32326b6..6cda88ff1 100644<br>
> --- a/testcases/kernel/syscalls/pkeys/pkey.h<br>
> +++ b/testcases/kernel/syscalls/pkeys/pkey.h<br>
> @@ -11,6 +11,13 @@<br>
>  #include "lapi/syscalls.h"<br>
>  #include "lapi/mmap.h"<br>
><br>
> +#if defined(__powerpc__) || defined(__ppc__)<br>
> +# undef PKEY_DISABLE_ACCESS<br>
> +# define PKEY_DISABLE_ACCESS 0x3<br>
<br>
Where does powerpc define <span class="gmail_default" style="font-size:small"></span>PKEY_DISABLE_ACCESS as 0x3?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Good question, I previously thought that was officially defined as 0x3 on PowerPC (per <span style="color:rgb(51,51,51);font-family:sans-serif;font-size:13.3333px">Ram's patch)</span>.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">But after looking at 'powerpc/include/uapi/asm/mman.h' it still includes</div><div class="gmail_default" style="font-size:small">header which define <span class="gmail_default"></span>PKEY_DISABLE_ACCESS as 0x1. </div><div class="gmail_default" style="font-size:small"><span class="gmail_default">    </span>#include <asm-generic/mman-common.h></div><br><div class="gmail_default" style="font-size:small">@<span style="color:rgb(51,51,51);font-family:sans-serif;font-size:13.3333px">Ram Pai, could you explain why you're using 0x3 in kselftest?</span></div><div class="gmail_default" style="font-size:small">Did I miss anything?</div></div><div class="gmail_default" style="font-size:small"><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>