[PATCH] arm64: allow vmalloc regions to be set with set_memory_*
Ard Biesheuvel
ard.biesheuvel at linaro.org
Thu Jan 28 11:07:02 PST 2016
On 28 January 2016 at 19:10, Will Deacon <will.deacon at arm.com> wrote:
> On Thu, Jan 28, 2016 at 05:43:41PM +0100, Ard Biesheuvel wrote:
>> On 28 January 2016 at 16:08, Will Deacon <will.deacon at arm.com> wrote:
>> > On Mon, Jan 18, 2016 at 03:01:05PM +0100, Ard Biesheuvel wrote:
>> >> The range of set_memory_* is currently restricted to the module address
>> >> range because of difficulties in breaking down larger block sizes.
>> >> vmalloc maps PAGE_SIZE pages so it is safe to use as well. Update the
>> >> function ranges and add a comment explaining why the range is restricted
>> >> the way it is.
>> >>
>> >> Suggested-by: Laura Abbott <labbott at fedoraproject.org>
>> >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
>> >> ---
>> >> arch/arm64/mm/pageattr.c | 23 +++++++++++++++++++----
>> >> 1 file changed, 19 insertions(+), 4 deletions(-)
>> >
>> > What's the user for this? It would be better to apply along with something
>> > that actually needs to change permission for arbitrary vmalloc mappings.
>> >
>>
>> BPF already uses set_memory_ro() but doesn't bother to check the return value.
>
> Urgh :(
>
> Then I can take it as a fix, if you like.
>
I will let you decide whether it should be merged now or in v4.6. I
don't think there's any urgency here, though.
BTW I already sent a v2 based on -rc2 here
http://article.gmane.org/gmane.linux.ports.arm.kernel/472555
Thanks,
Ard.
More information about the linux-arm-kernel
mailing list