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]
Message-ID: <20110824083050.GI29452@sun>
Date:	Wed, 24 Aug 2011 12:30:50 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Al Viro <viro@...IV.linux.org.uk>,
	James Bottomley <jbottomley@...allels.com>,
	Tejun Heo <tj@...nel.org>,
	Glauber Costa <glommer@...allels.com>,
	containers@...ts.osdl.org, linux-kernel@...r.kernel.org,
	Pavel Emelyanov <xemul@...allels.com>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	Nathan Lynch <ntl@...ox.com>,
	Oren Laadan <orenl@...columbia.edu>,
	Daniel Lezcano <dlezcano@...ibm.com>,
	LINUXFS-ML <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH resend] vfs: Add ->statfs callback for pipefs

On Wed, Aug 24, 2011 at 01:23:28AM -0700, Andrew Morton wrote:
> On Wed, 24 Aug 2011 12:09:24 +0400 Cyrill Gorcunov <gorcunov@...il.com> wrote:
> 
> > From: Pavel Emelyanov <xemul@...allels.com>
> > 
> > This is done to make it possible to distinguish pipes
> > from fifos when opening one via /proc/<pid>/fd/ link.
> > 
> > Signed-off-by: Pavel Emelyanov <xemul@...allels.com>
> > Reviewed-by: Tejun Heo <tj@...nel.org>
> > Acked-by: Serge Hallyn <serge.hallyn@...onical.com>
> > Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
> > ---
> >  fs/pipe.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > Any objections to this one? It was a part of a patchset
> > but can be treated independently so I'm re-sending it alone.
> > 
> > Index: linux-2.6.git/fs/pipe.c
> > ===================================================================
> > --- linux-2.6.git.orig/fs/pipe.c
> > +++ linux-2.6.git/fs/pipe.c
> > @@ -1254,6 +1254,7 @@ out:
> >  
> >  static const struct super_operations pipefs_ops = {
> >  	.destroy_inode = free_inode_nonrcu,
> > +	.statfs = simple_statfs,
> >  };
> >  
> >  /*
> 
> OK, I give up - how does it work?
> 
> <goes off and reads the kernel>
> 
> So it appears that the statfs call would previously return -ENOSYS, but
> with this change the statfs will succeed and userspace can then inspect
> f_type.  Yes?  I will fix your changelog by adding a description along these
> lines.

Yes, it allows to distinguish pipes from anything else. Initially this patch was
a part of early rfc on checkpoint/restore facility (mostly implemented in
userspace). So we need to distinguish somehow pipes when we dump data from
/proc/pid/fd. That's the main reason. BUT since this patch can be used without
any other c/r bits and can be treated separately I've sent it alone without
any mention of c/r at all.

> 
> And I'll ask you to fix it further by telling us why we want to do
> this?  The kernel has had this issue for a long time - why does it now
> matter?

	Cyrill
--
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