Chameleon > Bug Reports

A few bugs I found

(1/1)

loc[a]lhost:
I was experimenting with the undocumented "Kernel Cache" boot flag that lets you choose a custom kernel cache path explicitly instead of using the default path.

However, it didn't work at all, so I started debugging it and found 2 issues:

1) In sys.c, the GetFileInfo() function has the following code:

--- Code: ---strncpy(gMakeDirSpec, name, idx);
--- End code ---
This results in gMakeDirSpec not being a null-terminated in most cases. Adding "gMakeDirSpec[idx] = '\0';" fixes this.

2) I'm not sure this is a bug, but boot.c tests a weird condition for the kernel cache file time:

--- Code: ---if (ret == 0 && cachetime != (exttime + 1)) {
trycache = 0;
break;
}

--- End code ---
This makes using a custom kernel cache path harder, as I need to carefully craft the cache file time to satisfy the condition above.


After making the fixes, I can use a custom kernel cache file just fine.

Could you add those fixes to the trunk?

Note:
Maybe this feature should be more documented. I use a hardware RAID volume for booting (HighPoint RAID controller), and Chameleon has problems reading files that have a physical offset of more than 2TB in the volume. Until now, I used to defragment my drive every time I update my boot files (kexts, kernel, etc.). Now, with the custom kernel cache path, I no longer have to do this.

ErmaC:
open an issue at : http://forge.voodooprojects.org/p/chameleon/issues/
With the proper diff patch file.

Fabio

Navigation

[0] Message Index

Go to full version