Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4613730imw; Tue, 19 Jul 2022 09:49:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vpnuPLOllztGKAmeikKztMsaTCtwwF9HKjv1N6pzkKSrux/0BPBw0yyvq9JZrm6vCUMd4q X-Received: by 2002:a05:6402:5d6:b0:43b:2391:a07e with SMTP id n22-20020a05640205d600b0043b2391a07emr37009399edx.366.1658249348253; Tue, 19 Jul 2022 09:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658249348; cv=none; d=google.com; s=arc-20160816; b=qkJqDBNj+cPbjcQRitlHBgsx6fJe7Q1SPBAy6t7XBaQZybsg0UtjT6dEHCmvN+IXbV VQGekp3p4Eorng38n3A/W/BniWaQnSq+VifP2H5EoF6SQEof6s4KlSgXxwWcM1LS5lFl 3AWrlpsNTTSJA5NR3ZWfAUQAFPFl/IwPGBPSGtHsqAs+LIUetB2UG/5x8+s8OqhmAKIL hXPZr/80OA6mB3Q0pgIr5/VciZLmRglSII4LwfqrQPY587rc5cYFL3AiNNovzFEwtrX7 ZXP0NSquCsnnyM56H6k3yJqrT6a47DleGrANo9WvRij41jF7qGKnP1ubce0HtkdsH0Dn e0BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Xlfzi0mVmWi9G0I/mY1MHM7z0OG4bhE7Or7p89HZyMU=; b=Tq9B4//ubMDaGflaFTrUoUTKnZhZzvZh1rvB5GCy2u3z6BRaBcCb+aQcEhYUFTDABd oj2ePaIjWsJQ+otmH3AWt77uCLWkHlYgTDJV6NuWTHiyj1OsHmmzG0uOoTLjkGlfUIe7 XNXh9e+oa2q5ldMs9XloHO+T9KjmicF520ForXhD4ug7QY5aYewbTQoPjQ9Q79GdS0e0 sSZHzJOSY+OPuH1IWwJtSQ7eS3h0JVzSNMvum6jpy+elfQSBFEzGAl8rqHAOQAGNh+Bc YM8vndNdGIWjKIjVSUpE2bvbN6m0FABZsDLoUw7T9RndduENqXuLZM+0Cv8g6m/gK9cM zuhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FoAkRYUL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qx3-20020a170906fcc300b00722f48fa044si17352804ejb.192.2022.07.19.09.48.43; Tue, 19 Jul 2022 09:49:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FoAkRYUL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237838AbiGSQfV (ORCPT + 99 others); Tue, 19 Jul 2022 12:35:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233392AbiGSQfT (ORCPT ); Tue, 19 Jul 2022 12:35:19 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05B5863C9 for ; Tue, 19 Jul 2022 09:35:17 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id bp15so28254890ejb.6 for ; Tue, 19 Jul 2022 09:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Xlfzi0mVmWi9G0I/mY1MHM7z0OG4bhE7Or7p89HZyMU=; b=FoAkRYULGV4X6ZrFtDAkEVt/BKsgTrqYgRBy8dc+oOTvqCgMJzqa+hZNbAqUAg7h0X uXpcXEZNxqV60KB0HXIvuxmkpcb/v0b6V2DXzVOUCbLBhVxX6Otc0gfmd9U84Yyj2N2o auYWCnJD8QLRwC7ycUlmKDJ2mtqQwTAQz2xzI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Xlfzi0mVmWi9G0I/mY1MHM7z0OG4bhE7Or7p89HZyMU=; b=lAu1KydU4z+9XKHsEADNBXUu+aK6+qDYEHYZIYsvlKFnl67NiYFq1SWq4r4aU7VFcm oz/8aDYQAnVzxr79RZPIA5r884YaDZ1B+TAsVqerYfDGmR9ryxykpC0ffpCyb5osWMG+ cU6rt86SX4tXsAO/feoXFTZZPhWvieSW91z0zduyOnrC1XhAG4gq5keRn1T+hwHr1FOZ yLZk6q64IZUDwPtS4aG3hrFEOlH2cSI0lhnHCwkkwF65PK4sdvfRGX1Hsk69UoOIczDS gAfJmyUOANjk0OCMi6qrKxHTSvmirypJSbP5Nu/+Ggv7+SSdEstz/qAsNjprJkyDKu8S Q1rQ== X-Gm-Message-State: AJIora9y356AloGs79Ot7AXNWDtk/LTIF8EHY6aRRZu6sKkHES6zs23a 9ZH0SkJ7gTfeRYkUcEsPibjL+hzCDD4xAD4xFf4= X-Received: by 2002:a17:907:69b0:b0:72f:6520:9305 with SMTP id ra48-20020a17090769b000b0072f65209305mr112051ejc.388.1658248516308; Tue, 19 Jul 2022 09:35:16 -0700 (PDT) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com. [209.85.208.43]) by smtp.gmail.com with ESMTPSA id g17-20020a17090604d100b00722e52d043dsm6848419eja.114.2022.07.19.09.35.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jul 2022 09:35:15 -0700 (PDT) Received: by mail-ed1-f43.google.com with SMTP id v12so20375384edc.10 for ; Tue, 19 Jul 2022 09:35:15 -0700 (PDT) X-Received: by 2002:a05:6000:180f:b0:21d:68f8:c4ac with SMTP id m15-20020a056000180f00b0021d68f8c4acmr27998829wrh.193.1658248038755; Tue, 19 Jul 2022 09:27:18 -0700 (PDT) MIME-Version: 1.0 References: <20220716230344.239749011@linutronix.de> <87wncauslw.ffs@tglx> <87tu7euska.ffs@tglx> <87o7xmup5t.ffs@tglx> <87lesqukm5.ffs@tglx> <2f7f899cb75b79b08b0662ff4d2cb877@overdrivepizza.com> <87fsiyuhyz.ffs@tglx> <0e038c2795784b7eb4de52f77b67206a@AcuMS.aculab.com> In-Reply-To: <0e038c2795784b7eb4de52f77b67206a@AcuMS.aculab.com> From: Linus Torvalds Date: Tue, 19 Jul 2022 09:27:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation To: David Laight Cc: Thomas Gleixner , Sami Tolvanen , Joao Moreira , Peter Zijlstra , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 19, 2022 at 1:26 AM David Laight wrote: > > Shouldn't it be testing the value the caller supplied? Actually, I'm just all confused. All that verification code is *in* the caller, before the call - to verify that the target looks fine. I think I was confused by the hash thunk above the function also being generated with a "cmpl $hash". And I don't even know why that is, and why it wasn't just the bare constant. Linus