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]
Date:	Mon, 1 Jan 2007 23:17:34 +0000
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	David Miller <davem@...emloft.net>
Cc:	James.Bottomley@...elEye.com, arjan@...radead.org,
	torvalds@...l.org, miklos@...redi.hu, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org, akpm@...l.org
Subject: Re: fuse, get_user_pages, flush_anon_page, aliasing caches and all that again

On Mon, Jan 01, 2007 at 03:01:52PM -0800, David Miller wrote:
> From: James Bottomley <James.Bottomley@...elEye.com>
> Date: Mon, 01 Jan 2007 10:34:12 -0600
> 
> > Erm, well the whole reason for the flush_anon_pages() was that you told
> > me not to do it in flush_dcache_page() ...
> > 
> > Although this is perhaps part of the confusion over what
> > flush_dcache_page() is actually supposed to do.
> 
> I completely agree, it's confusing.  I've tried to make it
> "just a hook" where architectures do whatever is necessary
> at that point to synchronize things.  It's a poor definition
> and gives the implementor not much more than a rope with which
> to hang themselves :-)
> 
> That's why I'm thinking strongly about perhaps encouraging
> people to go the kmap() route.  It would avoid all the flushing
> in exchange for some specialized TLB accesses.  If the flushes
> are really expensive, and the TLB operations to setup/teardown
> the kmap()'s can be relatively cheap, it might be the thing to
> do on PARISC.

This all sounds wonderful, and also means that if/when ARM starts
implementing highmem, kmap becomes useful.  (When I looked at that
a while back, adding the necessary flushes where required would mean
that we ended up doing a lot of flushing all over the place.)

> More and more I like Ralf's kmap() approach because you only
> do things exactly where the kernel actually touches the page.
> And if it would really help in some way, we can even tag the
> kmap() calls with "KMAP_READ" or "KMAP_WRITE" type attributes
> as appropriate.  Because let's say you don't want to do the
> TLB mapping thing, and still want to actually cache flush,
> then this hint about the access could guide what kind of flush
> you do.

You'd still want to do the flushing on ARM because it's mostly VIVT.
Remapping pages with VIVT would just makes things much worse.

So yes, this sounds like a great idea.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-
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