lkml.org 
[lkml]   [2022]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V3 2/2] mm/mmap: Drop generic protection_map[] array
From


On 6/16/22 11:42, hch@infradead.org wrote:
> On Thu, Jun 16, 2022 at 05:45:39AM +0000, Christophe Leroy wrote:
>>> +/* Note due to the way vm flags are laid out, the bits are XWR */
>>> +pgprot_t protection_map[16] = {
>>
>> Was const previously, now back to non const ? Maybe due to a conflict
>> with linux/mm.h ? At least it should be __ro_after_init.
>
> Maybe we just need to duplicate vm_get_page_prot in all the
> architectures and thus avoid making protection_map global in a
> common header entirely. That certainly seems like the cleaner
> interface.

Agreed, also it does free up the platforms to provide any appropriate
qualifiers for the protection_map[] array i.e __ro_after_init, const
etc without impacting generic declaration used in a generic function.

\
 
 \ /
  Last update: 2022-06-17 05:30    [W:0.355 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site