[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9308a0f-2877-8ef7-dcb8-301b91195d28@arm.com>
Date: Mon, 14 Feb 2022 15:29:01 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-arch@...r.kernel.org
Subject: Re: [PATCH 30/30] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT
On 2/14/22 3:18 PM, Geert Uytterhoeven wrote:
> Hi Anshuman,
>
> On Mon, Feb 14, 2022 at 7:54 AM Anshuman Khandual
> <anshuman.khandual@....com> wrote:
>> All platforms now define their own vm_get_page_prot() and also there is no
>> generic version left to fallback on. Hence drop ARCH_HAS_GET_PAGE_PROT.
>>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: linux-mm@...ck.org
>> Cc: linux-kernel@...r.kernel.org
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
>
> Thanks for your patch!
>
>> - select ARCH_HAS_VM_GET_PAGE_PROT
>
> So before, all architectures selected ARCH_HAS_VM_GET_PAGE_PROT...
Right. ARCH_HAS_VM_GET_PAGE_PROT construct is required until all platforms
define their own vm_get_page_prot(). But once defined, this can be dropped
off, as a generic MM fallback is no longer available otherwise.
>
>> --- a/mm/mmap.c
>> +++ b/mm/mmap.c
>> @@ -81,7 +81,6 @@ static void unmap_region(struct mm_struct *mm,
>> struct vm_area_struct *vma, struct vm_area_struct *prev,
>> unsigned long start, unsigned long end);
>>
>> -#ifndef CONFIG_ARCH_HAS_VM_GET_PAGE_PROT
>
> ... hence the block below was not included.
>
>> /* description of effects of mapping type and prot in current implementation.
>> * this is due to the limited x86 page protection hardware. The expected
>> * behavior is in parens:
>> @@ -102,8 +101,6 @@ static void unmap_region(struct mm_struct *mm,
>> * w: (no) no
>> * x: (yes) yes
>> */
>> -#endif /* CONFIG_ARCH_HAS_VM_GET_PAGE_PROT */
>> -
>
> So shouldn't the whole block be removed instead?
You are right, will remove the entire comment block here.
> Do I need more coffee??
>
>> static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags)
>> {
>> return pgprot_modify(oldprot, vm_get_page_prot(vm_flags));
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>
Powered by blists - more mailing lists