[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <908938ec-912b-9190-40e0-11ca88e8f0d7@intel.com>
Date: Tue, 25 May 2021 08:03:20 -0700
From: "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-mm@...ck.org,
linux-arch@...r.kernel.org, linux-api@...r.kernel.org,
Arnd Bergmann <arnd@...db.de>,
Andy Lutomirski <luto@...nel.org>,
Balbir Singh <bsingharora@...il.com>,
Borislav Petkov <bp@...en8.de>,
Cyrill Gorcunov <gorcunov@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Eugene Syromiatnikov <esyr@...hat.com>,
Florian Weimer <fweimer@...hat.com>,
"H.J. Lu" <hjl.tools@...il.com>, Jann Horn <jannh@...gle.com>,
Jonathan Corbet <corbet@....net>,
Kees Cook <keescook@...omium.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Nadav Amit <nadav.amit@...il.com>,
Oleg Nesterov <oleg@...hat.com>, Pavel Machek <pavel@....cz>,
Peter Zijlstra <peterz@...radead.org>,
Randy Dunlap <rdunlap@...radead.org>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Vedvyas Shanbhogue <vedvyas.shanbhogue@...el.com>,
Dave Martin <Dave.Martin@....com>,
Weijiang Yang <weijiang.yang@...el.com>,
Pengfei Xu <pengfei.xu@...el.com>,
Haitao Huang <haitao.huang@...el.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Will Deacon <will@...nel.org>
Subject: Re: [PATCH v27 30/31] mm: Update arch_validate_flags() to test vma
anonymous
On 5/25/2021 4:00 AM, Catalin Marinas wrote:
> On Fri, May 21, 2021 at 03:12:10PM -0700, Yu-cheng Yu wrote:
>> When newer VM flags are being created, such as VM_MTE, it becomes necessary
>> for mmap/mprotect to verify if certain flags are being applied to an
>> anonymous VMA.
>>
>> To solve this, one approach is adding a VM flag to track that MAP_ANONYMOUS
>> is specified [1], and then using the flag in arch_validate_flags().
>>
>> Another approach is passing the VMA to arch_validate_flags(), and check
>> vma_is_anonymous().
>>
>> To prepare the introduction of PROT_SHADOW_STACK, which creates a shadow
>> stack mapping and can be applied only to an anonymous VMA, update
>> arch_validate_flags() to pass in the VMA.
>>
>> [1] commit 9f3419315f3c ("arm64: mte: Add PROT_MTE support to mmap() and mprotect()"),
>>
>> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@...el.com>
>> Reviewed-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
>> Cc: Catalin Marinas <catalin.marinas@....com>
>> Cc: Kees Cook <keescook@...omium.org>
>> Cc: Vincenzo Frascino <vincenzo.frascino@....com>
>> Cc: Will Deacon <will@...nel.org>
>
> For arm64:
>
> Acked-by: Catalin Marinas <catalin.marinas@....com>
>
Thanks!
Powered by blists - more mailing lists