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: <CAMj1kXFF_y9pJ+Nuy7-63LA79+x=pPOg5uHYB_RHP_4gRKhTeQ@mail.gmail.com>
Date: Sat, 3 May 2025 13:28:39 +0200
From: Ard Biesheuvel <ardb@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	will@...nel.org, catalin.marinas@....com, mark.rutland@....com, 
	Yeoreum Yun <yeoreum.yun@....com>
Subject: Re: [PATCH 1/3] arm64/boot: Move init_pgdir[] into __pi_ namespace

On Sat, 3 May 2025 at 13:22, Ard Biesheuvel <ardb+git@...gle.com> wrote:
>
> From: Ard Biesheuvel <ardb@...nel.org>
>
> init_pgdir[] is only referenced from the startup code, but lives after
> BSS in the linker map. Before tightening the rules about accessing BSS
> from startup code, move init_pgdir[] into the __pi_ namespace, so it
> does not need to be exported explicitly.
>
> Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> ---
>  arch/arm64/include/asm/pgtable.h | 2 --
>  arch/arm64/kernel/image-vars.h   | 2 --
>  arch/arm64/kernel/pi/pi.h        | 1 +
>  arch/arm64/kernel/vmlinux.lds.S  | 4 ++--
>  4 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
> index d3b538be1500..6a040f0bbfe1 100644
> --- a/arch/arm64/include/asm/pgtable.h
> +++ b/arch/arm64/include/asm/pgtable.h
> @@ -754,8 +754,6 @@ static inline bool pud_table(pud_t pud) { return true; }
>                                  PUD_TYPE_TABLE)
>  #endif
>
> -extern pgd_t init_pg_dir[];
> -extern pgd_t init_pg_end[];
>  extern pgd_t swapper_pg_dir[];
>  extern pgd_t idmap_pg_dir[];
>  extern pgd_t tramp_pg_dir[];
> diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h
> index 5e3c4b58f279..a0977f7cd3ec 100644
> --- a/arch/arm64/kernel/image-vars.h
> +++ b/arch/arm64/kernel/image-vars.h
> @@ -56,8 +56,6 @@ PROVIDE(__pi_memstart_offset_seed     = memstart_offset_seed);
>
>  PROVIDE(__pi_init_idmap_pg_dir         = init_idmap_pg_dir);
>  PROVIDE(__pi_init_idmap_pg_end         = init_idmap_pg_end);
> -PROVIDE(__pi_init_pg_dir               = init_pg_dir);
> -PROVIDE(__pi_init_pg_end               = init_pg_end);
>  PROVIDE(__pi_swapper_pg_dir            = swapper_pg_dir);
>
>  PROVIDE(__pi__text                     = _text);
> diff --git a/arch/arm64/kernel/pi/pi.h b/arch/arm64/kernel/pi/pi.h
> index c91e5e965cd3..38a908d048e8 100644
> --- a/arch/arm64/kernel/pi/pi.h
> +++ b/arch/arm64/kernel/pi/pi.h
> @@ -22,6 +22,7 @@ static inline void *prel64_to_pointer(const prel64_t *offset)
>  extern bool dynamic_scs_is_enabled;
>
>  extern pgd_t init_idmap_pg_dir[], init_idmap_pg_end[];
> +extern pgd_t init_pg_dir[];
>

Apologies, I hit send too quickly - init_pg_end[] is missing here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ