Re: Accessing to a file from a KEXT
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Let me try to explain why it's frowned upon... Since you need to rev your driver for Tiger anyway, consider taking a little extra time to do it the right way... S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Technical Support * Networking, Communications, Hardware _______________________________________________ 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... At 13:07 -0700 3/5/05, Mike Smith wrote: As John noted in his followup, this approach is strongly frowned upon. The issue here is one of dependency. Once you're inside the kernel, you should try to avoid taking dependencies on user space code. The problem with opening files from kernel code is that you can't control where the file is coming from (it may require a user space process to service the request, like for WebDAV). The makes the approach inherently dangerous. There are also issues with resource management. The kernel squirrels away certain resources to try to ensure that it can make progress under pathological load conditions. If your kernel code 'leaves' the kernel and then comes back in, you're double dipping from that pool, which can cause the system to run out of these resources, which never ends well. Obviously this is a guideline. In some cases there's no way to avoid this sort of thing. However, be mindful of what Mike wrote: At 13:07 -0700 3/5/05, Mike Smith wrote: The most common reason for why folks want to open a file from within the kernel is that they're writing a driver and they want to download a large firmware image to the device. There are other ways to solve this problem. If that's what you're trying to do, let us know and we'll outline them. This email sent to site_archiver@lists.apple.com
participants (1)
-
Quinn