Re: [patch 1/2] Fixup symlink function pointers for hppfs [for 2.6.13]

From: Blaisorblade
Date: Fri Aug 26 2005 - 15:09:23 EST


On Friday 26 August 2005 21:03, Al Viro wrote:
> On Fri, Aug 26, 2005 at 04:57:44PM +0200, blaisorblade@xxxxxxxx wrote:
> > From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>

> > Update hppfs for the symlink functions prototype change.
> > Should be trivial, but please verify it's correct.

> > Yes, I know the code I leave there is still _bogus_, see next patch for
> > this.

About what it's doing, hppfs (HoneyPot Proc FS) is a wrapper for procfs, which
must be able to hide part of the content for avoid an hacker inside UML
realize he's hacking a virtual machine, and it's normally mounted on /proc,
if used.

> Assuming that the next patch was "hppfs: fix symlink error path",
Yes.
> you've still left BS in there -
BullShit? Thanks for improving my acronym dictionary!
> > proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY);

> is obviously wrong; at the very least you need vfsmount in there.
And beyond that what? I cannot even think what's the rest *. And "obvious"
doesn't hold with me.

I'm _not_ a VFS hacker, I don't go beyond Documentation/filesystems/vfs.txt,
so I'd better leave fixing that to you.

At least what you don't mention. I'll fix vfsmount in these days (if you want
to do it yourself, I've put together needed info below).

I had to check dentry_open prototype to realize you're referring to the NULL
there and not to dget.

And the dentries you see are all descendants of the root one, taken in
hppfs_fill_super() from

err = init_inode(root_inode, proc_sb->s_root);

I guess the current hack could be replaced with reading
fs/proc/inode.c:proc_mnt... I wouldn't pass proc_mnt directly because we
don't know we took _that_ mount inside hppfs_fill_super(), but I like
replacing

list_entry(get_fs_type("proc")->fs_supers.next,...)

with proc_mnt->mnt_sb (assuming it's always filled in - IIRC I already checked
the initialization order).

* I've verified that there's no missing dput() in failure case as that's
handled by dentry_open().
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade


___________________________________
Yahoo! Messenger: chiamate gratuite in tutto il mondo
http://it.beta.messenger.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/