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: <20120705173729.GC16586@moon>
Date:	Thu, 5 Jul 2012 21:37:29 +0400
From:	Cyrill Gorcunov <gorcunov@...nvz.org>
To:	Pavel Emelyanov <xemul@...allels.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	Al Viro <viro@...IV.linux.org.uk>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	James Bottomley <jbottomley@...allels.com>
Subject: Re: [rfc 2/7] procfs: Convert /proc/pid/fdinfo/ handling routines to
 seq-file

On Wed, Jul 04, 2012 at 11:37:26AM +0400, Pavel Emelyanov wrote:
...
> 
> I believe we can still have the proc_fdinfo_read and proc_fd_link code non-splitted.
> Just push a callback pointer ino the proc_fd_info (as usual -- we an opaque void *argument).

Hi Pavel, sorry for delay (was busy a bit). It seems this wont work.
Look, previously we have had

static int proc_fd_info(struct inode *inode, struct path *path, char *info)
{
	struct task_struct *task = get_proc_task(inode);
	...

	if (info) {
		...
	}

	this makes info argument optional
}

static int proc_fd_link(struct dentry *dentry, struct path *path)
{
	return proc_fd_info(dentry->d_inode, path, NULL);
}

it's possible because we didn't use seq-files engine. One we switch to
seq-files the old proc_fd_info become a part of

static const struct file_operations proc_fdinfo_file_operations = {
	.open		= seq_fdinfo_open,

ie the declaration of seq_fdinfo_open is restricted to file_operations::open
method and I can't add opaque void *argument here.

Sure I can add one more wrapper function but I guess this increase code
complexity which I tried to escape.

	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