• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Process exit notifcation in a kext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Process exit notifcation in a kext


  • Subject: Re: Process exit notifcation in a kext
  • From: Bogdan Harjoc <email@hidden>
  • Date: Fri, 18 Jun 2010 13:00:06 +0300

On Thu, Jun 17, 2010 at 9:24 PM, Terry Lambert <email@hidden> wrote:
>> I'd like to ask is this approach is correct: call
>> proc_find(pid) which takes a reference to the proc_t, and then
>> proc_rele(pid) when the exit notification from kqueue comes. This
>> avoids the race, but will the process exit while I am holding a
>> reference to it ?
> In addition, you have no guarantee that the locking order will happen the
> way you want it to, i.e. there is a race in acquiring the lock on the
> process list between you doing the pfind() and the process ID being reused
> between the time you decide a given PID is interesting to you and the time
> that the process reference is obtained on a process with that PID, such that
> it may not be the process you found interesting by the time you have the
> reference.  It's undefined, which is why it's bad to use PID as a unique
> identifier for security purposes.

True, because I would call pfind() in a callback coming from
tcp_input() (and not from a user process). I was hoping for a way to
tag a process (like one can tag mbuf's), is this somehow possible ?

> -- Terry

Thanks again,
Bogdan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Process exit notifcation in a kext
      • From: Terry Lambert <email@hidden>
    • Re: Process exit notifcation in a kext
      • From: Michael Smith <email@hidden>
References: 
 >Process exit notifcation in a kext (From: Bogdan Harjoc <email@hidden>)
 >Re: Process exit notifcation in a kext (From: Terry Lambert <email@hidden>)
 >Re: Process exit notifcation in a kext (From: Bogdan Harjoc <email@hidden>)
 >Re: Process exit notifcation in a kext (From: Terry Lambert <email@hidden>)

  • Prev by Date: Re: Process exit notifcation in a kext
  • Next by Date: problem calling Mach RPC function
  • Previous by thread: Re: Process exit notifcation in a kext
  • Next by thread: Re: Process exit notifcation in a kext
  • Index(es):
    • Date
    • Thread