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: <20080116221503.AA7BF150C8@wotan.suse.de>
Date:	Wed, 16 Jan 2008 23:15:03 +0100 (CET)
From:	Andi Kleen <ak@...e.de>
To:	linux-kernel@...r.kernel.org, mingo@...e.hu, tglx@...utronix.de,
	jbeulich@...ell.com, venkatesh.pallipadi@...el.com
Subject: [PATCH] [5/36] CPA: Implement change_page_attr_addr entry point for i386


Similar to 64bit.

Needed by PAT patches. Replaces 5ec5c5a2302ca8794da03f8bedec931a2a814ae9

Note: should probably be put before PAT patches to avoid bisect failures later

Signed-off-by: Andi Kleen <ak@...e.de>

---
 arch/x86/mm/pageattr_32.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

Index: linux/arch/x86/mm/pageattr_32.c
===================================================================
--- linux.orig/arch/x86/mm/pageattr_32.c
+++ linux/arch/x86/mm/pageattr_32.c
@@ -233,6 +233,21 @@ int change_page_attr(struct page *page, 
 	return err;
 }
 
+int change_page_attr_addr(unsigned long addr, int numpages, pgprot_t prot)
+{
+	int i;
+	unsigned long pfn = (addr >> PAGE_SHIFT);
+	for (i = 0; i < numpages; i++) {
+		if (!pfn_valid(pfn + i)) {
+			break;
+		} else {
+			pte_t *pte = lookup_address(addr + i*PAGE_SIZE);
+			BUG_ON(pte && !pte_none(*pte));
+		}
+	}
+	return change_page_attr(virt_to_page(addr), i, prot);
+}
+
 void global_flush_tlb(void)
 {
 	struct list_head l;
--
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