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:	Wed, 07 Dec 2011 14:44:33 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	viro@...IV.linux.org.uk
Cc:	john.johansen@...onical.com, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, torvalds@...ux-foundation.org
Subject: Re: [git pull] apparmor fix for __d_path() misuse

Al Viro wrote:
> > So, can we keep behavior of tomoyo_get_absolute_path() unchanged?
> 
> Sure, you are always free to add
> 	if (pos == ERR_PTR(-EINVAL)) {
> 		pos = dentry_path(path->dentry, ...)
> 		/* do whatever you want to buffer to indicate that
> 		 * beginning had been lost
> 		 */
> 	}

Maybe I can call tomoyo_get_local_path() if tomoyo_get_absolute_path() failed
with -EINVAL.

> Or you might want to do __d_path() from (path->mnt,path->mnt->mnt_root) to
> path - that's the path from the last mountpoint to your object; i.e. it may
> be shorter if that vfsmount had been a binding into the guts of filesystem,
> but that is what __d_path() as you used it would stabilize to once the race
> window is over.

Excuse me, what "once the race window is over" means?
Does

  do {
    pos = d_absolute_path(path, buffer, buflen - 1);
  } while (pos == ERR_PTR(-EINVAL));

work (i.e. racing with "umount -l" is a temporary failure)?
--
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