Skip to content

Conversation

@chkp-eyalit
Copy link
Contributor

Major updates:

  • Folder structure cleanup
  • Project extensions no longer require to update the base Scout folder
  • Python code is now a proper package
  • Python now uses scoutCompiler to avoid passing on duplicate flags
  • bugfixes for PIC in different architectures
  • Drastic size improvements for Scout loaders (around 50% size compared to the previous version)

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.
@chkp-eyalit chkp-eyalit merged commit 75392c1 into CheckPointSW:master May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant