func:  perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) if ( current_is_64bit ( ) )  static inline int current_is_64bit(void) return ! test_ti_thread_flag ( task_thread_info ( current ) , TIF_32BIT ) ; perf_callchain_user_64 ( entry , regs ); static void perf_callchain_user_64(struct perf_callchain_entry struct pt_regs *regs) unsigned long sp , next_sp ; unsigned long next_ip ; unsigned long lr ; long level = 0 ; struct signal_frame_64 __user * sigframe ; unsigned long __user * fp , * uregs ; next_ip = perf_instruction_pointer ( regs ); lr = regs -> link; sp = regs -> gpr [ 1 ]; fp = ( unsigned long __user * ) sp; if ( ! valid_user_sp ( sp , 1 ) || read_user_stack_64 ( fp , & next_sp ) )  if ( level > 0 && read_user_stack_64 ( & fp [ 2 ] , & next_ip ) )  if ( next_sp - sp >= sizeof ( struct signal_frame_64 ) && ( is_sigreturn_64_address ( next_ip , sp ) || ( level <= 1 && is_sigreturn_64_address ( lr , sp ) ) ) && sane_signal_64_frame ( sp ) )  sigframe = ( struct signal_frame_64 __user * ) sp; uregs = sigframe -> uc . uc_mcontext . gp_regs; if ( read_user_stack_64 ( & uregs [ PT_NIP ] , & next_ip ) || read_user_stack_64 ( & uregs [ PT_LNK ] , & lr ) || read_user_stack_64 ( & uregs [ PT_R1 ] , & sp ) )  level = 0; if ( level == 0 )  next_ip = lr; sp = next_sp; static int read_user_stack_64(unsigned long __user *ptr, unsigned long *ret) if ( ( unsigned long ) ptr > TASK_SIZE - sizeof ( unsigned long ) || ( ( unsigned long ) ptr & 7 ) )  if ( ! __get_user_inatomic ( * ret , ptr ) )  return read_user_stack_slow ( ptr , ret , 8 ) ; static int read_user_stack_slow(void __user *ptr, void *ret, int nb) pgd_t * pgdir ; pte_t * ptep , pte ; unsigned shift ; unsigned long addr = ( unsigned long ) ptr ; unsigned long offset ; unsigned long pfn ; void * kaddr ; pgdir = current -> mm -> pgd; if ( ! pgdir )  ptep = find_linux_pte_or_hugepte ( pgdir , addr , & shift ); if ( ! shift )  shift = PAGE_SHIFT; offset = addr & ( ( 1UL << shift ) - 1 ); if ( ptep == NULL )  pte = * ptep; if ( ! pte_present ( pte ) || ! ( pte_val ( pte ) & _PAGE_USER ) )  pfn = pte_pfn ( pte ); if ( ! page_is_ram ( pfn ) )  kaddr = pfn_to_kaddr ( pfn ); memcpy ( ret , kaddr + offset , nb ); 