Post

Replies

Boosts

Views

Activity

How to set environment variables for system extension
Hi Experts, I knew there is LSEnvironment for defining environment variables to be set before launching App. e.g. <key>LSEnvironment</key> <dict> <key>PATH</key> <string>/Users/flori/.rvm/gems/ruby-1.9.3-p362/bin:/Users/flori/.rvm/gems/ruby-1.9.3-p362@global/bin:/Users/flori/.rvm/rubies/ruby-1.9.3-p326/bin:/Users/flori/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:</string> </dict> How about system extension? How can I set some environment variables before running? Thanks a lot.
0
0
740
Dec ’20
How to set environment variables for system extension
Hi Experts, I knew there is LSEnvironment for defining environment variables to be set before launching. e.g. <key>LSEnvironment</key> <dict> <key>PATH</key> <string>/Users/flori/.rvm/gems/ruby-1.9.3-p362/bin:/Users/flori/.rvm/gems/ruby-1.9.3-p362@global/bin:/Users/flori/.rvm/rubies/ruby-1.9.3-p326/bin:/Users/flori/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:</string> </dict> How about system extension? Thanks a lot.
2
0
1.7k
Dec ’20
Sysextd Crashing when enabling system extension
Process: sysextd [633] Path: /System/Library/Frameworks/SystemExtensions.framework/Versions/A/Helpers/sysextd Identifier: sysextd Version: 79.40.4 Code Type: X86-64 (Native) Parent Process: launchd [1] Responsible: sysextd [633] User ID: 0 Date/Time: 2020-11-21 19:06:59.948 +0800 OS Version: macOS 11.0.1 (20B50) Report Version: 12 Anonymous UUID: E7E0F5B9-898B-B40D-21A3-AF796FC8960A Time Awake Since Boot: 120 seconds System Integrity Protection: disabled Crashed Thread: 1 Dispatch queue: sysextd.extensionmanager Exception Type: EXCBADINSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXCCORPSENOTIFY Termination Signal: Illegal instruction: 4 Termination Reason: Namespace SIGNAL, Code 0x4 Terminating Process: exc handler [633] Application Specific Information: dyld3 mode Fatal error: 'try!' expression unexpectedly raised an error: sysextd.ExtensionFinishUninstallingAction.actionErrors.outstandingreferences: file sysextd/extensionmanager.swift, line 422 Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystemkernel.dylib 0x00007fff203185ce _ulockwait + 10 1 libdispatch.dylib 0x00007fff201a0f98 dlockwait + 44 2 libdispatch.dylib 0x00007fff201a122c dispatchgroupwaitslow + 49 3 libdispatch.dylib 0x00007fff201a3b37 dispatchblockwait + 212 4 sysextd 0x0000000104ff8c3f 0x104ff0000 + 35903 5 sysextd 0x0000000104ffb95f 0x104ff0000 + 47455 6 sysextd 0x0000000104ffb199 0x104ff0000 + 45465 7 libdyld.dylib 0x00007fff20366631 start + 1 Thread 1 Crashed:: Dispatch queue: sysextd.extensionmanager 0 libswiftCore.dylib 0x00007fff2c72f124 assertionFailure(::file:line:flags:) + 532 1 libswiftCore.dylib 0x00007fff2c784629 swiftunexpectedError + 585 2 sysextd 0x0000000105009168 0x104ff0000 + 102760 3 sysextd 0x000000010501047f 0x104ff0000 + 132223 4 sysextd 0x0000000105012018 0x104ff0000 + 139288 5 sysextd 0x0000000104ff8c86 0x104ff0000 + 35974 6 libdispatch.dylib 0x00007fff201ad1d5 dispatchblockasyncinvoke2 + 83 7 libdispatch.dylib 0x00007fff201a07c7 dispatchclientcallout + 8 8 libdispatch.dylib 0x00007fff201a65fe dispatchlaneserialdrain + 606 9 libdispatch.dylib 0x00007fff201a70cb dispatchlaneinvoke + 375 10 libdispatch.dylib 0x00007fff201b0c5d dispatchworkloopworkerthread + 819 11 libsystempthread.dylib 0x00007fff20348499 pthreadwqthread + 314 12 libsystempthread.dylib 0x00007fff20347467 startwqthread + 15 Thread 1 crashed with X86 Thread State (64-bit): rax: 0x0000000200000003 rbx: 0x0000000105066360 rcx: 0xfffffffe00000000 rdx: 0x0000000000000003 rdi: 0x00007fd5ddd06f08 rsi: 0x00000000000bcfa0 rbp: 0x00007000082ed2f0 rsp: 0x00007000082ed2a0 r8: 0x0000000000000110 r9: 0x000000000000001b r10: 0x00007fd5ddc00000 r11: 0x0000000000000000 r12: 0x0000000000000000 r13: 0x000000000000000b r14: 0x0000000000000001 r15: 0x00007fff2cab8944 rip: 0x00007fff2c72f124 rfl: 0x0000000000010246 cr2: 0x00007fff80068470 Logical CPU: 0 Error Code: 0x00000000 Trap Number: 6 Thread 1 instruction stream: 41 0f b6 c7 48 89 03 49-c7 46 10 01 00 00 00 41 A...H..I.F.....A bf 01 00 00 00 48 8b 7d-d0 e9 19 01 00 00 48 89 .....H.}......H. 4d c0 4c 89 65 c8 4c 89-e7 41 89 f4 e8 5b 8a 34 M.L.e.L..A...[.4 00 41 0f b6 cc 48 8d 7d-c0 48 89 de 48 8b 55 10 .A...H.}.H..H.U. 4d 89 f8 4d 89 e9 45 31-e4 41 56 ff 75 20 e8 29 M..M..E1.AV.u .) 18 00 00 48 83 c4 10 48-8b 7d c8 e8 cc 8a 34 00 ...H...H.}....4. [0f]0b 44 89 f9 c1 e9 06-44 89 f8 83 e0 3f c1 e0 ..D.....D....?.. <== 08 41 81 ff 00 08 00 00-73 0d 09 c8 ba c1 81 00 .A......s....... 00 48 8b 7d d0 eb 38 83-e1 3f 09 c8 44 89 f9 c1 .H.}..8..?..D... e9 0c c1 e0 08 41 81 ff-ff ff 00 00 48 8b 7d d0 .....A......H.}. 77 09 09 c8 ba e1 81 81-00 eb 14 83 e1 3f 09 c8 w............?.. 41 c1 ef 12 c1 e0 08 44-09 f8 ba f1 81 81 81 8d A......D........ Thread 1 last branch register state not available. Binary Images: 0x104ff0000 - 0x105073fff sysextd (79.40.4) <4ED43E22-4E63-3CA2-9354-AB354CE49D62> /System/Library/Frameworks/SystemExtensions.framework/Versions/A/Helpers/sysextd
0
0
794
Nov ’20
Do I need to Block_release dispatch_block_t which passed to the dispatch_barrier_async when no ARC ?
Do I need to release the block which passed to the dispatchbarrierasync when no ARC ? I noticed "The barrier block to submit to the target dispatch queue. This block is copied and retained until it finishes executing, at which point it is released." in dispatchbarrierasync.dispatch_block_t work = dispatch_block_create(0, ^{ //... }); if (work) { dispatchbarrierasync(dispatchQueue, work); auto res = dispatchblockwait(work, timeout); if (res) { // timeout, then cancel, I should release work here? dispatchblockcancel(work); } Blockrelease(work); // do I need to release work when no ARC? the dispatchbarrierasync would release it if it's executed? } } Thanks!
1
0
1.2k
Nov ’20
Multiple Network Extension on the same machine
Hi Experts, If multiple NEFilterDataProvider/NEFilterPacketProvider(s) are on the machine and all are active at the same time. which provider will receive the TCP/UDP segment first? If one of network extension drops the flow or packet, then there is no chance for others to parse it? which is instantiated first or instantiated last if no earlyboot? Thanks a lot!
1
0
636
Nov ’20
Objective-C Memory Management on Static Variables
///************************** // MyClass.m #import "MyClass.h" static MyClass *myClass = NULL; @implementation MyClass (MyClass *)sharedMyClass { myClass = NULL; myClass = [[MyClass alloc] init]; return myClass; } @end Hi Experts, I just want to know myClass is a static ObjC object, it will be automatically released by ARC when no one is referencing it anymore, so no memory leak? is it correct?
2
0
2.1k
Oct ’20
com.apple.networkextension.filter-packet does not work
Hi,I downloaded FilteringNetworkTraffic and added a FilterPacketProvider to intercept network packet with following info.plist:&amp;lt;key&amp;gt;NEProviderClasses&amp;lt;/key&amp;gt; &amp;lt;dict&amp;gt; &amp;lt;key&amp;gt;com.apple.networkextension.filter-packet&amp;lt;/key&amp;gt; &amp;lt;string&amp;gt;$(PRODUCT_MODULE_NAME).FilterPacketProvider&amp;lt;/string&amp;gt; &amp;lt;/dict&amp;gt;but the callback function and packetHandler closure do not work at all? thanks!
12
0
2.9k
Jan ’20