Message ID | 20240214122845.2033971-57-ardb+git@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7503C48BED for <linux-arm-kernel@archiver.kernel.org>; Wed, 14 Feb 2024 13:30:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=3Ya46n3I+9bbknHm8/nABdlAn7IavufdZIt3i2CYrxQ=; b=aV2lBrLH+DJVaniFRfBzxKKb4P bLX4zqwERmzrVSf28Lca/80y5vrEGvkagnn368eFFlLzznwLr1BlFUtFFPrqc4C+HmwjrbsZk1VHe uC4KJH0sbaZV8GZpljxdyQ5UNiduRAZnmvqqUeEUl/bcfIPXx9HD7MJ3s/EpsV0tQ9fy0pD9dYPBT zbcywcC3Rdhsdgn/hHotaxwsUUaSkFK0JQpsrD4JAsIKu+ZIogxwXjmYc+q04aSBlps4XLvkStvTM FySg2hXblEH3jsycGbu62SQQ3AsY8dHAdO5hQSSF33I9/Vb/gr9JwQjogw68XqcEh+A+JKcSvUXTp p7M7MiNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raFLa-0000000D1lc-2Us3; Wed, 14 Feb 2024 13:30:46 +0000 Received: from mail-wm1-x34a.google.com ([2a00:1450:4864:20::34a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raEOt-0000000CoPK-41sd for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 12:30:12 +0000 Received: by mail-wm1-x34a.google.com with SMTP id 5b1f17b1804b1-40fd153b5c3so3275395e9.1 for <linux-arm-kernel@lists.infradead.org>; Wed, 14 Feb 2024 04:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707913806; x=1708518606; darn=lists.infradead.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=GHienn26NLkDg8GQxTAgXIDcX5IvttP8vOHFNDCy9GM=; b=ORO/YbJXFmHF+M40do/CbXNPYUvQiYfsKfHSxKcgpJoTFkHpUsAmXxGeJWEeSor5+d FwiL51r9rQlNWiPp3Vgu0N9asExyThelclEP/3zd0iPlCi1MFh16m/xFJmP8tISMj9JD +txPYa7jpCkJUJHmSvzpGC/ss9GHhW5TTjKbViPlcGWpe62pUWYGitFj0f8eeEYG1OwV w3U3DOuNQ+o9IjpAkFHBHAXCJmbHG0qUhg1Mmh+/ROnXBrtXLHTmhwBSchFzlhjRCYm9 3VV7RV/cqLhoUJ9moTt2YM68GnDa6HViovF/Bl9WGSa3z87QINlSccWNyTLGyF0VDsF7 qj2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707913806; x=1708518606; 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=GHienn26NLkDg8GQxTAgXIDcX5IvttP8vOHFNDCy9GM=; b=KJCzKxMlHAQn+bDc9Uqx2PIG0TxdvIUoIhu3wm/arYBHDrybum3rasxulkOKKlEBCJ hSQrOddZNfkSv+DYepJ1JTsdKwv07qCv0Ctb2ILivwUmGFCC2oFo2yXtWZSQp5PeFGKT asNrzgTOl4jjHrTBXTt/kRRjmyzg4Vt0vS3s5F68J0Z+0gP408bGC4NFxAXoVNAE8j1b DAlZXMmQ58AgfvLXaRNOkgUdknop8Di3I0kUx3rQ0K5QzxnlQbm4M72ObF3IWSbZm2oB l7ynLZm9dn7e36QxUCZCYFbnpLZdnA+zq9SAcKs7AhBd2Ouj0zMYIIC8d7DSY+vkiJ4h K28Q== X-Gm-Message-State: AOJu0Yxlbj7bT9EtpiJISow8JV8WiYecR/uKdsB2l5z7buWPhfIr3UXu BFDOax4SJIwMIjRijyT5b8ceV0WsBBPNXMXcpc4jwje/FZdMlGc+R/ZwMmAWBXF5EWJMy4bJJbb ok6tDOgkMmlqB/+RYmjRJ6IchpH/8xTqwpRUrF94NAXQvfzf0uHG8lFzS+tSW64yu6iqbz2KjJm itfX9o3g1c3kHNO/hx0s6O/H06EXbsIBtzI0cDNNjE X-Google-Smtp-Source: AGHT+IGzja8vYqa3pb+GDOKNV31TQPqv/BXaWaumHWVSi8COK8lhOMvS8nxPSECapMhTDeoalBiO/D1a X-Received: from palermo.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:118a]) (user=ardb job=sendgmr) by 2002:a05:600c:3d91:b0:411:e008:d86c with SMTP id bi17-20020a05600c3d9100b00411e008d86cmr46899wmb.4.1707913805862; Wed, 14 Feb 2024 04:30:05 -0800 (PST) Date: Wed, 14 Feb 2024 13:28:58 +0100 In-Reply-To: <20240214122845.2033971-45-ardb+git@google.com> Mime-Version: 1.0 References: <20240214122845.2033971-45-ardb+git@google.com> X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Developer-Signature: v=1; a=openpgp-sha256; l=1646; i=ardb@kernel.org; h=from:subject; bh=7NJV+O5Gti5YrDiC4EJgS3VtX3sXg64sBlUrZ/2tWI8=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIfXMJu5jl7ddO/qSc++R8FcME1ymHEvn7th+RSBvYXZcd Zr/Sw7HjlIWBjEOBlkxRRaB2X/f7Tw9UarWeZYszBxWJpAhDFycAjCRa4IM/+O+PdNbYn5tQ9u5 ufxWnw/ffjK3uodp5lqOjbrHppZ9i73C8Fdo4+VnlwrL386sKv46W0i5vMdC739Xb0v6/MW9zho 5N7kA X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Message-ID: <20240214122845.2033971-57-ardb+git@google.com> Subject: [PATCH v8 12/43] arm64: idreg-override: Create a pseudo feature for rodata=off From: Ard Biesheuvel <ardb+git@google.com> To: linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel <ardb@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Ryan Roberts <ryan.roberts@arm.com>, Anshuman Khandual <anshuman.khandual@arm.com>, Kees Cook <keescook@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_043008_235130_8E7295EE X-CRM114-Status: GOOD ( 13.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
arm64: Add support for LPA2 and WXN at stage 1
|
expand
|
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index e309255b7f04..03c34242bfc7 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -17,6 +17,7 @@ #define ARM64_SW_FEATURE_OVERRIDE_NOKASLR 0 #define ARM64_SW_FEATURE_OVERRIDE_HVHE 4 +#define ARM64_SW_FEATURE_OVERRIDE_RODATA_OFF 8 #ifndef __ASSEMBLY__ diff --git a/arch/arm64/kernel/pi/idreg-override.c b/arch/arm64/kernel/pi/idreg-override.c index f9e05c10faab..e4bcabcc6860 100644 --- a/arch/arm64/kernel/pi/idreg-override.c +++ b/arch/arm64/kernel/pi/idreg-override.c @@ -159,6 +159,7 @@ static const struct ftr_set_desc sw_features __prel64_initconst = { .fields = { FIELD("nokaslr", ARM64_SW_FEATURE_OVERRIDE_NOKASLR, NULL), FIELD("hvhe", ARM64_SW_FEATURE_OVERRIDE_HVHE, hvhe_filter), + FIELD("rodataoff", ARM64_SW_FEATURE_OVERRIDE_RODATA_OFF, NULL), {} }, }; @@ -190,6 +191,7 @@ static const struct { { "arm64.nomops", "id_aa64isar2.mops=0" }, { "arm64.nomte", "id_aa64pfr1.mte=0" }, { "nokaslr", "arm64_sw.nokaslr=1" }, + { "rodata=off", "arm64_sw.rodataoff=1" }, }; static int __init parse_hexdigit(const char *p, u64 *v)