All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64/cpufeature: Unexport set_cpu_feature()
@ 2022-06-15 19:15 Mark Brown
  2022-06-16  8:57 ` Suzuki K Poulose
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mark Brown @ 2022-06-15 19:15 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Suzuki K Poulose
  Cc: linux-arm-kernel, Mark Brown

We currently export set_cpu_feature() to modules but there are no in tree
users that can be built as modules and it is hard to see cases where it
would make sense for there to be any such users. Remove the export to avoid
anyone else having to worry about why it is there and ensure that any users
that do get added get a bit more visiblity.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/kernel/cpufeature.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 79fac13ab2ef..8d88433de81d 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -3101,7 +3101,6 @@ void cpu_set_feature(unsigned int num)
 	WARN_ON(num >= MAX_CPU_FEATURES);
 	elf_hwcap |= BIT(num);
 }
-EXPORT_SYMBOL_GPL(cpu_set_feature);
 
 bool cpu_have_feature(unsigned int num)
 {
-- 
2.30.2


_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] arm64/cpufeature: Unexport set_cpu_feature()
  2022-06-15 19:15 [PATCH] arm64/cpufeature: Unexport set_cpu_feature() Mark Brown
@ 2022-06-16  8:57 ` Suzuki K Poulose
  2022-06-16  9:23   ` Mark Brown
  2022-06-16  9:15 ` Mark Rutland
  2022-06-16 17:54 ` Catalin Marinas
  2 siblings, 1 reply; 6+ messages in thread
From: Suzuki K Poulose @ 2022-06-16  8:57 UTC (permalink / raw)
  To: Mark Brown, Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel

On 15/06/2022 20:15, Mark Brown wrote:
> We currently export set_cpu_feature() to modules but there are no in tree
> users that can be built as modules and it is hard to see cases where it
> would make sense for there to be any such users. Remove the export to avoid
> anyone else having to worry about why it is there and ensure that any users
> that do get added get a bit more visiblity.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>

Also, it doesn't sound safe to expose this to the modules anyways.

Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>

> ---
>   arch/arm64/kernel/cpufeature.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 79fac13ab2ef..8d88433de81d 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -3101,7 +3101,6 @@ void cpu_set_feature(unsigned int num)
>   	WARN_ON(num >= MAX_CPU_FEATURES);
>   	elf_hwcap |= BIT(num);
>   }
> -EXPORT_SYMBOL_GPL(cpu_set_feature);
>   
>   bool cpu_have_feature(unsigned int num)
>   {


_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] arm64/cpufeature: Unexport set_cpu_feature()
  2022-06-15 19:15 [PATCH] arm64/cpufeature: Unexport set_cpu_feature() Mark Brown
  2022-06-16  8:57 ` Suzuki K Poulose
@ 2022-06-16  9:15 ` Mark Rutland
  2022-06-16  9:35   ` Mark Brown
  2022-06-16 17:54 ` Catalin Marinas
  2 siblings, 1 reply; 6+ messages in thread
From: Mark Rutland @ 2022-06-16  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Catalin Marinas, Will Deacon, Suzuki K Poulose, linux-arm-kernel

On Wed, Jun 15, 2022 at 08:15:04PM +0100, Mark Brown wrote:
> We currently export set_cpu_feature() to modules but there are no in tree
> users that can be built as modules and it is hard to see cases where it
> would make sense for there to be any such users. Remove the export to avoid
> anyone else having to worry about why it is there and ensure that any users
> that do get added get a bit more visiblity.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>

Looking through the git history, the exposed was added in commit:

  aec0bff757c93748 ("arm64: HWCAP: encapsulate elf_hwcap")

... but even then there didn't appear to be any in-tree modular user, and the
commit message didn't explain why.

Otherwise, this definitely seems like something we shouldn't be exporting, so
FWIW:

  Reviewed-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/kernel/cpufeature.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 79fac13ab2ef..8d88433de81d 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -3101,7 +3101,6 @@ void cpu_set_feature(unsigned int num)
>  	WARN_ON(num >= MAX_CPU_FEATURES);
>  	elf_hwcap |= BIT(num);
>  }
> -EXPORT_SYMBOL_GPL(cpu_set_feature);
>  
>  bool cpu_have_feature(unsigned int num)
>  {
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] arm64/cpufeature: Unexport set_cpu_feature()
  2022-06-16  8:57 ` Suzuki K Poulose
@ 2022-06-16  9:23   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-06-16  9:23 UTC (permalink / raw)
  To: Suzuki K Poulose; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 586 bytes --]

On Thu, Jun 16, 2022 at 09:57:27AM +0100, Suzuki K Poulose wrote:
> On 15/06/2022 20:15, Mark Brown wrote:

> > We currently export set_cpu_feature() to modules but there are no in tree
> > users that can be built as modules and it is hard to see cases where it
> > would make sense for there to be any such users. Remove the export to avoid
> > anyone else having to worry about why it is there and ensure that any users
> > that do get added get a bit more visiblity.

> Also, it doesn't sound safe to expose this to the modules anyways.

Indeed, when I said worry I really meant it.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] arm64/cpufeature: Unexport set_cpu_feature()
  2022-06-16  9:15 ` Mark Rutland
@ 2022-06-16  9:35   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-06-16  9:35 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Catalin Marinas, Will Deacon, Suzuki K Poulose, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 568 bytes --]

On Thu, Jun 16, 2022 at 10:15:26AM +0100, Mark Rutland wrote:

> Looking through the git history, the exposed was added in commit:

>   aec0bff757c93748 ("arm64: HWCAP: encapsulate elf_hwcap")

> ... but even then there didn't appear to be any in-tree modular user, and the
> commit message didn't explain why.

Prior to that commit the function was a static inline in the header and
the variable it manipulated was exported, presumably for the read side
which is more sensible, so it looks like it was just preserving the
status quo without really thinking about it.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] arm64/cpufeature: Unexport set_cpu_feature()
  2022-06-15 19:15 [PATCH] arm64/cpufeature: Unexport set_cpu_feature() Mark Brown
  2022-06-16  8:57 ` Suzuki K Poulose
  2022-06-16  9:15 ` Mark Rutland
@ 2022-06-16 17:54 ` Catalin Marinas
  2 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2022-06-16 17:54 UTC (permalink / raw)
  To: Mark Brown, Will Deacon, Suzuki K Poulose; +Cc: linux-arm-kernel

On Wed, 15 Jun 2022 20:15:04 +0100, Mark Brown wrote:
> We currently export set_cpu_feature() to modules but there are no in tree
> users that can be built as modules and it is hard to see cases where it
> would make sense for there to be any such users. Remove the export to avoid
> anyone else having to worry about why it is there and ensure that any users
> that do get added get a bit more visiblity.
> 
> 
> [...]

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

[1/1] arm64/cpufeature: Unexport set_cpu_feature()
      https://git.kernel.org/arm64/c/3f77a1d0570e

-- 
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] 6+ messages in thread

end of thread, other threads:[~2022-06-16 17:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 19:15 [PATCH] arm64/cpufeature: Unexport set_cpu_feature() Mark Brown
2022-06-16  8:57 ` Suzuki K Poulose
2022-06-16  9:23   ` Mark Brown
2022-06-16  9:15 ` Mark Rutland
2022-06-16  9:35   ` Mark Brown
2022-06-16 17:54 ` Catalin Marinas

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.