From b5ee4eca8e232a0fc9fc7dcd3cc31b60f6710024 Mon Sep 17 00:00:00 2001 From: Atemu Date: Thu, 7 Jul 2022 14:24:33 +0200 Subject: [PATCH 1/2] linux: disable ASHMEM on >= 5.18 Dropped by upstream, see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=721412ed3d819e767cac2b06646bf03aa158aaec It was marked as optional, so it didn't break our builds but resulted in: warning: unused option: ASHMEM Explicitly disable ASHMEM on kernels >=5.18 for clarity and fewer warnings --- pkgs/os-specific/linux/kernel/common-config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 5f0d5d380991..74db399841aa 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -911,7 +911,7 @@ let FSL_MC_UAPI_SUPPORT = mkIf (stdenv.hostPlatform.system == "aarch64-linux") (whenAtLeast "5.12" yes); - ASHMEM = { optional = true; tristate = whenAtLeast "5.0" "y";}; + ASHMEM = { optional = true; tristate = whenBetween "5.0" "5.18" "y";}; ANDROID = { optional = true; tristate = whenAtLeast "5.0" "y";}; ANDROID_BINDER_IPC = { optional = true; tristate = whenAtLeast "5.0" "y";}; ANDROID_BINDERFS = { optional = true; tristate = whenAtLeast "5.0" "y";}; From 339ce46af2c4ff6f52b8ccb1dc3c87abf542b091 Mon Sep 17 00:00:00 2001 From: Atemu Date: Thu, 7 Jul 2022 14:33:52 +0200 Subject: [PATCH 2/2] nixos/waydroid: add FIXME regarding ASHMEM removal in 5.18 --- nixos/modules/virtualisation/waydroid.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/waydroid.nix b/nixos/modules/virtualisation/waydroid.nix index 2c0b658948dd..84abf6065810 100644 --- a/nixos/modules/virtualisation/waydroid.nix +++ b/nixos/modules/virtualisation/waydroid.nix @@ -34,7 +34,7 @@ in system.requiredKernelConfig = with config.lib.kernelConfig; [ (isEnabled "ANDROID_BINDER_IPC") (isEnabled "ANDROID_BINDERFS") - (isEnabled "ASHMEM") + (isEnabled "ASHMEM") # FIXME Needs memfd support instead on Linux 5.18 and waydroid 1.2.1 ]; /* NOTE: we always enable this flag even if CONFIG_PSI_DEFAULT_DISABLED is not on