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]
Date:   Tue, 8 Jun 2021 13:46:10 -0400
From:   Pavel Tatashin <pasha.tatashin@...een.com>
To:     Marc Zyngier <maz@...nel.org>
Cc:     James Morris <jmorris@...ei.org>, Sasha Levin <sashal@...nel.org>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        kexec mailing list <kexec@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jonathan Corbet <corbet@....net>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        James Morse <james.morse@....com>,
        Vladimir Murzin <vladimir.murzin@....com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-mm <linux-mm@...ck.org>,
        Mark Rutland <mark.rutland@....com>, steve.capper@....com,
        rfontana@...hat.com, Thomas Gleixner <tglx@...utronix.de>,
        Selin Dag <selindag@...il.com>,
        Tyler Hicks <tyhicks@...ux.microsoft.com>,
        Pingfan Liu <kernelfans@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        madvenka@...ux.microsoft.com
Subject: Re: [PATCH 03/18] arm64: hyp-stub: Move elx_sync into the vectors

On Tue, Jun 1, 2021 at 9:18 PM Pavel Tatashin <pasha.tatashin@...een.com> wrote:
>
> > > It cannot call mutate_to_vhe because #HVC_VHE_RESTART is not used
> > > here. But, if it had to it would not work as we cannot return to the
> > > old kernel text after relocation.
> >
> > OK, so you are happy with having a dangling branch pointing to
> > nowhere? Something in me screams that it isn't a good idea, in
> > general.
> >
> > If HVC_SOFT_RESTART is all you need, I'd rather you have a small stub
> > that implements exactly that and nothing else. Feel free to extract it
> > as a reusable macro if you want.

Using macro won't help here to save kernel text. Optimally, we would
want to use only one vector table to reduce kernel text memory usage.
I could do that by overwriting sync entries in
trans_pgd_copy_el2_vectors(). But, that would be ugly, as I would need
to have some specific assumptions about what entries need to be
overwritten. Therefore, I decided to move the vector table that we
currently have in hibernate code, and make it common between kexec and
hibernate; trans_pgd_copy_el2_vectors() will use that table's body to
create copies.

Thanks,
Pasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ