bad_user_access_length function and modules.

Michael Lausch (mla@loki.muc.de)
Tue, 29 Aug 1995 21:59:57 +0200


There seems to be a problem with the put_usr_{byte,word,long} and
get_usr_{byte,word,long} functions. this function call __put_user or
__get_usr with the appropriate "size" parameter. __put_user and
__get_user call the function bad_usr_access_length, if the "size"
parameter has a wrong value. Normally (gcc 2.7.0) the optimizer can
eliminate the (never executed) call to bad_user_access_length if the
driver (module) only call the put_usr{byte,word,long} or
get_usr_{byte,word,long} function. If the compiler does not do this
(no optimization or an older gcc version, for example 2.5.8) this
optimization is not done, and the module cannot be loaded because
bad_user_access_length is not in the ksyms.c file.

Do i miss something, or should the bad_user_access_length be included
in the ksysms.c file?