Re: [RFC PATCH v1 3/6] powerpc: Add skeleton for Kernel Userspace Execution Prevention

From: Michael Ellerman
Date: Wed Nov 21 2018 - 06:51:04 EST


Russell Currey <ruscur@xxxxxxxxxx> writes:

> On Wed, 2018-11-07 at 16:56 +0000, Christophe Leroy wrote:
>> This patch adds a skeleton for Kernel Userspace Execution Prevention.
>>
>> Then subarches implementing it have to define CONFIG_PPC_HAVE_KUEP
>> and provide setup_kuep() function.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxx>
>
> An open question (with nothing to do specifically with this patch):
>
> For what reason would you ever disable execution prevention? Clearly
> there must be something since "nosmep" is a thing, but I don't know why
> we'd ever do it.

Because depending on the implementation there might be a performance
overhead, and you may want to avoid that.

cheers