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: <20100709162255.GA5741@random.random>
Date:	Fri, 9 Jul 2010 18:22:55 +0200
From:	Andrea Arcangeli <aarcange@...hat.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: mmu notifier calls in apply_to_page_range()

On Fri, Jul 09, 2010 at 08:51:39AM -0700, Jeremy Fitzhardinge wrote:
> Yes, but apply_to_page_range isn't necessarily making changes which
> requires that teardown/refill.  The most common user is vmalloc, which
> is just using a side-effect of apply_to_page_range to make sure that all
> the intermediate levels of the pagetable are allocated over the
> vmalloced range.  I think all the other users of it are within Xen code.
> In particular, we're using it in the gntdev driver, which also uses mmu
> notifiers to keep grant mappings in sync with process mappings, so the
> recursive mmu notifier call is causing problems.
> 
> It seems to me that apply_to_page_range should be agnostic to its use,
> and its up to its callers to do any appropriate mmu notifier work. 
> Would you be happy with a patch to remove those calls?

mmu notifier only relevant for userland mappings, not kernel
mappings. I don't know about the xen use, but for vmalloc certainly it
can't be a problem to remove those two mmu notifier invalidates.

Only bit that is worrysome is the mm == &init_mm
pte_alloc_kernel|pte_alloc_map_lock. That seems to imply it may also
be used to mangle over userland. But apparently all users are passing
&init_mm as expected. I guess if you remove the mm parameter and you
default to &init_mm definitely there will be no risk in removing the
mmu notifier range_start/end invalidates.
--
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