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]
Date:   Sat, 3 Sep 2016 10:32:20 +0300
From:   Dmitry Safonov <0x7f454c46@...il.com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Dmitry Safonov <dsafonov@...tuozzo.com>,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Andy Lutomirski <luto@...capital.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        "H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC 1/3] x86/vdso: create vdso file, use it for mapping

Big thanks on review, Al!

2016-09-03 3:20 GMT+03:00 Al Viro <viro@...iv.linux.org.uk>:
> On Thu, Aug 25, 2016 at 06:21:08PM +0300, Dmitry Safonov wrote:
>> +             unsigned long n_addr = mmap_region(vdso_file_64, text_start,
>> +                             image->size, VM_READ|VM_EXEC|
>> +                             VM_DONTEXPAND|VM_SOFTDIRTY|
>> +                             VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC, 0);
>> +             if (text_start != n_addr) {
>> +                     pr_err("Failed to mmap vdso file at %lx, mmap_region returned %lx\n",
>> +                                     text_start, n_addr);
>> +                     goto old_way;
>> +             }
>> +             vma = find_vma(mm, text_start);
>> +             if (IS_ERR(vma) || vma->vm_start != text_start) {
>> +                     pr_err("Failed to find vdso mapped vma at %lx\n",
>> +                                     text_start);
>> +                     goto old_way;
>
> Umm...  Since when can find_vma() return ERR_PTR()?

Will fix

>> +     d_set_d_op(path.dentry, &vdso_dops);
>
> Nope.  Set ->s_d_op to &vdso_dops and be done with that.

Ok

>> +static struct file_system_type vdso_fs_type = {
>> +     .name           = "vdsofs",
>> +     .mount          = ramfs_mount,
>
> Probably the wrong thing here.  Just use a simple wrapper using mount_pseudo()
> for all work; see fs/aio.c:aio_mount().

Will check, thanks!

>> +     ret = register_filesystem(&vdso_fs_type);
>
> Do you really want it user-mountable?  If not, no need to register...

Of course, I don't want to, will omit that, thanks.

-- 
             Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ