From patchwork Fri Jul 12 17:00:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Jackman X-Patchwork-Id: 13731985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72389C2BD09 for ; Fri, 12 Jul 2024 17:01:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BF99B6B0093; Fri, 12 Jul 2024 13:01:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BA7516B0095; Fri, 12 Jul 2024 13:01:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F9DF6B0096; Fri, 12 Jul 2024 13:01:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 7D1E26B0093 for ; Fri, 12 Jul 2024 13:01:02 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id F1DB91A0C40 for ; Fri, 12 Jul 2024 17:01:01 +0000 (UTC) X-FDA: 82331715522.29.65C4B56 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) by imf07.hostedemail.com (Postfix) with ESMTP id CEBF840039 for ; Fri, 12 Jul 2024 17:00:58 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=iax7Z+s3; spf=pass (imf07.hostedemail.com: domain of 3SWGRZggKCIwzqs02q3rw44w1u.s421y3AD-220Bqs0.47w@flex--jackmanb.bounces.google.com designates 209.85.221.73 as permitted sender) smtp.mailfrom=3SWGRZggKCIwzqs02q3rw44w1u.s421y3AD-220Bqs0.47w@flex--jackmanb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720803642; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=27EENIWQHHAHugBK1Q6SYWc3PF1x6i/tf/vuqqwaqlI=; b=kZ8QypKV+NvEMInY8EEogipCAcaiO4psfA1cY/BPZ/OJ36/ysRww5GmqRsdNC3ExajQ50Q MvDp5u0Sv2RvIbIFBDvN4PVBT1y1NJDu4VhJcQINAmLpygWm8gWyOP3GqSMDXAa6rRsEA5 mA/Htn99iCLDaMxdV/41CqYqq7WNW8k= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=iax7Z+s3; spf=pass (imf07.hostedemail.com: domain of 3SWGRZggKCIwzqs02q3rw44w1u.s421y3AD-220Bqs0.47w@flex--jackmanb.bounces.google.com designates 209.85.221.73 as permitted sender) smtp.mailfrom=3SWGRZggKCIwzqs02q3rw44w1u.s421y3AD-220Bqs0.47w@flex--jackmanb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720803642; a=rsa-sha256; cv=none; b=fXFEdXNXce15/yNDyrnGoXly9mcfzZTRMm9SbK+yBYQjDWeFUoY8Wb/KzAY/QIaJ8qBRU7 LQ2bqs/S8xvUMYt8EPc5oUJHcyMbJLJAHyHg6Zz9q9utXnEAFqGGSusQDd7YQRhyY6qcdK Flm44cdu56FMj70EgesFi95G4+/TW1c= Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-3678f403afaso1232089f8f.0 for ; Fri, 12 Jul 2024 10:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1720803657; x=1721408457; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=27EENIWQHHAHugBK1Q6SYWc3PF1x6i/tf/vuqqwaqlI=; b=iax7Z+s3AX+H0Iks5llBrUkX5vTedtTpmaiwv3S3TiMLVBiRIIGX2LQTMjIJpq6uFz 3Ye42uURDOrsHU/lXOEszbPS7+zPjNXFGYexmW/5QgQDpVKjJDzqPm11cuTFXw0opA/9 A6yt0zE8mq1zPEILnquNSv9ano40yvNZiHg+Br1hb16jvXKOgbLUSnbAsyKbz65oHhMJ ewfTGgNBijTUPvrylMolprpir48YJqSUDrKlZZkq6J2ZDsz6c+bgh09nzzhsEEaW3Ps5 4AwWzSHtvprCmBXhHYxjUM4EFBuuSVSTruq8pbrcLNLGkTR8XR7Xkvx2YIxbMWuJdf/G 4gcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720803657; x=1721408457; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=27EENIWQHHAHugBK1Q6SYWc3PF1x6i/tf/vuqqwaqlI=; b=J5Dn+GkBDP7VdliIOVbRWxwclqa9m5Gi9PTk7iYjVmYqfLbka0U2tXe4tcm5X091tu vhW1pSudxPiHgEw989tCugUrRj0tsFBP06bDCjzNu9tnWO/TQpijjzy73r+5GJHKDftA KmexWHN1gPMiV5tJMsB6LXitzHm44BOmWoVAIeF9iSLfb+BtmKZBoBwyL8fRVLAB0Cxx 0JCvAVYASvOGcFkBa7EEJEylN+r7dBiJxD4LJr7nJU3t3nxK8fZnDSmugRLSgfREDhKO BkGd+Ox4WC1+FkIj4MYZIvl8qZ50PJWO2pc24nHk/HfOPQhtSB5hQyj8dOlbjJNKZVWw S30A== X-Forwarded-Encrypted: i=1; AJvYcCWmuD8WOU6TSkmtWJsGZaIHEMINoIHDHDGImitmEPk7B1GBwNJH7CpPriI8UKKk4wA8Op34xtr3qdenewqi/7Rf7EY= X-Gm-Message-State: AOJu0YyUan+Oui4Xa5/oOxph8IYAzc74X7Wc43MjwNhezwdTaukLIOrV ZQPO9fW59QgpWK8P17i3bhGxVEjtHtipmIT3632vPKM5YmDDhtEidhRHh6gHIu643WRgZDC7rSS ThhGbAfjJVw== X-Google-Smtp-Source: AGHT+IGA7T3CScQphIzrB5GwbqwR/XvQ+ZJeEz+EAB7hHAYrv99hyozzic8O5c9/DkjRZkjaSXDa+Xm3xrwxfw== X-Received: from beeg.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:11db]) (user=jackmanb job=sendgmr) by 2002:a05:6000:14c:b0:360:727b:8b5d with SMTP id ffacd0b85a97d-367cea738dbmr25053f8f.6.1720803657248; Fri, 12 Jul 2024 10:00:57 -0700 (PDT) Date: Fri, 12 Jul 2024 17:00:20 +0000 In-Reply-To: <20240712-asi-rfc-24-v1-0-144b319a40d8@google.com> Mime-Version: 1.0 References: <20240712-asi-rfc-24-v1-0-144b319a40d8@google.com> X-Mailer: b4 0.14-dev Message-ID: <20240712-asi-rfc-24-v1-2-144b319a40d8@google.com> Subject: [PATCH 02/26] x86: Create CONFIG_MITIGATION_ADDRESS_SPACE_ISOLATION From: Brendan Jackman To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Sean Christopherson , Paolo Bonzini , Alexandre Chartre , Liran Alon , Jan Setje-Eilers , Catalin Marinas , Will Deacon , Mark Rutland , Andrew Morton , Mel Gorman , Lorenzo Stoakes , David Hildenbrand , Vlastimil Babka , Michal Hocko , Khalid Aziz , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Valentin Schneider , Paul Turner , Reiji Watanabe , Junaid Shahid , Ofir Weisse , Yosry Ahmed , Patrick Bellasi , KP Singh , Alexandra Sandulescu , Matteo Rizzo , Jann Horn Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, Brendan Jackman X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: CEBF840039 X-Stat-Signature: ouqencddppiasir57tgoybse3nfknotp X-HE-Tag: 1720803658-166212 X-HE-Meta: U2FsdGVkX1+XqHkTKkYd8+Eqni8fI6nwRWsyAFLp5Fy/BYxQRdAgCwU7LMK9AQwkCGNGAZzfIs9h8rxIC9/Gx1j1QafyPayOjWoWNd1T4uvS6A9/+J+e0/sGNckLMmu/5X7gYMhNRuL63Hm22XfU83UgrGbS5d36zub4Z1+z87VBOBpkmD8q2QNWrVHn2Ghi9xL62socvcgpC9l/nienQj2Zff3WTqiAH8v02zR6/TGVI4Gi+mdLs9ZPDGferiuz5VC01q3Lxth38VZWGwqZALQox9vfUGq19jYnOuSFYJteZugNrdJiPeneToX6CRH7c7U10A9faaYasFMXLgbEsJ9cjS4AsSj/LNIPDoKhwuzdZ84LO3Aeiv/PS3zpQCThf/eQ25lvnQ5zCYLJMtiYTO/FmKzue5OnT9NC6Pk8/2i++k/JIv9v2AuLHeSoKwhYdca/nXK/hIPs0hF77UU/np0mcZAlig6u20U7ATTK2ZkMr6riG2Lhfhybb2F+vz9nXcPSCiigreYRXpFkh//4gF8Am1Cp5YleiA8+MXjtjLz0CrWt3H7j/pn5CJwNXvv0P41tF4I3S1VbftAIMG+vJFAJIVDacE6c3SUHLfggeyeVlWvwqi8j2zLKWwfVk2TEOlNgI2F92gSSDVsaS63YrFPnyNTURp1d04in8uxE/0b+2W1U4p/vjAwVrVu1/aNDhRpPfq6JSjPjVfq056tztfO3+VLTYO+WuFLAB4A2PEqywtEsAbrB6dtj1kzZ4Z9tdXAb6nIacg0ufHz8qDxoVA/Mby+Whe9Hm7mcVRNJ5SaszW1EVpAamBrCGAC9ggsP4Dg6cEgHE1yV1L0MwuRXv3kcJQGmqjCh0E36GQuppTt//GcWZVv6VeDJlG/VqYSka37WNB783+kOL0Z4TaMpynBtHlqM1HgX1LDrSWH67BYNKMn9ISv+g5XpASr3xjezErqpQrj6Dfx7npJCnHZ GKThF9UO EeqMvJC1+BoadQB24C3we7qcw5KU4dpqWlOcZEA0b5PcuZNmkivockZDqZd2P+mf83a9rjS286T9lTsbli7qxDF2BAUrTWhEipV2RvmJVFLS48WrCMKq+YSLs0GqaFb+7XvSQLP2AaqmatWz4MmfPPmwBRWzZhKvGLfyXoW3oQMMmSJF15XG7jrk+V4XCJsPSR2AVz2MvIMjcLGsZ7wJbdiAuqXKxxR+Vxgl2lwjEwpCi06dOZ6Jqst0BLlfL4Cs3I1UNlkLq/oB0X+94uiS+uXjgI7Pj/hfw10hKJpM7fWvVQA7CTzdPMoGZOLiZN6nVpmV0r6e8O/RXbQewo4od/HABon3jal8s8WiTALEqsXpU6NE77tgWKMJPxNVm5Z7pV70C0ll5XyZEa7tYWtlPQ39MIahAWLodFQheTgfOL+jVicr7/0naiCu5RhlpCnztn67/Pk1GMD6fxKrXuCS1ZTbN4F4RiGM09zwaauF7BEzgLceg7nZcdb4h/U9UN39/Mb+RWn4IEaFoIisSzB4r1LQBYF1CQVcqMO5PYPhk/H076cORVXFN+F9/NqGhISyB9OLZ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Currently a nop config. Keeping as a separate commit for easy review of the boring bits. Later commits will use and enable this new config. This config is only added for non-UML x86_64 as other architectures do not yet have pending implementations. It also has somewhat artificial dependencies on !PARAVIRT and !KASAN which are explained in the Kconfig file. Co-developed-by: Junaid Shahid Signed-off-by: Brendan Jackman --- arch/alpha/include/asm/Kbuild | 1 + arch/arc/include/asm/Kbuild | 1 + arch/arm/include/asm/Kbuild | 1 + arch/arm64/include/asm/Kbuild | 1 + arch/csky/include/asm/Kbuild | 1 + arch/hexagon/include/asm/Kbuild | 1 + arch/loongarch/include/asm/Kbuild | 1 + arch/m68k/include/asm/Kbuild | 1 + arch/microblaze/include/asm/Kbuild | 1 + arch/mips/include/asm/Kbuild | 1 + arch/nios2/include/asm/Kbuild | 1 + arch/openrisc/include/asm/Kbuild | 1 + arch/parisc/include/asm/Kbuild | 1 + arch/powerpc/include/asm/Kbuild | 1 + arch/riscv/include/asm/Kbuild | 1 + arch/s390/include/asm/Kbuild | 1 + arch/sh/include/asm/Kbuild | 1 + arch/sparc/include/asm/Kbuild | 1 + arch/um/include/asm/Kbuild | 1 + arch/x86/Kconfig | 19 +++++++++++++++++++ arch/xtensa/include/asm/Kbuild | 1 + include/asm-generic/asi.h | 5 +++++ 22 files changed, 44 insertions(+) diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index 396caece6d6d9..ca72ce3baca13 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild @@ -5,3 +5,4 @@ generic-y += agp.h generic-y += asm-offsets.h generic-y += kvm_para.h generic-y += mcs_spinlock.h +generic-y += asi.h diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild index 3c1afa524b9c2..60bdeffa7c31e 100644 --- a/arch/arc/include/asm/Kbuild +++ b/arch/arc/include/asm/Kbuild @@ -4,3 +4,4 @@ generic-y += kvm_para.h generic-y += mcs_spinlock.h generic-y += parport.h generic-y += user.h +generic-y += asi.h diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 03657ff8fbe3d..1e2c3d8dbbd99 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild @@ -6,3 +6,4 @@ generic-y += parport.h generated-y += mach-types.h generated-y += unistd-nr.h +generic-y += asi.h diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 4b6d2d52053e4..f95699a559309 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild @@ -5,6 +5,7 @@ generic-y += qrwlock.h generic-y += qspinlock.h generic-y += parport.h generic-y += user.h +generic-y += asi.h generated-y += cpucap-defs.h generated-y += sysreg-defs.h diff --git a/arch/csky/include/asm/Kbuild b/arch/csky/include/asm/Kbuild index 1117c28cb7e8a..5e49ccb571644 100644 --- a/arch/csky/include/asm/Kbuild +++ b/arch/csky/include/asm/Kbuild @@ -10,3 +10,4 @@ generic-y += qspinlock.h generic-y += parport.h generic-y += user.h generic-y += vmlinux.lds.h +generic-y += asi.h \ No newline at end of file diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 3ece3c93fe086..744ffbeeb7ae4 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild @@ -3,3 +3,4 @@ generic-y += extable.h generic-y += iomap.h generic-y += kvm_para.h generic-y += mcs_spinlock.h +generic-y += asi.h diff --git a/arch/loongarch/include/asm/Kbuild b/arch/loongarch/include/asm/Kbuild index 2dbec7853ae86..66fcd325d6083 100644 --- a/arch/loongarch/include/asm/Kbuild +++ b/arch/loongarch/include/asm/Kbuild @@ -27,3 +27,4 @@ generic-y += param.h generic-y += posix_types.h generic-y += resource.h generic-y += kvm_para.h +generic-y += asi.h diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 0dbf9c5c6faeb..faf0f135df4ab 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -4,3 +4,4 @@ generic-y += extable.h generic-y += kvm_para.h generic-y += mcs_spinlock.h generic-y += spinlock.h +generic-y += asi.h diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index a055f5dbe00a3..012e4bf83c134 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild @@ -8,3 +8,4 @@ generic-y += parport.h generic-y += syscalls.h generic-y += tlb.h generic-y += user.h +generic-y += asi.h diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild index 7ba67a0d6c97b..3191699298d80 100644 --- a/arch/mips/include/asm/Kbuild +++ b/arch/mips/include/asm/Kbuild @@ -13,3 +13,4 @@ generic-y += parport.h generic-y += qrwlock.h generic-y += qspinlock.h generic-y += user.h +generic-y += asi.h diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild index 7fe7437555fb4..bfdc4026c5b16 100644 --- a/arch/nios2/include/asm/Kbuild +++ b/arch/nios2/include/asm/Kbuild @@ -5,3 +5,4 @@ generic-y += kvm_para.h generic-y += mcs_spinlock.h generic-y += spinlock.h generic-y += user.h +generic-y += asi.h diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index c8c99b554ca4c..d137c4e08e369 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild @@ -7,3 +7,4 @@ generic-y += spinlock.h generic-y += qrwlock_types.h generic-y += qrwlock.h generic-y += user.h +generic-y += asi.h diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index 4fb596d94c893..3cbb4eb14712c 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild @@ -5,3 +5,4 @@ generic-y += agp.h generic-y += kvm_para.h generic-y += mcs_spinlock.h generic-y += user.h +generic-y += asi.h diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index 61a8d5555cd7e..103c7e2f66987 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild @@ -8,3 +8,4 @@ generic-y += mcs_spinlock.h generic-y += qrwlock.h generic-y += vtime.h generic-y += early_ioremap.h +generic-y += asi.h diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild index 504f8b7e72d41..08c199a56731e 100644 --- a/arch/riscv/include/asm/Kbuild +++ b/arch/riscv/include/asm/Kbuild @@ -9,3 +9,4 @@ generic-y += qrwlock.h generic-y += qrwlock_types.h generic-y += user.h generic-y += vmlinux.lds.h +generic-y += asi.h diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 4b904110d27cb..b5caf77e8d955 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild @@ -7,3 +7,4 @@ generated-y += unistd_nr.h generic-y += asm-offsets.h generic-y += kvm_types.h generic-y += mcs_spinlock.h +generic-y += asi.h diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index fc44d9c88b419..ea19e45158285 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild @@ -3,3 +3,4 @@ generated-y += syscall_table.h generic-y += kvm_para.h generic-y += mcs_spinlock.h generic-y += parport.h +generic-y += asi.h diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index 43b0ae4c2c211..cb9062c9be17f 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild @@ -4,3 +4,4 @@ generated-y += syscall_table_64.h generic-y += agp.h generic-y += kvm_para.h generic-y += mcs_spinlock.h +generic-y += asi.h diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index b2d834a29f3a9..1bcb16b09dc49 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild @@ -28,3 +28,4 @@ generic-y += trace_clock.h generic-y += kprobes.h generic-y += mm_hooks.h generic-y += vga.h +generic-y += asi.h diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 928820e61cb50..ff74aa53842ea 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2516,6 +2516,25 @@ config MITIGATION_PAGE_TABLE_ISOLATION See Documentation/arch/x86/pti.rst for more details. +config MITIGATION_ADDRESS_SPACE_ISOLATION + bool "Allow code to run with a reduced kernel address space" + default n + depends on X86_64 && !PARAVIRT && !KASAN && !UML + help + This feature provides the ability to run some kernel code + with a reduced kernel address space. This can be used to + mitigate some speculative execution attacks. + + The !PARAVIRT dependency is only because of lack of testing; in theory + the code is written to work under paravirtualization. In practice + there are likely to be unhandled cases, in particular concerning TLB + flushes. + + The !KASAN dependency is mainly because ASI creates a secondary + direct-map region in order to implement local-nonsensitive memory. + This dependencies will later be removed with extensions to the KASAN + implementation. + config MITIGATION_RETPOLINE bool "Avoid speculative indirect branches in kernel" select OBJTOOL if HAVE_OBJTOOL diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index fa07c686cbcc2..07cea6902f980 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild @@ -8,3 +8,4 @@ generic-y += parport.h generic-y += qrwlock.h generic-y += qspinlock.h generic-y += user.h +generic-y += asi.h diff --git a/include/asm-generic/asi.h b/include/asm-generic/asi.h new file mode 100644 index 0000000000000..c4d9a5ff860a9 --- /dev/null +++ b/include/asm-generic/asi.h @@ -0,0 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_GENERIC_ASI_H +#define __ASM_GENERIC_ASI_H + +#endif