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: <9473dc801fb245ea8df91da31d426f7f@SC-EXCH04.marvell.com>
Date:	Wed, 10 Jun 2015 05:00:03 +0000
From:	Lisa Du <cldu@...vell.com>
To:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: A race condition between debugfs and seq_file operation

> -----Original Message-----
> From: gregkh@...uxfoundation.org [mailto:gregkh@...uxfoundation.org]
> Sent: 2015年6月10日 5:12
> To: Lisa Du
> Cc: linux-kernel@...r.kernel.org
> Subject: Re: A race condition between debugfs and seq_file operation
> 
> On Mon, Jun 08, 2015 at 04:28:10AM +0000, Lisa Du wrote:
> > Hi, All
> > Recently I met one race condition related to debugfs.
> >
> > Take an example from ion.c in kernel3.14:
> > static int ion_debug_client_open(struct inode *inode, struct file
> > *file) {
> > 	return single_open(file, ion_debug_client_show, inode->i_private); }
> >
> > static const struct file_operations debug_client_fops = {
> > 	.open = ion_debug_client_open,
> > 	.read = seq_read,
> > 	.llseek = seq_lseek,
> > 	.release = single_release,
> > };
> > client->debug_root = debugfs_create_file(client->display_name, 0664,
> > 					dev->clients_debug_root,
> > 					client, &debug_client_fops);
> >
> > I find during I read the debugfs node, driver can do
> > debugfs_remove_recursive(dentry); Is it expected?
> 
> Yes.  Well, not "expected", but a mess, yes.
> 
> Removing debugfs files are known to have lots of races, this isn't the only
> one :(
Thanks for the reply! 
Not sure if there is any plan to resolve such races in the future?
> 
> thanks,
> 
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ