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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAC_TJvdPwL76o-qE_Tw5R06JPeVLgy5O4nBYia=pzmEjA5dvng@mail.gmail.com>
Date:   Mon, 18 Jul 2022 10:09:36 -0700
From:   Kalesh Singh <kaleshsingh@...gle.com>
To:     Fuad Tabba <tabba@...gle.com>
Cc:     Marc Zyngier <maz@...nel.org>, Mark Rutland <mark.rutland@....com>,
        Mark Brown <broonie@...nel.org>,
        "Madhavan T. Venkataraman" <madvenka@...ux.microsoft.com>,
        Will Deacon <will@...nel.org>,
        Quentin Perret <qperret@...gle.com>, android-mm@...gle.com,
        "Cc: Android Kernel" <kernel-team@...roid.com>,
        James Morse <james.morse@....com>,
        Alexandru Elisei <alexandru.elisei@....com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" 
        <linux-arm-kernel@...ts.infradead.org>,
        kvmarm <kvmarm@...ts.cs.columbia.edu>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] KVM: arm64: Fix hypervisor address symbolization

On Mon, Jul 18, 2022 at 2:08 AM Fuad Tabba <tabba@...gle.com> wrote:
>
> Hi Kalesh,
>
> On Sat, Jul 16, 2022 at 12:58 AM Kalesh Singh <kaleshsingh@...gle.com> wrote:
> >
> > With CONFIG_RANDOMIZE_BASE=y vmlinux addresses will resolve correctly
> > from kallsyms. Fix this by adding the KASLR offset before printing the
> > symbols.
> >
> > Based on arm64 for-next/stacktrace.
> >
> > Fixes: 6ccf9cb557bd ("KVM: arm64: Symbolize the nVHE HYP addresses")
> > Reported-by: Fuad Tabba <tabba@...gle.com>
> > Signed-off-by: Kalesh Singh <kaleshsingh@...gle.com>
> > ---
>
> Even with this patch applied I still don't get symbolization unless I
> disable randomization, either by setting CONFIG_RANDOMIZE_BASE=n or
> pass nokaslr as a kernel parameter. I tried both and in either case it
> works.

Hi Fuad,

Thanks for testing it. The fix only addressed the symbolization for
the hyp panic address. I plan to fix the symbolization of stacktrace
in the next version of this series.

--Kalesh

>
> Thanks,
> /fuad
>
>
> >  arch/arm64/kvm/handle_exit.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c
> > index f66c0142b335..e43926ef2bc2 100644
> > --- a/arch/arm64/kvm/handle_exit.c
> > +++ b/arch/arm64/kvm/handle_exit.c
> > @@ -347,10 +347,10 @@ void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr,
> >                         kvm_err("nVHE hyp BUG at: %s:%u!\n", file, line);
> >                 else
> >                         kvm_err("nVHE hyp BUG at: [<%016llx>] %pB!\n", panic_addr,
> > -                                       (void *)panic_addr);
> > +                                       (void *)(panic_addr + kaslr_offset()));
> >         } else {
> >                 kvm_err("nVHE hyp panic at: [<%016llx>] %pB!\n", panic_addr,
> > -                               (void *)panic_addr);
> > +                               (void *)(panic_addr + kaslr_offset()));
> >         }
> >
> >         /*
> >
> > base-commit: 82a592c13b0aeff94d84d54183dae0b26384c95f
> > --
> > 2.37.0.170.g444d1eabd0-goog
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ