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: <20200922180745.m6bjgjzz6cwercgf@google.com>
Date:   Tue, 22 Sep 2020 19:07:45 +0100
From:   David Brazdil <dbrazdil@...gle.com>
To:     Will Deacon <will@...nel.org>
Cc:     kvmarm@...ts.cs.columbia.edu,
        Catalin Marinas <catalin.marinas@....com>,
        Marc Zyngier <maz@...nel.org>,
        James Morse <james.morse@....com>,
        Julien Thierry <julien.thierry.kdev@...il.com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Dennis Zhou <dennis@...nel.org>, Tejun Heo <tj@...nel.org>,
        Christoph Lameter <cl@...ux.com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-team@...roid.com
Subject: Re: [PATCH v3 07/11] kvm: arm64: Duplicate
 arm64_ssbd_callback_required for nVHE hyp

> >  		u64 *ptr;
> >  
> > -		ptr = per_cpu_ptr(&arm64_ssbd_callback_required, cpu);
> > +		ptr = per_cpu_ptr_nvhe(arm64_ssbd_callback_required, cpu);
> >  		err = create_hyp_mappings(ptr, ptr + 1, PAGE_HYP);
> >  		if (err)
> >  			return err;
> > +
> > +		/* Copy value from kernel to hyp. */
> > +		*ptr = per_cpu(arm64_ssbd_callback_required, cpu);
> 
> Hmm. Is this correct for late arriving CPUs, where we don't know whether
> a callback is required at the point we do the copy?
> 
> That sounds fiddly to resolve, but this _might_ all be moot because I'm
> about to post a series that allows us to remove the hyp mapping of this
> variable entirely. So leave this for now, but maybe stick a comment in
> that it doesn't work for late cpus.

Ah, good point. I'll move the value copy at the end of cpu_init_hyp_mode().
It must be known at that point. And if your series gets rid of this completely,
even better.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ