Skip to content

seccomp: Disable Speculative Store Bypass mitigation#1471

Merged
sporksmith merged 1 commit intoshadow:mainfrom
sporksmith:disable-spec-store-bypass-mitigation
Jun 23, 2021
Merged

seccomp: Disable Speculative Store Bypass mitigation#1471
sporksmith merged 1 commit intoshadow:mainfrom
sporksmith:disable-spec-store-bypass-mitigation

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

By default, installing a seccomp filter sets the PR_SPEC_FORCE_DISABLE
bit (see prctl(2)). This results in a significant performance penalty.
Meanwhile Shadow is semi-cooperative with its virtual processes; it
doesn't try to protect itself or the system from malicious code. Hence,
it isn't worth paying this overhead.

Here we use the SECCOMP_FILTER_FLAG_SPEC_ALLOW to override this
behavior.

By default, installing a seccomp filter sets the PR_SPEC_FORCE_DISABLE
bit (see prctl(2)). This results in a significant performance penalty.
Meanwhile Shadow is semi-cooperative with its virtual processes; it
doesn't try to protect itself or the system from malicious code. Hence,
it isn't worth paying this overhead.

Here we use the SECCOMP_FILTER_FLAG_SPEC_ALLOW to override this
behavior.
@github-actions github-actions bot added Component: Libraries Support functions like LD_PRELOAD and logging Component: Testing Unit and integration tests and frameworks labels Jun 23, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 23, 2021

Codecov Report

Merging #1471 (083454c) into main (1381e24) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1471      +/-   ##
==========================================
- Coverage   53.71%   53.70%   -0.02%     
==========================================
  Files         137      137              
  Lines       20538    20538              
  Branches     5196     5196              
==========================================
- Hits        11033    11030       -3     
- Misses       6603     6605       +2     
- Partials     2902     2903       +1     
Flag Coverage Δ
tests 53.70% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/lib/shim/shim.c 33.75% <0.00%> (ø)
src/main/host/syscall/mman.c 61.36% <0.00%> (-0.76%) ⬇️
src/main/routing/topology.c 46.71% <0.00%> (-0.27%) ⬇️
src/main/host/descriptor/file.c 33.92% <0.00%> (-0.23%) ⬇️
src/main/host/descriptor/epoll.c 78.98% <0.00%> (+0.38%) ⬆️
src/main/utility/tagged_ptr.c 63.63% <0.00%> (+9.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1381e24...083454c. Read the comment docs.

@sporksmith sporksmith requested a review from robgjansen June 23, 2021 20:42
Copy link
Copy Markdown
Member

@robgjansen robgjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@robgjansen
Copy link
Copy Markdown
Member

robgjansen commented Jun 23, 2021

Hmm, I wonder why the testing label got added. That seems like a bug in the PR labeler.

@sporksmith sporksmith merged commit 4f7b191 into shadow:main Jun 23, 2021
@sporksmith sporksmith deleted the disable-spec-store-bypass-mitigation branch June 23, 2021 21:37
@robgjansen robgjansen removed the Component: Testing Unit and integration tests and frameworks label Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Libraries Support functions like LD_PRELOAD and logging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants