ptrace and kernel threads

2013-02-22 Thread Kevin Wilson
H i all, You will get an error when trying to call ptrace system call on kernel threads. In code, you have the following check: static int ptrace_attach(struct task_struct *task, long request, unsigned long addr, unsigned long flags) { ...

Re: scripts/basic/fixdep issue

2013-02-22 Thread Sync Rico
Hi, Anyone has any idea about how to build fixdep with --static? Best Regards, SyncBQ On Wed, Feb 20, 2013 at 3:06 PM, Sync Rico syncr...@gmail.com wrote: Hi, I have a problem with fixdep: a kernel was compiled on a PC and when trying to build a kernel module for that kernel I use a

Sending an IP packet

2013-02-22 Thread Adel Qodmani
Hey, My question is quite simple, I have an sk_buff that I want to transmit, the sk_buff is an ICMP message and so far, I've built the headers and set up everything. The problem is, when I want to do such a thing, I typically use a function called: dev_queue_xmit which takes the skb and

setup code

2013-02-22 Thread horseriver
hi I am confused on booting from grub's rescue mode . As we know ,before the kernel start ,the setup code, which is from setup.S ,will be executed at front. If boot from rescue mode , will grub also load setup code and execute it ? or grub execute its own code doing the same work as

Re: Sending an IP packet

2013-02-22 Thread Rami Rosen
Hi, Adel, You should use ip_route_output_flow(). For this you should construct a flowi4 instance. ip_route_output_flow() is exported via EXPORT_SYMBOL_GPL. See for example how this is done in udp_sendmsg(). Good luck! Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Feb 22, 2013 at 2:36

Re: Sending an IP packet

2013-02-22 Thread Adel Qodmani
On Fri, Feb 22, 2013 at 3:47 PM, Rami Rosen roszenr...@gmail.com wrote: Hi, Adel, You should use ip_route_output_flow(). For this you should construct a flowi4 instance. ip_route_output_flow() is exported via EXPORT_SYMBOL_GPL. See for example how this is done in udp_sendmsg(). Good

Re: How to solve module collision

2013-02-22 Thread Jimmy Pan
I found out the method on account of your suggestion. Anyone can refer to the article for detail. https://lwn.net/Articles/143397/ Thanks On Sat, Feb 16, 2013 at 7:54 PM, richard -rw- weinberger richard.weinber...@gmail.com wrote: On Sat, Feb 16, 2013 at 4:56 AM, Jimmy Pan dsp...@gmail.com

Re: Sending an IP packet

2013-02-22 Thread Rami Rosen
Hi, Adel, ip_route_output_flow() calls __ip_route_output_key(). The return value is the routing entry, rtable. the parameters for __ip_route_output_key() do not include sock; only net and flow (flp4). And the __ip_route_output_key() is exported. There is a call for xfrm_lookup() which does need

Re: Sending an IP packet

2013-02-22 Thread Valdis . Kletnieks
On Fri, 22 Feb 2013 14:36:17 +0200, Adel Qodmani said: My question is quite simple, I have an sk_buff that I want to transmit, the sk_buff is an ICMP message and so far, I've built the headers and set up everything. Others have given some details on how. A better question is why. Sending an

Re: ptrace and kernel threads

2013-02-22 Thread Mulyadi Santosa
On Fri, Feb 22, 2013 at 4:38 PM, Kevin Wilson wkev...@gmail.com wrote: Question: what is the reason that kernel threads cannot be traced while userspace threads can be traced ? Subjectively, I think that's because most kernel threads play important roles in kernel's works. So tracing them might

Re: Sending an IP packet

2013-02-22 Thread Rami Rosen
Hi, Adel, - In your first message you said you are using kernel modules. - In case you intend to add code in ICMP for your special requirements from the control protocol, then this seems not a good idea (because this means patching the kernel for using your module; and probably such patches

Re: Sending an IP packet

2013-02-22 Thread Valdis . Kletnieks
On Fri, 22 Feb 2013 17:15:35 +0200, you said: I am trying to implement a new protocol that we've designed which works on top of the IP layer, so I am using ICMP messages to carry control information for the protocol. Why using ICMP, it seemed natural since our protocol is a Network-layer

Re: Sending an IP packet

2013-02-22 Thread Adel Qodmani
On Fri, Feb 22, 2013 at 5:40 PM, valdis.kletni...@vt.edu wrote: In that case, you *really* want to go look at how TCP and SCTP and other protocols handle ICMP integration. You want an API that integrates your ICMP handling with the rest of the protocol stack, because otherwise you'll end up

test mailing list

2013-02-22 Thread 9981.0
just for test, ignore it if you receive it!___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies