Post

Replies

Boosts

Views

Activity

Reply to How is proc_listallpids supposed to be used?
How are you determining they're "invalid"? […] I suspect those are zombie processes Yes, these look like to be zombie processes (listed as in ps output). They seem to be grouped after "pid" 0. But OK, I will assume that the order is not guaranteed. They were seen as invalid as they didn't appear in Activity Monitor.app. It can return a PID that's no longer valid (the process was terminated immediately after the call was made). PIDs can be "missing" from the list (because they were created immediately after the call was made). Yes, this is fair as this is just a snapshot. That's also why I thought that there could be no guarantees that the number of entries returned by the API was the exact number of entries instead of just a maximum number of entries in the populated list (i.e. entries after "pid" 0 were just random values).
2w
Reply to How is proc_listallpids supposed to be used?
Well, the best guide is probably our own code with "top" being the most straightforward example. The top project would have been an interesting pointer if the source code for top included a call to proc_listallpids. Which is not the case. No, that's not what's going on. Both of those pids will always be returned by proc_listallpids because they're "special" within the system. You probably have misread what I wrote. I'm not telling that they won't be returned. As I mentioned, the proc_listallpids API returns a list of the existing pids in a decreasing order. So in theory, the last pid should be 0 or 1 depending on whether you consider that the kernel is a process. But in practice, the API can end up listing pids after pid 0. And it's not just padding. Those are the pids that are invalid. Sorry for the time you spent explaining why launchd is special, I already knew about all this stuff.
3w
Reply to Error when updating system extension
This issue is related to notarization assessment not being automatically done by the OS. [Q] Are there public APIs to assess notarization? There are private APIs (visible in the security open source code of the security library) but there does not seem to be public APIs.
Topic: Code Signing SubTopic: Notarization Tags:
Feb ’26
Reply to Error when updating system extension
I don't think the problem is coming from the macOS instance itself as the problem does not occur when the extension is updated using an installation package. The problem only happens when replacing the system extension and its wrapper .app using basic NSFileManager APIs. I diffed the 2 cases and there are no differences. Same files, same contents. And anyway spctl and codesign are happy. I tried different macOS versions in VMs (14, 15). Same result. What I'm also observing is that after updating the system extension using an installation package, just using the NSFileManager APIs is going to work fine when reverting to any version that has been previous installed via an installation package or updating to version that has been previously updated via an installation package.
Topic: Code Signing SubTopic: Notarization Tags:
Dec ’25
Reply to How many instances of the same NEFilterDataProvider can there be in a running NE?
I don't have logs, only a memgraph, so I can't say whether there were 2 starts logged. The 2 instances are referenced by a collection object (owned by a different class instance). The data filter instance adds itself to the collection from the startFilterWithCompletionHandler: method and removed itself from the collection from the stopFilterWithReason: method. So the most probable hypothesis is that the stopFilterWithReason: was not called. Which would be more a bug in the NetworkExtension framework. I haven't been able to reproduce this case so far (like by disabling/enabling the Network filter from the System Settings).
Jul ’25
Reply to How is proc_listallpids supposed to be used?
How are you determining they're "invalid"? […] I suspect those are zombie processes Yes, these look like to be zombie processes (listed as in ps output). They seem to be grouped after "pid" 0. But OK, I will assume that the order is not guaranteed. They were seen as invalid as they didn't appear in Activity Monitor.app. It can return a PID that's no longer valid (the process was terminated immediately after the call was made). PIDs can be "missing" from the list (because they were created immediately after the call was made). Yes, this is fair as this is just a snapshot. That's also why I thought that there could be no guarantees that the number of entries returned by the API was the exact number of entries instead of just a maximum number of entries in the populated list (i.e. entries after "pid" 0 were just random values).
Replies
Boosts
Views
Activity
2w
Reply to How is proc_listallpids supposed to be used?
Well, the best guide is probably our own code with "top" being the most straightforward example. The top project would have been an interesting pointer if the source code for top included a call to proc_listallpids. Which is not the case. No, that's not what's going on. Both of those pids will always be returned by proc_listallpids because they're "special" within the system. You probably have misread what I wrote. I'm not telling that they won't be returned. As I mentioned, the proc_listallpids API returns a list of the existing pids in a decreasing order. So in theory, the last pid should be 0 or 1 depending on whether you consider that the kernel is a process. But in practice, the API can end up listing pids after pid 0. And it's not just padding. Those are the pids that are invalid. Sorry for the time you spent explaining why launchd is special, I already knew about all this stuff.
Replies
Boosts
Views
Activity
3w
Reply to Are there workarounds for these bugs in Xcode?
OK, I will file tickets. At least the IBAction one is still happening in Xcode 26.2.
Replies
Boosts
Views
Activity
Feb ’26
Reply to When is the kTCCServiceEndpointSecurityClient permission set by macOS?
Thanks. I will file multiple feedback assistant tickets as getting documentations and fixing the issues seem to be 2 different topics.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to Error when updating system extension
API != command line tool. Not a fan of using command line tools either. I have already a radar/feedback assistant ticket about this issue: 21381323
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to Error when updating system extension
This issue is related to notarization assessment not being automatically done by the OS. [Q] Are there public APIs to assess notarization? There are private APIs (visible in the security open source code of the security library) but there does not seem to be public APIs.
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to Error when updating system extension
I don't think the problem is coming from the macOS instance itself as the problem does not occur when the extension is updated using an installation package. The problem only happens when replacing the system extension and its wrapper .app using basic NSFileManager APIs. I diffed the 2 cases and there are no differences. Same files, same contents. And anyway spctl and codesign are happy. I tried different macOS versions in VMs (14, 15). Same result. What I'm also observing is that after updating the system extension using an installation package, just using the NSFileManager APIs is going to work fine when reverting to any version that has been previous installed via an installation package or updating to version that has been previously updated via an installation package.
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Dec ’25
Reply to Incoming UDP Traffic in macOS 15.3 and later?
It looks like that the issue is not reproducible in the 15.6 RC.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Incoming UDP Traffic in macOS 15.3 and later?
It can be reproduced in macOS 26 beta 1 and beta 2.
Replies
Boosts
Views
Activity
Jul ’25
Reply to How many instances of the same NEFilterDataProvider can there be in a running NE?
Feedback ID: 18731867
Replies
Boosts
Views
Activity
Jul ’25
Reply to How many instances of the same NEFilterDataProvider can there be in a running NE?
I don't have logs, only a memgraph, so I can't say whether there were 2 starts logged. The 2 instances are referenced by a collection object (owned by a different class instance). The data filter instance adds itself to the collection from the startFilterWithCompletionHandler: method and removed itself from the collection from the stopFilterWithReason: method. So the most probable hypothesis is that the stopFilterWithReason: was not called. Which would be more a bug in the NetworkExtension framework. I haven't been able to reproduce this case so far (like by disabling/enabling the Network filter from the System Settings).
Replies
Boosts
Views
Activity
Jul ’25
Reply to How many instances of the same NEFilterDataProvider can there be in a running NE?
It is a System Extension with only one data filter.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Launch Constraint, SIP and legacy launchd plist
A sub folder of /Applications, yes.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to Launch Constraint, SIP and legacy launchd plist
Is there some reason you’re unable to do that? Yes, it's related to other macOS requirements that make it mandatory to have the binary in this location (whose parent system directories are not root:wheel 755).
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to Launch Constraint, SIP and legacy launchd plist
It's not specific to a location. But then there's the SIP factor and whether the default ownership and permissions are restrictive enough. Which is the case for /Library/LaunchDaemons. So the issue I'm concerned about is not with the launchd plist file but really with the program targeted by the plist.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’25