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] [day] [month] [year] [list]
Message-Id: <201005272246.AFJ57327.SMFOOOLQFHVFtJ@I-love.SAKURA.ne.jp>
Date:	Thu, 27 May 2010 22:46:35 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	adobriyan@...il.com, miklos@...redi.hu
Cc:	viro@...iv.linux.org.uk, john.johansen@...onical.com,
	penguin-kernel@...ove.sakura.ne.jp, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] vfs: sanitize __d_path()

Alexey Dobriyan wrote:
> Why would they want to do it (which means taking locks again and
> potential incoherence)?
> The information is right there, ship it upwards:
> 
> +       if (deleted)
> +               *deleted = 0;
>         spin_lock(&vfsmount_lock);
>         prepend(&end, &buflen, "\0", 1);
> -       if (d_unlinked(dentry) &&
> -               (prepend(&end, &buflen, " (deleted)", 10) != 0))
> -                       goto Elong;
> +       if (d_unlinked(dentry) && deleted)
> +               *deleted = 1;
> 
> "(deleted)" as interface sucks, we can't change it,
> at least, let's make in-kernel interface correct.

We don't need vfsmount_lock for d_unlinked(), do we?
Then, I think we can do

+	if (deleted)
+		*deleted = d_unlinked(dentry);
 	spin_lock(&vfsmount_lock);
-	prepend(&end, &buflen, "\0", 1);
+	prepend(&end, &buflen, "", 1);
-	if (d_unlinked(dentry) &&
-	    (prepend(&end, &buflen, " (deleted)", 10) != 0))
-		goto Elong;
--
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