All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
@ 2022-01-10  6:41 Anshuman Khandual
  2022-01-10 10:52   ` Catalin Marinas
  2022-01-11 10:19   ` Catalin Marinas
  0 siblings, 2 replies; 8+ messages in thread
From: Anshuman Khandual @ 2022-01-10  6:41 UTC (permalink / raw)
  To: linux-mm
  Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Andrew Morton, linux-arm-kernel,
	x86, linux-kernel

ARCH_HAS_FILTER_PGPROT config has duplicate definitions on platforms that
subscribe it. Instead make it a generic config option which can be selected
on applicable platforms when required.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: x86@kernel.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
This applies on v5.16

 arch/arm64/Kconfig | 4 +---
 arch/x86/Kconfig   | 3 ---
 mm/Kconfig         | 3 +++
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index c4207cf9bb17..652fe8d12f4a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -23,6 +23,7 @@ config ARM64
 	select ARCH_HAS_DMA_PREP_COHERENT
 	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
 	select ARCH_HAS_FAST_MULTIPLIER
+	select ARCH_HAS_FILTER_PGPROT
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_GCOV_PROFILE_ALL
 	select ARCH_HAS_GIGANTIC_PAGE
@@ -1178,9 +1179,6 @@ config HW_PERF_EVENTS
 	def_bool y
 	depends on ARM_PMU
 
-config ARCH_HAS_FILTER_PGPROT
-	def_bool y
-
 # Supported by clang >= 7.0
 config CC_HAVE_SHADOW_CALL_STACK
 	def_bool $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5c2ccb85f2ef..d9594e05fddb 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -328,9 +328,6 @@ config GENERIC_CALIBRATE_DELAY
 config ARCH_HAS_CPU_RELAX
 	def_bool y
 
-config ARCH_HAS_FILTER_PGPROT
-	def_bool y
-
 config HAVE_SETUP_PER_CPU_AREA
 	def_bool y
 
diff --git a/mm/Kconfig b/mm/Kconfig
index 356f4f2c779e..dbf9daa4a29b 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -766,6 +766,9 @@ config IDLE_PAGE_TRACKING
 config ARCH_HAS_CACHE_LINE_SIZE
 	bool
 
+config ARCH_HAS_FILTER_PGPROT
+	bool
+
 config ARCH_HAS_PTE_DEVMAP
 	bool
 
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
  2022-01-10  6:41 [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT Anshuman Khandual
@ 2022-01-10 10:52   ` Catalin Marinas
  2022-01-11 10:19   ` Catalin Marinas
  1 sibling, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2022-01-10 10:52 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-mm, Will Deacon, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Andrew Morton, linux-arm-kernel, x86,
	linux-kernel

On Mon, Jan 10, 2022 at 12:11:36PM +0530, Anshuman Khandual wrote:
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5c2ccb85f2ef..d9594e05fddb 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -328,9 +328,6 @@ config GENERIC_CALIBRATE_DELAY
>  config ARCH_HAS_CPU_RELAX
>  	def_bool y
>  
> -config ARCH_HAS_FILTER_PGPROT
> -	def_bool y

Aren't you missing a select for x86?

-- 
Catalin

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

* Re: [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
@ 2022-01-10 10:52   ` Catalin Marinas
  0 siblings, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2022-01-10 10:52 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-mm, Will Deacon, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Andrew Morton, linux-arm-kernel, x86,
	linux-kernel

On Mon, Jan 10, 2022 at 12:11:36PM +0530, Anshuman Khandual wrote:
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5c2ccb85f2ef..d9594e05fddb 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -328,9 +328,6 @@ config GENERIC_CALIBRATE_DELAY
>  config ARCH_HAS_CPU_RELAX
>  	def_bool y
>  
> -config ARCH_HAS_FILTER_PGPROT
> -	def_bool y

Aren't you missing a select for x86?

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
  2022-01-10 10:52   ` Catalin Marinas
@ 2022-01-10 11:43     ` Anshuman Khandual
  -1 siblings, 0 replies; 8+ messages in thread
From: Anshuman Khandual @ 2022-01-10 11:43 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-mm, Will Deacon, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Andrew Morton, linux-arm-kernel, x86,
	linux-kernel



On 1/10/22 4:22 PM, Catalin Marinas wrote:
> On Mon, Jan 10, 2022 at 12:11:36PM +0530, Anshuman Khandual wrote:
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index 5c2ccb85f2ef..d9594e05fddb 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -328,9 +328,6 @@ config GENERIC_CALIBRATE_DELAY
>>  config ARCH_HAS_CPU_RELAX
>>  	def_bool y
>>  
>> -config ARCH_HAS_FILTER_PGPROT
>> -	def_bool y
> 
> Aren't you missing a select for x86?
> 

It already gets unconditionally selected in arch/x86/Kconfig.

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

* Re: [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
@ 2022-01-10 11:43     ` Anshuman Khandual
  0 siblings, 0 replies; 8+ messages in thread
From: Anshuman Khandual @ 2022-01-10 11:43 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: linux-mm, Will Deacon, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Andrew Morton, linux-arm-kernel, x86,
	linux-kernel



On 1/10/22 4:22 PM, Catalin Marinas wrote:
> On Mon, Jan 10, 2022 at 12:11:36PM +0530, Anshuman Khandual wrote:
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index 5c2ccb85f2ef..d9594e05fddb 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -328,9 +328,6 @@ config GENERIC_CALIBRATE_DELAY
>>  config ARCH_HAS_CPU_RELAX
>>  	def_bool y
>>  
>> -config ARCH_HAS_FILTER_PGPROT
>> -	def_bool y
> 
> Aren't you missing a select for x86?
> 

It already gets unconditionally selected in arch/x86/Kconfig.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
  2022-01-10  6:41 [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT Anshuman Khandual
@ 2022-01-11 10:19   ` Catalin Marinas
  2022-01-11 10:19   ` Catalin Marinas
  1 sibling, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2022-01-11 10:19 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-mm, Will Deacon, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Andrew Morton, linux-arm-kernel, x86,
	linux-kernel

On Mon, Jan 10, 2022 at 12:11:36PM +0530, Anshuman Khandual wrote:
> ARCH_HAS_FILTER_PGPROT config has duplicate definitions on platforms that
> subscribe it. Instead make it a generic config option which can be selected
> on applicable platforms when required.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: x86@kernel.org
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Assuming this goes in via the mm tree, for arm64:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

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

* Re: [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
@ 2022-01-11 10:19   ` Catalin Marinas
  0 siblings, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2022-01-11 10:19 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-mm, Will Deacon, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Andrew Morton, linux-arm-kernel, x86,
	linux-kernel

On Mon, Jan 10, 2022 at 12:11:36PM +0530, Anshuman Khandual wrote:
> ARCH_HAS_FILTER_PGPROT config has duplicate definitions on platforms that
> subscribe it. Instead make it a generic config option which can be selected
> on applicable platforms when required.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: x86@kernel.org
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Assuming this goes in via the mm tree, for arm64:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT
@ 2022-01-24  6:13 Anshuman Khandual
  0 siblings, 0 replies; 8+ messages in thread
From: Anshuman Khandual @ 2022-01-24  6:13 UTC (permalink / raw)
  To: linux-mm
  Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Andrew Morton, linux-arm-kernel,
	x86, linux-kernel

ARCH_HAS_FILTER_PGPROT config has duplicate definitions on platforms that
subscribe it. Instead make it a generic config option which can be selected
on applicable platforms when required.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: x86@kernel.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
This applies on v5.17-rc1

 arch/arm64/Kconfig | 4 +---
 arch/x86/Kconfig   | 3 ---
 mm/Kconfig         | 3 +++
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 6978140edfa4..cad609528e58 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -23,6 +23,7 @@ config ARM64
 	select ARCH_HAS_DMA_PREP_COHERENT
 	select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
 	select ARCH_HAS_FAST_MULTIPLIER
+	select ARCH_HAS_FILTER_PGPROT
 	select ARCH_HAS_FORTIFY_SOURCE
 	select ARCH_HAS_GCOV_PROFILE_ALL
 	select ARCH_HAS_GIGANTIC_PAGE
@@ -1166,9 +1167,6 @@ config HW_PERF_EVENTS
 	def_bool y
 	depends on ARM_PMU
 
-config ARCH_HAS_FILTER_PGPROT
-	def_bool y
-
 # Supported by clang >= 7.0
 config CC_HAVE_SHADOW_CALL_STACK
 	def_bool $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ebe8fc76949a..5f33a10d3dcc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -332,9 +332,6 @@ config GENERIC_CALIBRATE_DELAY
 config ARCH_HAS_CPU_RELAX
 	def_bool y
 
-config ARCH_HAS_FILTER_PGPROT
-	def_bool y
-
 config ARCH_HIBERNATION_POSSIBLE
 	def_bool y
 
diff --git a/mm/Kconfig b/mm/Kconfig
index 3326ee3903f3..257ed9c86de3 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -744,6 +744,9 @@ config IDLE_PAGE_TRACKING
 config ARCH_HAS_CACHE_LINE_SIZE
 	bool
 
+config ARCH_HAS_FILTER_PGPROT
+	bool
+
 config ARCH_HAS_PTE_DEVMAP
 	bool
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-01-24  6:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10  6:41 [PATCH] mm: Generalize ARCH_HAS_FILTER_PGPROT Anshuman Khandual
2022-01-10 10:52 ` Catalin Marinas
2022-01-10 10:52   ` Catalin Marinas
2022-01-10 11:43   ` Anshuman Khandual
2022-01-10 11:43     ` Anshuman Khandual
2022-01-11 10:19 ` Catalin Marinas
2022-01-11 10:19   ` Catalin Marinas
2022-01-24  6:13 Anshuman Khandual

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.