Re: Mark kernel page as read-only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Catalin,

On Thu, Jun 28, 2018 at 10:53:22AM +0000, catalin.vasile@xxxxxxxxxxxx wrote:
> I have some pages allocated through __get_free_pages(). Is there a way
> to set such a page's protection to be read-only? I am working with an
> octeon2 mips platform.

__get_free_pages() is going to give you a virtual address in the
unmapped (c)kseg0 segment, which you cannot modify the protection of.

One option might be to switch away from __get_free_pages() towards using
alloc_pages(), followed by vmap() with a read-only prot argument.

Thanks,
    Paul




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux