* We also need to get rid of verify_area in entry.S
@ 2005-08-29 17:54 Jesper Juhl
2005-08-29 18:21 ` Chris Zankel
0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2005-08-29 17:54 UTC (permalink / raw)
To: Chris Zankel; +Cc: linux-kernel
Hi Chris,
In addition to the patch I sent a few minutes ago, there's one last reference
to verify_area left in xtensa. It's in arch/xtensa/kernel/entry.S, and I'm
going to need your help to get rid of that one since that code is over my head
and I assume that the naive approach below would just break it :
diff -upr -X ./linux-2.6.13/Documentation/dontdiff linux-2.6.13-orig/arch/xtensa/kernel/entry.S linux-2.6.13/arch/xtensa/kernel/entry.S
--- linux-2.6.13-orig/arch/xtensa/kernel/entry.S 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/arch/xtensa/kernel/entry.S 2005-08-29 03:48:43.000000000 +0200
@@ -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 a3, a7, a0, a2, .Leac
_beqi a6, SYSXTENSA_ATOMIC_SET, .Lset
_beqi a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg
So, could you come up with a working patch and push it to Andrew along with the
one I sent a little while ago, so I can push my verify_area removal patches? Or
you can just sign off on my previous patch if it's OK, and send me one for
entry.S and then I'll push the entire thing onwards if you prefer that.
Thanks in advance.
--
Jesper Juhl
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: We also need to get rid of verify_area in entry.S
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
0 siblings, 1 reply; 4+ messages in thread
From: Chris Zankel @ 2005-08-29 18:21 UTC (permalink / raw)
To: Jesper Juhl; +Cc: linux-kernel
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.
I am currently working on the system call interface and am removing the
non-rt signal calls, so the signal.c patch probably doesn't apply
cleanly anymore.
Thanks,
~Chris
Jesper Juhl wrote:
> In addition to the patch I sent a few minutes ago, there's one last reference
> to verify_area left in xtensa. It's in arch/xtensa/kernel/entry.S, and I'm
> going to need your help to get rid of that one since that code is over my head
> and I assume that the naive approach below would just break it :
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: We also need to get rid of verify_area in entry.S
2005-08-29 18:21 ` Chris Zankel
@ 2005-08-29 19:44 ` Jesper Juhl
2006-05-07 20:56 ` Jesper Juhl
0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2005-08-29 19:44 UTC (permalink / raw)
To: Chris Zankel; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: We also need to get rid of verify_area in entry.S
2005-08-29 19:44 ` Jesper Juhl
@ 2006-05-07 20:56 ` Jesper Juhl
0 siblings, 0 replies; 4+ messages in thread
From: Jesper Juhl @ 2006-05-07 20:56 UTC (permalink / raw)
To: Chris Zankel; +Cc: linux-kernel
On 8/29/05, Jesper Juhl <jesper.juhl@gmail.com> wrote:
> 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.
> >
Hi Chris,
Following up on an old mail...
verify_area() is still alive on xtensa in 2.6.17-rc3-git13 :-(
Do you have any plans to get rid of it? Are the original patches I
send still useful? Should I create new patches?
It would be nice to finally be rid of that function across the board.
Xtensa is the only user left and verify_area() comletely relaces it,
so let's get rid of the cruft - no?
/Jesper
> 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
>
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-07 20:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2006-05-07 20:56 ` Jesper Juhl
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.