- 14 4月, 2021 16 次提交
-
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- Files might come from a remote source and might have xattrs, including security.ima. It should not be IMA task to decide whether security.ima should be kept or not. This patch removes the removexattr() system call in ima_inode_post_setattr(). Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NMimi Zohar <zohar@linux.ibm.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- With the patch to accept EVM portable signatures when the appraise_type=imasig requirement is specified in the policy, appraisal can be successfully done even if the file does not have an IMA signature. However, remote attestation would not see that a different signature type was used, as only IMA signatures can be included in the measurement list. This patch solves the issue by introducing the new template field 'evmsig' to show EVM portable signatures and by including its value in the existing field 'sig' if the IMA signature is not found. Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Suggested-by: NMimi Zohar <zohar@linux.ibm.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- System administrators can require that all accessed files have a signature by specifying appraise_type=imasig in a policy rule. Currently, IMA signatures satisfy this requirement. Appended signatures may also satisfy this requirement, but are not applicable as IMA signatures. IMA/appended signatures ensure data source authentication for file content and prevent any change. EVM signatures instead ensure data source authentication for file metadata. Given that the digest or signature of the file content must be included in the metadata, EVM signatures provide the same file data guarantees of IMA signatures, as well as providing file metadata guarantees. This patch lets systems protected with EVM signatures pass appraisal verification if the appraise_type=imasig requirement is specified in the policy. This facilitates deployment in the scenarios where only EVM signatures are available. The patch makes the following changes: file xattr types: security.ima: IMA_XATTR_DIGEST/IMA_XATTR_DIGEST_NG security.evm: EVM_XATTR_PORTABLE_DIGSIG execve(), mmap(), open() behavior (with appraise_type=imasig): before: denied (file without IMA signature, imasig requirement not met) after: allowed (file with EVM portable signature, imasig requirement met) open(O_WRONLY) behavior (without appraise_type=imasig): before: allowed (file without IMA signature, not immutable) after: denied (file with EVM portable signature, immutable) In addition, similarly to IMA signatures, this patch temporarily allows new files without or with incomplete metadata to be opened so that content can be written. Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NMimi Zohar <zohar@linux.ibm.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- With the patch to allow xattr/attr operations if a portable signature verification fails, cp and tar can copy all xattrs/attrs so that at the end of the process verification succeeds. However, it might happen that the xattrs/attrs are already set to the correct value (taken at signing time) and signature verification succeeds before the copy has completed. For example, an archive might contains files owned by root and the archive is extracted by root. Then, since portable signatures are immutable, all subsequent operations fail (e.g. fchown()), even if the operation is legitimate (does not alter the current value). This patch avoids this problem by reporting successful operation to user space when that operation does not alter the current value of xattrs/attrs. Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- If files with portable signatures are copied from one location to another or are extracted from an archive, verification can temporarily fail until all xattrs/attrs are set in the destination. Only portable signatures may be moved or copied from one file to another, as they don't depend on system-specific information such as the inode generation. Instead portable signatures must include security.ima. Unlike other security.evm types, EVM portable signatures are also immutable. Thus, it wouldn't be a problem to allow xattr/attr operations when verification fails, as portable signatures will never be replaced with the HMAC on possibly corrupted xattrs/attrs. This patch first introduces a new integrity status called INTEGRITY_FAIL_IMMUTABLE, that allows callers of evm_verify_current_integrity() to detect that a portable signature didn't pass verification and then adds an exception in evm_protect_xattr() and evm_inode_setattr() for this status and returns 0 instead of -EPERM. Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NMimi Zohar <zohar@linux.ibm.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- When a file is being created, LSMs can set the initial label with the inode_init_security hook. If no HMAC key is loaded, the new file will have LSM xattrs but not the HMAC. It is also possible that the file remains without protected xattrs after creation if no active LSM provided it. Unfortunately, EVM will deny any further metadata operation on new files, as evm_protect_xattr() will always return the INTEGRITY_NOLABEL error, or INTEGRITY_NOXATTRS if no protected xattrs exist. This would limit the usability of EVM when only a public key is loaded, as commands such as cp or tar with the option to preserve xattrs won't work. This patch ignores these errors when they won't be an issue, if no HMAC key is loaded and cannot be loaded in the future (which can be enforced by setting the EVM_SETUP_COMPLETE initialization flag). Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- When EVM_ALLOW_METADATA_WRITES is set, EVM allows any operation on metadata. Its main purpose is to allow users to freely set metadata when it is protected by a portable signature, until an HMAC key is loaded. However, callers of evm_verifyxattr() are not notified about metadata changes and continue to rely on the last status returned by the function. For example IMA, since it caches the appraisal result, will not call again evm_verifyxattr() until the appraisal flags are cleared, and will grant access to the file even if there was a metadata operation that made the portable signature invalid. This patch introduces evm_status_revalidate(), which callers of evm_verifyxattr() can use in their xattr post hooks to determine whether re-validation is necessary and to do the proper actions. IMA calls it in its xattr post hooks to reset the appraisal flags, so that the EVM status is re-evaluated after a metadata operation. Lastly, this patch also adds a call to evm_reset_status() in evm_inode_post_setattr() to invalidate the cached EVM status after a setattr operation. Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- ima_inode_setxattr() and ima_inode_removexattr() hooks are called before an operation is performed. Thus, ima_reset_appraise_flags() should not be called there, as flags might be unnecessarily reset if the operation is denied. This patch introduces the post hooks ima_inode_post_setxattr() and ima_inode_post_removexattr(), and adds the call to ima_reset_appraise_flags() in the new functions. Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- EVM_ALLOW_METADATA_WRITES is an EVM initialization flag that can be set to temporarily disable metadata verification until all xattrs/attrs necessary to verify an EVM portable signature are copied to the file. This flag is cleared when EVM is initialized with an HMAC key, to avoid that the HMAC is calculated on unverified xattrs/attrs. Currently EVM unnecessarily denies setting this flag if EVM is initialized with a public key, which is not a concern as it cannot be used to trust xattrs/attrs updates. This patch removes this limitation. Cc: stable@vger.kernel.org # 4.16.x Fixes: ae1ba167 ("EVM: Allow userland to permit modification of EVM-protected metadata") Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- Public keys do not need to be appraised by IMA as the restriction on the IMA/EVM keyrings ensures that a key can be loaded only if it is signed with a key in the primary or secondary keyring. However, when evm_load_x509() is called, appraisal is already enabled and a valid IMA signature must be added to the EVM key to pass verification. Since the restriction is applied on both IMA and EVM keyrings, it is safe to disable appraisal also when the EVM key is loaded. This patch calls evm_load_x509() inside ima_load_x509() if CONFIG_IMA_LOAD_X509 is enabled. Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NMimi Zohar <zohar@linux.ibm.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Roberto Sassu 提交于
hulk inclusion category: feature feature: IMA Digest Lists extension bugzilla: 46797 --------------------------- evm_inode_init_security() requires an HMAC key to calculate the HMAC on initial xattrs provided by LSMs. However, it checks generically whether a key has been loaded, including also public keys, which is not correct as public keys are not suitable to calculate the HMAC. Originally, support for signature verification was introduced to verify a possibly immutable initial ram disk, when no new files are created, and to switch to HMAC for the root filesystem. By that time, an HMAC key should have been loaded and usable to calculate HMACs for new files. More recently support for requiring an HMAC key was removed from the kernel, so that signature verification can be used alone. Since this is a legitimate use case, evm_inode_init_security() should not return an error when no HMAC key has been loaded. This patch fixes this problem by replacing the evm_key_loaded() check with a check of the EVM_INIT_HMAC flag in evm_initialized. Cc: stable@vger.kernel.org # 4.5.x Fixes: 26ddabfe ("evm: enable EVM when X509 certificate is loaded") Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com> Reviewed-by: NMimi Zohar <zohar@linux.ibm.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Yang Yingliang 提交于
hulk inclusion category: bugfix Bugzilla: 50424 CVE: NA ---------------------------------------- The kernel memory accounting for all memory cgroups is not stable, and it will cause a 100% regression in hackbench compared with kernel-4.19, so disable it by default. We can use the following command line to enable or disable it: cgroup.memory=kmem or cgroup.memory=kmem. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 liubo 提交于
euleros inclusion category: feature feature: etmem bugzilla: 48246 ------------------------------------------------- The original memory extension feature name is memig, after open source the feature name is changed to etmem. This patch is used to synchronously modify the feature name and file name. The config options and the file name are modified synchronously to etmem. Signed-off-by: Nliubo <liubo254@huawei.com> Reviewed-by: Ngeruijun <geruijun@huawei.com> Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 liubo 提交于
euleros inclusion category: feature feature: memig bugzilla: 48246 ------------------------------------------------- fix compile error when CONFIG_NUMA is turned off on Raspberry platform. compile info: mm/vmscan.c: In function ‘get_page_from_vaddr’: mm/vmscan.c:4350:40: error: implicit declaration of function ‘vma_migratable’; did you mean ‘rq_mergeable’? [-Werror=implicit-function-declaration] This patch solves the problem of compilation errors introduced by memig into the interface in the vmscan.c file. Delete dependency on NUMA for CONFIG_MEMIG_SWAP, and use vma->vm_flags & VM_LOCKED for judgement. Signed-off-by: Nliubo <liubo254@huawei.com> Reviewed-by: NJing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 liubo 提交于
euleros inclusion category: feature feature: add memig swap feature patch to openEuler kernel bugzilla: 48246 ------------------------------------------------- reason:This patch is used to add memig swap feature to openEuler system. memig_swap.ko is used to transfer the address passed in the user state for page migration Signed-off-by: Nyanxiaodan <yanxiaodan@huawei.com> Signed-off-by: Nlinmiaohe <linmiaohe@huawei.com> Signed-off-by: Nlouhongxiang <louhongxiang@huawei.com> Signed-off-by: Nliubo <liubo254@huawei.com> Signed-off-by: Ngeruijun <geruijun@huawei.com> Signed-off-by: Nliangchenshu <liangchenshu@huawei.com> Reviewed-by: NJing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 liubo 提交于
euleros inclusion category: feature feature: add memig scan feature patch to openEuler kernel bugzilla: 48246 ------------------------------------------------- reason:This patch is used to add memig scan feature to openEuler system. memig_scan.ko is used to scan the virtual address of the target process and return the address access information to the user mode for grading cold and hot pages. Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: Nyanxiaodan <yanxiaodan@huawei.com> Signed-off-by: NFeilong Lin <linfeilong@huawei.com> Signed-off-by: Ngeruijun <geruijun@huawei.com> Signed-off-by: Nliubo <liubo254@huawei.com> Reviewed-by: NJing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 13 4月, 2021 24 次提交
-
-
由 Xiongfeng Wang 提交于
hulk inclusion category: bugfix bugzilla: 47994 CVE: NA ------------------------------------------------------------------------- Fix the following compile error when CONFIG_ACPI is not enabled. arch/arm64/kernel/smp.c: In function ‘smp_prepare_cpus’: arch/arm64/kernel/smp.c:785:9: error: ‘cpu_madt_gicc’ undeclared (first use in this function); did you mean ‘bpf_map_inc’? if ((cpu_madt_gicc[cpu].flags & ACPI_MADT_ENABLED)) ^~~~~~~~~~~~~ bpf_map_inc arch/arm64/kernel/smp.c:785:9: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [arch/arm64/kernel/smp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Xiongfeng Wang 提交于
hulk inclusion category: bugfix bugzilla: 50485 CVE: NA ------------------------------------------------------------------------- Fix the following compile error. arch/arm64/kernel/ipi_nmi.c: In function ‘ipi_nmi_handler’: arch/arm64/kernel/ipi_nmi.c:54:7: error: implicit declaration of function ‘kgdb_nmicallback’ [-Werror=implicit-function-declaration] if (!kgdb_nmicallback(cpu, get_irq_regs())) ^~~~~~~~~~~~~~~~ Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sumit Garg 提交于
maillist inclusion category: feature bugzilla: 49593 CVE: NA Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html ------------------------------------------------- arm64 platforms with GICv3 or later supports pseudo NMIs which can be leveraged to roundup CPUs which are stuck in hard lockup state with interrupts disabled that wouldn't be possible with a normal IPI. So instead switch to roundup CPUs using IPI turned as NMI. And in case a particular arm64 platform doesn't supports pseudo NMIs, it will switch back to default kgdb CPUs roundup mechanism. Signed-off-by: NSumit Garg <sumit.garg@linaro.org> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sumit Garg 提交于
maillist inclusion category: feature bugzilla: 49593 CVE: NA Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html ------------------------------------------------- Add a new API kgdb_smp_call_nmi_hook() to expose default CPUs roundup mechanism to a particular archichecture as a runtime fallback if it detects to not support NMI roundup. Currently such an architecture example is arm64 supporting pseudo NMIs feature which is only available on platforms which have support for GICv3 or later version. Signed-off-by: NSumit Garg <sumit.garg@linaro.org> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sumit Garg 提交于
maillist inclusion category: feature bugzilla: 49593 CVE: NA Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html ------------------------------------------------- Enable NMI backtrace support on arm64 using IPI turned as an NMI leveraging pseudo NMIs support. It is now possible for users to get a backtrace of a CPU stuck in hard-lockup using magic SYSRQ. Signed-off-by: NSumit Garg <sumit.garg@linaro.org> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sumit Garg 提交于
maillist inclusion category: feature bugzilla: 49593 CVE: NA Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html ------------------------------------------------- Add a boolean return to arch_trigger_cpumask_backtrace() to support a use-case where a particular architecture detects at runtime if it supports NMI backtrace or it would like to fallback to default implementation using SMP cross-calls. Currently such an architecture example is arm64 supporting pseudo NMIs feature which is only available on platforms which have support for GICv3 or later version. Signed-off-by: NSumit Garg <sumit.garg@linaro.org> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sumit Garg 提交于
maillist inclusion category: feature bugzilla: 49593 CVE: NA Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html ------------------------------------------------- Assign an unused IPI which can be turned as NMI using ipi_nmi framework. Also, invoke corresponding dynamic IPI setup/teardown APIs. Signed-off-by: NSumit Garg <sumit.garg@linaro.org> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sumit Garg 提交于
maillist inclusion category: feature bugzilla: 49593 CVE: NA Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html ------------------------------------------------- Add support to handle SGIs as pseudo NMIs. As SGIs or IPIs default to a special flow handler: handle_percpu_devid_fasteoi_ipi(), so skip NMI handler update in case of SGIs. Also, enable NMI support prior to gic_smp_init() as allocation of SGIs as IRQs/NMIs happen as part of this routine. Signed-off-by: NSumit Garg <sumit.garg@linaro.org> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Sumit Garg 提交于
maillist inclusion category: feature bugzilla: 49593 CVE: NA Reference: https://www.spinics.net/lists/arm-kernel/msg851005.html ------------------------------------------------- Introduce framework to turn an IPI as NMI using pseudo NMIs. The main motivation for this feature is to have an IPI that can be leveraged to invoke NMI functions on other CPUs. And current prospective users are NMI backtrace and KGDB CPUs round-up whose support is added via future patches. Signed-off-by: NSumit Garg <sumit.garg@linaro.org> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Wei Li 提交于
hulk inclusion category: feature bugzilla: 49592 CVE: NA ------------------------------------------------- Enable the config of sdei_watchdog and pmu_watchdog. Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Jingyi Wang 提交于
hulk inclusion category: feature bugzilla: 49592 CVE: NA ------------------------------------------------- On aarch64, we can compile both SDEI_WATCHODG and PMU_WATCHDOG code instead of choosing one. SDEI_WATCHDOG is used by default, and if SDEI_WATCHDOG is disabled by kernel parameter "disable_sdei_nmi_watchdog", PMU_WATCHDOG is used instead. Signed-off-by: NJingyi Wang <wangjingyi11@huawei.com> Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Wei Li 提交于
hulk inclusion category: feature bugzilla: 49592 CVE: NA ------------------------------------------------- Add new config CONFIG_PMU_WATCHDOG for watchdog implementation method configuration. Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Wei Li 提交于
hulk inclusion category: feature bugzilla: 49592 CVE: NA ------------------------------------------------- This feature is based on "arm64: perf: add nmi support for pmu" patch series. It can be enabled by passing the kernel cmdline parameter "hardlockup_enable=on", or the perf NMI watchdog will be disabled defaultly. Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Xiangyou Xie 提交于
hulk inclusion category: config bugzilla: 47727 CVE: NA ------------------------------ We enable haltpoll by default for the improvement of performance. X86 has been supported. Now, we will provide it on ARM. Signed-off-by: NXiangyou Xie <xiexiangyou@huawei.com> Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Xiangyou Xie 提交于
hulk inclusion category: feature bugzilla: 47727 CVE: NA ------------------------------ Add support for cpuidle-haltpoll driver for ARM. Allow arm to use the couidle-haltpoll driver. Signed-off-by: NXiangyou Xie <xiexiangyou@huawei.com> Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Peng Liang 提交于
hulk inclusion category: feature bugzilla: 47727 CVE: NA ------------------------------ boot_option_idle_override is defined only in x86/ia64. Since haltpoll supports x86 and arm64, let's check boot_option_idle_override only in x86. Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Xiangyou Xie 提交于
hulk inclusion category: feature bugzilla: 47727 CVE: NA ------------------------------ Currently, ARM does not support kvm_para* of KVM_GUEST. We provide some definitions of kvm_para* functions, although it is only a simple return. Signed-off-by: NXiangyou Xie <xiexiangyou@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Xiangyou Xie 提交于
hulk inclusion category: feature bugzilla: 47727 CVE: NA ------------------------------ Use arch_cpu_idle() to replace default_idle() in default_enter_idle(). default_idle() is defined only in x86. Signed-off-by: NXiangyou Xie <xiexiangyou@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Xiangyou Xie 提交于
hulk inclusion category: feature bugzilla: 47727 CVE: NA ------------------------------ When it is to wake up a task in a remote cpu shared LLC , we can simply set need_resched flag, waking up a cpu that is in polling idle. This wakeup action does not require an IPI. But the premise is that it need to support _TIF_POLLING_NRFLAG Signed-off-by: NXiangyou Xie <xiexiangyou@huawei.com> Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Peng Liang 提交于
hulk inclusion category: feature bugzilla: 48052 CVE: NA ------------------------------ Add KVM_CAP_ARM_CPU_FEATURE extension for userpace to check whether KVM supports to set CPU features in AArch64. Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NZhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Peng Liang 提交于
hulk inclusion category: feature bugzilla: 48052 CVE: NA ------------------------------ Since 23711a5e ("KVM: arm64: Allow setting of ID_AA64PFR0_EL1.CSV2 from userspace"), ID_AA64PFR0_EL1 uses a separate set_user callback. We should remove some check in the callback to make ID_AA64PFR0_EL1 configurable. Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NZhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Peng Liang 提交于
hulk inclusion category: feature bugzilla: 48052 CVE: NA ------------------------------ It's time to make ID registers configurable. When userspace (but not guest) want to set the values of ID registers, save the value in kvm_arch_vcpu so that guest can read the modified values. Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NZhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Peng Liang 提交于
hulk inclusion category: feature bugzilla: 48052 CVE: NA ------------------------------ To emulate the ID registers, we need a place to storage the values of the ID regsiters. Maybe putting in kvm_arch_vcpu is a good idea. This commit has no functional changes but only code refactor. When initializing a vcpu, get the values of the ID registers from arm64_ftr_regs and storage them in kvm_arch_vcpu. And we just read the value from kvm_arch_vcpu when getting/setting the value of the ID regs. Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NZhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Peng Liang 提交于
hulk inclusion category: feature bugzilla: 48052 CVE: NA ------------------------------ If we want to emulate ID registers, we need to initialize ID registers firstly. This commit is to add a helper function to traverse arm64_ftr_regs so that we can initialize ID registers from arm64_ftr_regs. Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NPeng Liang <liangpeng10@huawei.com> Reviewed-by: NZhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-