lkml.org 
[lkml]   [2020]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC PATCH 02/27] KVM: arm64: Link position-independent string routines into .hyp.text
On Monday 23 Nov 2020 at 12:34:25 (+0000), David Brazdil wrote:
> On Tue, Nov 17, 2020 at 06:15:42PM +0000, 'Quentin Perret' via kernel-team wrote:
> > diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h
> > index 8539f34d7538..dd8ccc9efb6a 100644
> > --- a/arch/arm64/kernel/image-vars.h
> > +++ b/arch/arm64/kernel/image-vars.h
> > @@ -105,6 +105,17 @@ KVM_NVHE_ALIAS(__stop___kvm_ex_table);
> > /* Array containing bases of nVHE per-CPU memory regions. */
> > KVM_NVHE_ALIAS(kvm_arm_hyp_percpu_base);
> >
> > +/* Position-independent library routines */
> > +__kvm_nvhe_clear_page = __kvm_nvhe___pi_clear_page;
> > +__kvm_nvhe_copy_page = __kvm_nvhe___pi_copy_page;
> > +__kvm_nvhe_memcpy = __kvm_nvhe___pi_memcpy;
> > +__kvm_nvhe_memset = __kvm_nvhe___pi_memset;
> > +
> > +#ifdef CONFIG_KASAN
> > +__kvm_nvhe___memcpy = __kvm_nvhe___pi_memcpy;
> > +__kvm_nvhe___memset = __kvm_nvhe___pi_memset;
> > +#endif
> > +
> > #endif /* CONFIG_KVM */
>
> Nit: Would be good to use the kvm_nvhe_sym() helper for the namespacing.
> And feel free to define something like KVM_NVHE_ALIAS for PI in hyp-image.h.

Ack, that'd be much nicer, I'll fix it up for v2.

Thanks,
Quentin

\
 
 \ /
  Last update: 2020-11-23 15:17    [W:0.393 / U:1.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site