Show pointer value in kernel printouts (instead of <ptr>) on VM parallels running OS X 10.12

I am working on Kext which is running under 10.12.4 VM (I am using parallels) and I would like to enable printouts of pointers (currently all pointers are hidden and displayed on /var/log/system.log

how <ptr>

)

Prior to 10.12, it was possible to directly remove debug restrictions by setting nvram csr-active-config=%ff%00%00%00

. However, it is now impossible to install csr-active-config

directly, but through csrutil disable

from recovery mode. unfortunately it does not disable all SIP features and the pointers remain hidden.

luckily the following thread offers a workaround:

Alternatively, CSR can be completely disabled by setting csr-active-config = ff% 00% 00% 00. For a virtual machine, this can be achieved by booting into the recovery partition, using csrutil clear to completely remove the csr-active- variable config and nvram Xsr-active-config = ff% 00% 00% 00. Then shutdown the virtual machine and use a hex editor to change X → c in the nvram. This will work with boot-arg -show_pointers.

I am working with Parallels and I am trying to find the location of the nvram settings. I saw a promising file called NVRAM.dat

, but unfortunately, I was unable to trace the line Xsr-active-config

after following the instructions in the above paragraph.

Perhaps there is another place for the nvram settings?

thank

+3


source to share


2 answers


I don't have a direct answer to your question, but I have a workaround: Serial log output is kprintf()

not cleared of pointers. So if you enable the kprintf flag in debug boot-args, enable the virtual serial port, which writes to the host file in the VM setup and changes your log from printf

/ IOLog

to kprintf

, you can get the original write to the serial port file.



I found the logging mechanism to be kprintf()

more useful than the syslog core in other ways - it works to the point of panic, is not limited in speed, and is less noisy. The downside is that it has a noticeable performance impact if you log a lot.

+1


source


change doprnt_hide_pointers to false in the debugger



+3


source







All Articles