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: <20131108134859.GA4461@redhat.com>
Date:	Fri, 8 Nov 2013 14:48:59 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: linux-next: manual merge of the akpm-current tree with the vfs
	tree

On 11/08, Oleg Nesterov wrote:
>
> On 11/08, Stephen Rothwell wrote:
> >
> > Hi Andrew,
> >
> > Today's linux-next merge of the akpm-current tree got a conflict in
> > fs/anon_inodes.c between commit 24b0303e9532 ("take anon inode allocation
> > to libfs.c") from the vfs tree and commit 02f3ac4386d9 ("anon_inodefs:
> > forbid open via /proc") from the akpm-current tree.
> >
> > I just dropped the akpm-current changes for today - they should probably
> > be applied to fs/libfs.c.
>
> Well, this probably means that
>
> 	anon_inodefs-forbid-open-via-proc.patch
>
> should be dropped. I'll rediff this patch against vfs.git

24b0303e9532 also removes anon_inode_fops. It seems that it was not really
needed anyway, inode_init_always() does inode->i_fop = empty_fops...

So probably we can simply change empty_fops but I need to recheck.

Oleg.

--- x/fs/inode.c
+++ x/fs/inode.c
@@ -114,6 +114,11 @@ int proc_nr_inodes(ctl_table *table, int
 }
 #endif
 
+static int empty_open(struct inode *inode, struct file *file)
+{
+	return -ENXIO;
+}
+
 /**
  * inode_init_always - perform inode structure intialisation
  * @sb: superblock inode belongs to
@@ -125,7 +130,9 @@ int proc_nr_inodes(ctl_table *table, int
 int inode_init_always(struct super_block *sb, struct inode *inode)
 {
 	static const struct inode_operations empty_iops;
-	static const struct file_operations empty_fops;
+	static const struct file_operations empty_fops = {
+		.open = empty_open,
+	};
 	struct address_space *const mapping = &inode->i_data;
 
 	inode->i_sb = sb;

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