- 22 8月, 2023 1 次提交
-
-
由 Borislav Petkov (AMD) 提交于
stable inclusion from stable-v5.10.187 commit 93df00f9d48d48466ddbe01a06eaaf3311ecfb53 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I7NLYY CVE: CVE-2023-20593 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=93df00f9d48d48466ddbe01a06eaaf3311ecfb53 -------------------------------- Upstream commit: 522b1d69219d8f083173819fde04f994aa051a98 Add a fix for the Zen2 VZEROUPPER data corruption bug where under certain circumstances executing VZEROUPPER can cause register corruption or leak data. The optimal fix is through microcode but in the case the proper microcode revision has not been applied, enable a fallback fix using a chicken bit. Signed-off-by: NBorislav Petkov (AMD) <bp@alien8.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Conflicts: arch/x86/include/asm/microcode_amd.h arch/x86/kernel/cpu/common.c Signed-off-by: NYu Liao <liaoyu15@huawei.com> (cherry picked from commit 57b20021)
-
- 31 7月, 2023 2 次提交
-
-
由 Pawan Gupta 提交于
stable inclusion from stable-v5.10.158 commit 5e3d4a68e2e11dbe561fa7de919ff9c82547a215 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7NTXH Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5e3d4a68e2e11dbe561fa7de919ff9c82547a215 -------------------------------- commit aaa65d17 upstream. Support for the TSX control MSR is enumerated in MSR_IA32_ARCH_CAPABILITIES. This is different from how other CPU features are enumerated i.e. via CPUID. Currently, a call to tsx_ctrl_is_supported() is required for enumerating the feature. In the absence of a feature bit for TSX control, any code that relies on checking feature bits directly will not work. In preparation for adding a feature bit check in MSR save/restore during suspend/resume, set a new feature bit X86_FEATURE_TSX_CTRL when MSR_IA32_TSX_CTRL is present. [ bp: Remove tsx_ctrl_is_supported()] [Pawan: Resolved conflicts in backport; Removed parts of commit message referring to removed function tsx_ctrl_is_supported()] Suggested-by: NAndrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: NPawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NDave Hansen <dave.hansen@linux.intel.com> Cc: <stable@kernel.org> Link: https://lore.kernel.org/r/de619764e1d98afbb7a5fa58424f1278ede37b45.1668539735.git.pawan.kumar.gupta@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Nsanglipeng <sanglipeng1@jd.com> Conflicts: arch/x86/include/asm/cpufeatures.h (cherry picked from commit 96756435)
-
由 Pawan Gupta 提交于
stable inclusion from stable-v5.10.158 commit 471fb7b735bf9dd1caf2c8751158b81a3d9a5584 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7NTXH Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=471fb7b735bf9dd1caf2c8751158b81a3d9a5584 -------------------------------- commit 66065157 upstream. The "force" argument to write_spec_ctrl_current() is currently ambiguous as it does not guarantee the MSR write. This is due to the optimization that writes to the MSR happen only when the new value differs from the cached value. This is fine in most cases, but breaks for S3 resume when the cached MSR value gets out of sync with the hardware MSR value due to S3 resetting it. When x86_spec_ctrl_current is same as x86_spec_ctrl_base, the MSR write is skipped. Which results in SPEC_CTRL mitigations not getting restored. Move the MSR write from write_spec_ctrl_current() to a new function that unconditionally writes to the MSR. Update the callers accordingly and rename functions. [ bp: Rework a bit. ] Fixes: caa0ff24 ("x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value") Suggested-by: NBorislav Petkov <bp@alien8.de> Signed-off-by: NPawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: NBorislav Petkov (AMD) <bp@alien8.de> Reviewed-by: NThomas Gleixner <tglx@linutronix.de> Cc: <stable@kernel.org> Link: https://lore.kernel.org/r/806d39b0bfec2fe8f50dc5446dff20f5bb24a959.1669821572.git.pawan.kumar.gupta@linux.intel.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Nsanglipeng <sanglipeng1@jd.com> (cherry picked from commit ce0d9ab5)
-
- 20 7月, 2023 1 次提交
-
-
由 Borislav Petkov 提交于
stable inclusion from stable-v5.10.155 commit 154d744fbefcd13648ff036db2d185319afa74dc category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7M5F4 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=154d744fbefcd13648ff036db2d185319afa74dc -------------------------------- commit 2632daeb upstream. DE_CFG contains the LFENCE serializing bit, restore it on resume too. This is relevant to older families due to the way how they do S3. Unify and correct naming while at it. Fixes: e4d0e84e ("x86/cpu/AMD: Make LFENCE a serializing instruction") Reported-by: NAndrew Cooper <Andrew.Cooper3@citrix.com> Reported-by: NPawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Cc: <stable@kernel.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Nsanglipeng <sanglipeng1@jd.com> (cherry picked from commit c983d6f2)
-
- 25 6月, 2023 1 次提交
-
-
由 Zheng Zengkai 提交于
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5RQLJ -------------------------------- 5a2451f1 ("x86/fpu: Avoid kabi change caused by struct fpu") will lead to performance degradation of libmicro pthread_create testcase. Assuming that no 3rd party driver will reach into struct fpu, replace kabi fix macro from KABI_DEPRECATE to KABI_BROKEN_REMOVE for element "union fpregs_state state" of struct fpu. Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> (cherry picked from commit b60bbfca)
-
- 18 5月, 2023 1 次提交
-
-
由 Charlotte Tan 提交于
stable inclusion from stable-v5.10.152 commit ef11e8ec00b976a30131751cca1792ac6e87e95c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ef11e8ec00b976a30131751cca1792ac6e87e95c -------------------------------- [ Upstream commit 5566e68d ] arch_rmrr_sanity_check() warns if the RMRR is not covered by an ACPI Reserved region, but it seems like it should accept an NVS region as well. The ACPI spec https://uefi.org/specs/ACPI/6.5/15_System_Address_Map_Interfaces.html uses similar wording for "Reserved" and "NVS" region types; for NVS regions it says "This range of addresses is in use or reserved by the system and must not be used by the operating system." There is an old comment on this mailing list that also suggests NVS regions should pass the arch_rmrr_sanity_check() test: The warnings come from arch_rmrr_sanity_check() since it checks whether the region is E820_TYPE_RESERVED. However, if the purpose of the check is to detect RMRR has regions that may be used by OS as free memory, isn't E820_TYPE_NVS safe, too? This patch overlaps with another proposed patch that would add the region type to the log since sometimes the bug reporter sees this log on the console but doesn't know to include the kernel log: https://lore.kernel.org/lkml/20220611204859.234975-3-atomlin@redhat.com/ Here's an example of the "Firmware Bug" apparent false positive (wrapped for line length): DMAR: [Firmware Bug]: No firmware reserved region can cover this RMRR [0x000000006f760000-0x000000006f762fff], contact BIOS vendor for fixes DMAR: [Firmware Bug]: Your BIOS is broken; bad RMRR [0x000000006f760000-0x000000006f762fff] This is the snippet from the e820 table: BIOS-e820: [mem 0x0000000068bff000-0x000000006ebfefff] reserved BIOS-e820: [mem 0x000000006ebff000-0x000000006f9fefff] ACPI NVS BIOS-e820: [mem 0x000000006f9ff000-0x000000006fffefff] ACPI data Fixes: f036c7fa ("iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved") Cc: Will Mortensen <will@extrahop.com> Link: https://lore.kernel.org/linux-iommu/64a5843d-850d-e58c-4fc2-0a0eeeb656dc@nec.com/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=216443Signed-off-by: NCharlotte Tan <charlotte@extrahop.com> Reviewed-by: NAaron Tomlin <atomlin@redhat.com> Link: https://lore.kernel.org/r/20220929044449.32515-1-charlotte@extrahop.comSigned-off-by: NLu Baolu <baolu.lu@linux.intel.com> Signed-off-by: NJoerg Roedel <jroedel@suse.de> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
-
- 16 5月, 2023 1 次提交
-
-
由 Jithu Joseph 提交于
mainline inclusion from mainline-v6.4-rc1 commit c68e3d47 category: feature feature: Backport Intel In Field Scan(IFS) Array BIST support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I73EG8 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=c68e3d47 Intel-SIG: commit c68e3d47 ("x86/include/asm/msr-index.h: Add IFS Array test bits") ------------------------------------- x86/include/asm/msr-index.h: Add IFS Array test bits Define MSR bitfields for enumerating support for Array BIST test. Signed-off-by: NJithu Joseph <jithu.joseph@intel.com> Reviewed-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230322003359.213046-5-jithu.joseph@intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NAichun Shi <aichun.shi@intel.com>
-
- 25 4月, 2023 3 次提交
-
-
由 Xie Haocheng 提交于
amd inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6XNL2 CVE: NA ------------------------------------------------- Error report detail: *** ERROR - ABI BREAKAGE WAS DETECTED *** The following symbols have been changed (this will cause an ABI breakage): new kabi: 0x65d25289 __SCK__tp_func_xdp_exception vmlinux EXPORT_SYMBOL_GPL 0x5e9265ee __tracepoint_xdp_exception vmlinux EXPORT_SYMBOL_GPL old kabi: 0x5e0fbbff __SCK__tp_func_xdp_exception vmlinux EXPORT_SYMBOL_GPL 0x017cc464 __tracepoint_xdp_exception vmlinux EXPORT_SYMBOL_GPL Signed-off-by: NXie Haocheng <haocheng.xie@amd.com>
-
由 Xie Haocheng 提交于
amd inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6XNL2 CVE: NA ------------------------------------------------- This reverts commit a9cbff64. This patch could introduce build warnings, should be reverted. The build warning messages: WARNING: modpost: EXPORT symbol "__SCT__perf_lopwr_cb" [vmlinux] version generation failed, symbol will not be versioned. WARNING: modpost: EXPORT symbol "__SCT__perf_lopwr_cb" [vmlinux] version generation failed, symbol will not be versioned. Signed-off-by: NXie Haocheng <haocheng.xie@amd.com>
-
由 Jim Mattson 提交于
mainline inclusion from mainline-v6.3-rc1 commit f8df91e7 category: feature feature: SPR fast rep string operations bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6YPV0 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8df91e73a6827a4569bb56cd53e55b4ea2f5b1f Intel-SIG: commit f8df91e7 ("x86/cpufeatures: Add macros for Intel's new fast rep string features") ------------------------------------- KVM_GET_SUPPORTED_CPUID should reflect these host CPUID bits. The bits are already cached in word 12. Give the bits X86_FEATURE names, so that they can be easily referenced. Hide these bits from /proc/cpuinfo, since the host kernel makes no use of them at present. Signed-off-by: NJim Mattson <jmattson@google.com> Reviewed-by: NSean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220901211811.2883855-1-jmattson@google.comSigned-off-by: NSean Christopherson <seanjc@google.com> [ jason: amend commit log ] Signed-off-by: NJason Zeng <jason.zeng@intel.com>
-
- 20 4月, 2023 2 次提交
-
-
由 Kai Huang 提交于
mainline inclusion from mainline-v6.2-rc1 commit 16a7fe37 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6X1FF CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=16a7fe3728a8b832ef0d1add66875a666b1f24fc Intel-SIG: commit 16a7fe37 KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest Incremental backporting patches for SGX on Intel Xeon platform. -------------------------------- The new Asynchronous Exit (AEX) notification mechanism (AEX-notify) allows one enclave to receive a notification in the ERESUME after the enclave exit due to an AEX. EDECCSSA is a new SGX user leaf function (ENCLU[EDECCSSA]) to facilitate the AEX notification handling. The new EDECCSSA is enumerated via CPUID(EAX=0x12,ECX=0x0):EAX[11]. Besides Allowing reporting the new AEX-notify attribute to KVM guests, also allow reporting the new EDECCSSA user leaf function to KVM guests so the guest can fully utilize the AEX-notify mechanism. Similar to existing X86_FEATURE_SGX1 and X86_FEATURE_SGX2, introduce a new scattered X86_FEATURE_SGX_EDECCSSA bit for the new EDECCSSA, and report it in KVM's supported CPUIDs. Note, no additional KVM enabling is required to allow the guest to use EDECCSSA. It's impossible to trap ENCLU (without completely preventing the guest from using SGX). Advertise EDECCSSA as supported purely so that userspace doesn't need to special case EDECCSSA, i.e. doesn't need to manually check host CPUID. The inability to trap ENCLU also means that KVM can't prevent the guest from using EDECCSSA, but that virtualization hole is benign as far as KVM is concerned. EDECCSSA is simply a fancy way to modify internal enclave state. More background about how do AEX-notify and EDECCSSA work: SGX maintains a Current State Save Area Frame (CSSA) for each enclave thread. When AEX happens, the enclave thread context is saved to the CSSA and the CSSA is increased by 1. For a normal ERESUME which doesn't deliver AEX notification, it restores the saved thread context from the previously saved SSA and decreases the CSSA. If AEX-notify is enabled for one enclave, the ERESUME acts differently. Instead of restoring the saved thread context and decreasing the CSSA, it acts like EENTER which doesn't decrease the CSSA but establishes a clean slate thread context using the CSSA for the enclave to handle the notification. After some handling, the enclave must discard the "new-established" SSA and switch back to the previously saved SSA (upon AEX). Otherwise, the enclave will run out of SSA space upon further AEXs and eventually fail to run. To solve this problem, the new EDECCSSA essentially decreases the CSSA. It can be used by the enclave notification handler to switch back to the previous saved SSA when needed, i.e. after it handles the notification. Signed-off-by: NKai Huang <kai.huang@intel.com> Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com> Acked-by: NSean Christopherson <seanjc@google.com> Acked-by: NJarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/all/20221101022422.858944-1-kai.huang%40intel.com [ Zhiquan: amend commit log and resolve the conflict. commit 01338078 ("KVM: x86: Move reverse CPUID helpers to separate header file") moved part of content from arch/x86/kvm/cpuid.h to arch/x86/kvm/reverse_cpuid.h. The modifications have been applied on arch/x86/kvm/reverse_cpuid.h should be moved to arch/x86/kvm/cpuid.h. ] Signed-off-by: NZhiquan Li <zhiquan1.li@intel.com>
-
由 Dave Hansen 提交于
mainline inclusion from mainline-v6.2-rc1 commit 370839c2 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6X1FF CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=370839c241f7b98c66063c2892795a37ee3d2771 Intel-SIG: commit 370839c2 x86/sgx: Allow enclaves to use Asynchrounous Exit Notification Incremental backporting patches for SGX on Intel Xeon platform. -------------------------------- Short Version: Allow enclaves to use the new Asynchronous EXit (AEX) notification mechanism. This mechanism lets enclaves run a handler after an AEX event. These handlers can run mitigations for things like SGX-Step[1]. AEX Notify will be made available both on upcoming processors and on some older processors through microcode updates. Long Version: == SGX Attribute Background == The SGX architecture includes a list of SGX "attributes". These attributes ensure consistency and transparency around specific enclave features. As a simple example, the "DEBUG" attribute allows an enclave to be debugged, but also destroys virtually all of SGX security. Using attributes, enclaves can know that they are being debugged. Attributes also affect enclave attestation so an enclave can, for instance, be denied access to secrets while it is being debugged. The kernel keeps a list of known attributes and will only initialize enclaves that use a known set of attributes. This kernel policy eliminates the chance that a new SGX attribute could cause undesired effects. For example, imagine a new attribute was added called "PROVISIONKEY2" that provided similar functionality to "PROVISIIONKEY". A kernel policy that allowed indiscriminate use of unknown attributes and thus PROVISIONKEY2 would undermine the existing kernel policy which limits use of PROVISIONKEY enclaves. == AEX Notify Background == "Intel Architecture Instruction Set Extensions and Future Features - Version 45" is out[2]. There is a new chapter: Asynchronous Enclave Exit Notify and the EDECCSSA User Leaf Function. Enclaves exit can be either synchronous and consensual (EEXIT for instance) or asynchronous (on an interrupt or fault). The asynchronous ones can evidently be exploited to single step enclaves[1], on top of which other naughty things can be built. AEX Notify will be made available both on upcoming processors and on some older processors through microcode updates. == The Problem == These attacks are currently entirely opaque to the enclave since the hardware does the save/restore under the covers. The Asynchronous Enclave Exit Notify (AEX Notify) mechanism provides enclaves an ability to detect and mitigate potential exposure to these kinds of attacks. == The Solution == Define the new attribute value for AEX Notification. Ensure the attribute is cleared from the list reserved attributes. Instead of adding to the open-coded lists of individual attributes, add named lists of privileged (disallowed by default) and unprivileged (allowed by default) attributes. Add the AEX notify attribute as an unprivileged attribute, which will keep the kernel from rejecting enclaves with it set. 1. https://github.com/jovanbulck/sgx-step 2. https://cdrdv2.intel.com/v1/dl/getContent/671368?explicitVersion=trueSigned-off-by: NDave Hansen <dave.hansen@linux.intel.com> Acked-by: NJarkko Sakkinen <jarkko@kernel.org> Tested-by: NHaitao Huang <haitao.huang@intel.com> Tested-by: NKai Huang <kai.huang@intel.com> Link: https://lore.kernel.org/all/20220720191347.1343986-1-dave.hansen%40linux.intel.com [ Zhiquan: amend commit log. ] Signed-off-by: NZhiquan Li <zhiquan1.li@intel.com>
-
- 19 4月, 2023 2 次提交
-
-
由 Vitaly Kuznetsov 提交于
stable inclusion from stable-v5.10.150 commit 7ae8bed9087a904201ac39b159ef4b1947049465 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7ae8bed9087a904201ac39b159ef4b1947049465 -------------------------------- [ Upstream commit ea9da788 ] Section 1.9 of TLFS v6.0b says: "All structures are padded in such a way that fields are aligned naturally (that is, an 8-byte field is aligned to an offset of 8 bytes and so on)". 'struct enlightened_vmcs' has a glitch: ... struct { u32 nested_flush_hypercall:1; /* 836: 0 4 */ u32 msr_bitmap:1; /* 836: 1 4 */ u32 reserved:30; /* 836: 2 4 */ } hv_enlightenments_control; /* 836 4 */ u32 hv_vp_id; /* 840 4 */ u64 hv_vm_id; /* 844 8 */ u64 partition_assist_page; /* 852 8 */ ... And the observed values in 'partition_assist_page' make no sense at all. Fix the layout by padding the structure properly. Fixes: 68d1eb72 ("x86/hyper-v: define struct hv_enlightened_vmcs and clean field bits") Reviewed-by: NMaxim Levitsky <mlevitsk@redhat.com> Reviewed-by: NMichael Kelley <mikelley@microsoft.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: NSean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220830133737.1539624-2-vkuznets@redhat.comSigned-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
-
由 Kees Cook 提交于
stable inclusion from stable-v5.10.150 commit 6ed7b05a3592e96023989417f617f80a5e25dedd category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6ed7b05a3592e96023989417f617f80a5e25dedd -------------------------------- [ Upstream commit 712f210a ] In preparation for reducing the use of ksize(), record the actual allocation size for later memcpy(). This avoids copying extra (uninitialized!) bytes into the patch buffer when the requested allocation size isn't exactly the size of a kmalloc bucket. Additionally, fix potential future issues where runtime bounds checking will notice that the buffer was allocated to a smaller value than returned by ksize(). Fixes: 757885e9 ("x86, microcode, amd: Early microcode patch loading support for AMD") Suggested-by: NDaniel Micay <danielmicay@gmail.com> Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NBorislav Petkov <bp@suse.de> Link: https://lore.kernel.org/lkml/CA+DvKQ+bp7Y7gmaVhacjv9uF6Ar-o4tet872h4Q8RPYPJjcJQA@mail.gmail.com/Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
-
- 15 4月, 2023 3 次提交
-
-
由 Aichun Shi 提交于
Intel inclusion category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: N/A Intel-SIG: Revert commit d75018fd ("x86/microcode: Remove->request_microcode_user()") ------------------------------------- This reverts commit d75018fd. This revert is to recover old microcode interface /dev/cpu/microcode. Signed-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Aichun Shi 提交于
Intel inclusion category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: N/A Intel-SIG: Revert commit 8b0c0efc ("x86/microcode: Kill refresh_fw") ------------------------------------- This reverts commit 8b0c0efc. This revert is to recover old microcode interface /dev/cpu/microcode. Signed-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Aichun Shi 提交于
Intel inclusion category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: N/A Intel-SIG: Revert commit e6a1a829 ("x86/microcode: Drop struct ucode_cpu_info.valid") ------------------------------------- This reverts commit e6a1a829. This revert is to recover old microcode interface /dev/cpu/microcode. Signed-off-by: NAichun Shi <aichun.shi@intel.com>
-
- 17 3月, 2023 8 次提交
-
-
由 Jithu Joseph 提交于
mainline inclusion from mainline-v6.2-rc1 commit aa63e0fd category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=aa63e0fd Intel-SIG: commit aa63e0fd ("platform/x86/intel/ifs: Use generic microcode headers and functions") ------------------------------------- platform/x86/intel/ifs: Use generic microcode headers and functions Existing implementation (broken) of IFS used a header format (for IFS test images) which was very similar to microcode format, but didn’t accommodate extended signatures. This meant same IFS test image had to be duplicated for different steppings and the validation code in the driver was only looking at the primary header parameters. Going forward, IFS test image headers have been tweaked to become fully compatible with the microcode format. Newer IFS test image headers will use header version 2 in order to distinguish it from microcode images and older IFS test images. In light of the above, reuse struct microcode_header_intel directly in the IFS driver and reuse microcode functions for validation and sanity checking. [ bp: Massage commit message. ] Signed-off-by: NJithu Joseph <jithu.joseph@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NSohil Mehta <sohil.mehta@intel.com> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20221117225039.30166-1-jithu.joseph@intel.comSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Jithu Joseph 提交于
mainline inclusion from mainline-v6.2-rc1 commit 28377e56 category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=28377e56 Intel-SIG: commit 28377e56 ("x86/microcode/intel: Use a reserved field for metasize") ------------------------------------- x86/microcode/intel: Use a reserved field for metasize Intel is using microcode file format for IFS test images too. IFS test images use one of the existing reserved fields in microcode header to indicate the size of the region in the file allocated for metadata structures. In preparation for this, rename first of the existing reserved fields in microcode header to metasize. In subsequent patches IFS specific code will make use of this field while parsing IFS images. Signed-off-by: NJithu Joseph <jithu.joseph@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NAshok Raj <ashok.raj@intel.com> Reviewed-by: NSohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20221117035935.4136738-10-jithu.joseph@intel.comSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Jithu Joseph 提交于
mainline inclusion from mainline-v6.2-rc1 commit e0788c32 category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=e0788c32 Intel-SIG: commit e0788c32 ("x86/microcode/intel: Add hdr_type to intel_microcode_sanity_check()") ------------------------------------- x86/microcode/intel: Add hdr_type to intel_microcode_sanity_check() IFS test images and microcode blobs use the same header format. Microcode blobs use header type of 1, whereas IFS test images will use header type of 2. In preparation for IFS reusing intel_microcode_sanity_check(), add header type as a parameter for sanity check. [ bp: Touchups. ] Signed-off-by: NJithu Joseph <jithu.joseph@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NAshok Raj <ashok.raj@intel.com> Link: https://lore.kernel.org/r/20221117035935.4136738-9-jithu.joseph@intel.comSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Jithu Joseph 提交于
mainline inclusion from mainline-v6.2-rc1 commit 514ee839 category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=514ee839 Intel-SIG: commit 514ee839 ("x86/microcode/intel: Reuse microcode_sanity_check()") ------------------------------------- x86/microcode/intel: Reuse microcode_sanity_check() IFS test image carries the same microcode header as regular Intel microcode blobs. Reuse microcode_sanity_check() in the IFS driver to perform sanity check of the IFS test images too. Signed-off-by: NJithu Joseph <jithu.joseph@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NAshok Raj <ashok.raj@intel.com> Reviewed-by: NSohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20221117035935.4136738-8-jithu.joseph@intel.comSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Jithu Joseph 提交于
mainline inclusion from mainline-v6.2-rc1 commit 716f3802 category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=716f3802 Intel-SIG: commit 716f3802 ("x86/microcode/intel: Reuse find_matching_signature()") ------------------------------------- x86/microcode/intel: Reuse find_matching_signature() IFS uses test images provided by Intel that can be regarded as firmware. An IFS test image carries microcode header with an extended signature table. Reuse find_matching_signature() for verifying if the test image header or the extended signature table indicate whether that image is fit to run on a system. No functional changes. Signed-off-by: NJithu Joseph <jithu.joseph@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NAshok Raj <ashok.raj@intel.com> Reviewed-by: NSohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20221117035935.4136738-6-jithu.joseph@intel.comSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Borislav Petkov 提交于
mainline inclusion from mainline-v6.2-rc1 commit 254ed7cf category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=254ed7cf Intel-SIG: commit 254ed7cf ("x86/microcode: Drop struct ucode_cpu_info.valid") ------------------------------------- x86/microcode: Drop struct ucode_cpu_info.valid It is not needed anymore. Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NAshok Raj <ashok.raj@intel.com> Link: https://lore.kernel.org/r/20221028142638.28498-6-bp@alien8.deSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Borislav Petkov 提交于
mainline inclusion from mainline-v6.2-rc1 commit a61ac80a category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=a61ac80a Intel-SIG: commit a61ac80a ("x86/microcode: Kill refresh_fw") ------------------------------------- x86/microcode: Kill refresh_fw request_microcode_fw() can always request firmware now so drop this superfluous argument. Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NAshok Raj <ashok.raj@intel.com> Link: https://lore.kernel.org/r/20221028142638.28498-4-bp@alien8.deSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Borislav Petkov 提交于
mainline inclusion from mainline-v6.1-rc1 commit 8c61eafd category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=8c61eafd Intel-SIG: commit 8c61eafd ("x86/microcode: Remove ->request_microcode_user()") ------------------------------------- x86/microcode: Remove ->request_microcode_user() 181b6f40 ("x86/microcode: Rip out the OLD_INTERFACE") removed the old microcode loading interface but forgot to remove the related ->request_microcode_user() functionality which it uses. Rip it out now too. Signed-off-by: NBorislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220825075445.28171-1-bp@alien8.deSigned-off-by: NAichun Shi <aichun.shi@intel.com>
-
- 11 3月, 2023 1 次提交
-
-
由 Tony Luck 提交于
mainline inclusion from mainline-v6.1-rc4 commit 7beade0d category: feature feature: Intel server CPU model numbers bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6M81K CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=7beade0d Intel-SIG: commit 7beade0d ("x86/cpu: Add several Intel server CPU model numbers") ------------------------------------- x86/cpu: Add several Intel server CPU model numbers These servers are all on the public versions of the roadmap. The model numbers for Grand Ridge, Granite Rapids, and Sierra Forest were included in the September 2022 edition of the Instruction Set Extensions document. Signed-off-by: NTony Luck <tony.luck@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Acked-by: NDave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/r/20221103203310.5058-1-tony.luck@intel.comSigned-off-by: NQuanxian Wang <quanxian.wang@intel.com>
-
- 08 3月, 2023 1 次提交
-
-
由 Tom Lendacky 提交于
stable inclusion from stable-v5.15.94 commit 8f12dcab90e886d0169a9cd372a8bb35339cfc19 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6FB6C CVE: CVE-2022-27672 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8f12dcab90e886d0169a9cd372a8bb35339cfc19 -------------------------------- commit be8de49b upstream. Certain AMD processors are vulnerable to a cross-thread return address predictions bug. When running in SMT mode and one of the sibling threads transitions out of C0 state, the other sibling thread could use return target predictions from the sibling thread that transitioned out of C0. The Spectre v2 mitigations cover the Linux kernel, as it fills the RSB when context switching to the idle thread. However, KVM allows a VMM to prevent exiting guest mode when transitioning out of C0. A guest could act maliciously in this situation, so create a new x86 BUG that can be used to detect if the processor is vulnerable. Reviewed-by: NBorislav Petkov (AMD) <bp@alien8.de> Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com> Message-Id: <91cec885656ca1fcd4f0185ce403a53dd9edecb7.1675956146.git.thomas.lendacky@amd.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Guo Mengqi <guomengqi3@huawei.com Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com> Reviewed-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
-
- 28 2月, 2023 1 次提交
-
-
由 Jens Axboe 提交于
stable inclusion from stable-v5.10.162 commit 4b1dcf8ec9b2f11b57f1ff5dcaa1f8575c7dacb5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6BTWC CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.168&id=4b1dcf8ec9b2f11b57f1ff5dcaa1f8575c7dacb5 -------------------------------- [ Upstream commit c8d5ed67 ] The generic entry code has support for TIF_NOTIFY_SIGNAL already. Just provide the TIF bit. [ tglx: Adopted to other TIF changes in x86 ] Signed-off-by: NJens Axboe <axboe@kernel.dk> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20201026203230.386348-4-axboe@kernel.dkSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLi Lingfeng <lilingfeng3@huawei.com> Reviewed-by: NZhang Yi <yi.zhang@huawei.com> Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
-
- 25 2月, 2023 2 次提交
-
-
由 Andrey Ryabinin 提交于
mainline inclusion from mainline-v6.2-rc1 commit 3f148f33 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6C6UC CVE: CVE-2023-0597 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3f148f3318140035e87decc1214795ff0755757b -------------------------------- KASAN maps shadow for the entire CPU-entry-area: [CPU_ENTRY_AREA_BASE, CPU_ENTRY_AREA_BASE + CPU_ENTRY_AREA_MAP_SIZE] This will explode once the per-cpu entry areas are randomized since it will increase CPU_ENTRY_AREA_MAP_SIZE to 512 GB and KASAN fails to allocate shadow for such big area. Fix this by allocating KASAN shadow only for really used cpu entry area addresses mapped by cea_map_percpu_pages() Thanks to the 0day folks for finding and reporting this to be an issue. [ dhansen: tweak changelog since this will get committed before peterz's actual cpu-entry-area randomization ] Signed-off-by: NAndrey Ryabinin <ryabinin.a.a@gmail.com> Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com> Tested-by: NYujie Liu <yujie.liu@intel.com> Cc: kernel test robot <yujie.liu@intel.com> Link: https://lore.kernel.org/r/202210241508.2e203c3d-yujie.liu@intel.comSigned-off-by: NTong Tiangen <tongtiangen@huawei.com> Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
-
由 Peter Zijlstra 提交于
mainline inclusion from mainline-v6.2-rc1 commit 97e3d26b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6C6UC CVE: CVE-2023-0597 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=97e3d26b5e5f371b3ee223d94dd123e6c442ba80 -------------------------------- Seth found that the CPU-entry-area; the piece of per-cpu data that is mapped into the userspace page-tables for kPTI is not subject to any randomization -- irrespective of kASLR settings. On x86_64 a whole P4D (512 GB) of virtual address space is reserved for this structure, which is plenty large enough to randomize things a little. As such, use a straight forward randomization scheme that avoids duplicates to spread the existing CPUs over the available space. [ bp: Fix le build. ] Reported-by: NSeth Jenkins <sethjenkins@google.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Confilict: arch/x86/mm/cpu_entry_area.c Use get_random_u32() instead of prandom_u32_max() in init_cea_offsets(). With CONFIG_RANDOMIZE_BASE=y, KASLR use prandom_seed_state() init prandom seed before init_cea_offsets(). But when CONFIG_RANDOMIZE_BASE=n, prandom seed init after init_cea_offsets() cause cea is always 0. The patch d4150779("random32: use real rng for non-deterministic randomness") use get_random_u32() instead of prandom_u32() in prandom_u32_max() that make prandom_u32_max() don't need to wait prandom seed init(). But the patch has many pre-patches that have not been merged, So,we adopt the current solution as a workaround. directly use get_random_u32() in init_cea_offsets() to simplify code. Signed-off-by: NKe Liu <liuke94@huawei.com> Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
-
- 01 2月, 2023 2 次提交
-
-
由 Peter Zijlstra 提交于
stable inclusion from stable-v5.10.141 commit e5796ff9acc5e922be3b1a599e004534e4fe23cf category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I685FC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e5796ff9acc5e922be3b1a599e004534e4fe23cf -------------------------------- commit 33292497 upstream. Turns out that i386 doesn't unconditionally have LFENCE, as such the loop in __FILL_RETURN_BUFFER isn't actually speculation safe on such chips. Fixes: ba6e31af ("x86/speculation: Add LFENCE to RSB fill sequence") Reported-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/Yv9tj9vbQ9nNlXoY@worktop.programming.kicks-ass.netSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com> Reviewed-by: NZheng Zengkai <zhengzengkai@huawei.com> (cherry picked from commit bef64b59)
-
由 Peter Zijlstra 提交于
stable inclusion from stable-v5.10.141 commit adee8f3082b01e5dab620d651e3ec75f57c0c855 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I685FC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=adee8f3082b01e5dab620d651e3ec75f57c0c855 -------------------------------- commit 4e3aa923 upstream. Commit 2b129932 ("x86/speculation: Add RSB VM Exit protections") made a right mess of the RSB stuffing, rewrite the whole thing to not suck. Thanks to Andrew for the enlightening comment about Post-Barrier RSB things so we can make this code less magical. Cc: stable@vger.kernel.org Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/YvuNdDWoUZSBjYcm@worktop.programming.kicks-ass.net [bwh: Backported to 5.10: adjust context] Signed-off-by: NBen Hutchings <benh@debian.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com> Reviewed-by: NZheng Zengkai <zhengzengkai@huawei.com> (cherry picked from commit 4b944c0f)
-
- 30 1月, 2023 1 次提交
-
-
由 Wei Huang 提交于
mainline inclusion from mainline-v5.15 commit 746700d2 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6B4YT CVE: NA -------------------------------- AMD future CPUs will require a 5-level NPT if host CR4.LA57 is set. To prevent kvm_mmu_get_tdp_level() from incorrectly changing NPT level on behalf of CPUs, add a new parameter in kvm_configure_mmu() to force a fixed TDP level. Signed-off-by: NWei Huang <wei.huang2@amd.com> Message-Id: <20210818165549.3771014-2-wei.huang2@amd.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NXie Haocheng <haocheng.xie@amd.com>
-
- 11 1月, 2023 1 次提交
-
-
由 Xie Haocheng 提交于
amd inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6A0G7 CVE: NA -------------------------------- Below AMD platform features are incorrect detected: X86_FEATURE_SME, X86_FEATURE_SEV, X86_FEATURE_VM_PAGE_FLUSH, X86_FEATURE_SEV_ES, X86_FEATURE_SME_COHERENT This bug is introduced by commit ac376dd8. The definition and use of CPUID_8000_001F_EAX will cause c.x86_capability get a conflict wrong value. Signed-off-by: NXie Haocheng <haocheng.xie@amd.com>
-
- 08 12月, 2022 1 次提交
-
-
由 Kim Phillips 提交于
mainline inclusion from mainline-v5.15-rc1 commit 9164d949 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I65D55 CVE: NA -------------------------------- Factor out a helper function rather than export cpu_llc_id, which is needed in order to be able to build the AMD uncore driver as a module. Signed-off-by: NKim Phillips <kim.phillips@amd.com> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: NIngo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20210817221048.88063-7-kim.phillips@amd.comSigned-off-by: NXie Haocheng <haocheng.xie@amd.com>
-
- 07 12月, 2022 2 次提交
-
-
由 Tony Luck 提交于
mainline inclusion from mainline-v5.19-rc1 commit db1af129 category: feature feature: Intel In Filed Scan(IFS) bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I651S7 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=db1af129 Intel-SIG: commit db1af129 ("x86/msr-index: Define INTEGRITY_CAPABILITIES MSR") ------------------------------------- x86/msr-index: Define INTEGRITY_CAPABILITIES MSR The INTEGRITY_CAPABILITIES MSR is enumerated by bit 2 of the CORE_CAPABILITIES MSR. Add defines for the CORE_CAPS enumeration as well as for the integrity MSR. Reviewed-by: NDan Williams <dan.j.williams@intel.com> Signed-off-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: NThomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20220506225410.1652287-3-tony.luck@intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NAichun Shi <aichun.shi@intel.com>
-
由 Jithu Joseph 提交于
mainline inclusion from mainline-v5.19-rc1 commit d3287fb0 category: feature feature: Intel In Filed Scan(IFS) bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I651S7 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=d3287fb0 Intel-SIG: commit d3287fb0 ("x86/microcode/intel: Expose collect_cpu_info_early() for IFS") ------------------------------------- x86/microcode/intel: Expose collect_cpu_info_early() for IFS IFS is a CPU feature that allows a binary blob, similar to microcode, to be loaded and consumed to perform low level validation of CPU circuitry. In fact, it carries the same Processor Signature (family/model/stepping) details that are contained in Intel microcode blobs. In support of an IFS driver to trigger loading, validation, and running of these tests blobs, make the functionality of cpu_signatures_match() and collect_cpu_info_early() available outside of the microcode driver. Add an "intel_" prefix and drop the "_early" suffix from collect_cpu_info_early() and EXPORT_SYMBOL_GPL() it. Add declaration to x86 <asm/cpu.h> Make cpu_signatures_match() an inline function in x86 <asm/cpu.h>, and also give it an "intel_" prefix. No functional change intended. Reviewed-by: NDan Williams <dan.j.williams@intel.com> Signed-off-by: NJithu Joseph <jithu.joseph@intel.com> Co-developed-by: NTony Luck <tony.luck@intel.com> Signed-off-by: NTony Luck <tony.luck@intel.com> Reviewed-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20220506225410.1652287-2-tony.luck@intel.comSigned-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NAichun Shi <aichun.shi@intel.com>
-
- 02 12月, 2022 1 次提交
-
-
由 Pawan Gupta 提交于
stable inclusion from stable-v5.10.140 commit 14cbbb9c9914663d0eeca6b59c1c9d4f5a547ee0 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63FTT Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=14cbbb9c9914663d0eeca6b59c1c9d4f5a547ee0 -------------------------------- commit 7df54884 upstream. Older Intel CPUs that are not in the affected processor list for MMIO Stale Data vulnerabilities currently report "Not affected" in sysfs, which may not be correct. Vulnerability status for these older CPUs is unknown. Add known-not-affected CPUs to the whitelist. Report "unknown" mitigation status for CPUs that are not in blacklist, whitelist and also don't enumerate MSR ARCH_CAPABILITIES bits that reflect hardware immunity to MMIO Stale Data vulnerabilities. Mitigation is not deployed when the status is unknown. [ bp: Massage, fixup. ] Fixes: 8d50cdf8 ("x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data") Suggested-by: NAndrew Cooper <andrew.cooper3@citrix.com> Suggested-by: NTony Luck <tony.luck@intel.com> Signed-off-by: NPawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/a932c154772f2121794a5f2eded1a11013114711.1657846269.git.pawan.kumar.gupta@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
-
- 30 11月, 2022 2 次提交
-
-
由 Zheng Yejian 提交于
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60L10 CVE: NA -------------------------------- If a function is patched, instructions at the beginning are modified to be 'jump codes' which jump to new function. This requires the function be big enough, otherwise the modification may be out of function range. Currently each architecture needs to implement arch_klp_func_can_patch() to check function size. However, there exists following problems: 1. arch 'x86' didn't implement arch_klp_func_can_patch(); 2. implementations in arm64 & ppc32, function size is checked only if there's a long jump. There is a scenario where a very short function is successfully patched, but as kernel module increases, someday long jump is required, then the function become unable to be patched. 3. implementaions look like duplicate. In this patch, introduce macro KLP_MAX_REPLACE_SIZE to denote the maximum size that will be replaced on patching, then move the check ahead into klp_init_object_loaded(). Fixes: c33e4283 ("livepatch/core: Allow implementation without ftrace") Signed-off-by: NZheng Yejian <zhengyejian1@huawei.com> Reviewed-by: NKuohai Xu <xukuohai@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Zheng Yejian 提交于
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60L10 CVE: NA -------------------------------- In arm/arm64/ppc32/ppc64, this field is named as old_insns, so uniform it. Signed-off-by: NZheng Yejian <zhengyejian1@huawei.com> Reviewed-by: NKuohai Xu <xukuohai@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-