lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <098cda37-0e3c-de44-5995-9e5f74b301c6@linux.intel.com>
Date:   Mon, 5 Mar 2018 13:26:45 -0800
From:   Dave Hansen <dave.hansen@...ux.intel.com>
To:     Khalid Aziz <khalid.aziz@...cle.com>, davem@...emloft.net,
        akpm@...ux-foundation.org
Cc:     corbet@....net, bob.picco@...cle.com, steven.sistare@...cle.com,
        pasha.tatashin@...cle.com, mike.kravetz@...cle.com,
        rob.gardner@...cle.com, mingo@...nel.org, nitin.m.gupta@...cle.com,
        anthony.yznaga@...cle.com, kirill.shutemov@...ux.intel.com,
        tom.hromatka@...cle.com, allen.pais@...cle.com,
        tklauser@...tanz.ch, shannon.nelson@...cle.com,
        vijay.ac.kumar@...cle.com, mhocko@...e.com, jack@...e.cz,
        punit.agrawal@....com, hughd@...gle.com, thomas.tai@...cle.com,
        ross.zwisler@...ux.intel.com, dave.jiang@...el.com,
        willy@...radead.org, minchan@...nel.org,
        imbrenda@...ux.vnet.ibm.com, aarcange@...hat.com,
        kstewart@...uxfoundation.org, pombredanne@...b.com,
        tglx@...utronix.de, gregkh@...uxfoundation.org,
        nagarathnam.muthusamy@...cle.com, linux@...ck-us.net,
        jane.chu@...cle.com, dan.j.williams@...el.com, jglisse@...hat.com,
        ktkhai@...tuozzo.com, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        sparclinux@...r.kernel.org, Khalid Aziz <khalid@...ehiking.org>
Subject: Re: [PATCH v12 10/11] sparc64: Add support for ADI (Application Data
 Integrity)

On 03/05/2018 01:14 PM, Khalid Aziz wrote:
> On 03/05/2018 12:22 PM, Dave Hansen wrote:
>> On 02/21/2018 09:15 AM, Khalid Aziz wrote:
>>> +#define arch_validate_prot(prot, addr) sparc_validate_prot(prot, addr)
>>> +static inline int sparc_validate_prot(unsigned long prot, unsigned
>>> long addr)
>>> +{
>>> +    if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM |
>>> PROT_ADI))
>>> +        return 0;
>>> +    if (prot & PROT_ADI) {
>>> +        if (!adi_capable())
>>> +            return 0;
>>> +
>>> +        if (addr) {
>>> +            struct vm_area_struct *vma;
>>> +
>>> +            vma = find_vma(current->mm, addr);
>>> +            if (vma) {
>>> +                /* ADI can not be enabled on PFN
>>> +                 * mapped pages
>>> +                 */
>>> +                if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP))
>>> +                    return 0;
>>
>> You don't hold mmap_sem here.  How can this work?
>>
> Are you suggesting that vma returned by find_vma() could be split or
> merged underneath me if I do not hold mmap_sem and thus make the flag
> check invalid? If so, that is a good point.

Um, yes.  You can't walk the vma tree without holding mmap_sem.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ