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: <1160427983.7752.24.camel@localhost.localdomain>
Date:	Tue, 10 Oct 2006 07:06:23 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	Thomas Hellström <thomas@...gstengraphics.com>,
	linux-mm@...ck.org,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	Hugh Dickins <hugh@...itas.com>, Arnd Bergmann <arnd@...db.de>
Subject: Re: User switchable HW mappings & cie


> Anyway, so right now you can use "vm_insert_page()" and it will increment 
> the page count and add things to the rmap lists, which is what current 
> users want. But if you don't have a normal page, you should be able to 
> basically avoid that part entirely, and just use
> 
> 	set_pte_at(mm, addr, pte, make-up-a-pte-here);
> 
> and you're done (of course, you need to use all the appropriate magic to 
> set up the pte, ie you'd normally have something like
> 
> 	pte = get_locked_pte(mm, addr, &ptl);
> 	..
> 	pte_unmap_unlock(pte, ptl);
> 
> around it). Note that "vm_insert_page()" is _not_ for VM_PFNMAP mappings, 
> exactly because it does actually increment page counts. It's for a 
> "normal" mapping that just wants to insert a reference-counted page.

Yes, that's why we want a vm_insert_pfn() as I really don't want to see
PTE manipulations proliferate in drivers :) Nick is coming up with an
implementation faster than I can think about the code anyway ;)

Cheers,
Ben.


-
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