hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/release-management/issues/ID3TGE -------------------------------- Due to security, wo remove the dump_pagetable interface Fixes: 2b208e9181b9 ("zcopy: Add debug inerface dump_pagetable") Signed-off-by: Liu Mingrui <liumingrui@huawei.com> --- drivers/misc/zcopy/zcopy.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/misc/zcopy/zcopy.c b/drivers/misc/zcopy/zcopy.c index 4b987f740e62..65e83879733a 100644 --- a/drivers/misc/zcopy/zcopy.c +++ b/drivers/misc/zcopy/zcopy.c @@ -34,7 +34,6 @@ enum pgt_entry { enum { IO_ATTACH = 1, - IO_DUMP = 3, IO_MAX }; @@ -46,11 +45,6 @@ struct zcopy_ioctl_pswap { unsigned long size; }; -struct zcopy_ioctl_dump { - unsigned long size; - unsigned long addr; -}; - struct zcopy_cdev { struct cdev chrdev; dev_t dev; @@ -68,7 +62,6 @@ static int (*__zcopy_pud_alloc)(struct mm_struct *, p4d_t *, unsigned long); static unsigned long (*kallsyms_lookup_name_funcp)(const char *); static void (*__zcopy_mmu_notifier_arch_invalidate_secondary_tlbs)(struct mm_struct *, unsigned long, unsigned long); -static void (*dump_pagetable)(unsigned long addr); static struct kretprobe __kretprobe; @@ -750,18 +743,6 @@ static long zcopy_ioctl(struct file *file, unsigned int type, unsigned long ptr) ctx.src_pid, ctx.size); break; } - case IO_DUMP: - { - struct zcopy_ioctl_dump param; - - if (copy_from_user((void *)¶m, (void *)ptr, - sizeof(struct zcopy_ioctl_dump))) { - ret = -EFAULT; - break; - } - dump_pagetable(param.addr); - break; - } default: break; } @@ -833,10 +814,6 @@ static int register_unexport_func(void) __kallsyms_lookup_name("__mmu_notifier_arch_invalidate_secondary_tlbs"); ret = REGISTER_CHECK(__zcopy_mmu_notifier_arch_invalidate_secondary_tlbs, "__mmu_notifier_arch_invalidate_secondary_tlbs"); - if (ret) - goto out; - dump_pagetable = (void (*)(unsigned long))__kallsyms_lookup_name("show_pte"); - ret = REGISTER_CHECK(dump_pagetable, "show_pte"); out: return ret; -- 2.25.1