From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 965771B21BD for ; Mon, 10 Feb 2025 07:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739173363; cv=none; b=KE+ZS2UEpPQ6WR6bbj2RoWIp546PwDTESedkAXNNUEuW9Z548lYnVZA8IGGcNuHUeDenDy+Ey5jA3flsnD4MWP/7d0DRlUXhvBoi0Y7m0wj9tsPBne6pavqrNCupDaKiRMKeZHnl4JrFhfPp+GzG6WVI49SbS/ZBc6rz/Ha+csc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739173363; c=relaxed/simple; bh=uELykYu2UfnPFrcbXaL5ytU50E2XF8fxhOESv8wBqLc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=u75FGHT8xQs63vKlDc01pi+AFRqcz2jhRLpxH4nQdL60617kovyGxYR771tKeRcllFyjj4ci1927fjcPQ35BicvyDWVNxNeG6whlytXo4ZcP4ULBN7HNYdQQ402bgfbfLwrGifFKjOTO8G/AdJBUfU6ZdmuCyn5XdTKNX/MhqzQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=hEHhEnub; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="hEHhEnub" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-38dc6d9b292so1495608f8f.2 for ; Sun, 09 Feb 2025 23:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1739173360; x=1739778160; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Jki0b2am8yzlz3QyhCDEFnMh6r+K6Xff5FC3zmcGxIQ=; b=hEHhEnub9vJ60lxT2vbKKBzRLmTMTfzEohjaxyIuLzLiow2SvvpkSatF4AZQxAJjnt GldSg7omHp61iZ44O1NoCTj6O106Fa44wXsTEgwrO3V6PzE0XKFkh6b/1ZhCnDiUMPLD iwdjtrUpH14ypIzDoUIvMM99VMZk3yMbhrAuLsSxv/dZnbni6dapXkUUVW/cIaTFVxpU G5YOpqgvdH6tvuTG1XbLoQT9/+QjN8WaQ3SBagZb0OxHRyre8cxLMu7PshbV34ULqsvb gv/zLIyYV/g09f6i49Cxt3Z9AKBh7vYEdtAS2ASA6AqW2u06PJmqX7yjLhHIybimdYpn yLVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739173360; x=1739778160; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jki0b2am8yzlz3QyhCDEFnMh6r+K6Xff5FC3zmcGxIQ=; b=qDY5d4Qx7rYKtVreIMvZAQ+QiKwsDa1hzquKKfBByfkCI3AV9HoGLppV/s0dpBV3P9 8CuQwt2r+/ojYus61+FbMR4pal0T39pOYAheoNvBF3cD3wuIpamThCL99VszX5qXUTSS dP9UD2dx/CeNdrXI+8gs87kWzBnJN4vgdsImYCuK7VmYwgXAh8A/5hRooaoqrGPv2bqd 9V8FSUMjRvni/ubrE6Kd66YiyJtEVfnQ4+m2ClhnOo2GYM9V/mVl2ElC0MtHLnXAr4s/ VaEU+XgPk4yfK9eLxzaFOUiHvIWnUeJjNIvRKd/gkFNOct0X07EbjbHqUbtL4gAwtu67 qpyQ== X-Forwarded-Encrypted: i=1; AJvYcCVrUpWpFcjYsTT3BAO8VjpqwSO+XbtfuD3wLLFtwXkgjax0bdpidmUb5d2SB9YODr1wsGqoEcXVkS9EMEQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyVG/HLJIjxZ/LzMutBNgAzkfV9NpZRVVoPzWMOaYKCDqjGYyuK u/ivbq8YG+NX1H9QM9RKI54kjjueUI1QryKCS7OzKR6TldwHzP7U5NEWgemo3aQ= X-Gm-Gg: ASbGncuhQSKZwdcVWCB/JhoHC/KAXwg5F29Vhw0jJbxT4wThdyw5unSE4C+XEJpIFFZ 55ljA29Im53163Lwrh/zq38KhIhz+R4znM5fL0yhHKnSfWmsdCBp/pqHdpMcqlrcGANTUihHW9T tQS8FdCdQ12JWIjpdMIJgN2NKWKlKTtGLM4b6ZBg/1z0QH2lNI+k0rueSaPkFXzmq51NHMyo7r5 FVXM9sUlKoHmOqQ7Zyes96uSoEDJiTLp9V5dtZLxh33UlKbaZJC6VyIuKLjaz8k/4ueKnHVNCbn zpPwySC2OzBffp1yoKeMNVGaJfPjJH4tagLpuAjQSnnuMemGc+bN+tFtf0eH X-Google-Smtp-Source: AGHT+IF39BdEkA9ZgcBIHbLRArZRwyqYfhbYwkkcPtQvR89C0KQhk8Xnq25iZkfcHIflDsp+ppJQFw== X-Received: by 2002:a5d:47ad:0:b0:38b:d7c3:3768 with SMTP id ffacd0b85a97d-38dc90fdb89mr7501603f8f.12.1739173359748; Sun, 09 Feb 2025 23:42:39 -0800 (PST) Received: from ?IPV6:2a01:e0a:e17:9700:16d2:7456:6634:9626? ([2a01:e0a:e17:9700:16d2:7456:6634:9626]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4390d896d70sm171375435e9.0.2025.02.09.23.42.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Feb 2025 23:42:38 -0800 (PST) Message-ID: <4320b0be-acce-43b2-b148-1577c6a56dff@rivosinc.com> Date: Mon, 10 Feb 2025 08:42:34 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 14/26] riscv/traps: Introduce software check exception To: Deepak Gupta Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Christian Brauner , Peter Zijlstra , Oleg Nesterov , Eric Biederman , Kees Cook , Jonathan Corbet , Shuah Khan , Jann Horn , Conor Dooley , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, alistair.francis@wdc.com, richard.henderson@linaro.org, jim.shu@sifive.com, andybnac@gmail.com, kito.cheng@sifive.com, charlie@rivosinc.com, atishp@rivosinc.com, evan@rivosinc.com, alexghiti@rivosinc.com, samitolvanen@google.com, broonie@kernel.org, rick.p.edgecombe@intel.com References: <20250204-v5_user_cfi_series-v9-0-b37a49c5205c@rivosinc.com> <20250204-v5_user_cfi_series-v9-14-b37a49c5205c@rivosinc.com> Content-Language: en-US From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 07/02/2025 22:26, Deepak Gupta wrote: > Hi Clement, > > Thanks for looking at it. Inline > On Thu, Feb 06, 2025 at 02:49:09PM +0100, Clément Léger wrote: >> >> >> On 05/02/2025 02:22, Deepak Gupta wrote: >>> zicfiss / zicfilp introduces a new exception to priv isa `software check >>> exception` with cause code = 18. This patch implements software check >>> exception. >> >> Hey Deepak, >> >> While not directly related to this patch, is the exception 18 delegation >> documented in the SBI doc ? I mean, should we specify that it is always >> delegated when implementing FWFT LANDING_PAD/SHADOW_STACK ? > > I don't think it's document in SBI spec anywhere. Should it be ? That's a good question ! I don't know the process to document that part of the SBI but that would probably be nice to document it anyway I guess. Atish may know what to do with that. Clément > > > In code, opensbi delegates the exception (SW_CHECK) > https://github.com/riscv-software-src/opensbi/ > commit/110524441a827e026db3547ed03c5723b9c9e211 > >> >> Thanks, >> >> Clément >> >>>