[PATCH OLK-5.10 0/1] zcopy: Remove the dump_pagetable interface
zcopy: Remove the dump_pagetable interface Liu Mingrui (1): zcopy: Remove the dump_pagetable interface drivers/misc/zcopy/zcopy.c | 24 ------------------------ 1 file changed, 24 deletions(-) -- 2.25.1
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/release-management/issues/ID3TGE -------------------------------- Due to security, we remove the dump_pagetable interface Fixes: 6215c86ac4fb ("zcopy: Add debug inerface dump_pagetable") Signed-off-by: Liu Mingrui <liumingrui@huawei.com> --- drivers/misc/zcopy/zcopy.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/misc/zcopy/zcopy.c b/drivers/misc/zcopy/zcopy.c index 295519412c1c..a20269a3d843 100644 --- a/drivers/misc/zcopy/zcopy.c +++ b/drivers/misc/zcopy/zcopy.c @@ -38,7 +38,6 @@ enum pgt_entry { enum { IO_ATTACH = 1, - IO_DUMP = 3, IO_MAX }; @@ -50,11 +49,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; @@ -70,7 +64,6 @@ static int (*__zcopy_pmd_alloc)(struct mm_struct *, pud_t *, unsigned long); static int (*__zcopy_pud_alloc)(struct mm_struct *, p4d_t *, unsigned long); static unsigned long (*kallsyms_lookup_name_funcp)(const char *); static void (*zcopy_page_remove_rmap)(struct page *, bool); -static void (*dump_pagetable)(unsigned long addr); static struct kretprobe __kretprobe; @@ -558,18 +551,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; } @@ -633,11 +614,6 @@ static int register_unexport_func(void) zcopy_page_remove_rmap = (void (*)(struct page *, bool))__kallsyms_lookup_name("page_remove_rmap"); ret = REGISTER_CHECK(zcopy_page_remove_rmap, "page_remove_rmap"); - 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
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/19094 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/DWR... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/19094 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/DWR...
participants (2)
-
Liu Mingrui -
patchwork bot