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] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0703150928270.10389@williams.orchestra.cse.unsw.EDU.AU>
Date:	Thu, 15 Mar 2007 09:57:09 +1100 (EST)
From:	Kandan Venkataraman <kven709@....unsw.EDU.AU>
To:	Christoph Hellwig <hch@...radead.org>
cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] Loop device - Tracking page writes made to a loop device
 through mmap

On Tue, 13 Mar 2007, Christoph Hellwig wrote:

> On Wed, Mar 14, 2007 at 07:21:41AM +1100, Kandan Venkataraman wrote:
>> All comments have been taken care of.
>>
>> Description:
>>
>> A  file_operations structure variable called loop_fops is initialised with
>> the default block device file operations (def_blk_fops).
>> The mmap operation is overriden with a new function called loop_file_mmap.
>
> NACK.  block device driver should never ever play around with file
> operations themselves.  If you want functionality like the one you
> have please don't overload the loop driver, but start a new (character)
> driver doing specificaly what you want.  And even then I'm not sure
> we'd want functionality like this in the mainline tree, but at least
> we can have an open discussion if it's done properly.
>

The reason I chose the loop device was the following:

The loop device has backing storage and makes use of the page cache. The 
nopage method for all block device files and most disk files is 
implemented by filemap_nopage. This function uses the page cache. Thus, 
this allows me to mmap a large address space.

If I wrote a character device, I would have to store the contents in 
kernel memory as the function filemap_nopage is not suitable for character 
devices. This would severly restrict the size of my mmap.

I am out my depth here, any pointers on how to proceed would be very 
helpful

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