[bug?] Access was denied by memory protection keys in execute-only address

Ram Pai linuxram at us.ibm.com
Sat Mar 24 11:44:40 AEDT 2018

On Fri, Mar 23, 2018 at 05:27:06PM +0800, Li Wang wrote:
>    On Thu, Mar 22, 2018 at 3:09 PM, Ram Pai <[1]linuxram at us.ibm.com> wrote:
>      On Wed, Mar 21, 2018 at 02:53:00PM +0800, Li Wang wrote:
>      >    On Wed, Mar 21, 2018 at 5:58 AM, Ram Pai
>      <[1][2]linuxram at us.ibm.com> wrote:
>      >    that why not disable the pkey_execute_disable_supported on p8

>      machine?
>      It turns out to be a testcase bug.  On Big endian powerpc ABI, function
>      ptrs are basically pointers to function descriptors.  The testcase
>      copies functions which results in function descriptors getting copied.
>      You have to apply the following patch to your test case for it to
>      operate as intended.  Thanks to Michael Ellermen for helping me out.
>      Otherwise I would be scratching my head for ever.
>    ​Thanks for the explanation, I learned something new about this. :)
>    And the worth to say, seems the patch only works on powerpc arch,
>    others(x86_64, etc)
>    that does not works well, so a simple workaround is to isolate the code
>    changes
>    to powerpc system?

yes. this code has to be made applicable to powerpc Big-endian code
only.  The powerpc little-endian code remains unchanged.


More information about the Linuxppc-dev mailing list