Re: Process exit notifcation in a kext
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:cc:content-type :content-transfer-encoding; bh=BZhKnNwzznPeyUC9WSBpIOwWMJn771LauJCZS6WTRO0=; b=JXSpeDVh+ar3pKFJRY7Jfc8135itQKaWgYF4C+8pbX5XbeG9vs7SeC9uoJC5oNl0rg c0nthamukc185n9+I7SPJCQsmBnmqV3Tb7Hv8cam7xo3pVGcgw2Gnq5Ne9dHwh+S6FTP KSrcpN3TdIDLY+HL+CG5UaFWeX4VKryKDuvzc= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; b=cBebc2OLahMViUiNA9xFa66ilYjmwTTCA5FSLgAV+bryn/e9WS6FhhstRQUeNH+ghu 1iK7uX+mFYajXVGCqGsaZB0dnEyJfjlUUHBm1C4gDydqh0De8b4jhM28XleJdMlb9//C veVbP55ZX+EnmCCknLBQ03bzlKqjLoUkfrLHw= On Tue, Jun 22, 2010 at 10:44 PM, Terry Lambert <tlambert@apple.com> wrote:
The tcp_input() doesn't happen in the context of a process, it happens in the context of a kernel thread (the moral equivalent of netisr() on BSD systems). The data gets unloaded onto a socket at the top end, but the binding between a socket and a process is via a file descriptor, and any given file descriptor could be referenced by multiple processes [...]
Agreed here, there's no trivial way of mapping socket_t to pid. Since I'm only dealing with TCP sockets, I can get the pid in the 'attach' filter callback. The two possible cases are "connect()ed socket" which the process creates, and "accept()ed socket" for which I assume the pid is the same as its listening socket, which the process also creates. Thanks for the big picture, Bogdan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Bogdan Harjoc