From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailer.gwdg.de (mailer.gwdg.de [134.76.10.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D06433E37D for ; Tue, 6 Jan 2026 10:30:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.76.10.26 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767695424; cv=none; b=LZniNi92+06RxDAASHwN/v53rMflsZEcTYjLZfzP4eyhUMhD7HKBxYWVjwslRp/rc3DO80IB0pi80j0v+V8/ErRCFbTu9MlWaXUDaSFyZPOOi/Njf3G9SRzyS4ZHTUNKFDFjZ0g+tOAB5Fu40xY6KTg86tCN3VNF8t1jc8d5zl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767695424; c=relaxed/simple; bh=LXTCL7i3zTm324q3PIEfd8BVbUnLfGojRS3qAhHvzVk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rPYKZoweIPzclaJIpbNVT6Q1o36b+2wL0g1VkQHD2KALYvRYZiYqYAdljwVwdzxYM783+Jo/47hZVYmrp283xddFbKNlMHNV0PGoVDzIvM1nPVitWaXyWV/dQt+4hc6V+jhyNl3AVEiFXQsgPYVXjBUArFFav+Sr567Mw5rprdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cispa.de; spf=pass smtp.mailfrom=cispa.de; arc=none smtp.client-ip=134.76.10.26 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cispa.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cispa.de Received: from mbx19-sub-05.um.gwdg.de ([10.108.142.70] helo=email.gwdg.de) by mailer.gwdg.de with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (GWDG Mailer) (envelope-from ) id 1vd4KP-0008h6-2z; Tue, 06 Jan 2026 11:30:17 +0100 Received: from Mac (10.250.9.200) by MBX19-SUB-05.um.gwdg.de (10.108.142.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.35; Tue, 6 Jan 2026 11:30:16 +0100 From: Lukas Gerlach To: CC: , , , , , , , , , , Subject: Re: [PATCH 1/2] riscv: Use pointer masking to limit uaccess speculation Date: Tue, 6 Jan 2026 11:30:10 +0100 Message-ID: <20260106103010.5577-1-lukas.gerlach@cispa.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <6f196be2-3d56-75f5-78d8-800138a8ba46@kernel.org> References: <6f196be2-3d56-75f5-78d8-800138a8ba46@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: mbx19-sub-01.um.gwdg.de (10.108.142.54) To MBX19-SUB-05.um.gwdg.de (10.108.142.70) X-Spam-Level: - X-Virus-Scanned: (clean) by clamav Thanks for the feedback. > I would suggest to fix VA_BITS definition instead of defining a new macro here. I can make VA_BITS branchfree at the cost of readability. Let me know if that's preferred over a separate macro. I agree that the guard page approach is more robust than clearing the sign bit. Is Smnpm currently used or planned for the kernel? If not, clearing the sign bit should be sufficient since it creates a non-canonical address that always faults. Thanks, Lukas