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]
Message-ID: <CAMj1kXEy6n3zZ8Z51kP=tTuOU0xCXLLfC-b6BMpdsjMoM7zGBg@mail.gmail.com>
Date:   Tue, 1 Mar 2022 17:52:30 +0100
From:   Ard Biesheuvel <ardb@...nel.org>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     Corentin Labbe <clabbe.montjoie@...il.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: boot flooded with unwind: Index not found

On Tue, 1 Mar 2022 at 17:37, Ard Biesheuvel <ardb@...nel.org> wrote:
>
> On Tue, 1 Mar 2022 at 16:52, Russell King (Oracle)
> <linux@...linux.org.uk> wrote:
> >
> > On Tue, Mar 01, 2022 at 04:48:25PM +0100, Corentin Labbe wrote:
> > > Hello
> > >
> > > I booted today linux-next (20220301) and my boot is flooded with:
> > > [    0.000000] unwind: Index not found c0f0c440
> > > [    0.000000] unwind: Index not found 00000000
> > > [    0.000000] unwind: Index not found c0f0c440
> > > [    0.000000] unwind: Index not found 00000000
> > >
> > > This happen on a sun8i-a83t-bananapi-m3
> >
> > Have you enabled vmapped stacks?
> >
>
> This is probably related to
>
> 538b9265c063 ARM: unwind: track location of LR value in stack frame
>
> which removes a kernel_text_address() check on frame->pc as it is
> essentially redundant, given that we won't find unwind data otherwise.
> Unfortunately, I failed to realise that the other check carries a
> pr_warn(), which may apparently fire spuriously in some cases.
>
> The 0x0 value can easily be filtered out, but i would be interesting
> where the other value originates from. We might be able to solve this
> with a simple .nounwind directive in a asm routine somewhere.
>
> I'll prepare a patch that disregards the 0x0 value - could you check
> in the mean time what the address 0xcf0c440 coincides with in your
> build?

Something like the below should restore the previous behavior, while
taking the kernel_text_address() check out of the hot path.

--- a/arch/arm/kernel/unwind.c
+++ b/arch/arm/kernel/unwind.c
@@ -400,7 +400,8 @@ int unwind_frame(struct stackframe *frame)

        idx = unwind_find_idx(frame->pc);
        if (!idx) {
-               pr_warn("unwind: Index not found %08lx\n", frame->pc);
+               if (frame->pc && kernel_text_address(frame->pc))
+                       pr_warn("unwind: Index not found %08lx\n", frame->pc);
                return -URC_FAILURE;
        }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ