Skip to contentSkip to conversation

arm64: Make ARMV8_DEPRECATED depend on SYSCTL

PATCH New Dave Martin 3 participants 3 messages Nov 6, 2017 – Nov 7, 2017 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Make ARMV8_DEPRECATED depend on SYSCTL

If CONFIG_SYSCTL=n and CONFIG_ARMV8_DEPRECATED=y, the deprecated instruction emulation code currently leaks some memory at boot time, and won't have any runtime control interface. This does not feel like useful or intended behaviour...

This patch adds a dependency on CONFIG_SYSCTL, so that such a kernel can't be built in the first place.

It's probably not worth adding the error-handling / cleanup code that would be needed to deal with this otherwise: people who desperately need the emulation can still enable SYSCTL.

---
 arch/arm64/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig +1 -0
index 1046074..df296b7 100644
@@ -807,6 +807,7 @@ config FORCE_MAX_ZONEORDER
 menuconfig ARMV8_DEPRECATED
 	bool "Emulate deprecated/obsolete ARMv8 instructions"
 	depends on COMPAT
+	depends on SYSCTL
 	help
 	  Legacy software support may require certain instructions
 	  that have been deprecated or obsoleted in the architecture.
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 arm64: Make ARMV8_DEPRECATED depend on SYSCTL

Quoted 5 lines · Dave Martin

If CONFIG_SYSCTL=n and CONFIG_ARMV8_DEPRECATED=y, the deprecated instruction emulation code currently leaks some memory at boot time, and won't have any runtime control interface. This does not feel like useful or intended behaviour...

Quoted 8 lines

This patch adds a dependency on CONFIG_SYSCTL, so that such a kernel can't be built in the first place.

It's probably not worth adding the error-handling / cleanup code that would be needed to deal with this otherwise: people who desperately need the emulation can still enable SYSCTL.

Makes sense here, but I think we might still want to apply the patch I proposed for other users.

#2 lore raw

PATCH 1/1 arm64: Make ARMV8_DEPRECATED depend on SYSCTL

In reply to Dave Martin
Quoted 22 lines · Dave Martin

If CONFIG_SYSCTL=n and CONFIG_ARMV8_DEPRECATED=y, the deprecated instruction emulation code currently leaks some memory at boot time, and won't have any runtime control interface. This does not feel like useful or intended behaviour...

This patch adds a dependency on CONFIG_SYSCTL, so that such a kernel can't be built in the first place.

It's probably not worth adding the error-handling / cleanup code that would be needed to deal with this otherwise: people who desperately need the emulation can still enable SYSCTL.

---
 arch/arm64/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig +0 -0
index 1046074..df296b7 100644

arch/arm64/Kconfig config FORCE_MAX_ZONEORDER · line 813

Quoted 7 lines
arch/arm64/Kconfig +1 -0
@@ -807,6 +807,7 @@ config FORCE_MAX_ZONEORDER
 menuconfig ARMV8_DEPRECATED
 	bool "Emulate deprecated/obsolete ARMv8 instructions"
 	depends on COMPAT
+	depends on SYSCTL
 	help
 	  Legacy software support may require certain instructions
 	  that have been deprecated or obsoleted in the architecture.

Adding the dependency makes sense.

Thanks!