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>] [day] [month] [year] [list]
Date:	Wed, 28 May 2008 18:51:21 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Andy Whitcroft <apw@...dowen.org>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org, agl@...ibm.com,
	wli@...omorphy.com, kenchen@...gle.com, dwg@....ibm.com,
	andi@...stfloor.org, Mel Gorman <mel@....ul.ie>, dean@...tic.org,
	abh@...y.com, Michael Kerrisk <mtk.manpages@...glemail.com>
Subject: Re: [PATCH 3/3]
 hugetlb-allow-huge-page-mappings-to-be-created-without-reservations

On Wed, 28 May 2008 00:10:06 +0100 Andy Whitcroft <apw@...dowen.org> wrote:

> +		unsigned long idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) +
> +				(vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
> +		return region_chg(&inode->i_mapping->private_list,
> +							idx, idx + 1);
> +
> +	} else {
> +		if (!is_vma_resv_set(vma, HPAGE_RESV_OWNER))
> +			return 1;
> +	}
> +
> +	return 0;
> +}
> +static void vma_commit_reservation(struct vm_area_struct *vma,
> +							unsigned long addr)
> +{
> +	struct address_space *mapping = vma->vm_file->f_mapping;
> +	struct inode *inode = mapping->host;
> +
> +	if (vma->vm_flags & VM_SHARED) {
> +		unsigned long idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) +
> +				(vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
> +		region_add(&inode->i_mapping->private_list, idx, idx + 1);

There are a couple more users of the little helper function which I
suggested that Mel add.

They both use ulong too - I do think that pgoff_t has a little
documentary value.

I guess these changes impact the manpages, but the mmap manpage doesn't
seem to know about huge pages at all.
--
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