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:	Fri, 12 Oct 2007 10:45:17 -0700
From:	Suleiman Souhlal <ssouhlal@...ebsd.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Arjan van de Ven <arjan@...radead.org>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Suleiman Souhlal <suleiman@...gle.com>,
	linux-mm <linux-mm@...ck.org>, hugh <hugh@...itas.com>
Subject: Re: [PATCH] mm: avoid dirtying shared mappings on mlock


On Oct 12, 2007, at 7:58 AM, Peter Zijlstra wrote:

> On Fri, 2007-10-12 at 07:53 -0700, Arjan van de Ven wrote:
>> On Fri, 12 Oct 2007 12:50:22 +0200
>>>>> The pages will still be read-only due to dirty tracking, so the
>>>>> first write will still do page_mkwrite().
>>>>
>>>> Which can SIGBUS, no?
>>>
>>> Sure, but that is no different than any other mmap'ed write. I'm not
>>> seeing how an mlocked region is special here.
>>>
>>> I agree it would be nice if mmap'ed writes would have better error
>>> reporting than SIGBUS, but such is life.
>>
>> well... there's another consideration
>> people use mlock() in cases where they don't want to go to the
>> filesystem for paging and stuff as well (think the various iscsi
>> daemons and other things that get in trouble).. those kind of uses
>> really use mlock to avoid
>> 1) IO to the filesystem
>> 2) Needing memory allocations for pagefault like things
>> at least for the more "hidden" cases...
>>
>> prefaulting everything ready pretty much gives them that... letting
>> things fault on demand... nicely breaks that.
>
> Non of that is changed. So I'm a little puzzled as to which side you
> argue.

I think this might change the behavior in case you mlock sparse files.
I guess currently the holes disappear when you mlock them, but with  
the patch the blocks wouldn't get allocated until they get written to.

-- Suleiman
-
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