-
Notifications
You must be signed in to change notification settings - Fork 17
Major refactor - v2.0.0 #24
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update the return code from main, and fix a few comments.
Mainly indentations and typos.
Instead of a duplicate function, the proxy will be the one implementing the original instruction handler, which won't exist in Proxy mode.
Ignore SlickEdit's project files
No need for the PIC entry point of "scout_main"
No need for duplicate code lines, using a shared header and proper macros instead.
Remove the code duplication when invoking a scout instruction and there needs to be different logic for PIC / non-PIC code. Now masked behind a macro that embeds this logic behind the scenes.
Properly separated between the restrictions of a PIC code and the effects of it (SCOUT_ISOLATED_ENV), hoping to remove confusing terms. In a similar fashion, SCOUT_KERNEL_MODE also defines a flag for high privileges, which is what needed when flushing the cache.
Shrink the size of the binary only when the new SCOUT_SLIM_SIZE symbol is defined: when there is a PIC loader. On a side note, previous changes made it possible for a loader not to be PIC anylonger, so we should check both conditions.
Should help make a shellcode (PIC) loader smaller, by only including needed TCP features, by demand.
Minor typos fixes in the docs
Resolves issue #10, by using the proper constants for each libc implementation as instructed by the compilation flags.
typo fixed and missing default flag in documentation was added
Folder structure should now separate between Scout infrastructure, that shouldn't be changed by the project, and extensions written by the project and that are located in separate folders.
This is a major (breaking) change, bump the version accordingly.
The compilation was split to multiple architectures and is now based on a main class that will store all information and use it when needed. Still need to work on the PIC context, but the example files now look way better.
Split up the loader deps to "scout_loader_deps" and "scout_net_loader_deps", so advanced integrating projects won't need to be aware of all of our internal files.
Now the code is aware of the compilation-mode and if it is a special toolchain or a plain old GCC. This way the ARM architecture could properly configure the ELF-start address automatically.
Instead of exporting two functions and checking that the user didn't call the wrong one, just export a single function that will invoke the wanted logic based on the PIC flag that is stored by the compiler.
Return the final file name from the compilation function, so the user will be able to use it after it was generated.
Now API exposed by the compiler, which passes most of the arguments and removes the duplicate passed flags.
Fixed the order (and size) of the base GOT
Both docs and the code itself are now complete and adhere to the coding standards in both C and Python files.
Python package is now structured correctly, both examples are using the correct API, and work as expected. Kernel driver also includes a bypass to the mitigation in copy_to_user() using instrPhysRead() instead of a plain old instrMemRead().
Updated all architectures so that the compiler won't try to position "main" before "_start" (a problem we didn't have earlier when we used "scout_main"). Also had a check of the PIC compilations in all CPU configs, and some bug fixes in the context-related code.
When compiling the GOT enable the project to increment the addressess on their side (thumb host), and also allow for a flag of "is_host_thumb" for us to do it on their behalf. This is so we would support a case in which Scout is Thumb but the host is Arm, or vice versa.
Refactor the base PLT implemention on SLIM_SIZE and remove the htonq/ntohq on 32 bit slim binaries as it turns out that they are very wasty in size.
setup.py properly installs the python package from the vanilla repo, but it generates folder that shouldn't be on the repo itself.
Properly pass the argument using ths stack instead of by register. Also enhance the embedded_scout example and demonstrate how to use the scout loader through the scout_network api.
Update the docs to reference the added config flags, compile instructions and python setup.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Major updates: