Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4694488imw; Tue, 19 Jul 2022 11:22:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7JVuTRBAGVU4H+zGQ1jcBo40fyTvTTayHwHTWGf1lKgITt0gKiO9bW5FXb1UFAtfcICAX X-Received: by 2002:a17:907:9806:b0:72b:9b29:7d34 with SMTP id ji6-20020a170907980600b0072b9b297d34mr32423707ejc.466.1658254929330; Tue, 19 Jul 2022 11:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658254929; cv=none; d=google.com; s=arc-20160816; b=NKca8+hprmODBtnfCam9RwOQ0+vLpybZ3UoddQHMZb7GUHA1Cus5YejJ8AmKBPlgPz qtu1LGLuBayefOhahPulvinixzqzCGjWQxdy3h+FatfQE4rZKDgnrOE0Po9MR2Acirid RXsrjRHlv6Ll87HwEbsMltwjU2cIlVyiSWcVshkUMvkZyn3jXrUYWWODqPFrVQSM1sl/ tsWQzfVQ1dB/UYsPBTqQ9m+qkKTpMoHAJpZamvuidhdiw6PgNhdq3ywkEgrmebxRdU5u 9Jfyy6sAHYJWuKaYgFtTCGdMtHRa8/fmAmSS2zgWVdXJGWouRIK8PCiJjeuKcn1anJDq PZeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nxSzpV0hO6sx7HedazM5gIz+cjDlm1nQzCRG9Z5vJw4=; b=0q66FQA4zf8Z+t6kkn5RlwA7U+fozQsaztfnMIHpOlBWLk+Rt7W+Z8vvmsHet7tG2Y U0c6e4Id39BvvBZNeZageShCNiHLOoZUc/avZKgp/BlQ1NIVLnO4c+7nQIUq2K0JuQ/U DBh8FZ+0ofk7idSqULuafpRjQu3ED6v0VQ6crP7M6SilwFRKrgh6Na1lle0gTwa9mnLi 2KvfV1u2n9/01DJATg28Q12ZEoO3IhSpqtfm7rll+RyLm+iTk+dniw1TfSdsX4X/Vhyi 1z1x6gFc8QIzy9GCqveSHblQl9ulsGVOkMcipip+da4HAcs6ZhC3j71u01nRRfPCLtse Ganw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BvN5J3EW; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ej12-20020a056402368c00b0043a77b7ad59si17043549edb.70.2022.07.19.11.21.40; Tue, 19 Jul 2022 11:22:09 -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=@google.com header.s=20210112 header.b=BvN5J3EW; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236053AbiGSRV1 (ORCPT + 99 others); Tue, 19 Jul 2022 13:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbiGSRVZ (ORCPT ); Tue, 19 Jul 2022 13:21:25 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AABBC0A for ; Tue, 19 Jul 2022 10:21:25 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id q13-20020a17090a304d00b001f1af9a18a2so7983321pjl.5 for ; Tue, 19 Jul 2022 10:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nxSzpV0hO6sx7HedazM5gIz+cjDlm1nQzCRG9Z5vJw4=; b=BvN5J3EWujanwvsvnFMaJpYUNwsY0yMPJOkLcDYs+UuUnVtGxRlLIoDV9g5GkzPwxq 52X/hPLRXtmdyJHUHmMvZMLYu3HUkVqakqaN++qrSTm9B+5rUxZdugqqQ9z3AlEQkFc+ MjgDVZOxGa+nSVJVJkzbiSDCYia0bk21XO392ruFTyfoAToTRG3k8hXR+uLWNwlcPRc+ 5IA1YZJWJZrtH7d50JnJ2fyfFoOvqfPTmYGwYjwmNfp0dR612sedDaEaLtRxb9NVgDUL G/IHVXn17unEbPu/dWVsUDz0lcpWLFjzsW3YYKdtuWYLt5FPqq6GxVkDSNTDGGYNFXcF dn3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nxSzpV0hO6sx7HedazM5gIz+cjDlm1nQzCRG9Z5vJw4=; b=VGpBkat5qTwnk19EySyCvzPXHeN+ah1TEGUTrmnRxNmfGMr5+QqxE4Ihcp12H+DjUz MgUI9LniQhblN0B8ZS9mu9Ir6isCjsqmOK04qkLZa+44B6WFEEH5mX/oaETUnzq+VvTV uKnL24Gs+q6DqknJO9SxhckWCoeCxm6AShi5/yGvNoTECDjYA9xxc+6un7hvNEb759Ht tDHnkVSCkeYG4H9WN8IxHtwrrw0dtAdmJ6aI49DzYtn3YcwBe+HNx14toQLJTcYCxsi1 gnUlBTKQ+5rb1TAIeXWipvG94JavJakr7m2TSuhU7fWxIVuaW2zFPchRUt98ORfzZEnr yKmw== X-Gm-Message-State: AJIora86uf90RrmyMVhpPWnbAK4MXJM1PMVwu5x8EsACV7Vi0xCsONFQ dt4TzqYJOJnqn+cYMns9Ne4Rtw== X-Received: by 2002:a17:902:efc6:b0:16b:dd12:4d30 with SMTP id ja6-20020a170902efc600b0016bdd124d30mr33929304plb.29.1658251284626; Tue, 19 Jul 2022 10:21:24 -0700 (PDT) Received: from google.com ([2620:15c:201:2:893a:f024:99b0:7299]) by smtp.gmail.com with ESMTPSA id z20-20020aa79f94000000b00528d11c26f2sm11815447pfr.1.2022.07.19.10.21.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 10:21:24 -0700 (PDT) Date: Tue, 19 Jul 2022 10:21:17 -0700 From: Sami Tolvanen To: Joao Moreira Cc: Linus Torvalds , Thomas Gleixner , 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 Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation Message-ID: References: <87o7xmup5t.ffs@tglx> <87lesqukm5.ffs@tglx> <2f7f899cb75b79b08b0662ff4d2cb877@overdrivepizza.com> <87fsiyuhyz.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 05:19:13PM -0700, Joao Moreira wrote: > > The extra instruction is likely less of a problem than the extra > > register used. > > > FWIIW, per-ABI, R11 is a scratch-reg and should be usable without hard > consequences in this scenario. Clang always uses r11 for the indirect call with retpolines, so we'd need to use another register. Nevertheless, splitting the constant into two instructions would solve the call target gadget issue. Sami