From patchwork Thu Jan 25 01:40:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 1890442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TL3Tk4QY1z1yS7 for ; Thu, 25 Jan 2024 12:42:02 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rSoke-0004Ak-3L; Thu, 25 Jan 2024 01:41:56 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rSokb-0004AP-7W for kernel-team@lists.ubuntu.com; Thu, 25 Jan 2024 01:41:53 +0000 Received: from localhost.localdomain (1.general.cascardo.us.vpn [10.172.70.58]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 1B05B3F4BE for ; Thu, 25 Jan 2024 01:41:51 +0000 (UTC) From: Thadeu Lima de Souza Cascardo To: kernel-team@lists.ubuntu.com Subject: [SRU Mantic 1/1] UBUNTU: [Config]: set ARCH_MMAP_RND_{COMPAT_, }BITS to the maximum Date: Wed, 24 Jan 2024 22:40:11 -0300 Message-Id: <20240125014011.3859733-2-cascardo@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240125014011.3859733-1-cascardo@canonical.com> References: <20240125014011.3859733-1-cascardo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1983357 Specially given that some mappings may now be aligned to the PMD, a big chunk of the randomization is being lost. In some cases, like 32-bit programs on x86, there are no random bits left when defaulting to the minimum. Defaulting to the maximum may lead to programs breaking, specially the ones running on limited virtual address space. Those should have moved to 64-bit anyway. Signed-off-by: Thadeu Lima de Souza Cascardo --- debian.master/config/annotations | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian.master/config/annotations b/debian.master/config/annotations index b2827399baf6..f8ce3c70213c 100644 --- a/debian.master/config/annotations +++ b/debian.master/config/annotations @@ -1333,10 +1333,10 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT policy<{'amd64': 'y', 'armhf': ' CONFIG_ARCH_MIGHT_HAVE_PC_SERIO policy<{'amd64': 'y', 'ppc64el': 'y'}> CONFIG_ARCH_MILBEAUT policy<{'armhf': 'y'}> CONFIG_ARCH_MILBEAUT_M10V policy<{'armhf': 'y'}> -CONFIG_ARCH_MMAP_RND_BITS policy<{'amd64': '28', 'arm64': '18', 'armhf': '8', 'ppc64el': '28', 'riscv64': '18'}> +CONFIG_ARCH_MMAP_RND_BITS policy<{'amd64': '32', 'arm64': '33', 'arm64-generic-64k': '29', 'armhf': '16', 'ppc64el': '29', 'riscv64': '24'}> CONFIG_ARCH_MMAP_RND_BITS_MAX policy<{'amd64': '32', 'arm64': '33', 'arm64-generic-64k': '29', 'armhf': '16', 'ppc64el': '29', 'riscv64': '24'}> CONFIG_ARCH_MMAP_RND_BITS_MIN policy<{'amd64': '28', 'arm64': '18', 'arm64-generic-64k': '14', 'armhf': '8', 'ppc64el': '14', 'riscv64': '18'}> -CONFIG_ARCH_MMAP_RND_COMPAT_BITS policy<{'amd64': '8', 'arm64': '11', 'ppc64el': '8'}> +CONFIG_ARCH_MMAP_RND_COMPAT_BITS policy<{'amd64': '16', 'arm64': '16', 'ppc64el': '13', 'riscv64': '17'}> CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX policy<{'amd64': '16', 'arm64': '16', 'ppc64el': '13', 'riscv64': '17'}> CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN policy<{'amd64': '8', 'arm64': '11', 'arm64-generic-64k': '7', 'ppc64el': '7', 'riscv64': '8'}> CONFIG_ARCH_MMP policy<{'armhf': 'n'}>