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:   Tue, 22 Aug 2023 15:38:30 +0800
From:   Huacai Chen <chenhuacai@...nel.org>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        "Maciej W. Rozycki" <macro@...am.me.uk>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v4 3/4] MIPS: Return earlier in die() if notify_die()
 returns NOTIFY_STOP

On Mon, Aug 21, 2023 at 10:29 AM Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
>
>
>
> On 08/20/2023 04:53 PM, Huacai Chen wrote:
> > Hi, Tiezhu,
> >
> > On Sun, Aug 20, 2023 at 7:21 AM Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
> >>
> >> After the call to oops_exit(), it should not panic or execute
> >> the crash kernel if the oops is to be suppressed.
> >>
> >> Suggested-by: Maciej W. Rozycki <macro@...am.me.uk>
> >> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> >> ---
> >>  arch/mips/kernel/traps.c | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> >> index 8e528a8..fd770dc 100644
> >> --- a/arch/mips/kernel/traps.c
> >> +++ b/arch/mips/kernel/traps.c
> >> @@ -412,6 +412,9 @@ void die(const char *str, struct pt_regs *regs)
> >>
> >>         oops_exit();
> >>
> >> +       if (ret == NOTIFY_STOP)
> >> +               return;
> >> +
> >>         if (in_interrupt())
> >>                 panic("Fatal exception in interrupt");
> >>
> >> @@ -421,8 +424,7 @@ void die(const char *str, struct pt_regs *regs)
> >>         if (regs && kexec_should_crash(current))
> >>                 crash_kexec(regs);
> >>
> >> -       if (ret != NOTIFY_STOP)
> >> -               make_task_dead(SIGSEGV);
> >> +       make_task_dead(SIGSEGV);
> > Then you call make_task_dead() at the end unconditionally, and die()
> > becomes a noreturn function again.
>
> No, it can return if (ret == NOTIFY_STOP), so die() is a return
> function now, please see objdump -d arch/mips/kernel/traps.o.
Then should loongarch patches need to be updated, too?

Huacai
>
> Thanks,
> Tiezhu
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ