Skip to content
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

Please Merge Mitigations for Load Value Injection (LVI) into 10.0.1 #45549

Closed
scottconstable opened this issue Jun 4, 2020 · 15 comments
Closed
Assignees
Labels
backend:X86 bugzilla Issues migrated from bugzilla

Comments

@scottconstable
Copy link
Contributor

Bugzilla Link 46204
Resolution FIXED
Resolved on Jun 24, 2020 12:07
Version 10.0
OS All
Blocks #44654
Attachments X86 Pipeline test fixes for cherry-pick conflict
CC @topperc,@efriedma-quic,@RKSimon,@rotateright,@tstellar

Extended Description

The following patches provide critical mitigations for the Load Value Injection (LVI) vulnerability: https://software.intel.com/security-software-guidance/software-guidance/load-value-injection.

git cherry-pick 080dd10
git cherry-pick 71e8021
git cherry-pick b1d5810
git cherry-pick 5b519cf
git cherry-pick f95a67d
git cherry-pick c74dd64
git cherry-pick 62c42e2
git cherry-pick a505ad5
git cherry-pick 1d42c0d
git cherry-pick 0505181
git cherry-pick 539163a
git cherry-pick e97a3e5
git cherry-pick 8ce078c

Cherry-picking e97a3e5 onto the 10.x branch creates conflicts in the X86 CodeGen pipeline tests because the pipeline structure has diverged between 11.x and 10.x. The attached O0-pipeline.ll and O3-pipeline.ll files resolve the conflicts.

@scottconstable
Copy link
Contributor Author

assigned to @topperc

@tstellar
Copy link
Collaborator

Created attachment 23578 [details]
X86 Pipeline test fixes for cherry-pick conflict

The following patches provide critical mitigations for the Load Value
Injection (LVI) vulnerability:
https://software.intel.com/security-software-guidance/software-guidance/load-
value-injection.

git cherry-pick 080dd10
git cherry-pick 71e8021
git cherry-pick b1d5810
git cherry-pick 5b519cf
git cherry-pick f95a67d
git cherry-pick c74dd64
git cherry-pick 62c42e2
git cherry-pick a505ad5
git cherry-pick 1d42c0d
git cherry-pick 0505181
git cherry-pick 539163a
git cherry-pick e97a3e5
git cherry-pick 8ce078c

Cherry-picking e97a3e5 onto the 10.x branch creates conflicts in the X86
CodeGen pipeline tests because the pipeline structure has diverged between
11.x and 10.x. The attached O0-pipeline.ll and O3-pipeline.ll files resolve
the conflicts.

Can you push all the cherry-picks to a public branch somewhere? This will make it easier for me to review.

@scottconstable
Copy link
Contributor Author

@​TomStellard I have pushed the cherry-picks to the 10.x.LVI branch of my fork here: https://github.com/scottconstable/llvm-project/tree/10.x.LVI.

I think that we should also pick the recently committed 7e06cf0 because it fixes a performance degradation that was observed in -O0 builds (discussed here: https://reviews.llvm.org/D80964). This will also cause a pipeline test conflict when cherry-picked. I have attached the fixed test.

@scottconstable
Copy link
Contributor Author

@tstellar
Copy link
Collaborator

Scott can you add that patch to your branch?

@scottconstable
Copy link
Contributor Author

[commit 7e06cf00] X86 lvi-load-hardening test fix
This fixes an issue that causes check-llvm to fail on the 10.x branch (it was not failing on 11.x). One register was being allocated as eax on 11.x, but edx on 10.x.

@scottconstable
Copy link
Contributor Author

@​TomStellard I pushed the requested commit to 10.x.LVI. I also noticed that a different register allocation was causing the lvi-hardening-loads.ll test to fail on 10.x, so I have also attached the fixed file for that issue.

@tstellar
Copy link
Collaborator

Can you push this as a patch to the branch too?

@scottconstable
Copy link
Contributor Author

@​TomStellard I have pushed the cherry-pick and the fix as new commits on this branch: https://github.com/scottconstable/llvm-project/tree/10.x.LVI2.

@tstellar
Copy link
Collaborator

Created attachment 23578 [details]
X86 Pipeline test fixes for cherry-pick conflict

The following patches provide critical mitigations for the Load Value
Injection (LVI) vulnerability:
https://software.intel.com/security-software-guidance/software-guidance/load-
value-injection.

git cherry-pick 080dd10

Why is this commit needed?

@tstellar
Copy link
Collaborator

Craig, here is the full list of changes, what do you think?

https://github.com/tstellar/llvm-project/pull/186/files

@scottconstable
Copy link
Contributor Author

Created attachment 23578 [details]
X86 Pipeline test fixes for cherry-pick conflict

The following patches provide critical mitigations for the Load Value
Injection (LVI) vulnerability:
https://software.intel.com/security-software-guidance/software-guidance/load-
value-injection.

git cherry-pick 080dd10

Why is this commit needed?

RDF is a dependency for the vulnerability mitigations. We moved it from Hexagon to Codegen so that X86 users would not have to also build the Hexagon target.

@topperc
Copy link
Collaborator

topperc commented Jun 21, 2020

Craig, here is the full list of changes, what do you think?

https://github.com/tstellar/llvm-project/pull/186/files

I think I'm ok with it if you are. Most of the code requires a command line option to run at all.

@tstellar
Copy link
Collaborator

I've merged these. Please make sure to test the release branch and/or the next release candidate.

@scottconstable
Copy link
Contributor Author

Hi Tom, I checked out the updated release branch and everything looks and tests OK. Thanks!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants