RE: asm-i386/uaccess.h changes: bug or feature?

From: Chris Swiedler (ceswiedler_lk@mindspring.com)
Date: Wed Oct 04 2000 - 14:32:21 EST


To clarify: you're getting missing-symbol errors (not duplicate-symbols)?

I believe that the "return" versions of these macros have been deprecated.
There's an effort going on to replace these functions with a standard
"put_user(); return;" pair. People think that having a macro which returns
from a function is a bad idea. I imagine the source you're using hasn't been
updated; I would suggest removing the xxx_ret macros from the package you're
compiling (or contacting its maintainer).

chris

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Wes McRae
> Sent: Wednesday, October 04, 2000 3:00 PM
> To: linux-kernel@vger.kernel.org
> Subject: asm-i386/uaccess.h changes: bug or feature?
>
>
> Hello----
>
> Background: compiling lm_sensors 2.5.2 on RedHat 7.0 running 2.4.0-test8
> kernel. (vanilla intel system)
>
> Attempting to compile the sensor package gave symbol errors regarding
> the xxx_ret symbols (copying to/from user space, putting/getting. These
> have been removed from uaccess.h in recent kernels. These were present
> in 2.2.16 and at least some 2.3.x kernels. As you can see from the
> appended diff, these appear to be the only changes. I tend to assume
> there's a reason, but could find no explanation in the kernel docs for
> it.
>
> For what it's worth, I could still compile the application--just not
> load its modules.
>
> Many apologies if this is not the right place to send this--it seemed
> the most likely place after checking MAINTAINERS and REPORTING-BUGS.
>
> bye----
> wes
>
> --- /usr/include/asm/uaccess.h Fri Aug 25 08:31:57 2000
> +++ /usr/src/linux/include/asm/uaccess.h Fri Sep 29 12:09:04 2000
>
> @@ -232,20 +232,6 @@
> : "=r"(err), ltype (x) \
> : "m"(__m(addr)), "i"(-EFAULT), "0"(err))
>
> -/*
> - * The "xxx_ret" versions return constant specified in third argument,
> if
> - * something bad happens. These macros can be optimized for the
> - * case of just returning from the function xxx_ret is used.
> - */
> -
> -#define put_user_ret(x,ptr,ret) ({ if (put_user(x,ptr)) return ret; })
> -
> -#define get_user_ret(x,ptr,ret) ({ if (get_user(x,ptr)) return ret; })
> -
> -#define __put_user_ret(x,ptr,ret) ({ if (__put_user(x,ptr)) return ret;
> })
> -
> -#define __get_user_ret(x,ptr,ret) ({ if (__get_user(x,ptr)) return ret;
> })
> -
>
> /*
> * Copy To/From Userspace
> @@ -582,10 +568,6 @@
> (__builtin_constant_p(n) ? \
> __constant_copy_from_user((to),(from),(n)) : \
> __generic_copy_from_user((to),(from),(n)))
> -
> -#define copy_to_user_ret(to,from,n,retval) ({ if
> (copy_to_user(to,from,n)) return retval; })
> -
> -#define copy_from_user_ret(to,from,n,retval) ({ if
> (copy_from_user(to,from,n)) return retval; })
>
> #define __copy_to_user(to,from,n) \
> (__builtin_constant_p(n) ? \
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:14 EST