mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net, ak@suse.de
Subject: [PATCH 3/9] UML - Remove pte_mkexec
Date: Thu, 29 Jun 2006 17:36:29 -0400	[thread overview]
Message-ID: <200606292136.k5TLaTGc010802@ccure.user-mode-linux.org> (raw)

Andi is making pte_mkexec go away, and UML had one of the last uses.

This removes the use and the definition.

Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.16-rc-mm/arch/um/kernel/skas/mmu.c
===================================================================
--- linux-2.6.16-rc-mm.orig/arch/um/kernel/skas/mmu.c	2006-06-26 14:49:53.000000000 -0400
+++ linux-2.6.16-rc-mm/arch/um/kernel/skas/mmu.c	2006-06-28 13:07:26.000000000 -0400
@@ -61,8 +61,10 @@ static int init_stub_pte(struct mm_struc
 #endif
 
 	*pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT));
-	*pte = pte_mkexec(*pte);
-	*pte = pte_wrprotect(*pte);
+	/* This is wrong for the code page, but it doesn't matter since the
+	 * stub is mapped by hand with the correct permissions.
+	 */
+	*pte = pte_mkwrite(*pte);
 	return(0);
 
  out_pmd:
Index: linux-2.6.16-rc-mm/include/asm-um/pgtable.h
===================================================================
--- linux-2.6.16-rc-mm.orig/include/asm-um/pgtable.h	2006-01-03 17:39:53.000000000 -0500
+++ linux-2.6.16-rc-mm/include/asm-um/pgtable.h	2006-06-26 14:54:42.000000000 -0400
@@ -274,12 +274,6 @@ static inline pte_t pte_mkread(pte_t pte
 	return(pte_mknewprot(pte)); 
 }
 
-static inline pte_t pte_mkexec(pte_t pte)
-{ 
-	pte_set_bits(pte, _PAGE_USER);
-	return(pte_mknewprot(pte)); 
-}
-
 static inline pte_t pte_mkdirty(pte_t pte)
 { 
 	pte_set_bits(pte, _PAGE_DIRTY);


             reply	other threads:[~2006-06-29 21:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29 21:36 Jeff Dike [this message]
2006-06-29 21:41 ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606292136.k5TLaTGc010802@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome