if (page_present (mm, addr))
{
//DPRINTF ("pid %d, %s sym is present at %lx/%lx.", task->pid, us_proc_info.p_libs[i].path, us_proc_info.p_libs[i].p_ips[k].offset, addr);
- //if (!us_proc_info.p_libs[i].p_ips[k].installed)
+ if (!us_proc_info.p_libs[i].p_ips[k].installed)
{
us_proc_info.unres_ips_count--;
us_proc_info.p_libs[i].p_ips[k].installed = 1;
}
kretprobe_assert (ri, orig_ret_address, trampoline_address);
//BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address));
- if (trampoline_address != (unsigned long) &kretprobe_trampoline){
- if (ri->rp2) BUG_ON (ri->rp2->kp.tgid == 0);
- if (ri->rp) BUG_ON (ri->rp->kp.tgid == 0);
- else if (ri->rp2) BUG_ON (ri->rp2->kp.tgid == 0);
- }
+ //E.G. Check this code in case of __switch_to function instrumentation -- currently this code generates dump in this case
+ //if (trampoline_address != (unsigned long) &kretprobe_trampoline){
+ //if (ri->rp2) BUG_ON (ri->rp2->kp.tgid == 0);
+ //if (ri->rp) BUG_ON (ri->rp->kp.tgid == 0);
+ //else if (ri->rp2) BUG_ON (ri->rp2->kp.tgid == 0);
+ //}
if ((ri->rp && ri->rp->kp.tgid) || (ri->rp2 && ri->rp2->kp.tgid))
BUG_ON (trampoline_address == (unsigned long) &kretprobe_trampoline);
DECLARE_MOD_FUNC_DEP(find_extend_vma, struct vm_area_struct *, struct mm_struct * mm, unsigned long addr);
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
DECLARE_MOD_FUNC_DEP(handle_mm_fault, int, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access);
+#endif
#else
DECLARE_MOD_FUNC_DEP(handle_mm_fault, int, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, unsigned int flags);
#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30) */
IMP_MOD_DEP_WRAPPER (find_extend_vma, mm, addr)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
DECLARE_MOD_DEP_WRAPPER (handle_mm_fault, \
int, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access)
IMP_MOD_DEP_WRAPPER (handle_mm_fault, mm, vma, address, write_access)
+#endif
#else
DECLARE_MOD_DEP_WRAPPER (handle_mm_fault, \
int, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, unsigned int flags)
int init_module_dependencies()
{
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
INIT_MOD_DEP_VAR(handle_mm_fault, handle_mm_fault);
+#endif
+#endif
+
INIT_MOD_DEP_VAR(flush_ptrace_access, flush_ptrace_access);
INIT_MOD_DEP_VAR(find_extend_vma, find_extend_vma);
INIT_MOD_DEP_VAR(get_gate_vma, get_gate_vma);