From: Mikado <mikado4vn@gmail.com>
To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Which process is associated with process ID 0 (swapper)
Date: Thu, 20 Apr 2006 23:04:32 +0700 [thread overview]
Message-ID: <4447B110.4080700@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0604201118200.5749@chaos.analogic.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
linux-os (Dick Johnson) wrote:
> This must be a trick question. Linux is not VAX/VMS. There is no
> swapper process. Check in /proc. Processes start at 1. Even
> kernel threads have PIDs greater than 1.
Linux really has swapper process ;)
> Portions of the kernel networking code operate detached. The code
> gets the CPU from a timer queue or from an interrupt. When an
> connection is attempted, the process attempting the connection
> is either waiting, with its CPU time being used, or put to
> sleep, while the timer queue's CPU time is being used. The
> SYN/ACK handshake is handled during this time, therefore it
> is possible to find who is attempting that connection. Netstat
> gets that information from /proc/net and multiple socket
> calls.
I'm writing kernel module that hooks into netfilter code. I can catch
packet's information and its owner process. The first SYN packet of
handshaking belongs to real user-space socket/process. After timeout,
several SYN packets are generated by kernel-space swapper process (PID
0) Is there anyway to find out the relationship between them in
_kernel_space_ (module context).
Thanks,
Mikado.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFER7EQNWc9T2Wr2JcRAkHYAJ9HFfmHjzTRTIDhCPSI12wgWxKAjQCfXh1R
UAeStFg9Wqk+rJJDGr+WI5c=
=lbpv
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2006-04-20 15:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-20 14:58 Which process is associated with process ID 0 (swapper) Mikado
2006-04-20 15:30 ` linux-os (Dick Johnson)
2006-04-20 15:48 ` Mike Galbraith
2006-04-20 16:04 ` Mikado [this message]
2006-04-20 16:39 ` Joshua Hudson
2006-04-20 22:10 ` Jan Engelhardt
2006-04-20 22:15 ` Hua Zhong
2006-04-20 22:19 ` Jan Engelhardt
2006-04-20 23:12 ` Mikado
2006-04-21 12:46 ` Jan Engelhardt
2006-04-20 23:19 ` Mikado
2006-04-20 23:35 ` Mikado
2006-04-21 0:37 ` Patrick McHardy
2006-04-21 1:33 ` Mikado
2006-04-21 3:16 ` Bernd Eckenfels
2006-04-21 12:48 ` Jan Engelhardt
2006-04-21 12:52 ` Jan Engelhardt
2006-04-21 15:21 ` Mikado
2006-04-20 22:06 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4447B110.4080700@gmail.com \
--to=mikado4vn@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox