arm64/cpufeature: Unexport set_cpu_feature()
PATCH 1/1 arm64/cpufeature: Unexport set_cpu_feature()
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.
--- arch/arm64/kernel/cpufeature.c | 1 - 1 file changed, 1 deletion(-)
arch/arm64/kernel/cpufeature.c +0 -1
@@ -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) {
Signature · 7 lines
2.30.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · 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 <[email protected]>
Also, it doesn't sound safe to expose this to the modules anyways.
Quoted 9 lines
--- arch/arm64/kernel/cpufeature.c | 1 - 1 file changed, 1 deletion(-)arch/arm64/kernel/cpufeature.c +0
-0
arch/arm64/kernel/cpufeature.c void cpu_set_feature(unsigned int num) · line 3106
Quoted 7 lines
arch/arm64/kernel/cpufeature.c +0
-1@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 9 lines · Suzuki K Poulose
Quoted 5 lines · 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.Also, it doesn't sound safe to expose this to the modules anyways.
Indeed, when I said worry I really meant it.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · 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 <[email protected]>
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:
Mark.
Quoted 24 lines
--- arch/arm64/kernel/cpufeature.c | 1 - 1 file changed, 1 deletion(-)arch/arm64/kernel/cpufeature.c +0
-1@@ -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) {Signature · 7 lines
2.30.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 6 lines · Mark Rutland
Looking through the git history, the exposed was added in commit:
aec0bff757c93748("arm64: HWCAP: encapsulateelf_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.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 8 lines · 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.[...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64/cpufeature: Unexport set_cpu_feature()
https://git.kernel.org/arm64/c/3f77a1d0570e
Signature · 7 lines
Catalin _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel