Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4708149imw; Tue, 19 Jul 2022 11:39:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t3RxTgmJnLrqrd3l9oIScj3bNRv5WgdNk2FBnn8L7jIoq+kRsjH9brkTY2uDtWgx4F1nyg X-Received: by 2002:a05:6402:42d3:b0:435:2c49:313d with SMTP id i19-20020a05640242d300b004352c49313dmr44773612edc.86.1658255942425; Tue, 19 Jul 2022 11:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658255942; cv=none; d=google.com; s=arc-20160816; b=03bizTiBkcb1XJilfCUODSudOGetTZGvszA2r5OIcZqQyKu0JjO8sN9M5szk31vIAq OPbvZMimesN5nEA0S+jJHUsN4qRmg1wCg9Ps6BN/BBN254Th3sI2Zho51hcJ0WOiebpv gZ2mamhfC/vkr5GKDfPfJM0/VRDM9NUjDyk87Ck7AavD0f3G5TiUIrB6eSffW86MlSpP CXli5MP+aB6sUq1tKevqvXxbxhYBIgwFYnHV1pywtG8J6Il4M2nSYLvCAtmeIhSc7rlD cA2nEYsWE2dojStANUaYpSdWol3DZHVaQbUgv8xUchj9AGjCTsANzuMF3YTyPcvG6Cda Fz5w== 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=Mzb5Z4lYzEx/QvNne+kWXHe3dE7MvmmW8R2SziljTZQ=; b=DfSNkDnpB8uKoztF1GzJ0aVcZ/CQ4zKUs5UeGqBUGa8m/RDpFklKrCIVaJV7E5jecg FnU9nP1P+W59wqHCAZS9bELyrlPQU/yxf+qNT456k4gvGO0n+pXlWoxkR6lPGuRIDDPc 1YcFnyJSnglvidW0Z45aSJSrDnlhjQPw2JhjfScJ6riHxeZ5ZfapjTpYuFv6IUVmtjF0 nqCX1gbpYWiauvshNolWtlrKdSNGB22uMN0nsAbEbecZqldHMfDtqk03votNqqw9buWm FukNr8KlRHHXiQrIl79OWYICoBRPgoDyMRqM0GaIopeudMQTopJ2AgtPew85/lyWobh4 7a+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="iws/cgY/"; 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 u4-20020a1709063b8400b0072b3a316cc6si17609523ejf.977.2022.07.19.11.38.37; Tue, 19 Jul 2022 11:39:02 -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="iws/cgY/"; 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 S239834AbiGSSGw (ORCPT + 99 others); Tue, 19 Jul 2022 14:06:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239230AbiGSSGt (ORCPT ); Tue, 19 Jul 2022 14:06:49 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F1248E91 for ; Tue, 19 Jul 2022 11:06:49 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id t15so2100760pjo.1 for ; Tue, 19 Jul 2022 11:06:48 -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=Mzb5Z4lYzEx/QvNne+kWXHe3dE7MvmmW8R2SziljTZQ=; b=iws/cgY/LU04Xj4DXlB/H4/xL2g/jmk3tvbLLtIS3LW88swZhh9p8V5IeWbcElmdJf HSDpGB2J/p8yGEGisqXIrSnHnqwHR9Db/ldCkU16w6KhsfalI9zaohshdbOY4ZQP+Tqh UHS3RTp5GiAZ5Hf1QStX/uJRWzoySC69LBZJlXFgf4A1kbeyPluI6z09gyJ4beylspE1 BKXROi2y9jGRIV13jDfHfiF1tB7w1nyaq7KyYoT+LOJsclHg9iVnUQU0DcB2f+zrvN8b WrHX/OTZj+tzNi0x7/QHc9zA6BWE/gh318SjngnZlPvPYTqWTs8nh8TwP/9GvxQ4q5P7 o8og== 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=Mzb5Z4lYzEx/QvNne+kWXHe3dE7MvmmW8R2SziljTZQ=; b=TxUMlbdx/qEaaLde8zP4R7rZt/kSSghK0TYVoWajoCYRQAmAvE1cGu/3mWDzU9N3tg uw3WMv0gNV7KbOLUqNKPsYQR2rwyIS5TpSz0LfsD8TqXwnfS8aWCEUWrvZE1KU8THN29 Ev7u/L9IMaSX4YACR/g1UZURhdp8lQZr3i53u8P5bQq3ZPDVfXnrYXgz8mT+hvCRq5rU WlRsm8kWu1C9Qf36nU8bYV8WkidC25MRunatA8RrwjwuA02VsVJrnNlhUmNlGzpEOjjR 8a/qdy1haf0O2txcRcGk2D5fTHoDKybSI6xx8AcN8EhmfR0HMV/w3R1XV3Yfdw1MORjy T9JA== X-Gm-Message-State: AJIora/Pi5uwPS+bpjUDxdPbhLV0n2bkytjO9OYGtBqH0FOPJSUOObYj rVFDt3eMa16Pmm3hLu9oBhjSDA== X-Received: by 2002:a17:902:70cc:b0:16c:60e0:50fb with SMTP id l12-20020a17090270cc00b0016c60e050fbmr34530051plt.156.1658254008214; Tue, 19 Jul 2022 11:06:48 -0700 (PDT) Received: from google.com ([2620:15c:201:2:893a:f024:99b0:7299]) by smtp.gmail.com with ESMTPSA id b3-20020a170902bd4300b0016c1efb9195sm11972306plx.298.2022.07.19.11.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 11:06:47 -0700 (PDT) Date: Tue, 19 Jul 2022 11:06:40 -0700 From: Sami Tolvanen To: Linus Torvalds 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 Subject: Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation Message-ID: References: <2f7f899cb75b79b08b0662ff4d2cb877@overdrivepizza.com> <87fsiyuhyz.ffs@tglx> <0e038c2795784b7eb4de52f77b67206a@AcuMS.aculab.com> 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 Tue, Jul 19, 2022 at 10:27:00AM -0700, Linus Torvalds wrote: > 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. I believe it was actually Peter's idea to use an instruction. :) In earlier revisions of KCFI, I did teach objtool about the preambles, but that was just so it can ignore them. Sami