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-next>] [day] [month] [year] [list]
Message-ID: <CAGr1u3vZU_Pxwu1nSab0PExNPQsE0xiSpcoMbUQ7MeGbJzBAjA@mail.gmail.com>
Date:	Wed, 13 Nov 2013 03:34:13 -0800
From:	Michael Marineau <michael.marineau@...eos.com>
To:	Waiman Long <Waiman.Long@...com>
Cc:	linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>
Subject: 3.12 Regression: dcache: Translating dentry into pathname without
 taking rename_lock 232d2d60

Greetings,

Commit 232d2d60aa5469bb097f55728f65146bd49c1d25 causes intermittent
errors in /proc/*/fd/* where readlink returns "/" instead of the
correct path. This can be reproduced by the script below which copies
the kernel source directory structure while obsessively looking up
directory fds in proc from another process. Reverting
232d2d60aa5469bb097f55728f65146bd49c1d25 after two related commits
48f5ec21d9c67e881ff35343988e290ef5cf933f
1812997720ab90d029548778c55d7315555e1fef fixes the issue.

Cheers,
Mike


#!/usr/bin/python

import os
import subprocess
import tempfile

KERNEL_SOURCE="/home/marineam/git/linux"
TEMP_DIR=tempfile.mkdtemp()

# Copy the directory tree, can skip most of the files
rsync = subprocess.Popen(["rsync", "--exclude=*.*", "-a",
                            KERNEL_SOURCE, TEMP_DIR])

def check_entry(dir_path, name):
    expect = "%s/%s" % (dir_path, name)
    if os.path.islink(expect):
        return

    fd = os.open(expect, os.O_RDONLY)
    # It takes some pounding on proc to be likely to hit an error
    for i in xrange(100):
        got = os.readlink("/proc/self/fd/%d" % fd)
        if got != expect:
            print "Got %s instead of %s" % (got, expect)

    os.close(fd)

try:
    for dirpath, dirnames, filenames in os.walk(KERNEL_SOURCE):
        for name in dirnames:
            check_entry(dirpath, name)
finally:
    rsync.wait()
    subprocess.call(["rm", "-rf", TEMP_DIR])
--
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