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 E3053C43334 for ; Tue, 19 Jul 2022 00:11:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236434AbiGSALQ (ORCPT ); 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-Google-Smtp-Source: AGRyM1u16XKnLSD06WX3MAHVeO/4JaDK2xzESzZpeXu6cQbbbiYPIAQGnJ9vpw6VxkgUKgjvZva0NQ== 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" 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