* can I input a gate service to kernel to get kernel data to user ?
@ 2012-12-13 3:17 horse_rivers
2012-12-13 10:11 ` Daniel Baluta
2012-12-13 10:52 ` Matthias Brugger
0 siblings, 2 replies; 7+ messages in thread
From: horse_rivers @ 2012-12-13 3:17 UTC (permalink / raw)
To: kernelnewbies
is there method for doing this work? take kernel data to user?
thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* can I input a gate service to kernel to get kernel data to user ?
2012-12-13 3:17 can I input a gate service to kernel to get kernel data to user ? horse_rivers
@ 2012-12-13 10:11 ` Daniel Baluta
2012-12-14 0:59 ` horse_rivers
2012-12-13 10:52 ` Matthias Brugger
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Baluta @ 2012-12-13 10:11 UTC (permalink / raw)
To: kernelnewbies
On Thu, Dec 13, 2012 at 5:17 AM, horse_rivers <horse_rivers@126.com> wrote:
> is there method for doing this work? take kernel data to user?
Check copy_to_user [1].
thanks,
Daniel.
[1] http://lxr.linux.no/#linux+v3.7/arch/x86/lib/usercopy_32.c#L715
^ permalink raw reply [flat|nested] 7+ messages in thread
* can I input a gate service to kernel to get kernel data to user ?
2012-12-13 3:17 can I input a gate service to kernel to get kernel data to user ? horse_rivers
2012-12-13 10:11 ` Daniel Baluta
@ 2012-12-13 10:52 ` Matthias Brugger
2012-12-14 0:53 ` horse_rivers
1 sibling, 1 reply; 7+ messages in thread
From: Matthias Brugger @ 2012-12-13 10:52 UTC (permalink / raw)
To: kernelnewbies
On 12/13/2012 04:17 AM, horse_rivers wrote:
> is there method for doing this work? take kernel data to user?
I think copy_to_user is what you are looking for:
http://lxr.free-electrons.com/source/include/asm-generic/uaccess.h#L253
Cheers,
Matthias
>
>
> thanks!
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* can I input a gate service to kernel to get kernel data to user ?
2012-12-13 10:52 ` Matthias Brugger
@ 2012-12-14 0:53 ` horse_rivers
2012-12-14 9:28 ` Matthias Brugger
0 siblings, 1 reply; 7+ messages in thread
From: horse_rivers @ 2012-12-14 0:53 UTC (permalink / raw)
To: kernelnewbies
At?2012-12-13?18:52:53,"Matthias?Brugger"?<matthias.bgg@gmail.com>?wrote:
>On?12/13/2012?04:17?AM,?horse_rivers?wrote:
>>?is?there?method?for?doing?this?work??take?kernel?data?to?user?
>
>I?think?copy_to_user?is?what?you?are?looking?for:
>http://lxr.free-electrons.com/source/include/asm-generic/uaccess.h#L253
>
thanks !
can this function run at user level ?
when programme is ? at user level , can ?I use this function to get kernel text segment data ,and then analysis it ?
BestRegards!
>Cheers,
>Matthias
>
>>
>>
>>?thanks!
>>
>>?_______________________________________________
>>?Kernelnewbies?mailing?list
>>?Kernelnewbies at kernelnewbies.org
>>?http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
>
>_______________________________________________
>Kernelnewbies?mailing?list
>Kernelnewbies at kernelnewbies.org
>http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 7+ messages in thread
* can I input a gate service to kernel to get kernel data to user ?
2012-12-13 10:11 ` Daniel Baluta
@ 2012-12-14 0:59 ` horse_rivers
0 siblings, 0 replies; 7+ messages in thread
From: horse_rivers @ 2012-12-14 0:59 UTC (permalink / raw)
To: kernelnewbies
At?2012-12-13?18:11:24,"Daniel?Baluta"?<daniel.baluta@gmail.com>?wrote:
>On?Thu,?Dec?13,?2012?at?5:17?AM,?horse_rivers?<horse_rivers@126.com>?wrote:
>>?is?there?method?for?doing?this?work??take?kernel?data?to?user?
>
>Check?copy_to_user?[1].
how can user application achive to getting data from kernel , I have no idea about ?procedure for implementing this quest
is there some advice ?
BestRegards!
?
>
>thanks,
>Daniel.
>
>[1]?http://lxr.linux.no/#linux+v3.7/arch/x86/lib/usercopy_32.c#L715
>
>_______________________________________________
>Kernelnewbies?mailing?list
>Kernelnewbies at kernelnewbies.org
>http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 7+ messages in thread
* can I input a gate service to kernel to get kernel data to user ?
2012-12-14 0:53 ` horse_rivers
@ 2012-12-14 9:28 ` Matthias Brugger
0 siblings, 0 replies; 7+ messages in thread
From: Matthias Brugger @ 2012-12-14 9:28 UTC (permalink / raw)
To: kernelnewbies
Hi,
On 12/14/2012 01:53 AM, horse_rivers wrote:
> At 2012-12-13 18:52:53,"Matthias Brugger" <matthias.bgg@gmail.com> wrote:
>> On 12/13/2012 04:17 AM, horse_rivers wrote:
>>> is there method for doing this work? take kernel data to user?
>>
>> I think copy_to_user is what you are looking for:
>> http://lxr.free-electrons.com/source/include/asm-generic/uaccess.h#L253
>>
>
> thanks !
>
> can this function run at user level ?
>
> when programme is at user level , can I use this function to get kernel text segment data ,and then analysis it ?
no you can't. Userspace programs can only access the kernel trough a
systemcall, otherwise userspace could read memory from other programs
which would be dangerous (think of passwords etc).
If you want to read certain parts of kernel memory from userspace, you
need a kernel module which uses copy_to_user, for example a character
driver using the read or ioctl function to call copy_to_user.
The userspace then would use that character device to invoke systemcalls.
Please refer to http://lwn.net/Kernel/LDD3/ about device driver
programing. Although the book is outdated it is a perfect point to start
understanding the concepts.
Best regards,
Matthias
>
> BestRegards!
>
>> Cheers,
>> Matthias
>>
>>>
>>>
>>> thanks!
>>>
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: can I input a gate service to kernel to get kernel data to user ?
@ 2012-12-14 1:50 jeshkumar555
0 siblings, 0 replies; 7+ messages in thread
From: jeshkumar555 @ 2012-12-14 1:50 UTC (permalink / raw)
To: kernelnewbies
Hello :),
Refer this doc for user and kernel communication methods. Hope it helps :).
people.ee.ethz.ch/~arkeller/linux/multi/kernel_user_space_howto.html#toc2
Sent from my HTC
Excuse for typo.
----- Reply message -----
From: "horse_rivers" <horse_rivers@126.com>
Date: Fri, Dec 14, 2012 6:29 am
Subject: can I input a gate service to kernel to get kernel data to user ?
To: "kernelnewbies at kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
At?2012-12-13?18:11:24,"Daniel?Baluta"?<daniel.baluta@gmail.com>?wrote:
>On?Thu,?Dec?13,?2012?at?5:17?AM,?horse_rivers?<horse_rivers@126.com>?wrote:
>>?is?there?method?for?doing?this?work??take?kernel?data?to?user?
>
>Check?copy_to_user?[1].
how can user application achive to getting data from kernel , I have no idea about ?procedure for implementing this quest
is there some advice ?
BestRegards!
?
>
>thanks,
>Daniel.
>
>[1]?http://lxr.linux.no/#linux+v3.7/arch/x86/lib/usercopy_32.c#L715
>
>_______________________________________________
>Kernelnewbies?mailing?list
>Kernelnewbies at kernelnewbies.org
>http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121214/b6d2fd63/attachment.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-12-14 9:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-13 3:17 can I input a gate service to kernel to get kernel data to user ? horse_rivers
2012-12-13 10:11 ` Daniel Baluta
2012-12-14 0:59 ` horse_rivers
2012-12-13 10:52 ` Matthias Brugger
2012-12-14 0:53 ` horse_rivers
2012-12-14 9:28 ` Matthias Brugger
2012-12-14 1:50 jeshkumar555
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.