mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64/mm: Drop INIT_MM_CONTEXT()
@ 2024-12-02  4:35 Anshuman Khandual
  2024-12-02 10:01 ` Ard Biesheuvel
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Anshuman Khandual @ 2024-12-02  4:35 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Ard Biesheuvel,
	Ryan Roberts, Mark Rutland, linux-kernel

Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir
always gets assigned as the pgd during init_mm initialization. So just drop
this override on arm64.

Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
Separate boot-time page tables from swapper_pg_dir")' because non standard
init_pg_dir was assigned as the pgd. Subsequently it was changed as default
swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant
remap of kernel image")', which might have also just dropped this override.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
This patch applies on v6.13-rc1

 arch/arm64/include/asm/mmu.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index 2ec96d91acc6..662471cfc536 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -109,8 +109,5 @@ static inline bool kaslr_requires_kpti(void)
 	return true;
 }
 
-#define INIT_MM_CONTEXT(name)	\
-	.pgd = swapper_pg_dir,
-
 #endif	/* !__ASSEMBLY__ */
 #endif
-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64/mm: Drop INIT_MM_CONTEXT()
  2024-12-02  4:35 [PATCH] arm64/mm: Drop INIT_MM_CONTEXT() Anshuman Khandual
@ 2024-12-02 10:01 ` Ard Biesheuvel
  2024-12-02 11:38 ` Ryan Roberts
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2024-12-02 10:01 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-arm-kernel, Catalin Marinas, Will Deacon, Ryan Roberts,
	Mark Rutland, linux-kernel

On Mon, 2 Dec 2024 at 05:36, Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
> Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir
> always gets assigned as the pgd during init_mm initialization. So just drop
> this override on arm64.
>
> Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
> Separate boot-time page tables from swapper_pg_dir")' because non standard
> init_pg_dir was assigned as the pgd. Subsequently it was changed as default
> swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant
> remap of kernel image")', which might have also just dropped this override.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> ---
> This patch applies on v6.13-rc1
>
>  arch/arm64/include/asm/mmu.h | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
> index 2ec96d91acc6..662471cfc536 100644
> --- a/arch/arm64/include/asm/mmu.h
> +++ b/arch/arm64/include/asm/mmu.h
> @@ -109,8 +109,5 @@ static inline bool kaslr_requires_kpti(void)
>         return true;
>  }
>
> -#define INIT_MM_CONTEXT(name)  \
> -       .pgd = swapper_pg_dir,
> -
>  #endif /* !__ASSEMBLY__ */
>  #endif
> --
> 2.30.2
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64/mm: Drop INIT_MM_CONTEXT()
  2024-12-02  4:35 [PATCH] arm64/mm: Drop INIT_MM_CONTEXT() Anshuman Khandual
  2024-12-02 10:01 ` Ard Biesheuvel
@ 2024-12-02 11:38 ` Ryan Roberts
  2024-12-03  2:46 ` Gavin Shan
  2024-12-10 18:34 ` Will Deacon
  3 siblings, 0 replies; 5+ messages in thread
From: Ryan Roberts @ 2024-12-02 11:38 UTC (permalink / raw)
  To: Anshuman Khandual, linux-arm-kernel
  Cc: Catalin Marinas, Will Deacon, Ard Biesheuvel, Mark Rutland, linux-kernel

On 02/12/2024 04:35, Anshuman Khandual wrote:
> Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir
> always gets assigned as the pgd during init_mm initialization. So just drop
> this override on arm64.
> 
> Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
> Separate boot-time page tables from swapper_pg_dir")' because non standard
> init_pg_dir was assigned as the pgd. Subsequently it was changed as default
> swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant
> remap of kernel image")', which might have also just dropped this override.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>

> ---
> This patch applies on v6.13-rc1
> 
>  arch/arm64/include/asm/mmu.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
> index 2ec96d91acc6..662471cfc536 100644
> --- a/arch/arm64/include/asm/mmu.h
> +++ b/arch/arm64/include/asm/mmu.h
> @@ -109,8 +109,5 @@ static inline bool kaslr_requires_kpti(void)
>  	return true;
>  }
>  
> -#define INIT_MM_CONTEXT(name)	\
> -	.pgd = swapper_pg_dir,
> -
>  #endif	/* !__ASSEMBLY__ */
>  #endif


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64/mm: Drop INIT_MM_CONTEXT()
  2024-12-02  4:35 [PATCH] arm64/mm: Drop INIT_MM_CONTEXT() Anshuman Khandual
  2024-12-02 10:01 ` Ard Biesheuvel
  2024-12-02 11:38 ` Ryan Roberts
@ 2024-12-03  2:46 ` Gavin Shan
  2024-12-10 18:34 ` Will Deacon
  3 siblings, 0 replies; 5+ messages in thread
From: Gavin Shan @ 2024-12-03  2:46 UTC (permalink / raw)
  To: Anshuman Khandual, linux-arm-kernel
  Cc: Catalin Marinas, Will Deacon, Ard Biesheuvel, Ryan Roberts,
	Mark Rutland, linux-kernel

On 12/2/24 2:35 PM, Anshuman Khandual wrote:
> Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir
> always gets assigned as the pgd during init_mm initialization. So just drop
> this override on arm64.
> 
> Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
> Separate boot-time page tables from swapper_pg_dir")' because non standard
> init_pg_dir was assigned as the pgd. Subsequently it was changed as default
> swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant
> remap of kernel image")', which might have also just dropped this override.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> This patch applies on v6.13-rc1
> 
>   arch/arm64/include/asm/mmu.h | 3 ---
>   1 file changed, 3 deletions(-)
> 

Reviewed-by: Gavin Shan <gshan@redhat.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64/mm: Drop INIT_MM_CONTEXT()
  2024-12-02  4:35 [PATCH] arm64/mm: Drop INIT_MM_CONTEXT() Anshuman Khandual
                   ` (2 preceding siblings ...)
  2024-12-03  2:46 ` Gavin Shan
@ 2024-12-10 18:34 ` Will Deacon
  3 siblings, 0 replies; 5+ messages in thread
From: Will Deacon @ 2024-12-10 18:34 UTC (permalink / raw)
  To: linux-arm-kernel, Anshuman Khandual
  Cc: catalin.marinas, kernel-team, Will Deacon, Ard Biesheuvel,
	Ryan Roberts, Mark Rutland, linux-kernel

On Mon, 02 Dec 2024 10:05:53 +0530, Anshuman Khandual wrote:
> Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir
> always gets assigned as the pgd during init_mm initialization. So just drop
> this override on arm64.
> 
> Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
> Separate boot-time page tables from swapper_pg_dir")' because non standard
> init_pg_dir was assigned as the pgd. Subsequently it was changed as default
> swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant
> remap of kernel image")', which might have also just dropped this override.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64/mm: Drop INIT_MM_CONTEXT()
      https://git.kernel.org/arm64/c/5f882f4aa8aa

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-10 18:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-02  4:35 [PATCH] arm64/mm: Drop INIT_MM_CONTEXT() Anshuman Khandual
2024-12-02 10:01 ` Ard Biesheuvel
2024-12-02 11:38 ` Ryan Roberts
2024-12-03  2:46 ` Gavin Shan
2024-12-10 18:34 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®