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:	Fri, 28 Mar 2008 09:48:12 +0100
From:	Miklos Szeredi <miklos@...redi.hu>
To:	viro@...IV.linux.org.uk
CC:	miklos@...redi.hu, akpm@...ux-foundation.org, linuxram@...ibm.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfo

> > +static void show_type(struct seq_file *m, struct super_block *sb)
> > +{
> > +	mangle(m, sb->s_type->name);
> 
> BTW, do we really want to bother with quoting?  Anyway, that can live
> for now...

Right, type name shouldn't need quoting.  We might want to check at fs
registration, that name is alphanumeric+underscore only, so that
somebody doesn't get the idea to put spaces into filesystem names.

> 
> > +static int show_mountinfo(struct seq_file *m, void *v)
> > +{
> > +	struct proc_mounts *p = m->private;
> > +	size_t count_save = m->count;
> 
> > +		/*
> > +		 * Mountpoint is outside root, rewind seq_file. Ugly,
> > +		 * but necessary for race-free detection of unreachable
> > +		 * mountpoints.
> > +		 */
> > +		m->count = count_save;
> > +		return 0;
> > +	}
> 
> You know, _if_ we want to go that way, let's do it right; all callers
> of ->show() are in seq_file.c and all of them know the previous value
> of m->count.  So let's define SEQ_SKIP as 1 and teach these 3 callers
> to handle it.  And make this sucker (and anything else that might want
> the same kind of things) return SEQ_SKIP instead of playing with m->count
> directly.

Sounds good.

> Again, will do on merge...

Thanks,
Miklos
--
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