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 }}
Could not load tags
Nothing to show
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 <angie.v.chinchilla@intel.com>
Authors: Serge Ayoun <serge.ayoun@intel.com> Angie Chinchilla <angie.v.chinchilla@intel.com> Shay Katz-zamir <shay.katz-zamir@intel.com> Cedric Xing <cedric.xing@intel.com> Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
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 <serge.ayoun@intel.com> Angie Chinchilla <angie.v.chinchilla@intel.com> Shay Katz-zamir <shay.katz-zamir@intel.com> Cedric Xing <cedric.xing@intel.com> Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
Signed-off-by: Zhang Lili lili.z.zhang@intel.com
Update README Signed-off-by: Zhang Lili lili.z.zhang@intel.com
Signed-off-by: Zhang Lili lili.z.zhang@intel.com
Update README for SUSE on sgx2 branch Signed-off-by: Zhang Lili lili.z.zhang@intel.com
Signed-off-by: Zhang Lili lili.z.zhang@intel.com
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 <sean.j.christopherson@intel.com>
intel_sgx: use mmu_notifier_unregister w/o "no_release"
Signed-off-by: Serge Ayoun <serge.ayoun@intel.com>
Removing conflicting compilation flags
…ap_sem) added isolate_range does not always extract the right vma ptr: code fix Signed-off-by: Serge Ayoun <serge.ayoun@intel.com>
Calling PF handler from isolate_range was not protected: down_read(mm…
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
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 <serge.ayoun@intel.com>
In order to cope with KSS feature: Signed-off-by: Zhang Lili Z <lili.z.zhang@intel.com>
Signed-off-by: Serge Ayoun <serge.ayoun@intel.com>
vm_insert_pfn replaced by vmf_insert_pfn from kernel 4.20
Signed-off-by: Serge Ayoun <serge.ayoun@intel.com>
Enclave virtual address range should never be defined as MAP_PRIVATE.
in success case Signed-off-by: Serge Ayoun <serge.ayoun@intel.com>
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 <npmccallum@redhat.com>
Rename MSR_IA32_FEATURE_CONTROL and FEATURE_CONTROL_LOCKED
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Clarify intended usage of this driver Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Fix build for RHEL 8.2
Update README.md
Obviously, this if check is redundant. Remove it. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
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 colin.king@canonical.com Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Fix signed integer overflow on shift
Note this is used in Intel PSW release 2.11 Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Update version to 2.11
* Fix compilation on 5.8 kernel Signed-off-by: Don Porter <porter@cs.unc.edu> * Address review comments * Address review comments
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
reset hashes
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
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 <4699115+haitaohuang@users.noreply.github.com>
Use cpuid instead of boot_cpu_has to check cpu features
Signed-off-by: Zhang Lili lili.z.zhang@intel.com
Signed-off-by: Haitao Huang <haitao.huang@linux.intel.com>
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"