From patchwork Thu Aug 22 17:48:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Gupta X-Patchwork-Id: 1975668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=yMjq+zBv; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=PktUxiQY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WqW2q6mLKz1yf6 for ; Fri, 23 Aug 2024 03:50:58 +1000 (AEST) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XMLyYnj0EUplIFqNSdxarJTz44i+paL5p13vhMoY6yU=; b=yMjq+zBvURPRtU 0aFw3yYEIgKwcbzVHN0Q5ieQ6Wn6ITMW4OX3db6SBAuXxcvWeY3zwsz5cDjmUJ+Ut97QocnNIQ6Ri TrEzUXXrQC05ilmvg/7yI9D37OLdelTjBd+c1tEDpiIE3Xfq1k3WHRnziKt5bJuUxOjr0Eo/lFe7q 2VkeMS6r46nopVdKXZF8prHRzMzv5zMJvJPeFVQOdf6us4Y4jKH7GYW8yO4u+OfevQKefy6C9GG3Q eX6iaLW14+HJo0puf5zGbLQn92MkyZsYNQUJNU3pr5kULKXg0Cms6WIJFQu2GiqCBlaeRJ2ydSXyn vEqSv5TvSH2mVZ8N5aoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shBxQ-0000000DrSh-0PbU; Thu, 22 Aug 2024 17:50:48 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shBvG-0000000Dr3U-33ov for opensbi@lists.infradead.org; Thu, 22 Aug 2024 17:48:36 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7141b04e7a3so941949b3a.3 for ; Thu, 22 Aug 2024 10:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1724348913; x=1724953713; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=m826Kf6N/xv1bMAB/HOkFq7sv0eDcIxBKBEwTe7pDe8=; b=PktUxiQY9b18SCDgHpveNHLTH63997eSll3Pv8k8uA0Uu40FrTpBjbnKKUhUE2OV9j fUlIBjJC++dtM7NhZDYj365XNKIWgrKEF8fHeYWqsMeRTXVdJ5/ARoWwrEfh9sFgD8Uj N2tRuWBb5RydglPikaNKNXBO9oh2ZAuGBCrW4F4roaCQJn4EY1pHnMrEY0RwjBHVnn0h cNDiGeqRvqLcaPaAKTAFHr/7Sr5lAvzb7MBtlrBs/kojgsBgPNxHX8LOA/B6hDUo6iun 6Oc15GL+OtI48T5TuplRB7UCTJlMnEDUxCu/IzI4I7qClcI2BPPmnb/kgO/zARJwqI4L iqgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724348913; x=1724953713; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=m826Kf6N/xv1bMAB/HOkFq7sv0eDcIxBKBEwTe7pDe8=; b=E3SKa8nGJN679OJ6sk5ACUqNmJquCiY6vgqC5P7LOG95lL+h6ekLESqS6zYaj20rB+ hMn57acagFICVU0jBGNmhqEzW0OD/HJdsveOw+8qGXho6QEYam/+5jgGw6dK2uGHVTTs i1Vbo5BRbf4uhJtAQw9Tba3xWRHkAAq8iQfGwARh4uavNhgkOnrVubTN3Te/hU3NFAFJ hnUO7U4IlXsxd/xDTAJX3lZR3fITB/2JQEw9xDrMCLyR4MsLXrpH0VVxuxh6WTFV8Vu4 0yTnSNj40Df5sSkHtHJKNZBo6knNbLKv5tklbUDDtH/l8FWzGNm6QQyGEBDTGagXxsJG bktQ== X-Gm-Message-State: AOJu0YwhT4Bd3+4qbMgfLSBGdF1Ybn56Wl3wgiXU2RlRmjhAUalGPbYX cOFA76ZAhLhoqj4QGtDae13MHvIrg4zjVnkPYUfigysnKg58wiohb2Oj1lnB3P7WXu+kJ25D4aS z X-Google-Smtp-Source: AGHT+IE0I50vZKJ6EzbB+GeW8bk7nemh2aYYVEHaesHav7zoRYuGPI4OTrMSUH76ySjt6BN7edy/ag== X-Received: by 2002:a05:6a00:17a8:b0:714:24dd:b3ca with SMTP id d2e1a72fcca58-71424ddb494mr7991357b3a.24.1724348913053; Thu, 22 Aug 2024 10:48:33 -0700 (PDT) Received: from debug.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7143430636esm1650251b3a.165.2024.08.22.10.48.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 10:48:32 -0700 (PDT) From: Deepak Gupta To: opensbi@lists.infradead.org Subject: [PATCH v3 0/4] zicfilp and zicfiss support in opensbi Date: Thu, 22 Aug 2024 10:48:24 -0700 Message-ID: <20240822174828.4031332-1-debug@rivosinc.com> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_104834_813483_DF49C3B5 X-CRM114-Status: UNSURE ( 7.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: v3 for zicfilp and zicfiss support in opensbi --- v3: - added fwft implementation for shadow stack and landing pad interface v2: - added mpelp for 32bit (mstatush) and its handling in trad redirection - removed default SSE enabling. it'll break s [...] Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:434 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: apatel@ventanamicro.com, anup@brainfault.org, atishp@rivosinc.com, cleger@rivosinc.com, Deepak Gupta Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org v3 for zicfilp and zicfiss support in opensbi --- v3: - added fwft implementation for shadow stack and landing pad interface v2: - added mpelp for 32bit (mstatush) and its handling in trad redirection - removed default SSE enabling. it'll break shadow stack enabled kernel - put sw check delegation at correct place Deepak Gupta (4): include: adding support for Zicfilp / Zicfiss encodings lib: sbi: Zicfilp/Zicfiss detection and elp cfi state reflect back in status lib: sbi: sw check exception delegation lib: sbi: fwft: implement landing pad and shadow stack fwft interface include/sbi/riscv_encoding.h | 7 ++++ include/sbi/sbi_hart.h | 3 ++ lib/sbi/sbi_fwft.c | 74 ++++++++++++++++++++++++++++++++++++ lib/sbi/sbi_hart.c | 21 +++++++++- lib/sbi/sbi_trap.c | 20 ++++++++++ 5 files changed, 124 insertions(+), 1 deletion(-)