Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3909569imw; Mon, 18 Jul 2022 17:15:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vvilk73mbIl2romP22WBXtEDUDGh7aziG/kjLSMwtpz93B+55XBSxRlvUv5LCPMxMDmA49 X-Received: by 2002:a17:906:5a5b:b0:72b:39cf:6042 with SMTP id my27-20020a1709065a5b00b0072b39cf6042mr27485281ejc.301.1658189732460; Mon, 18 Jul 2022 17:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658189732; cv=none; d=google.com; s=arc-20160816; b=mY6PYJSU6wSwnDSnHZrsLboLlSR5V3DPHsUEsABVewaa89LTX69/UIDnr1vLiEizrK pEZrFgyirw+QrvWEltTRBX96GukzGXuL2kwrQTJQWw4CeQAVDOzIiAqquZKwXPTbSTnG UKuu9b70Xh0eLgLB6O1J9zHIJBuiRyFVbxbZptOaipXTuPTsfK9uthI2YbKnOgBjARmN 2L28vuoYvlsqoID9mNS3RrK9A1Td9ZQtfvLXfiy2GJipVtG9AnX4LzYtC0upZjuF1FUb PWqKOfzkomOK+gD2aqCnGTw86rMs8mXyl7hh/hs06vapEdIbejTDMxAvdpEC3TTURhPr oCzg== 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=9twpH2Ssc0YmVOQRm9GWFwzaNV8adNbuZG+aBF8KB48=; b=pPM3X8NGtJ8EJhOUP40T7+E2WezJ6+rYNftg3DecpXeEZXz3qwYiMn5XSUCeeW3ZDD W0sdWHOfB604oXrwef9iMDayee1hnvYRkk/SXO7Hnnbs2+HYvnBV9W9n+RMBJuaMauEg SDarysUEwfnFkhuG2403AjV2zBW2JwsjZGkvCDes40rjCcA8lD+/Diovu9Ly+V2oP4/n Mbo/332hSqCSUvuQjB/pw3r5AcAICgRluUdhCiNBoga0NTVR0fFtmpkavq+I022TjMLr kGYrLpMz3c6iRBtAeG9xWvk6eCtRKG4jSdkGqaOvpy6jwS9yCPGqL7wvUKB3kRKx8FnD ZsaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HWFlRJam; 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 sh31-20020a1709076e9f00b007269f9395d7si20078852ejc.482.2022.07.18.17.15.07; Mon, 18 Jul 2022 17:15:32 -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=HWFlRJam; 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 S235005AbiGSALQ (ORCPT + 99 others); Mon, 18 Jul 2022 20:11:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236527AbiGSALK (ORCPT ); Mon, 18 Jul 2022 20:11:10 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47C7733E0C for ; Mon, 18 Jul 2022 17:11:09 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id e15so17521310edj.2 for ; Mon, 18 Jul 2022 17:11:09 -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=9twpH2Ssc0YmVOQRm9GWFwzaNV8adNbuZG+aBF8KB48=; b=HWFlRJamLb1qTqzKe1twXKvEhXrmLIWhrAxrDtrWxvwT1R4W7GxrJAyPWToqshdSTF zrVxThcXVV/p/+HNv8rzxIL5vKyRdlsmuiDhFUVxniuBFAB+QR2iUUBX6X873d2TYQJX JYI3DDfVOOcWbGTVR95I4Uc4aHkWNM2mzf5j0= 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=9twpH2Ssc0YmVOQRm9GWFwzaNV8adNbuZG+aBF8KB48=; b=aq7J/VJq+51vkpBeq1C2/vxZfQn2P3nOpn0m10GtOhD99x79iYV4JLxif/LgRPHlgU PqQztejelYHiilhtoFvs+Y+1qUiD81eKXSDsw9nXKXm0mGNN5VzAkioa27jxmUpqlXe9 UmeAXpiUubBedXGDNbBxd/9YK5XYYeSoIUR5OiFnuHjkX+YB4BudCBMwe2+oib6WgU5i uQhx1JKlUtM9o1A+8F3Ah1LR74rVyxCQzsRUwB8xy37zlbrQRI3tn4U/RBobP/gPisNS L4RsIUb14Ue/WIxHYESGfHsaJkAFBhnJ2WFpw+M9acY30qbL3IK0BSLJaxWqxmaeOXrH yOOg== X-Gm-Message-State: AJIora+ERzA45e6HDtv/M3ynfhQM0bZ4gL5L2DDEd3x7oDhpa3Of5a+2 7UvE2QoO6FnQcSLjvbHUO9qOaQ0Btl7KMzT63x8= X-Received: by 2002:a05:6402:1e8f:b0:43a:ddfc:5c4e with SMTP id f15-20020a0564021e8f00b0043addfc5c4emr41032933edf.358.1658189467637; Mon, 18 Jul 2022 17:11:07 -0700 (PDT) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com. [209.85.221.54]) by smtp.gmail.com with ESMTPSA id la23-20020a170907781700b0072b92daef1csm6128474ejc.146.2022.07.18.17.11.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Jul 2022 17:11:07 -0700 (PDT) Received: by mail-wr1-f54.google.com with SMTP id v16so3490985wrr.6 for ; Mon, 18 Jul 2022 17:11:07 -0700 (PDT) X-Received: by 2002:a05:6000:1a88:b0:21d:aa97:cb16 with SMTP id f8-20020a0560001a8800b0021daa97cb16mr25098121wry.97.1658189045434; Mon, 18 Jul 2022 17:04:05 -0700 (PDT) MIME-Version: 1.0 References: <87tu7euska.ffs@tglx> <87o7xmup5t.ffs@tglx> <87lesqukm5.ffs@tglx> <2f7f899cb75b79b08b0662ff4d2cb877@overdrivepizza.com> <87fsiyuhyz.ffs@tglx> In-Reply-To: From: Linus Torvalds Date: Mon, 18 Jul 2022 17:03:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation To: Peter Zijlstra Cc: Thomas Gleixner , Sami Tolvanen , Joao Moreira , 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 Mon, Jul 18, 2022 at 4:58 PM Peter Zijlstra wrote: > > On Mon, Jul 18, 2022 at 04:52:09PM -0700, Linus Torvalds wrote: > > I also happen to believe that the kCFI code should have entirely > > different targets for direct jumps and for indirect jumps, but that's > > a separate issue. Maybe it already does that? > > kCFI is purely about indirect calls. So it already only adds the pattern to things that have their address taken, not all functions? If so, that's simple enough to sort out: don't do any RSB stack adjustment for those thunks AT ALL. Because they should just then end up with a jump to the "real" target, and that real target will do the RSB stack thing. Linus