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>] [day] [month] [year] [list]
Date:	Mon, 10 May 2010 21:56:55 -0700 (PDT)
From:	Jose Luis Marchetti <joseluismarchetti@...oo.com.br>
To:	linux-kernel@...r.kernel.org
Subject: What locks are needed to safely use vma->vm_file ?

Hi,

It appears that doing down_read(&mm->mmap_sem) is enough to safely use vma->vm_file, is it correct ?

Also in the lock subject, to get to all vm_files in the system, is the following correct or something is missing ?

read_lock(&tasklist_lock);
for_each_process(p)
{
    mm = get_task_mm(p);
    down_read(&mm->mmap_sem);

    // ... Here what I need to do with this mm vm_file objects

    up_read(&mm->mmap_sem);
    mmput(mm);
}
read_unlock(&tasklist_lock);

Thanks in advance for your answer
José Luís Marchetti


      
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ