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

Previous thread: working with the linux-next tree by Robert P. J. Day on Saturday, May 16, 2009 - 9:41 am. (12 messages)

Next thread: Fwd: Cannot compile my Xtables module by Bartek Dolewski on Sunday, May 17, 2009 - 9:13 am. (4 messages)
From: seshikanth varma
Date: Sunday, May 17, 2009 - 2:48 am

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?

Thanks,
Seshikanth

 320 <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/include/asm-i386/uaccess.h#L320>
* Tell gcc we read from memory instead of writing: this is because 321
<http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/include/asm-i386/uaccess.h#L321>
* we do not write to any memory gcc knows about, so there are no 322
<http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/include/asm-i386/uaccess.h#L322>
* aliasing issues. 323
<http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/include/asm-i386/uaccess.h#L323>
*/ 324 <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/include/asm-i386/uaccess.h#L324>#define
__put_user_asm <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=__put_user_asm>(x
<http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=x>,
addr <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=addr>,
err <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=err>,
itype <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=itype>,
rtype <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=rtype>,
ltype <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=ltype>,
errret <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=errret>)
      \ 325 <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/include/asm-i386/uaccess.h#L325>
       __asm__ <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=__asm__>
__volatile__ <http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/+code=__volatile__>(
                                          \ 326
<http://lxr.linux.no/linux-bk+v2.6.11.5/include/asm-i386/include/asm-i386/uaccess.h#L326>
               "1: ...
From: H M Thalib
Date: Monday, July 20, 2009 - 8:54 am

I want to test my kernel for stability. Can you help me in artificially
simulating the kernel crash, kernel panic scenarios. Is there any
standard way to simulate it. maybe by running applications, scripts. but
I dont want to modify anything in the kernel space.
-- 
H M Thalib


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

From: SandeepKsinha
Date: Sunday, May 17, 2009 - 3:46 am

On Sun, May 17, 2009 at 3:18 PM, seshikanth varma




-- 
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@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

From: seshikanth varma
Date: Friday, May 22, 2009 - 11:36 am

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@gmail.com>wro=



--=20
Regards,
Seshikanth
From: SandeepKsinha
Date: Saturday, May 23, 2009 - 12:32 am

IMO, binutils members can answer this better.
copying binutils list....

On Sat, May 23, 2009 at 12:06 AM, seshikanth varma



-- 
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@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

From: SandeepKsinha
Date: Saturday, May 23, 2009 - 1:07 am

-- 
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@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

From: Dave Korn
Date: Saturday, May 23, 2009 - 3:49 am

Even before googling, how about reading the manual?  Unlike Google, it
relates directly to the software that you want to know how to use.  Here's an
online copy:

http://sourceware.org/binutils/docs-2.19/


    cheers,
      DaveK


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

From: Vipul Jain
Date: Monday, July 20, 2009 - 10:11 am

Hi Thalib,

   I believe you can use simple helloworld kernel module and just
dereference a null pointer
   any where in your code that will give to kernel crash for analysis.

   (Below is very beautiful article written by Rob Day that can be
helpful...You don't have to change kernel.. : ) )

http://linux.com/learn/linux-training/26428-the-kernel-newbie-corner-loadable-kernel-m...


   HTH,

Regards,
Vipul.




From: Mulyadi Santosa
Date: Monday, July 20, 2009 - 9:43 pm

Try to study fault-injection. It's documented in
Documentation/fault-injection.txt inside kernel source tree. Never use
it 'til now, so I only can give you a clue.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer
blog: the-hydra.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

From: H M Thalib
Date: Tuesday, July 21, 2009 - 9:26 am

Thanks -

But this steps involves in kernel space,

I am looking for producing kernel panic/crash/hang by running some 
script/application in user space - Is there any tool/standard defined 
way to do that


Thanks
Thalib

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

From: SandeepKsinha
Date: Tuesday, July 21, 2009 - 9:46 am

Hi Thalib,


Why do you feel that you would be able to achieve this? Don't you think tha=
t
such scripts would then we used as a malware.

I think in order to have such a protection we have a user space and a kerne=
l
space. You can panic/hang  user space processes using user space programs
unless you have a loop hole in the kernel implementation. Which no one will


Regards,
Sandeep.






=93To learn is to change. Education is a process that changes the learner.=
Previous thread: working with the linux-next tree by Robert P. J. Day on Saturday, May 16, 2009 - 9:41 am. (12 messages)

Next thread: Fwd: Cannot compile my Xtables module by Bartek Dolewski on Sunday, May 17, 2009 - 9:13 am. (4 messages)