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: <87czt41xum.wl-maz@kernel.org>
Date:   Wed, 02 Jun 2021 09:20:49 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Pavel Tatashin <pasha.tatashin@...een.com>
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 04/18] arm64: kernel: add helper for booted at EL2 and not VHE

On Wed, 02 Jun 2021 02:33:52 +0100,
Pavel Tatashin <pasha.tatashin@...een.com> wrote:
> 
> On Tue, Jun 1, 2021 at 8:38 AM Marc Zyngier <maz@...nel.org> wrote:
> >
> > On Thu, 27 May 2021 16:05:12 +0100,
> > Pavel Tatashin <pasha.tatashin@...een.com> wrote:
> > >
> > > Replace places that contain logic like this:
> > >       is_hyp_mode_available() && !is_kernel_in_hyp_mode()
> > >
> > > With a dedicated boolean function  is_hyp_callable(). This will be needed
> > > later in kexec in order to sooner switch back to EL2.
> >
> > This looks like the very definition of "run in nVHE mode", so I'd
> > rather you call it like this, rather than "callable", which is
> > extremely ambiguous (if running at EL2, I call it any time I want, for
> > free).
> 
> Hi Marc,
> 
> Naming is hard.

News flash!

> Are you proposing s/is_hyp_callable/run_in_nvhe_mode/ ? This is also
> not a very good name because it does not sound like a boolean, but
> instead that we know that there is nvhe mode available and we can
> switch to it.

No, what I suggest is "is_hyp_nvhe()", or something along those
lines. It clearly identifies that we are in control of EL2, and which
mode it is in.

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ