• 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: kernel mprotecting my stack?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kernel mprotecting my stack?


  • Subject: Re: kernel mprotecting my stack?
  • From: Cyrus Harmon <email@hidden>
  • Date: Wed, 7 Feb 2007 09:43:24 -0800

No, only one machine and no KEXT involved here. 0xba01b80 is a right where I expect it to page, in the middle of the stack I allocate for this thread, BUT, for some reason this page seems to be mprotected:

(gdb) x/32w 0xba01b80
0xba01b80: Cannot access memory at address 0xba01b80
(gdb) x/32w 0xba00b80
0xba00b80: 0x00000000 0x00000000 0x00000000 0x00000000
0xba00b90: 0x00000000 0x00000000 0x00000000 0x00000000
0xba00ba0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba00bb0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba00bc0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba00bd0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba00be0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba00bf0: 0x00000000 0x00000000 0x00000000 0x00000000
(gdb) x/32w 0xba02b80
0xba02b80: 0x00000000 0x00000000 0x00000000 0x00000000
0xba02b90: 0x00000000 0x00000000 0x00000000 0x00000000
0xba02ba0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba02bb0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba02bc0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba02bd0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba02be0: 0x00000000 0x00000000 0x00000000 0x00000000
0xba02bf0: 0x00000000 0x00000000 0x00000000 0x00000000


If the address were out of range, I could understand it, but in this case, it's in range and I can see the page above and the page below (although, I grant you, even the address is within the range I would expect, to 0x0's above and below it are very suspicious). But, still, it makes this rather hard to debug as I'm catching a fault in syscall and can't get a backtrace to figure out where I came from.

Thanks,

Cyrus

On Feb 7, 2007, at 9:29 AM, Garth Cummings wrote:

Hi Cyrus,

On Feb 6, 2007, at 5:47 PM, Cyrus Harmon wrote:

I'm not sure if this is really a kernel question per se, as it's motivated by user-space operations, rather than a KEXT or what not, but I'm getting an error like so:

[Switching to thread 11 (process 5245 thread 0x5803)]
0x90004d8a in syscall ()
(gdb) bt
#0  0x90004d8a in syscall ()
Cannot access memory at address 0xba01b80
Cannot access memory at address 0xba01b7c

If you're doing this bt from a two-machine kernel debugging session, that message usually means that the address is one not known to GDB because you haven't provided symbols covering that address.


If this is code in your KEXT, you need to create a symbol file for your KEXT and load that symbol file into GDB.

--gc
____________________________________________________________________
Garth Cummings					 email@hidden
Sr. Software Engineer
Apple Developer Technical Support

<http://developer.apple.com/technicalsupport>



_______________________________________________ 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: 
 >kernel mprotecting my stack? (From: Cyrus Harmon <email@hidden>)
 >Re: kernel mprotecting my stack? (From: Garth Cummings <email@hidden>)

  • Prev by Date: Re: kernel mprotecting my stack?
  • Next by Date: multiple plumbers for interface type
  • Previous by thread: Re: kernel mprotecting my stack?
  • Next by thread: Re: kernel mprotecting my stack?
  • Index(es):
    • Date
    • Thread