• 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: Writing from the kernel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing from the kernel


  • Subject: Re: Writing from the kernel
  • From: Terry Lambert <email@hidden>
  • Date: Tue, 20 Nov 2007 14:12:01 -0800

Internal documentation in source files is pretty significantly improved in Leopard. It's not everywhere, but we had to do this for errno origin and value tracking for the UNIX conformance work. Mostly this is under xnu/bsd/, but that's where you look to be looking anyway.

I'd definitely agree with Quinn that if this were anything but a research project... well.

-- Terry

On Nov 20, 2007, at 7:54 AM, Kynan Shook <email@hidden> wrote:

Thanks for the gun, I promise I won't shoot myself in the foot. ;-)

Now, is there any documentation on these interfaces? A google on vnode_open returns very few results...
Kynan


On Nov 20, 2007, at 5:05 AM, Quinn wrote:

In that case I would just write it to a file (-:

It's not that you /can't/ read or write files from the kernel, it's that doing this exposes you to all sorts of crazy deadlock situations. In this case, you're sitting at the block driver level and you end up calling all the way back up to the VFS level. It's very easy to deadlock due to reentrancy. It's also easy to deadlock due to lack of resources.

OTOH, for a research project you should be able to make it work. You can get the vnode for a path using vnode_lookup. You can open it using vnode_open. And you can write to it using VNOP_WRITE. You don't even have to take a dependency on the kernel; these are all KPIs.

_______________________________________________ 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
_______________________________________________
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


References: 
 >Writing from the kernel (From: Kynan Shook <email@hidden>)
 >Re: Writing from the kernel (From: Quinn <email@hidden>)
 >Re: Writing from the kernel (From: Kynan Shook <email@hidden>)

  • Prev by Date: MTRRs and PATs
  • Next by Date: Re: Writing from the kernel
  • Previous by thread: Re: Writing from the kernel
  • Next by thread: Re: Writing from the kernel
  • Index(es):
    • Date
    • Thread