[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56DDC534.3040301@oracle.com>
Date: Mon, 7 Mar 2016 11:15:16 -0700
From: Khalid Aziz <khalid.aziz@...cle.com>
To: Dave Hansen <dave.hansen@...el.com>, davem@...emloft.net,
corbet@....net, akpm@...ux-foundation.org,
dingel@...ux.vnet.ibm.com, zhenzhang.zhang@...wei.com,
bob.picco@...cle.com, kirill.shutemov@...ux.intel.com,
aneesh.kumar@...ux.vnet.ibm.com, aarcange@...hat.com,
arnd@...db.de, sparclinux@...r.kernel.org
Cc: rob.gardner@...cle.com, mhocko@...e.cz, chris.hyser@...cle.com,
richard@....at, vbabka@...e.cz, koct9i@...il.com, oleg@...hat.com,
gthelen@...gle.com, jack@...e.cz, xiexiuqi@...wei.com,
Vineet.Gupta1@...opsys.com, luto@...nel.org, ebiederm@...ssion.com,
bsegall@...gle.com, geert@...ux-m68k.org, dave@...olabs.net,
adobriyan@...il.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-arch@...r.kernel.org, linux-api@...r.kernel.org
Subject: Re: [PATCH v2] sparc64: Add support for Application Data Integrity
(ADI)
On 03/07/2016 10:35 AM, Dave Hansen wrote:
> On 03/02/2016 12:39 PM, Khalid Aziz wrote:
>> +long enable_sparc_adi(unsigned long addr, unsigned long len)
>> +{
>> + unsigned long end, pagemask;
>> + int error;
>> + struct vm_area_struct *vma, *vma2;
>> + struct mm_struct *mm;
>> +
>> + if (!ADI_CAPABLE())
>> + return -EINVAL;
> ...
>
> This whole thing with the VMA splitting and so forth looks pretty darn
> arch-independent. Are you sure you need that much arch-specific code
> for it, or can you share more of the generic VMA management code?
>
All of the VMA splitting/merging code is rather generic and is very
similar to the code for mbind, mlock, madavise and mprotect. Currently
there is no code sharing across all of these implementations. Maybe that
should change. In any case, I am looking at changing the interface to go
through mprotect instead as Dave suggested. I can share the code in
mprotect in that case. The only arch dependent part will be to set the
VM_SPARC_ADI flag on the VMA.
Thanks,
Khalid
Powered by blists - more mailing lists