All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Chris Zankel <zankel@tensilica.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: We also need to get rid of verify_area in entry.S
Date: Mon, 29 Aug 2005 21:44:11 +0200	[thread overview]
Message-ID: <200508292144.11941.jesper.juhl@gmail.com> (raw)
In-Reply-To: <43135211.50109@tensilica.com>

On Monday 29 August 2005 20:21, Chris Zankel wrote:
> Jesper,
> 
> Thanks for the patches. I'll take a look at the entry.S one and will 
> pass it along to Andres, and will incorporate the signal.c patch.
> 
Thank you.

I was originally planning to submit a single patch that removes 
verify_area across the board, but I guess it might be easier if I just 
hand you the bit of the patch that handles xtensa (instead of waiting for 
those bits to hit -mm) and then submit the rest along with a note that 
similar patches for xtensa will arrive later via you.

So, here's the final bit that removes verify_area completely from xtensa :


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

diff -upr -X ./linux-2.6.13/Documentation/dontdiff linux-2.6.13-orig/include/asm-xtensa/checksum.h linux-2.6.13/include/asm-xtensa/checksum.h
--- linux-2.6.13-orig/include/asm-xtensa/checksum.h	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/include/asm-xtensa/checksum.h	2005-08-29 03:46:34.000000000 +0200
@@ -45,7 +45,7 @@ asmlinkage unsigned int csum_partial_cop
  *	passed in an incorrect kernel address to one of these functions.
  *
  *	If you use these functions directly please don't forget the
- *	verify_area().
+ *	access_ok().
  */
 extern __inline__
 unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
diff -upr -X ./linux-2.6.13/Documentation/dontdiff linux-2.6.13-orig/include/asm-xtensa/uaccess.h linux-2.6.13/include/asm-xtensa/uaccess.h
--- linux-2.6.13-orig/include/asm-xtensa/uaccess.h	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/include/asm-xtensa/uaccess.h	2005-08-29 03:47:18.000000000 +0200
@@ -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))
 
-extern 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

  reply	other threads:[~2005-08-29 19:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-29 17:54 We also need to get rid of verify_area in entry.S Jesper Juhl
2005-08-29 18:21 ` Chris Zankel
2005-08-29 19:44   ` Jesper Juhl [this message]
2006-05-07 20:56     ` Jesper Juhl

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=200508292144.11941.jesper.juhl@gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zankel@tensilica.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.