Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4704717imw; Tue, 19 Jul 2022 11:35:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vtYVXlUeSdOv1frJGZZD0oMtseZKKm6Apjwy6+ewCyTwKyzUi9UVMkPU1X9yZSA5daxfQI X-Received: by 2002:a05:6402:3454:b0:43a:86c8:637 with SMTP id l20-20020a056402345400b0043a86c80637mr45690972edc.393.1658255712093; Tue, 19 Jul 2022 11:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658255712; cv=none; d=google.com; s=arc-20160816; b=Hwg0z7jM5eNPJBoGEcS2KTvify4I/Lh/5XFLTIMC6cYJeVhXcSoQq/uGPP1wQpQqUH LHIAgh3BmydAu4C4sbf057U/GjSybefr30wl5vzUDfzuFiUov7+LITJ24OKIcwu9w5y5 24s1cGyz0CnNLmGgK8pcYTPUV1PyQ4//nTJaDxha3znBmU/kR7BND7v//aq5MJF66y96 eZrM7PHabvuVnn5+cCbHZi4GwoOgRjTZgAlN0/ifzgAzPaJXePNyj9pqt5kpe41g1KG6 hzpbgHiZG/07Xs+ccJdCWfzeCRpHiidWMivGZau5TsA012od4ybsVxJoc9/COVhDhkMq K4UQ== 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=tnyHXEPt7s4Hu+atwyWT41QjMNO3QXDExK9gYwA1iFo=; b=M4n4wbn7W+4QRRH/cyUDhaduQe8w0mFllsHZwn0Tgr2SLJuKTNRy0RAv3mExrWxkNx sd/Sov8S6Lf3zTwkjP8crteY0qlJyhhK6R3RpI1nXq9TxANVim6HujZ1yMm8D7bqtlJY COGgzzb/qUfWgIN4Fg6BDE0zSvAD0wh/oqSDnQ1MDWHJKhF66Xw55+T0+mzUgyivSjTJ 2hcEk0QWl+NanVbtZFqqYioAT7QeFwZU7PXJRpZflxSjOiEjrDu4t/NzUU4z2m1XDJtW QQcb0QJTXzAWjRqivOrqiSpU+lZDrVLtxbQAn5CBjeOOnnF6U4Mwn37Qxo4vjXBVLoiI BvNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cHu51hj1; 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 p13-20020a056402500d00b0043aa5c04926si19129332eda.150.2022.07.19.11.34.45; Tue, 19 Jul 2022 11:35:12 -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=cHu51hj1; 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 S239334AbiGSRfN (ORCPT + 99 others); Tue, 19 Jul 2022 13:35:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237992AbiGSRfL (ORCPT ); Tue, 19 Jul 2022 13:35:11 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0747E0C1 for ; Tue, 19 Jul 2022 10:35:09 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id ss3so28483771ejc.11 for ; Tue, 19 Jul 2022 10:35: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=tnyHXEPt7s4Hu+atwyWT41QjMNO3QXDExK9gYwA1iFo=; b=cHu51hj12r7iQc2qyxLjkVoVif3j6nsczpvsYRyUA1j/of+rBAWUDd6qw2jKlzno7F r56GwpxwoYHkkUsfxkv1NRmshwA+9f2LnrYO7lDBkrFwqsd1nKbkoG7yEBcSScGiKkjb OFEzxrZPv8a2GJc7DF6gAf3Ukd5+mM1000gZE= 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=tnyHXEPt7s4Hu+atwyWT41QjMNO3QXDExK9gYwA1iFo=; b=azTCWHujfBA0n0v2dw351GxmNrmn/07O8akf1RdEkZjDRU8fPtEgPiQh738AxyhjzX v4/nGkR9rnTYfZa2UmnKDZN+KTEq1BqGsFCZif8/5anZ15SeOX749SnQ0wm6GWqqOcmO Ww64IJfjMtpAmNQjVKxR0vvaE9quduXgU7VOhnEBLxDzkOc1G2K7maO6GCX0SxzwokkR 2+skkVUthrUqTFVuw9UskjFhB/fmsRUguCZKUMPLmkDF8lyA4Vw6d3JXwfNxWC5wSIak V+qvKOJZzvP7BRuJ9ahqvyprTn5kIzo3/kYJa/bdC9OzL+FyXZs64emzSJtjjoCn/IEP 9HdQ== X-Gm-Message-State: AJIora97VC4E20JLIdtDYnx+egEsXOUWOX7VfD3JQxA1D0SHdzypqBCj 4/fHbSzd1C7L2djuy6clQIXE4cgUi9ZJ9nAMKoM= X-Received: by 2002:a17:907:6890:b0:72c:7533:8901 with SMTP id qy16-20020a170907689000b0072c75338901mr30734815ejc.100.1658252108251; Tue, 19 Jul 2022 10:35:08 -0700 (PDT) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com. [209.85.128.44]) by smtp.gmail.com with ESMTPSA id f13-20020a170906560d00b006fee98045cdsm7012568ejq.10.2022.07.19.10.35.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jul 2022 10:35:08 -0700 (PDT) Received: by mail-wm1-f44.google.com with SMTP id n185so9383841wmn.4 for ; Tue, 19 Jul 2022 10:35:07 -0700 (PDT) X-Received: by 2002:a05:600c:4ec9:b0:3a2:e9bd:fcd9 with SMTP id g9-20020a05600c4ec900b003a2e9bdfcd9mr352500wmq.154.1658251636400; Tue, 19 Jul 2022 10:27:16 -0700 (PDT) MIME-Version: 1.0 References: <87lesqukm5.ffs@tglx> <2f7f899cb75b79b08b0662ff4d2cb877@overdrivepizza.com> <87fsiyuhyz.ffs@tglx> <0e038c2795784b7eb4de52f77b67206a@AcuMS.aculab.com> In-Reply-To: From: Linus Torvalds Date: Tue, 19 Jul 2022 10:27:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation To: Sami Tolvanen Cc: David Laight , Thomas Gleixner , 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 10:23 AM Sami Tolvanen wrote: > > The preamble hash is encoded into an instruction just to avoid special > casing objtool, which would otherwise get confused about the random > bytes. On arm64, we just emit a bare constant before the function. Ahh. I think objtool would want to understand about kCFI anyway, so I think in the long run that hack isn't a goog idea. But I get why you'd do it as a "do this as just a compiler thing and hide it from objtool" as a development strategy. Linus