From a08348060f055520cbc5413d699428955b4732a8 Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Fri, 30 Nov 2012 18:57:26 +0400 Subject: [PATCH] porting dlsymmed_handlers on x86 --- driver/us_proc_inst.c | 52 --------------------------------------------------- driver/us_proc_inst.h | 1 - 2 files changed, 53 deletions(-) diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index dd74764..ea34c92 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -1936,55 +1936,3 @@ unsigned long get_ret_addr(struct task_struct *task, us_proc_ip_t *ip) } EXPORT_SYMBOL_GPL(get_ret_addr); -/*function call removes all OTG-probes installed in library "lib_to_delete"*/ -void otg_probe_list_clean(char* lib_to_delete) -{ - struct task_struct *task = current->group_leader; - struct mm_struct *mm; - struct vm_area_struct *vma = 0; - char *filename = ""; - char *buf = ""; - unsigned long int addr_max = 0; - unsigned long int addr_min = 0; - int err; - us_proc_otg_ip_t *p; - struct dentry *delete_dentry = get_dentry(lib_to_delete); - - mm = task->active_mm; -/*find in process space map file with name "lib_to_delete" and flag VM_EXEC -and save address borders of this file*/ - if (mm) { - vma = mm->mmap; - while (vma) { - if(vma->vm_file) { - if(vma->vm_file->f_dentry) { - if ((delete_dentry == vma->vm_file->f_dentry) && (vma->vm_flags & VM_EXEC)) { - addr_min = vma->vm_start; - addr_max = vma->vm_end; - break; - } - } - } - vma = vma->vm_next; - } - } - -/*remove OTG-probe if its address is between addr_min and addr_max*/ - list_for_each_entry_rcu (p, &otg_us_proc_info, list) { - if (!p->ip.installed) { - continue; - } - if ( ((unsigned long)p->ip.jprobe.kp.addr < addr_max) && - ((unsigned long)p->ip.jprobe.kp.addr >= addr_min) ) { - err = unregister_usprobe(task, &p->ip, 1); - if (err != 0) { - EPRINTF("failed to uninstall IP at %p. Error %d!", - p->ip.jprobe.kp.addr, err); - continue; - } - p->ip.installed = 0; - remove_otg_probe_from_list(p->ip.offset); - } - } -} -EXPORT_SYMBOL_GPL(otg_probe_list_clean); diff --git a/driver/us_proc_inst.h b/driver/us_proc_inst.h index 78649d4..75b7da4 100644 --- a/driver/us_proc_inst.h +++ b/driver/us_proc_inst.h @@ -29,7 +29,6 @@ extern int deinst_usr_space_proc (void); /* Detects when IPs are really loaded into phy mem and installs probes. */ extern void do_page_fault_ret_pre_code (void); -extern void otg_probe_list_clean(char*); /* Detects when target process exits. */ extern void do_exit_probe_pre_code (void); -- 2.7.4