Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9e122c8 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

[PATCH] xtensa: remove verify_area macros



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: default avatarChris Zankel <chris@zankel.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6f36d17a
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -34,10 +34,6 @@ config GENERIC_HARDIRQS
	bool
	bool
	default y
	default y


config RWSEM_GENERIC_SPINLOCK
       bool
       default y

source "init/Kconfig"
source "init/Kconfig"


menu "Processor type and features"
menu "Processor type and features"
+1 −1
Original line number Original line Diff line number Diff line
@@ -1102,7 +1102,7 @@ ENTRY(fast_syscall_sysxtensa)
	s32i	a7, a2, PT_AREG7
	s32i	a7, a2, PT_AREG7


	movi	a7, 4			# sizeof(unsigned int)
	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_SET, .Lset
	_beqi	a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg
	_beqi	a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg
+5 −5
Original line number Original line Diff line number Diff line
@@ -104,7 +104,7 @@ sys_sigaction(int sig, const struct old_sigaction *act,


	if (act) {
	if (act) {
		old_sigset_t mask;
		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_handler, &act->sa_handler) ||
		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
			return -EFAULT;
			return -EFAULT;
@@ -116,7 +116,7 @@ sys_sigaction(int sig, const struct old_sigaction *act,
	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);


	if (!ret && oact) {
	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_handler, &oact->sa_handler) ||
		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
			return -EFAULT;
			return -EFAULT;
@@ -236,7 +236,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
	err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4);
	err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4);
	err |= __get_user(buf, &sc->sc_cpstate);
	err |= __get_user(buf, &sc->sc_cpstate);
	if (buf) {
	if (buf) {
		if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
		if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
			goto badframe;
			goto badframe;
		err |= restore_cpextra(buf);
		err |= restore_cpextra(buf);
	}
	}
@@ -357,7 +357,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
	if (regs->depc > 64)
	if (regs->depc > 64)
		panic ("Double exception sys_sigreturn\n");
		panic ("Double exception sys_sigreturn\n");


	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
		goto badframe;
		goto badframe;


	if (__get_user(set.sig[0], &frame->sc.oldmask)
	if (__get_user(set.sig[0], &frame->sc.oldmask)
@@ -394,7 +394,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
		return 0;
		return 0;
	}
	}


	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
		goto badframe;
		goto badframe;


	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
+1 −2
Original line number Original line Diff line number Diff line
@@ -43,8 +43,7 @@ asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, i
 *	Note: when you get a NULL pointer exception here this means someone
 *	Note: when you get a NULL pointer exception here this means someone
 *	passed in an incorrect kernel address to one of these functions.
 *	passed in an incorrect kernel address to one of these functions.
 *
 *
 *	If you use these functions directly please don't forget the
 *	If you use these functions directly please don't forget the access_ok().
 *	verify_area().
 */
 */
static inline
static inline
unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
+6 −1
Original line number Original line Diff line number Diff line
@@ -172,4 +172,9 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
	return atomic_add_return(delta, (atomic_t *)(&sem->count));
	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 */
Loading