• 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: IOKit KEXT Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOKit KEXT Questions


  • Subject: Re: IOKit KEXT Questions
  • From: Terry Lambert <email@hidden>
  • Date: Wed, 15 Aug 2007 16:24:59 -0700

On Aug 15, 2007, at 3:21 PM, Matt Burnett wrote:
I have 2 questions regarding IOKit KEXTs.

- How does IOMemoryDescriptor deal with memory protection (mprotect/ vm_protect)? Is there a class available to check/change the protection of certain pages in memory or should i use mprotect/ vm_protect?

- Why do IOKit KEXTs have issues resolving kernel symbols, and what can i do to work around it. For example if i create a KEXT in C, i can lookup the address of any symbol which is in /mach.sym, however I get unresolved symbol errors if i do the same in a IOKit KEXT.

Example HelloIOKit.cpp Code:
...
extern "C" int execve(void *, void *, int *);
...
IOLog("Found execve at %p\n",execve);
...
Example kextload output:
kextload: extension HelloIOKit.kext appears to be valid
kld(): Undefined symbols:
_execve
...

We hide system calls so someone unscrupulous does not overwrite their entry points with jump instructions to their own code, perhaps thinking that we do not change locking or other implementations details in software updates.


If you need to trap and/or prevent this type of operation for legitimate reasons, use kauth instead.

-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: IOKit KEXT Questions
      • From: Ernesto Corvi <email@hidden>
    • Re: IOKit KEXT Questions
      • From: Matt Burnett <email@hidden>
References: 
 >IOKit KEXT Questions (From: Matt Burnett <email@hidden>)

  • Prev by Date: Rereading A Partition Table
  • Next by Date: Re: Rereading A Partition Table
  • Previous by thread: IOKit KEXT Questions
  • Next by thread: Re: IOKit KEXT Questions
  • Index(es):
    • Date
    • Thread