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, 20 Feb 2009 00:32:29 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	rusty@...tcorp.com.au, tglx@...utronix.de, x86@...nel.org,
	linux-kernel@...r.kernel.org, hpa@...or.com, jeremy@...p.org,
	cpw@....com, mingo@...e.hu
Subject: Re: Subject: [PATCH 08/10 UPDATED] vmalloc: add
 un/map_kernel_range_noflush()

On Fri, 20 Feb 2009 16:15:39 +0900 Tejun Heo <tj@...nel.org> wrote:

> +/**
> + * map_kernel_range_noflush - map kernel VM area with the specified pages
> + * @addr: start of the VM area to map
> + * @size: size of the VM area to map
> + * @prot: page protection flags to use
> + * @pages: pages to map
> + *
> + * Map PFN_UP(@size) pages at @addr.  The VM area @addr and @size
> + * specify should have been allocated using get_vm_area() and its
> + * friends.
> + *
> + * NOTE:
> + * This function does NOT do any cache flushing.  The caller is
> + * responsible for calling flush_cache_vmap() on to-be-mapped areas
> + * before calling this function.
> + *
> + * RETURNS:
> + * The number of pages mapped on success, -errno on failure.
> + */
> +int map_kernel_range_noflush(unsigned long addr, unsigned long size,
> +			     pgprot_t prot, struct page **pages)
> +{
> +	return vmap_page_range_noflush(addr, addr + size, prot, pages);
> +}
> +
> +/**
> + * unmap_kernel_range_noflush - unmap kernel VM area
> + * @addr: start of the VM area to unmap
> + * @size: size of the VM area to unmap
> + *
> + * Unmap PFN_UP(@size) pages at @addr.  The VM area @addr and @size
> + * specify should have been allocated using get_vm_area() and its
> + * friends.
> + *
> + * NOTE:
> + * This function does NOT do any cache flushing.  The caller is
> + * responsible for calling flush_cache_vunmap() on to-be-mapped areas
> + * before calling this function and flush_tlb_kernel_range() after.
> + */
> +void unmap_kernel_range_noflush(unsigned long addr, unsigned long size)
> +{
> +	vunmap_page_range(addr, addr + size);
> +}

Should these be called
vmap_kernel_range_noflush/vunmap_kernel_range_noflush?

<avoids pointing out the 2 gigapage limit>
--
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