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: <4669A831.3040105@de.ibm.com>
Date:	Fri, 08 Jun 2007 21:04:17 +0200
From:	Carsten Otte <cotte@...ibm.com>
To:	Jörn Engel <joern@...ybastard.org>
CC:	Christoph Hellwig <hch@...radead.org>,
	Jared Hulbert <jaredeh@...il.com>, carsteno@...ibm.com,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	richard.griffiths@...driver.com,
	Richard Griffiths <res07ml0@...izon.net>,
	Linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.21] cramfs: add cramfs Linear XIP

Jörn Engel wrote:
> Nitbit: Sooner or later the point/unpoint should get replaced by
> something with page granularity.  Something also needs to keep lists of
> mapped pages and invalidate them whenever the device is written to.
> That could be done in the filesystem or device driver.  I believe the
> device driver would be a better solution.
I think it needs to work like this:
- temporary references (for read/write syscalls and friends) get 
retrieved via get_xip_page and returned again via to-be-invented 
put_page/page_cache_release
- permanent references (for mapping to userland) get retrieved via 
get_xip_page and don't get returned until unmap
- the device driver can access page->count via a helper function 
provided by mm. This way, it can identify which pages are in use.
- In order to get references back, the device driver can call a 
callback provided by the file system. A default implementation will go 
to filemap_xip.c. This callback would use rmap to find all mappings, 
and unmap the page via xip_file_unmap()[mm/filemap_xip.c].

The nice thing about this approach is: we use page->count and rmap, 
both already exist and are perfectly suited for our purpose.
The downside: We need mem_map[] struct page entries behind all memory 
segments. Nowerdays we can easily create those via vmem_map/sparsemem.

Opinions?


-
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