-
Notifications
You must be signed in to change notification settings - Fork 6
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
Reduce stack usage for AES calls #24
Comments
I wasn't aware of
I guess they want to encourage you to use PRs. :) |
Yes, it works on 4.6.4. The error message for the attachments reads:
So that should alllow *.patch? |
I don' known the reason but *.patch is not in this list (GitHub Docs)
I've never heard of it but it would be great if it helps reduce stack usage |
Btw while we are discussing compiler-specific flags/optimisations, I have found an interesting answer about the keyword |
Using restrict is sometimes dangerous i think. It might enable optimizations that our code is not prepared for. For example i've seen already quite some code where someone uses |
Of course, it couldn't be used in the libc functions. But maybe it would be worth looking whether there aren't some loops worth adapting (especially in some time-sensitive parts like context switching, fork() etc where a lot of stuff is copied). |
We already implemented the udef_* functions for some VDI functions that otherwise use too much stack space, but for AES the situation is similar. Currently the four arrays are always declared with their maximum size (16 each), which amounts to a total of 192 bytes.
I'm therefore currently experimenting with the attached patch. It also has the benefit that you automatically get warnings when eg. specifying 2 intin parameters in the macro, but then writing 3 values to the array.
What do you think?
PS.: is there a reason why github rejects attaching *.patch files?
aesp.patch.txt
The text was updated successfully, but these errors were encountered: