Re: immutable wiki?
Hi! On 09:29 Tue 01 May , Bill Traynor wrote: I have an Editor account for the kernelnewbies.org wiki, but all pages are currently immutable. Was the wiki made read-only at some point? You must be on http://kernelnewbies.org/EditorsGroup to make changes. This was made for spam procection. Everybody who is on the list can add you. What is your username in the wiki? -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: immutable wiki?
On Wed, May 2, 2012 at 6:52 AM, mic...@michaelblizek.twilightparadox.com wrote: Hi! On 09:29 Tue 01 May , Bill Traynor wrote: I have an Editor account for the kernelnewbies.org wiki, but all pages are currently immutable. Was the wiki made read-only at some point? You must be on http://kernelnewbies.org/EditorsGroup to make changes. This was made for spam procection. Everybody who is on the list can add you. What is your username in the wiki? Thanks Michael, Rik already fixed it for me. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Crash when sending a lot of messages through a unix socket
Hi, I am trying to log information from within the kernel with the use of a unix socket (/dev/log). My code is a kprobe handler, so while executing I am atomic and uninterrupted. The crashes begin when I do stress tests against my module, so i.e. more than 50 logs per second. The crash messages I get every time are different (from NULL reference, unable to handle page request etc), so I suppose that something is overwritten and this leads to the crash. I don't want to post the code here because it ~100 LOC but these are my steps: Initialization: call sock_create_kern, with PF_UNIX, SOCK_DGRAM, 0 and the address of my socket, then I memset to 0 my sockaddr_un variable and then I set its sun_family to PF_UNIX and copy the /dev/log string to sun_path Logging: I have the message that I want to log in variable called buffer and its length in variable called message_length, I set the msg_name of the msghdr to the address of my sockaddr_un variable, than the msn_namelen to sizeof(sockadrr_un), the msg_iov to an iovec variable which contains the buffer and the message_length values, msg_iovlen to 1 and msg_control, msg_controllen to 0. Then I set the fs to KERNEL_DS, call sock_sendmsg with parameters my socket, the address of my msghdr and the message_length and then I restore the fs that there was before setting it to KERNEL_DS. Please note that my socket, sockadd_un and my buffer are static variables. Also I always use the socket which is initialized once in the Initialization state (function). Do you see any bad practice or something that could lead to crashes when stressing with a lot of messages the socket? Thank you in advance! Panos -- http://www.cern.ch/psakkos ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Dropping one packet in a coalesced skb
Hi, I have LSO enabled on my machine, and hence a single skb can (possibly) be multiple packets on the wire. I am writing a kernel module that tries dropping packets. Is there a way to drop just one 1500B sized TCP packet inside an skb that can be a 64KB TCP segment? This segment has about 40 packets due to LSO, and I don't want to drop all of them; just a few (2--3) packets. Can the effect be achieved if I modify skb_shinfo(skb)-gso_segs, or nr_frags? Thanks, -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Crash when sending a lot of messages through a unix socket
Hi :) On Wed, May 2, 2012 at 8:43 PM, Panagiotis Sakkos panos.sak...@cern.ch wrote: Hi, I am trying to log information from within the kernel with the use of a unix socket (/dev/log). My code is a kprobe handler, so while executing I am atomic and uninterrupted. The crashes begin when I do stress tests against my module, so i.e. more than 50 logs per second. Maybe that's the problem..under rapid call, kprobe handler must allocate stack for unwinding the call more and more. Not to mention that it began to push reentrancy problem to the surface. Regarding reentrancy, IMO think like this...your handler called once...ok fine, twice, perhaps still fine...but maybe more than 50 per sec, not to mention the possibility that they are executed by more than 1 core at once, perhaps that's the problem. race condition -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
RE: Crash when sending a lot of messages through a unix socket
procection. Everybody who is on the list can add you. What is your username in the wiki? Thanks Michael, Rik already fixed it for me. ? ? ? ?-Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com -- Message: 4 Date: Wed, 2 May 2012 13:43:41 + From: Panagiotis Sakkos panos.sak...@cern.ch Subject: Crash when sending a lot of messages through a unix socket To: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org Message-ID: a1f86b12a2e22c4cb3164ecffd1c54db08ec9...@ploxchg03.cern.ch Keywords: CERN SpamKiller Note: -50 Content-Type: text/plain; charset=iso-8859-1 Hi, I am trying to log information from within the kernel with the use of a unix socket (/dev/log). My code is a kprobe handler, so while executing I am atomic and uninterrupted. The crashes begin when I do stress tests against my module, so i.e. more than 50 logs per second. The crash messages I get every time are different (from NULL reference, unable to handle page request etc), so I suppose that something is overwritten and this leads to the crash. I don't want to post the code here because it ~100 LOC but these are my steps: Initialization: call sock_create_kern, with PF_UNIX, SOCK_DGRAM, 0 and the address of my socket, then I memset to 0 my sockaddr_un variable and then I set its sun_family to PF_UNIX and copy the /dev/log string to sun_path Logging: I have the message that I want to log in variable called buffer and its length in variable called message_length, I set the msg_name of the msghdr to the address of my sockaddr_un variable, than the msn_namelen to sizeof(sockadrr_un), the msg_iov to an iovec variable which contains the buffer and the message_length values, msg_iovlen to 1 and msg_control, msg_controllen to 0. Then I set the fs to KERNEL_DS, call sock_sendmsg with parameters my socket, the address of my msghdr and the message_length and then I restore the fs that there was before setting it to KERNEL_DS. Please note that my socket, sockadd_un and my buffer are static variables. Also I always use the socket which is initialized once in the Initialization state (function). Do you see any bad practice or something that could lead to crashes when stressing with a lot of messages the socket? Thank you in advance! Panos -- http://www.cern.ch/psakkos -- next part -- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120502/271a5a4d/attachment-0001.html -- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies End of Kernelnewbies Digest, Vol 18, Issue 2 ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Crash when sending a lot of messages through a unix socket
/plain; charset=ISO-8859-1 On Wed, May 2, 2012 at 6:52 AM, mic...@michaelblizek.twilightparadox.com wrote: Hi! On 09:29 Tue 01 May ? ? , Bill Traynor wrote: I have an Editor account for the kernelnewbies.org wiki, but all pages are currently immutable. ?Was the wiki made read-only at some point? You must be on http://kernelnewbies.org/EditorsGroup to make changes. This was made for spam procection. Everybody who is on the list can add you. What is your username in the wiki? Thanks Michael, Rik already fixed it for me. ? ? ? ?-Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com -- Message: 4 Date: Wed, 2 May 2012 13:43:41 + From: Panagiotis Sakkos panos.sak...@cern.ch Subject: Crash when sending a lot of messages through a unix socket To: kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org Message-ID: a1f86b12a2e22c4cb3164ecffd1c54db08ec9...@ploxchg03.cern.ch Keywords: CERN SpamKiller Note: -50 Content-Type: text/plain; charset=iso-8859-1 Hi, I am trying to log information from within the kernel with the use of a unix socket (/dev/log). My code is a kprobe handler, so while executing I am atomic and uninterrupted. The crashes begin when I do stress tests against my module, so i.e. more than 50 logs per second. The crash messages I get every time are different (from NULL reference, unable to handle page request etc), so I suppose that something is overwritten and this leads to the crash. I don't want to post the code here because it ~100 LOC but these are my steps: Initialization: call sock_create_kern, with PF_UNIX, SOCK_DGRAM, 0 and the address of my socket, then I memset to 0 my sockaddr_un variable and then I set its sun_family to PF_UNIX and copy the /dev/log string to sun_path Logging: I have the message that I want to log in variable called buffer and its length in variable called message_length, I set the msg_name of the msghdr to the address of my sockaddr_un variable, than the msn_namelen to sizeof(sockadrr_un), the msg_iov to an iovec variable which contains the buffer and the message_length values, msg_iovlen to 1 and msg_control, msg_controllen to 0. Then I set the fs to KERNEL_DS, call sock_sendmsg with parameters my socket, the address of my msghdr and the message_length and then I restore the fs that there was before setting it to KERNEL_DS. Please note that my socket, sockadd_un and my buffer are static variables. Also I always use the socket which is initialized once in the Initialization state (function). Do you see any bad practice or something that could lead to crashes when stressing with a lot of messages the socket? Thank you in advance! Panos -- http://www.cern.ch/psakkos -- next part -- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120502/271a5a4d/attachment-0001.html -- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies End of Kernelnewbies Digest, Vol 18, Issue 2 ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies