From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CA18C433EF for ; Thu, 21 Jul 2022 20:22:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233242AbiGUUWY (ORCPT ); Thu, 21 Jul 2022 16:22:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbiGUUWX (ORCPT ); Thu, 21 Jul 2022 16:22:23 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6468B87368 for ; Thu, 21 Jul 2022 13:22:19 -0700 (PDT) Received: (Authenticated sender: joao@overdrivepizza.com) by mail.gandi.net (Postfix) with ESMTPA id ADCA8C0002; Thu, 21 Jul 2022 20:22:12 +0000 (UTC) MIME-Version: 1.0 Date: Thu, 21 Jul 2022 13:22:12 -0700 From: Joao Moreira To: Linus Torvalds Cc: Peter Zijlstra , Sami Tolvanen , Thomas Gleixner , LKML , the arch/x86 maintainers , Tim Chen , Josh Poimboeuf , "Cooper, Andrew" , Pawan Gupta , Johannes Wikner , Alyssa Milburn , Jann Horn , "H.J. Lu" , "Moreira, Joao" , "Nuzman, Joseph" , Steven Rostedt , "Gross, Jurgen" , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , Peter Collingbourne , Kees Cook Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation In-Reply-To: References: Message-ID: <2ba33fe385b7043830e1a8d428047e53@overdrivepizza.com> X-Sender: joao@overdrivepizza.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Ok. I don't know the context, but I was thinking along the lines of > the same hash value perhaps being used multiple times because it has > the same function type. Then using the "addl" trick means that the > hash value in %r10 will be changing and cannot be re-used. Fwiiw, even if %r10 value was not being destroyed by the "addl", the call right after the check implies that you cannot trust the contents of %r10 anymore (it may have been messed up within the called function).