Question

I am trying to study the __copy_to_user() and __copy_from_user() inline functions mentioned on Page 65 of LDD3.

I can see that the __copy_to_user() function calls the __copy_to_user_inatomic function and this function calls the __copy_tofrom_user() function. The fact that I have not provided a link for that last one should clue you into my issue.

I can see that __copy_tofrom_user() has a prototype here, but I cannot find where the function is actually defined. A search on the Linux Cross Reference shows that it is used several places in the PowerPC architecture. But where is the actual definition?

My question is similar to this question but it looks like the asm-generic version does not have the __copy_tofrom_user() function.

Edit:

Here are links to the assembly for __copy_tofrom_user(): Looks like there is a 32-bit version and a 64-bit version implementation in this version of Linux.

Was it helpful?

Solution

This function is implemented in the copyuser_*.S files in the same directory.

(Assembler files are not indexed.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top