Re: Regarding implementation of copy_from_user() and copy_to_user()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 23, 2009 at 1:02 PM, SandeepKsinha <sandeepksinha@xxxxxxxxx> wrote:
> IMO, binutils members can answer this better.
> copying binutils list....
>
> On Sat, May 23, 2009 at 12:06 AM, seshikanth varma
> <seshikanthvarma@xxxxxxxxx> wrote:
>> Hi
>> I googled out but i could not find these things:
>>> .section .fixup
>>> .previous
>>> .align 4
>> Can u please help me in finding the meaning of these things? Any document
>> which gives elaborate explanation would be really helpful for me for
>> future reference, I have seen some more things in linux source code like
>> __extable ....
>>
>>
>>
>> On Sun, May 17, 2009 at 4:16 PM, SandeepKsinha <sandeepksinha@xxxxxxxxx>
>> wrote:
>>>
>>> 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 don't 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\n"
>>> > \
>>> >  327                "2:\n"
>>> > \
>>> >  328                ".section .fixup,\"ax\"\n"
>>> > \
>>> >  329                "3:     movl %3,%0\n"
>>> > \
>>> >  330                "       jmp 2b\n"
>>> > \
>>> >  331                ".previous\n"
>>> > \
>>> >  332                ".section __ex_table,\"a\"\n"
>>> > \
>>> >  333                "       .align 4\n"
>>> > \
>>> >  334                "       .long 1b,3b\n"
>>> > \
>>> >  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.”
>>
>>
>>
>> --
>> Regards,
>> Seshikanth
>>
>
>
>
> --
> Regards,
> Sandeep.
>
>
>
>
>
>
> “To learn is to change. Education is a process that changes the learner.”
>



-- 
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 http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux