2.1.6rc5 - can't load kext on m1 under Ventura

Developer discussions.

2.1.6rc5 - can't load kext on m1 under Ventura

Postby 0xdeadbeef » Thu Nov 10, 2022 12:31 pm

Hi,

just got my first m1 Mac running Ventura. Enabled kernel extension in the recovery system and installed 2.1.6rc5. After reboot it's not loading the kext and trying to load it manually fails:

# /sbin/kextload /Library/Extensions/zfs.kext
Executing: /usr/bin/kmutil load -p /Library/Extensions/zfs.kext
Error Domain=KMErrorDomain Code=31 "Error occurred while building a collection:
1: One or more binaries has an error which prevented linking. See other errors.
2: Could not use 'org.openzfsonosx.zfs' because: Failed to bind '_sprintf' in 'org.openzfsonosx.zfs' (at offset 0x558 in __DATA_CONST, __auth_got) as could not find a kext which exports this symbol
org.openzfsonosx.zfs specific:
1: Failed to bind '_sprintf' in 'org.openzfsonosx.zfs' (at offset 0x558 in __DATA_CONST, __auth_got) as could not find a kext which exports this symbol
" UserInfo={NSLocalizedDescription=Error occurred while building a collection:
1: One or more binaries has an error which prevented linking. See other errors.
2: Could not use 'org.openzfsonosx.zfs' because: Failed to bind '_sprintf' in 'org.openzfsonosx.zfs' (at offset 0x558 in __DATA_CONST, __auth_got) as could not find a kext which exports this symbol
org.openzfsonosx.zfs specific:
1: Failed to bind '_sprintf' in 'org.openzfsonosx.zfs' (at offset 0x558 in __DATA_CONST, __auth_got) as could not find a kext which exports this symbol[/code]

It weird that it seems to be missing sprintf(3)!?

Anyone else seen this?

thx
0xdeadbeef
0xdeadbeef
 
Posts: 7
Joined: Tue Feb 23, 2016 11:23 pm

Re: 2.1.6rc5 - can't load kext on m1 under Ventura

Postby 0xdeadbeef » Thu Nov 10, 2022 10:50 pm

Hi,

after a good night of sleep (:-) reading the docs I noticed that sprintf has been deprecated in the kernel around High Sierra:
https://developer.apple.com/documentati ... 83-sprintf

Considering the whole buffer without a length limit thing, I'm actually surprised Apple hasn't removed it earlier.

Anyways, snprintf has not been deprecated, so that would be an easy fix. Unfortunately I don't have a dev environment here and won't be able to set one up for another week.
0xdeadbeef
 
Posts: 7
Joined: Tue Feb 23, 2016 11:23 pm

Re: 2.1.6rc5 - can't load kext on m1 under Ventura

Postby dmz » Fri Nov 11, 2022 10:35 am

I'm having exactly the same issue under Monterey, which I guess is not surprising.
dmz
 
Posts: 18
Joined: Thu Mar 13, 2014 10:03 pm

Re: 2.1.6rc5 - can't load kext on m1 under Ventura

Postby lundman » Fri Nov 11, 2022 5:42 pm

Dang, recent fix - Linux still uses sprintf.
User avatar
lundman
 
Posts: 1160
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan


Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 4 guests