lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Apr 2018 20:10:22 +0800
From:   Vincent Chen <deanbo422@...il.com>
To:     "Eric W. Biederman" <ebiederm@...ssion.com>
Cc:     linux-arch <linux-arch@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-api@...r.kernel.org, Vincent Chen <vincentc@...estech.com>,
        Greentime Hu <greentime@...estech.com>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [REVIEW][PATCH 05/17] signal/nds32: Use force_sig(SIGILL) in do_revisn

2018-04-20 9:03 GMT+08:00 Eric W. Biederman <ebiederm@...ssion.com>:
> As originally committed do_revisn would deliver a siginfo for SIGILL
> with an si_code composed of random stack contents.  That makes no
> sense and is not something userspace can depend on.  So simplify
> the code and just use "force_sig(SIG_ILL, current)" instead.
>
> Fixes: 2923f5ea7738 ("nds32: Exception handling")
> Cc: Vincent Chen <vincentc@...estech.com>
> Cc: Greentime Hu <greentime@...estech.com>
> Cc: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> ---
>  arch/nds32/kernel/traps.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/nds32/kernel/traps.c b/arch/nds32/kernel/traps.c
> index 65961bf91d64..8e9a5b1f6234 100644
> --- a/arch/nds32/kernel/traps.c
> +++ b/arch/nds32/kernel/traps.c
> @@ -356,14 +356,11 @@ void do_dispatch_tlb_misc(unsigned long entry, unsigned long addr,
>
>  void do_revinsn(struct pt_regs *regs)
>  {
> -       siginfo_t si;
>         pr_emerg("Reserved Instruction\n");
>         show_regs(regs);
>         if (!user_mode(regs))
>                 do_exit(SIGILL);
> -       si.si_signo = SIGILL;
> -       si.si_errno = 0;
> -       force_sig_info(SIGILL, &si, current);
> +       force_sig(SIGILL, current);
>  }
>
>  #ifdef CONFIG_ALIGNMENT_TRAP
> --
> 2.14.1
>

You are right we do not store any valuable information in sigingo_t now.
However, We hope more information can be recorded by force_sig_fault()
as below instead of calling force_sig() directly.

-        force_sig(SIGILL, current);
+        force_sig_fault(SIGILL, ILL_ILLTRP,
+                        (void __user *)instruction_pointer(regs), current);

Thanks

Vincent Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ