[SRU][K/Unstable][PATCH 1/1] UBUNTU: [Config] Disable CONFIG_COMPAT on RISC-V

Emil Renner Berthing emil.renner.berthing at canonical.com
Tue Jun 28 08:00:15 UTC 2022


BugLink: https://bugs.launchpad.net/bugs/1980061

This sets CONFIG_COMPAT=n for riscv64 kernels. Enabling it allows 32bit
binaries to be run on 64bit kernels, but requires hardware support. So
far no chips have been released that support it and neither does
upstream Qemu. Also Ubuntu doesn't ship 32bit RISC-V binaries, so
disable this feature for now.

Signed-off-by: Emil Renner Berthing <emil.renner.berthing at canonical.com>
---
 debian.master/config/amd64/config.common.amd64     | 1 +
 debian.master/config/annotations                   | 6 +++---
 debian.master/config/arm64/config.common.arm64     | 1 +
 debian.master/config/config.common.ubuntu          | 1 -
 debian.master/config/ppc64el/config.common.ppc64el | 1 +
 debian.master/config/riscv64/config.common.riscv64 | 2 +-
 debian.master/config/s390x/config.common.s390x     | 1 +
 7 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/debian.master/config/amd64/config.common.amd64 b/debian.master/config/amd64/config.common.amd64
index ae25cbc87c39..73abfdd0a295 100644
--- a/debian.master/config/amd64/config.common.amd64
+++ b/debian.master/config/amd64/config.common.amd64
@@ -67,6 +67,7 @@ CONFIG_CDROM_PKTCDVD=m
 CONFIG_CMDLINE_PARTITION=y
 CONFIG_COMEDI=m
 CONFIG_COMMON_CLK=y
+CONFIG_COMPAT=y
 CONFIG_COUNTER=m
 CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
 CONFIG_CRAMFS=m
diff --git a/debian.master/config/annotations b/debian.master/config/annotations
index 7cdb31fe4c31..0fdb2c6a89a9 100644
--- a/debian.master/config/annotations
+++ b/debian.master/config/annotations
@@ -9,7 +9,7 @@ CONFIG_DEBUG_KERNEL                             note<required debug option>
 
 # Menu: ROOT
 CONFIG_LIVEPATCH                                policy<{'amd64': 'y', 'ppc64el': 'y', 's390x': 'y'}>
-CONFIG_COMPAT                                   policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
+CONFIG_COMPAT                                   policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 'riscv64': 'n', 's390x': 'y'}>
 CONFIG_ACPI_PRMT                                policy<{'amd64': 'y'}>
 
 # Menu: ACPI (Advanced Configuration and Power Interface) Support
@@ -11164,7 +11164,7 @@ CONFIG_SECCOMP_CACHE_DEBUG                      policy<{'amd64': 'n', 'arm64': '
 CONFIG_STACKPROTECTOR                           policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y'}>
 CONFIG_STACKPROTECTOR_STRONG                    policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y'}>
 CONFIG_ARCH_MMAP_RND_BITS                       policy<{'amd64': '28', 'arm64': '18', 'armhf': '8', 'ppc64el': '28', 'riscv64': '18'}>
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS                policy<{'amd64': '8', 'arm64': '11', 'ppc64el': '8', 'riscv64': '8'}>
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS                policy<{'amd64': '8', 'arm64': '11', 'ppc64el': '8'}>
 CONFIG_COMPAT_32BIT_TIME                        policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_VMAP_STACK                               policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'riscv64': 'n', 's390x': 'y'}>
 CONFIG_RANDOMIZE_KSTACK_OFFSET                  policy<{'amd64': 'y', 'arm64': 'y', 's390x': 'y'}>
@@ -12437,7 +12437,7 @@ CONFIG_NF_FLOW_TABLE_INET                       policy<{'amd64': 'm', 'arm64': '
 
 # Menu: Networking support >> Networking options >> Network packet filtering framework (Netfilter) >> Core Netfilter Configuration >> Netfilter Xtables support (required for ip_tables)
 CONFIG_NETFILTER_XTABLES                        policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
-CONFIG_NETFILTER_XTABLES_COMPAT                 policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
+CONFIG_NETFILTER_XTABLES_COMPAT                 policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 'riscv64': '-', 's390x': 'y'}>
 CONFIG_NETFILTER_XT_MARK                        policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
 CONFIG_NETFILTER_XT_CONNMARK                    policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
 CONFIG_NETFILTER_XT_SET                         policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
diff --git a/debian.master/config/arm64/config.common.arm64 b/debian.master/config/arm64/config.common.arm64
index 999452da4665..ae43a5b2e7c4 100644
--- a/debian.master/config/arm64/config.common.arm64
+++ b/debian.master/config/arm64/config.common.arm64
@@ -72,6 +72,7 @@ CONFIG_COMEDI=m
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AXG_AUDIO=m
 CONFIG_COMMON_CLK_XLNX_CLKWZRD=m
+CONFIG_COMPAT=y
 CONFIG_COUNTER=m
 # CONFIG_CPU_BIG_ENDIAN is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu
index 6148d9e8186a..d6b1957e57a0 100644
--- a/debian.master/config/config.common.ubuntu
+++ b/debian.master/config/config.common.ubuntu
@@ -2175,7 +2175,6 @@ CONFIG_COMMON_RESET_HI3660=m
 CONFIG_COMMON_RESET_HI6220=m
 CONFIG_COMPACTION=y
 CONFIG_COMPAL_LAPTOP=m
-CONFIG_COMPAT=y
 CONFIG_COMPAT_32=y
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_COMPAT_BINFMT_ELF=y
diff --git a/debian.master/config/ppc64el/config.common.ppc64el b/debian.master/config/ppc64el/config.common.ppc64el
index f42478d06042..cc98a0a6930a 100644
--- a/debian.master/config/ppc64el/config.common.ppc64el
+++ b/debian.master/config/ppc64el/config.common.ppc64el
@@ -66,6 +66,7 @@ CONFIG_CMM=m
 CONFIG_COMEDI=m
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_XLNX_CLKWZRD=m
+CONFIG_COMPAT=y
 CONFIG_COUNTER=m
 # CONFIG_CPU_BIG_ENDIAN is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
diff --git a/debian.master/config/riscv64/config.common.riscv64 b/debian.master/config/riscv64/config.common.riscv64
index defd4cba83f2..8ed1cff72616 100644
--- a/debian.master/config/riscv64/config.common.riscv64
+++ b/debian.master/config/riscv64/config.common.riscv64
@@ -20,7 +20,6 @@ CONFIG_AQTION=m
 CONFIG_ARCH_MMAP_RND_BITS=18
 CONFIG_ARCH_MMAP_RND_BITS_MAX=24
 CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
 CONFIG_ARCNET=m
@@ -65,6 +64,7 @@ CONFIG_CMDLINE_PARTITION=y
 CONFIG_COMEDI=m
 CONFIG_COMMON_CLK=y
 # CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
+# CONFIG_COMPAT is not set
 # CONFIG_COUNTER is not set
 CONFIG_CRAMFS=m
 CONFIG_CRC7=y
diff --git a/debian.master/config/s390x/config.common.s390x b/debian.master/config/s390x/config.common.s390x
index f74d370fcc2f..242030babd09 100644
--- a/debian.master/config/s390x/config.common.s390x
+++ b/debian.master/config/s390x/config.common.s390x
@@ -54,6 +54,7 @@ CONFIG_CMA=y
 CONFIG_CMM=y
 # CONFIG_COMEDI is not set
 # CONFIG_COMMON_CLK is not set
+CONFIG_COMPAT=y
 # CONFIG_COUNTER is not set
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CRAMFS is not set
-- 
2.36.1




More information about the kernel-team mailing list