forked from intel/linux-sgx-driver
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Sync with intel main and add fix for kernel 6.5 OOT driver compilation error #1
Open
joshwyant
wants to merge
83
commits into
fortanix:master
Choose a base branch
from
novapolis:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Signed-off-by: Angie Chinchilla <[email protected]>
Authors: Serge Ayoun <[email protected]> Angie Chinchilla <[email protected]> Shay Katz-zamir <[email protected]> Cedric Xing <[email protected]> Signed-off-by: Angie Chinchilla <[email protected]>
Signed-off-by: Angie Chinchilla <[email protected]>
Signed-off-by: Angie Chinchilla <[email protected]>
Set sgx2 to master:<03435d33de0bcca6c5777f23ac161249b9158f1e> for rebasing but keep the previous commit history/label.
Rebased 2.0 patch applies to linux-sgx-driver:master commit-id 03435d3 Authors: Serge Ayoun <[email protected]> Angie Chinchilla <[email protected]> Shay Katz-zamir <[email protected]> Cedric Xing <[email protected]> Signed-off-by: Angie Chinchilla <[email protected]>
Signed-off-by: Angie Chinchilla <[email protected]>
Signed-off-by: Zhang Lili [email protected]
Update README Signed-off-by: Zhang Lili [email protected]
Signed-off-by: Zhang Lili [email protected]
Update README for SUSE on sgx2 branch Signed-off-by: Zhang Lili [email protected]
Signed-off-by: Zhang Lili [email protected]
Port README.md update from master
Update README.md
Replace the call to mmu_notifier_unregister_no_release() with a call to the basic mmu_notifier_unregister(). The no_release variant was not added until kernel 3.17 and using it prevents building the driver in Debian 8 (and earlier). Back when usge of the MMU notifier was added to the SGX driver, the MMU release callback, sgx_mmu_notifier_release(), included acquiring mmap_sem for read, i.e. down_read(&mm->mmap_sem). This caused a deadlock if we called mmu_notifier_unregister() in sgx_encl_release() because the semaphore is already write-locked by munmap(). Eventually we stopped acquiring mmap_sem in sgx_mmu_notifier_release(), but kept using the no_release unregister variant as invoking release on a dying enclave was unnecessary and added an extra lock/unlock sequence. TL;DR: Calling mmu_notifier_unregister_no_release() was necessary to avoid deadlock in an old incarnation of the driver, but the current driver plays nice with the release variant. Signed-off-by: Sean Christopherson <[email protected]>
intel_sgx: use mmu_notifier_unregister w/o "no_release"
Signed-off-by: Serge Ayoun <[email protected]>
Removing conflicting compilation flags
…ap_sem) added isolate_range does not always extract the right vma ptr: code fix Signed-off-by: Serge Ayoun <[email protected]>
Calling PF handler from isolate_range was not protected: down_read(mm…
Signed-off-by: Angie Chinchilla <[email protected]>
Update License.txt to 3-c BSD/GPL v2, to match src
. Updating sgx_secs structure to reflect configid and configsvn members. . Releasing SGX_ATTR_RESERVED bit mask 7. Signed-off-by: Serge Ayoun <[email protected]>
In order to cope with KSS feature: Signed-off-by: Zhang Lili Z <[email protected]>
Signed-off-by: Serge Ayoun <[email protected]>
vm_insert_pfn replaced by vmf_insert_pfn from kernel 4.20
Signed-off-by: Serge Ayoun <[email protected]>
Enclave virtual address range should never be defined as MAP_PRIVATE.
in success case Signed-off-by: Serge Ayoun <[email protected]>
They have new names in more recent kernels. We check for the old defines, however, in order to prevent breaking on older kernels. Also, rename FEATURE_CONTROL_SGX_ENABLE to match the new naming. Signed-off-by: Nathaniel McCallum <[email protected]>
Rename MSR_IA32_FEATURE_CONTROL and FEATURE_CONTROL_LOCKED
Signed-off-by: Haitao Huang <[email protected]>
Signed-off-by: Haitao Huang <[email protected]>
Clarify intended usage of this driver Signed-off-by: Haitao Huang <[email protected]>
Signed-off-by: Haitao Huang <[email protected]>
Fix build for RHEL 8.2
Update README.md
Obviously, this if check is redundant. Remove it. Signed-off-by: Tianjia Zhang <[email protected]>
Signed-off-by: Tianjia Zhang <[email protected]>
Signed-off-by: Tianjia Zhang <[email protected]>
Shifting a signed integer value of 1 by 31 or more bits will cause overflow and can lead to undefined behaviour. Fix this by adding a UL suffix to ensure an unsigned long is being shifted. Signed-off-by: Colin Ian King [email protected] Signed-off-by: Haitao Huang <[email protected]>
Fix signed integer overflow on shift
Note this is used in Intel PSW release 2.11 Signed-off-by: Haitao Huang <[email protected]>
Update version to 2.11
* Fix compilation on 5.8 kernel Signed-off-by: Don Porter <[email protected]> * Address review comments * Address review comments
Signed-off-by: Haitao Huang <[email protected]>
Signed-off-by: Haitao Huang <[email protected]>
reset hashes
Signed-off-by: Haitao Huang <[email protected]>
Update supported OSes by referring to releases
For non-FLC platforms, Linux kernel 5.11 or above disables sgx feature flag so boot_cpu_has is not usable. Signed-off-by: Haitao Huang <[email protected]>
Use cpuid instead of boot_cpu_has to check cpu features
Signed-off-by: Zhang Lili [email protected]
Signed-off-by: Haitao Huang <[email protected]>
reuse the patch from intel#151 and fix "shift exponent 32 is too large for 32-bit type 'int'" when loading the isgx module
joshwyant
changed the title
Sync with intel/linux-sgx-driver main branch
Sync with intel main and add fix for kernel 6.5 OOT driver compilation error
Apr 27, 2024
Merging in commit from ticapix@2f69bc4 which fixes the issue, see intel#152 (comment) |
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.
see commit for the fix by @ticapix below, "fix compilation on 6.5 and shift op, 2f69bc4"