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]
Date:   Wed, 8 Dec 2021 16:23:37 +0000
From:   Andrew Walbran <qwandor@...gle.com>
To:     Quentin Perret <qperret@...gle.com>
Cc:     Marc Zyngier <maz@...nel.org>, James Morse <james.morse@....com>,
        Alexandru Elisei <alexandru.elisei@....com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
        linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH 3/6] KVM: arm64: Make the hyp memory pool static

Reviewed-by: Andrew Walbran <qwandor@...gle.com>

On Wed, 8 Dec 2021 at 15:23, 'Quentin Perret' via kernel-team
<kernel-team@...roid.com> wrote:
>
> The hyp memory pool struct is sized to fit exactly the needs of the
> hypervisor stage-1 page-table allocator, so it is important it is not
> used for anything else. As it is currently used only from setup.c,
> reduce its visibility by marking it static.
>
> Signed-off-by: Quentin Perret <qperret@...gle.com>
> ---
>  arch/arm64/kvm/hyp/include/nvhe/mm.h | 1 -
>  arch/arm64/kvm/hyp/nvhe/setup.c      | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kvm/hyp/include/nvhe/mm.h b/arch/arm64/kvm/hyp/include/nvhe/mm.h
> index ef6a58a04235..3f60d6cc5368 100644
> --- a/arch/arm64/kvm/hyp/include/nvhe/mm.h
> +++ b/arch/arm64/kvm/hyp/include/nvhe/mm.h
> @@ -12,7 +12,6 @@
>
>  extern struct kvm_pgtable pkvm_pgtable;
>  extern hyp_spinlock_t pkvm_pgd_lock;
> -extern struct hyp_pool hpool;
>  extern u64 __io_map_base;
>
>  int hyp_create_idmap(u32 hyp_va_bits);
> diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c
> index 51e68a040d8a..e31149965204 100644
> --- a/arch/arm64/kvm/hyp/nvhe/setup.c
> +++ b/arch/arm64/kvm/hyp/nvhe/setup.c
> @@ -18,7 +18,6 @@
>  #include <nvhe/mm.h>
>  #include <nvhe/trap_handler.h>
>
> -struct hyp_pool hpool;
>  unsigned long hyp_nr_cpus;
>
>  #define hyp_percpu_size ((unsigned long)__per_cpu_end - \
> @@ -28,6 +27,7 @@ static void *vmemmap_base;
>  static void *hyp_pgt_base;
>  static void *host_s2_pgt_base;
>  static struct kvm_pgtable_mm_ops pkvm_pgtable_mm_ops;
> +static struct hyp_pool hpool;
>
>  static int divide_memory_pool(void *virt, unsigned long size)
>  {
> --
> 2.34.1.400.ga245620fadb-goog
>
> --
> To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@...roid.com.
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (3998 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ