@@ -365,13 +365,14 @@ void die(const char *str, struct pt_regs *regs, int err)
365365}
366366
367367void arm_notify_die (const char * str , struct pt_regs * regs ,
368- struct siginfo * info , unsigned long err , unsigned long trap )
368+ int signo , int si_code , void __user * addr ,
369+ unsigned long err , unsigned long trap )
369370{
370371 if (user_mode (regs )) {
371372 current -> thread .error_code = err ;
372373 current -> thread .trap_no = trap ;
373374
374- force_sig_info ( info -> si_signo , info , current );
375+ force_sig_fault ( signo , si_code , addr , current );
375376 } else {
376377 die (str , regs , err );
377378 }
@@ -438,10 +439,8 @@ int call_undef_hook(struct pt_regs *regs, unsigned int instr)
438439asmlinkage void do_undefinstr (struct pt_regs * regs )
439440{
440441 unsigned int instr ;
441- siginfo_t info ;
442442 void __user * pc ;
443443
444- clear_siginfo (& info );
445444 pc = (void __user * )instruction_pointer (regs );
446445
447446 if (processor_mode (regs ) == SVC_MODE ) {
@@ -485,13 +484,8 @@ asmlinkage void do_undefinstr(struct pt_regs *regs)
485484 dump_instr (KERN_INFO , regs );
486485 }
487486#endif
488-
489- info .si_signo = SIGILL ;
490- info .si_errno = 0 ;
491- info .si_code = ILL_ILLOPC ;
492- info .si_addr = pc ;
493-
494- arm_notify_die ("Oops - undefined instruction" , regs , & info , 0 , 6 );
487+ arm_notify_die ("Oops - undefined instruction" , regs ,
488+ SIGILL , ILL_ILLOPC , pc , 0 , 6 );
495489}
496490NOKPROBE_SYMBOL (do_undefinstr )
497491
@@ -539,9 +533,6 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason)
539533
540534static int bad_syscall (int n , struct pt_regs * regs )
541535{
542- siginfo_t info ;
543-
544- clear_siginfo (& info );
545536 if ((current -> personality & PER_MASK ) != PER_LINUX ) {
546537 send_sig (SIGSEGV , current , 1 );
547538 return regs -> ARM_r0 ;
@@ -555,13 +546,10 @@ static int bad_syscall(int n, struct pt_regs *regs)
555546 }
556547#endif
557548
558- info .si_signo = SIGILL ;
559- info .si_errno = 0 ;
560- info .si_code = ILL_ILLTRP ;
561- info .si_addr = (void __user * )instruction_pointer (regs ) -
562- (thumb_mode (regs ) ? 2 : 4 );
563-
564- arm_notify_die ("Oops - bad syscall" , regs , & info , n , 0 );
549+ arm_notify_die ("Oops - bad syscall" , regs , SIGILL , ILL_ILLTRP ,
550+ (void __user * )instruction_pointer (regs ) -
551+ (thumb_mode (regs ) ? 2 : 4 ),
552+ n , 0 );
565553
566554 return regs -> ARM_r0 ;
567555}
@@ -607,20 +595,13 @@ do_cache_op(unsigned long start, unsigned long end, int flags)
607595#define NR (x ) ((__ARM_NR_##x) - __ARM_NR_BASE)
608596asmlinkage int arm_syscall (int no , struct pt_regs * regs )
609597{
610- siginfo_t info ;
611-
612- clear_siginfo (& info );
613598 if ((no >> 16 ) != (__ARM_NR_BASE >> 16 ))
614599 return bad_syscall (no , regs );
615600
616601 switch (no & 0xffff ) {
617602 case 0 : /* branch through 0 */
618- info .si_signo = SIGSEGV ;
619- info .si_errno = 0 ;
620- info .si_code = SEGV_MAPERR ;
621- info .si_addr = NULL ;
622-
623- arm_notify_die ("branch through zero" , regs , & info , 0 , 0 );
603+ arm_notify_die ("branch through zero" , regs ,
604+ SIGSEGV , SEGV_MAPERR , NULL , 0 , 0 );
624605 return 0 ;
625606
626607 case NR (breakpoint ): /* SWI BREAK_POINT */
@@ -688,13 +669,10 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
688669 }
689670 }
690671#endif
691- info .si_signo = SIGILL ;
692- info .si_errno = 0 ;
693- info .si_code = ILL_ILLTRP ;
694- info .si_addr = (void __user * )instruction_pointer (regs ) -
695- (thumb_mode (regs ) ? 2 : 4 );
696-
697- arm_notify_die ("Oops - bad syscall(2)" , regs , & info , no , 0 );
672+ arm_notify_die ("Oops - bad syscall(2)" , regs , SIGILL , ILL_ILLTRP ,
673+ (void __user * )instruction_pointer (regs ) -
674+ (thumb_mode (regs ) ? 2 : 4 ),
675+ no , 0 );
698676 return 0 ;
699677}
700678
@@ -744,9 +722,6 @@ asmlinkage void
744722baddataabort (int code , unsigned long instr , struct pt_regs * regs )
745723{
746724 unsigned long addr = instruction_pointer (regs );
747- siginfo_t info ;
748-
749- clear_siginfo (& info );
750725
751726#ifdef CONFIG_DEBUG_USER
752727 if (user_debug & UDBG_BADABORT ) {
@@ -757,12 +732,8 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
757732 }
758733#endif
759734
760- info .si_signo = SIGILL ;
761- info .si_errno = 0 ;
762- info .si_code = ILL_ILLOPC ;
763- info .si_addr = (void __user * )addr ;
764-
765- arm_notify_die ("unknown data abort code" , regs , & info , instr , 0 );
735+ arm_notify_die ("unknown data abort code" , regs ,
736+ SIGILL , ILL_ILLOPC , (void __user * )addr , instr , 0 );
766737}
767738
768739void __readwrite_bug (const char * fn )
0 commit comments