| title: | Re Regarding implementation of copy from use |
|
On Sun, May 17, 2009 at 3:18 PM, seshikanth varma
<seshikanthvarma@xxxxxxxxx wrote:
Hi All,
I am trying to understand the implementation of copy_from_user() and
copy_to_user() implementation in linux. I know the basics of asm format. But
i dont know what is
.section .fixup
.previous
.align 4
Can u please point me to a detailed documentation of asm details involving
the above?
Google for "inline assembly" and "assembly in C".
Thanks,
Seshikanth
320 * Tell gcc we read from memory instead of writing: this is because
321 * we do not write to any memory gcc knows about, so there are no
322 * aliasing issues.
323 */
324#define __put_user_asm(x, addr, err, itype, rtype, ltype, errret)
325 __asm__ __volatile__(
326 "1: mov"itype" %"rtype"1,%2
"
327 "2:
"
328 ".section .fixup,"ax"
"
329 "3: movl %3,%0
"
330 " jmp 2b
"
331 ".previous
"
332 ".section __ex_table,"a"
"
333 " .align 4
"
334 " .long 1b,3b
"
335 ".previous"
336 : "=r"(err)
337 : ltype (x), "m"(__m(addr)), "i"(errret), "0"(err))
338
339
--
Regards,
Seshikanth
--
Regards,
Sandeep.
“To learn is to change. Education is a process that changes the learner.”
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at rel="nofollow" kernelnewbies.org/FAQ kernelnewbies.org/FAQ
|