Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Allocating an LDT entry / calling a kernel function from user code



I'm doing some experimental work on Darwin/x86 that involves a requirement to allocate an LDT (or GDT) entry and there appears to be a perfectly nice kernel function to do it:
thread_set_user_ldt(), in osfmk/i386/bsd_i386.c


Unfortunately, I don't see any kind of corresponding header in /usr/include, so presumably this kernel function isn't accessible through libSystem - is there some way that I can call it directly from user code? If so, where can I find documentation and/or sample code for doing so?

It looks like the function goes through the machdep call table defined in osfmk/i386/machdep_call.c, and there's an exported kernel symbol for this table - but again, the table doesn't appear to be accessible from libSystem, so I'm not sure how user code can access it. Also, is there any assurance that the machdep call table order will remain the same across different versions of darwin?

Thanks,
-Gav

--
Gavriel State
email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-x86 mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-x86/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.