kernel:Add Huawei hisi check (#1545)
Use huawei_hisi_check.h to determine whether it is an old Huawei HiSilicon device. Solve: 1. Compatible with non-GKI Huawei HiSilicon devices 2. Solve different bugs in EMUI of different system versions 3. Does not affect other devices
This commit is contained in:
@@ -8,8 +8,9 @@
|
||||
#endif
|
||||
#include "linux/uaccess.h"
|
||||
#include "klog.h" // IWYU pragma: keep
|
||||
#include "kernel_compat.h" // Add check Huawei Device
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || defined(CONFIG_IS_HW_HISI)
|
||||
#include "linux/key.h"
|
||||
#include "linux/errno.h"
|
||||
#include "linux/cred.h"
|
||||
@@ -78,7 +79,7 @@ void ksu_android_ns_fs_check()
|
||||
|
||||
struct file *ksu_filp_open_compat(const char *filename, int flags, umode_t mode)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || defined(CONFIG_IS_HW_HISI)
|
||||
if (init_session_keyring != NULL && !current_cred()->session_keyring &&
|
||||
(current->flags & PF_WQ_WORKER)) {
|
||||
pr_info("installing init session keyring for older kernel\n");
|
||||
|
||||
Reference in New Issue
Block a user