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:	Thu, 7 Sep 2006 14:54:12 -0700
From:	Andrew Morton <akpm@...l.org>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@....de>, Greg KH <greg@...ah.com>
Subject: Re: Naughty ramdrives

On Fri, 8 Sep 2006 00:59:27 +0400
Alexey Dobriyan <adobriyan@...il.com> wrote:

> You'd laugh, but...
> 
> Summary:
> 
> 	After loading and unloading rd.ko many times "ls -l /dev/ram*"
> 	results are not persistent.
> 
> Steps to reproduce:
> 
> 	# while true; do modprobe rd && rmmod rd; done
> 		[wait ~10 seconds]
> 	^C
> 	# modprobe rd
> 
> 	# ls -l /dev/ram*
> 	lrwxrwxrwx 1 root root 5 Sep  8 00:35 /dev/ram12 -> rd/12
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram6 -> rd/6
> 	# ls -l /dev/ram*
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram0 -> rd/0
> 	lrwxrwxrwx 1 root root 5 Sep  8 00:35 /dev/ram13 -> rd/13
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram6 -> rd/6
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram7 -> rd/7
> 	# ls -l /dev/ram*
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram0 -> rd/0
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram1 -> rd/1
> 	lrwxrwxrwx 1 root root 5 Sep  8 00:35 /dev/ram11 -> rd/11
> 	lrwxrwxrwx 1 root root 5 Sep  8 00:35 /dev/ram12 -> rd/12
> 	lrwxrwxrwx 1 root root 5 Sep  8 00:35 /dev/ram14 -> rd/14
> 	lrwxrwxrwx 1 root root 5 Sep  8 00:35 /dev/ram15 -> rd/15
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram3 -> rd/3
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram7 -> rd/7
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram8 -> rd/8
> 	lrwxrwxrwx 1 root root 4 Sep  8 00:35 /dev/ram9 -> rd/9
> 
> Versions:
> 
> 	Linux 2.6.18-rc5
> 	udev 087

So I assume udev is still madly crunching on its message backlog while
this is happening?

If so, ug.

> P.S.:
> 
> This was noticed while investigating #4899
> http://bugme.osdl.org/show_bug.cgi?id=4899
> where /dev/ram0 when opened, pins module indefinitely. It seems that
> adding ->release() which undoes
> 
> 	inode = igrab(bdev->bd_inode);
> 
> should do the trick. Am I right?

Looks right.

I'm not sure that igrab() is needed though.  Probably bd_openers is
sufficient.

I'm also not sure that rd_open() needs to play with bd_openers. 
fs/block_dev.c:do_open() already does that.

-
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