- xtensa-remove-verify_area-macros.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     xtensa: remove verify_area macros

has been removed from the -mm tree.  Its filename is

     xtensa-remove-verify_area-macros.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: xtensa: remove verify_area macros
From: Jesper Juhl <jesper.juhl@xxxxxxxxx>


verify_area() is still alive on xtensa in 2.6.17-rc3-git13 It would be nice
to finally be rid of that function across the board.

Signed-off-by: Chris Zankel <chris@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/xtensa/Kconfig           |    4 ---
 arch/xtensa/kernel/entry.S    |    2 -
 arch/xtensa/kernel/signal.c   |   10 ++++-----
 include/asm-xtensa/checksum.h |    3 --
 include/asm-xtensa/rwsem.h    |    7 +++++-
 include/asm-xtensa/uaccess.h  |   34 --------------------------------
 6 files changed, 13 insertions(+), 47 deletions(-)

diff -puN arch/xtensa/Kconfig~xtensa-remove-verify_area-macros arch/xtensa/Kconfig
--- a/arch/xtensa/Kconfig~xtensa-remove-verify_area-macros
+++ a/arch/xtensa/Kconfig
@@ -34,10 +34,6 @@ config GENERIC_HARDIRQS
 	bool
 	default y
 
-config RWSEM_GENERIC_SPINLOCK
-       bool
-       default y
-
 source "init/Kconfig"
 
 menu "Processor type and features"
diff -puN arch/xtensa/kernel/entry.S~xtensa-remove-verify_area-macros arch/xtensa/kernel/entry.S
--- a/arch/xtensa/kernel/entry.S~xtensa-remove-verify_area-macros
+++ a/arch/xtensa/kernel/entry.S
@@ -1102,7 +1102,7 @@ ENTRY(fast_syscall_sysxtensa)
 	s32i	a7, a2, PT_AREG7
 
 	movi	a7, 4			# sizeof(unsigned int)
-	verify_area a3, a7, a0, a2, .Leac
+	access_ok a0, a3, a7, a2, .Leac
 
 	_beqi	a6, SYSXTENSA_ATOMIC_SET, .Lset
 	_beqi	a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg
diff -puN arch/xtensa/kernel/signal.c~xtensa-remove-verify_area-macros arch/xtensa/kernel/signal.c
--- a/arch/xtensa/kernel/signal.c~xtensa-remove-verify_area-macros
+++ a/arch/xtensa/kernel/signal.c
@@ -104,7 +104,7 @@ sys_sigaction(int sig, const struct old_
 
 	if (act) {
 		old_sigset_t mask;
-		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
+		if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
 		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
 		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
 			return -EFAULT;
@@ -116,7 +116,7 @@ sys_sigaction(int sig, const struct old_
 	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
 
 	if (!ret && oact) {
-		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
+		if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
 		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
 		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
 			return -EFAULT;
@@ -236,7 +236,7 @@ restore_sigcontext(struct pt_regs *regs,
 	err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4);
 	err |= __get_user(buf, &sc->sc_cpstate);
 	if (buf) {
-		if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
+		if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
 			goto badframe;
 		err |= restore_cpextra(buf);
 	}
@@ -357,7 +357,7 @@ asmlinkage int sys_sigreturn(struct pt_r
 	if (regs->depc > 64)
 		panic ("Double exception sys_sigreturn\n");
 
-	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
 		goto badframe;
 
 	if (__get_user(set.sig[0], &frame->sc.oldmask)
@@ -394,7 +394,7 @@ asmlinkage int sys_rt_sigreturn(struct p
 		return 0;
 	}
 
-	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
 		goto badframe;
 
 	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
diff -puN include/asm-xtensa/checksum.h~xtensa-remove-verify_area-macros include/asm-xtensa/checksum.h
--- a/include/asm-xtensa/checksum.h~xtensa-remove-verify_area-macros
+++ a/include/asm-xtensa/checksum.h
@@ -43,8 +43,7 @@ asmlinkage unsigned int csum_partial_cop
  *	Note: when you get a NULL pointer exception here this means someone
  *	passed in an incorrect kernel address to one of these functions.
  *
- *	If you use these functions directly please don't forget the
- *	verify_area().
+ *	If you use these functions directly please don't forget the access_ok().
  */
 static inline
 unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
diff -puN include/asm-xtensa/rwsem.h~xtensa-remove-verify_area-macros include/asm-xtensa/rwsem.h
--- a/include/asm-xtensa/rwsem.h~xtensa-remove-verify_area-macros
+++ a/include/asm-xtensa/rwsem.h
@@ -172,4 +172,9 @@ static inline int rwsem_atomic_update(in
 	return atomic_add_return(delta, (atomic_t *)(&sem->count));
 }
 
-#endif	/* _XTENSA_RWSEM_XADD_H */
+static inline int rwsem_is_locked(struct rw_semaphore *sem)
+{
+	return (sem->count != 0);
+}
+
+#endif	/* _XTENSA_RWSEM_H */
diff -puN include/asm-xtensa/uaccess.h~xtensa-remove-verify_area-macros include/asm-xtensa/uaccess.h
--- a/include/asm-xtensa/uaccess.h~xtensa-remove-verify_area-macros
+++ a/include/asm-xtensa/uaccess.h
@@ -154,35 +154,6 @@
 .Laccess_ok_\@:
 	.endm
 
-/*
- * verify_area determines whether a memory access is allowed.  It's
- * mostly an unnecessary wrapper for access_ok, but we provide it as a
- * duplicate of the verify_area() C inline function below.  See the
- * equivalent C version below for clarity.
- *
- * On error, verify_area branches to a label indicated by parameter
- * <error>.  This implies that the macro falls through to the next
- * instruction on success.
- *
- * Note that we assume success is the common case, and we optimize the
- * branch fall-through case on success.
- *
- * On Entry:
- * 	<aa>	register containing memory address
- * 	<as>	register containing memory size
- * 	<at>	temp register
- * 	<error>	label to branch to on error; implies fall-through
- * 		macro on success
- * On Exit:
- * 	<aa>	preserved
- * 	<as>	preserved
- * 	<at>	destroyed
- */
-	.macro	verify_area	aa, as, at, sp, error
-	access_ok  \at, \aa, \as, \sp, \error
-	.endm
-
-
 #else /* __ASSEMBLY__ not defined */
 
 #include <linux/sched.h>
@@ -211,11 +182,6 @@
 #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size)))
 #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
 
-static inline int verify_area(int type, const void * addr, unsigned long size)
-{
-	return access_ok(type,addr,size) ? 0 : -EFAULT;
-}
-
 /*
  * These are the main single-value transfer routines.  They
  * automatically use the right size if we just have the right pointer
_

Patches currently in -mm which might be from jesper.juhl@xxxxxxxxx are

origin.patch
fix-use-after-free-bug-in-cpia2-driver.patch
small-whitespace-cleanup-for-qlogic-driver.patch
add-scsi_add_host-failure-handling-for-nsp32.patch
ensure-null-deref-cant-possibly-happen-in-is_exported.patch
bluetooth-fix-potential-null-ptr-deref-in-dtl1_cscdtl1_hci_send_frame.patch
pnp-card_probe-fix-memory-leak.patch
moxa-remove-pointless-casts.patch
moxa-remove-pointless-check-of-tty-argument-vs-null.patch
moxa-partial-codingstyle-cleanup-spelling-fixes.patch
correct-sak-description-in-sysrqtxt.patch
i-force-joystick-remove-some-pointless-casts.patch
debug-shared-irqs.patch
remove-redundant-null-checks-before-free-in-fs.patch
remove-redundant-null-checks-before-free-in-kernel.patch
remove-redundant-null-checks-before-free-in-drivers.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux