lkml.org 
[lkml]   [2016]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] sparc64: Add support for Application Data Integrity (ADI)
From
Date
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

\
 
 \ /
  Last update: 2016-03-07 20:01    [W:0.153 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site