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: <2a27d3730911180322i5a0dce3ds7deee6e96c6733b9@mail.gmail.com>
Date:	Wed, 18 Nov 2009 19:22:22 +0800
From:	Li Yang <leoli@...escale.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	gregkh@...e.de
Subject: Re: [RFC] char/mem: Honor O_SYNC over intelligent setting of uncached 
	access

On Wed, Nov 18, 2009 at 6:41 PM, Andi Kleen <andi@...stfloor.org> wrote:
> Li Yang <leoli@...escale.com> writes:
>
> D> The original code will automatially set the page non-cacheable if the mmap'ped
>> address is not in kernel managed low memory.
>>
>> We already have O_SYNC flag to pass the cacheability settings.   Therefore we should
>> honor the case that O_SYNC is delibrately not used.  For example, it is useful to the
>> case that not all system memory is managed by Linux, and want to be mmaped cacheable.
>>
>> Not sure if there is anything out there depending on the previous behavior.
>
> Very likely there is. That change seems rather dangerous.
>
> If you wanted to do something like this you would need a long
> deprecation period with printks and format warnings. But most likely
> it's not worth it, what advantage does the change have?

The general advantage is that user has the true control of the page
cacheability through O_SYNC file open() flag.  For the previous way,
kernel might map memory as non-cacheable when it's not necessary.  One
most common use case is that, user could limit the memory managed by
kernel and mmap the memory manually.  But he can't make that VMA
cacheable.  The user should have a better idea than kernel if a
certain memory space is I/O or not when using mmap().

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