-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callback chain in Security Manager #139
Comments
ARM Internal Ref: IOTSFW-1395 |
@marcuschangarm you mentioned mentioned the SecuritySetupInitiatedCallback_t securitySetupInitiatedCallback;
SecuritySetupCompletedCallback_t securitySetupCompletedCallback;
LinkSecuredCallback_t linkSecuredCallback;
HandleSpecificEvent_t securityContextStoredCallback;
PasskeyDisplayCallback_t passkeyDisplayCallback;
I would also like to point out that callchains have an associated cost in memory, including too many of these could significantly increase the memory requirements for the SecurityManager, specially in devices with tight memory constrains such as BBC micro:bit and MKit. |
The problem I've been running into is how to make compartmentalized modules that run concurrently. I'm using |
@rgrover @pan-: Having a second look at this issue, it seems a bit problematic to make the requested changes without modifying the existing API. This is because most of the callbacks in security manager require more than one parameter to be passed while the FunctionPointerWithContext can only handle a single parameter. A work around this is to put all the parameters inside a structure and pass this structure to the callback. Clearly, this requires changes to the API. |
It was an oversight on my part to not define structures for the callbacks in SecurityManager. I believe we should switch to using such structures and also allow chaining of callbacks. This would be a breaking change, but perhaps not too many people from the mbed-classic world would be using security. @pan- do you support this? |
I would rather prefer to extend FunctionPointerWithContext and allow it to support multiples parameters instead of making a breaking change. |
Why not remove FunctionPointerWithContext completely and switch to the new FunctionPointer class in core-util? Maintaining two function pointer classes seems like a waste of resources. |
Sure, the problem is that their is no function pointer implementation in mbed classic :(. |
The new function pointers only depend on the standard library. Manually copy-pasting them would still be easier than maintaining a parallel function pointer class. |
If we change the FunctionPointerWithContext for the other function pointers then we are definitely making a very large breaking change. |
A better question is, when are we going to feature freeze mbed classic (and only do bug support) and focus all our effort on mbed OS? |
No we don't as long as the function pointer interface has the same "concept". But it will be require to update the callchain because function pointer from mbed os is just a function pointer and not a function pointer and a node of a linked list. I agree with everything. |
It would be useful if (at least) onLinkSecured could have multiple callbacks, since different modules could depend on knowing the security status of the connection.
The text was updated successfully, but these errors were encountered: