Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1262369pxp; Thu, 10 Mar 2022 01:54:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwm8WT4Tf/EdS3oZN60XRAK4QfKQDXwfFKhfV4SVRBkWUuhRP5x0MHCkIuvLJZSNU1/32Z2 X-Received: by 2002:a17:90b:1052:b0:1bf:5024:c2a7 with SMTP id gq18-20020a17090b105200b001bf5024c2a7mr4045353pjb.218.1646906071823; Thu, 10 Mar 2022 01:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646906071; cv=none; d=google.com; s=arc-20160816; b=SMs5qHKwnGJZRhWckAN89lz/jyDIp/DtN8U/XvmmT3KzRKrcevxeIIV0c9+d/GNmw7 lejJQlBAfg1ZBJJ2p58zTRHhrERlb1HRxf+feZAwff6CjUmndg+a2xxDMpLMPwM8Zl0t bW2+YixK9VYPNq78q8JXLBeDu0JQrd0TSk4/YYBw4jClXL0a8VJe1xpeYCcky/DYuQNK wLBg1wzOSMUv/dqAUCrjwX+vsnVgf+OAfa2ZuSPQrEW9HQ/4HsioXl6XGW8m5blPd7vJ 0v/WDrKg+4ap355soCWf9hKRzIxh1UEQ/dpcro1wRdjaMzWhwsUO+/0rXO83r3QDzVOr P0Ng== 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=+bEaQ5W7/uwxuPOhbs7aFS9WiQFjr1dAU1fc+RFzx3w=; b=C4JJj8dCStOTlUif/cYbAf8OdpGH0heFUwa1OmGoY94QdVve0PmYM77pZcjS0LrKHI PPOdEHDADcj6+EetGmDOdGXZf9lnE2QMLMwtT1ezFMlSuOURqnDElBGLtq6/yeUKDsSE YLS7bZxS9T8+N7mOijJEHBuag8nyOdm2fo2blyTSk3CeG2y0Zy0wIXoTow99NJM0S8JS Y5tJ9Iy/DlSpl+mFBZgZWhSRi19db16gbeOelmWNqFyK+kv3vF0M2FPJAYFJiSxZ9gHC to9bufTN+8qPwHd0xFJcMQ3uTK7i6cmWFlAvSGI8jppKRqmFaatbvhixUSp1UHYvnt/n Adew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=GO1t2zd3; 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 h33-20020a632121000000b00370de8333desi4409162pgh.702.2022.03.10.01.54.16; Thu, 10 Mar 2022 01:54:31 -0800 (PST) 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=GO1t2zd3; 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 S235084AbiCJAbm (ORCPT + 99 others); Wed, 9 Mar 2022 19:31:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbiCJAbl (ORCPT ); Wed, 9 Mar 2022 19:31:41 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 198A611C7CA for ; Wed, 9 Mar 2022 16:30:42 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id n19so6645435lfh.8 for ; Wed, 09 Mar 2022 16:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+bEaQ5W7/uwxuPOhbs7aFS9WiQFjr1dAU1fc+RFzx3w=; b=GO1t2zd3diCLOfc1GR/4QHxRBwrXV3/Ri2DyCkq4E1Njl+mjDqufI33kutF5DdEGbM gwB9uJ0GOTZZadP1Tx+ogWkrvDnn+qqvel7Ys+vdsRnsIM9i3ysfWrJ4HXUr8JdUKcrm 8A2f7TXgUf1IHxsom0VuQZ+muNjQGSsk5YvC8JFZvHiaS81hWoKbwhk3n+AEmcByhmI2 3xtNdmnsv5psAM65huJgPO0CxRkkDVJDB4Sjet93q4qclZOwmw6QnjR5wd7Yv/wnoodE 3FRZGLdaYleo426aRw5WO3nGJPErBzgC1aGr/9IMEZoxny2/W4khl7VKOy0p1ToVzBr3 HfZg== 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=+bEaQ5W7/uwxuPOhbs7aFS9WiQFjr1dAU1fc+RFzx3w=; b=M8LUNtIkzf1pNK4nsUG1/iQmIgAyIXRkTDOwFllBJegeaobWQfl/rtA5O9w3qiYJCU TVNvJKUsHP3Ksfk2wb2L3D88yrkzi2Lin9Wg6QFBlUiUBv7Kp8KFOOreoaVV7C1V4K1a D6nkzEk+Ks9VQRFBj2WO4bupPgNCzmW63R4/VeEO1E/KTh4xKuGOW9mrr3J9elIB09va U5zxUP+PTGEVprQAZsIRkIUTsFLzqRiHE8VcYMdpt5hdpgF9evvGF9t2AVAx4tnsjtQV E8UV513tHPj3AfARp4xnssjGAK9tGLS5VxU6lbQCbWcweeG8NzVcv36IcTwcNzdfysCH 1BOw== X-Gm-Message-State: AOAM533T8x5/7+ch3xamG47U38xxzpkVjdL1IT9KrnbJ+I/A9cakdH+W /tgA6fS0sTvp26PUzIz1vxLz7c8+JvvTWhHv/KkxBQ== X-Received: by 2002:a05:6512:308e:b0:448:3826:6d68 with SMTP id z14-20020a056512308e00b0044838266d68mr1329592lfd.184.1646872240210; Wed, 09 Mar 2022 16:30:40 -0800 (PST) MIME-Version: 1.0 References: <20220308153011.021123062@infradead.org> <20220308200052.rpr4vkxppnxguirg@ast-mbp.dhcp.thefacebook.com> In-Reply-To: From: Nick Desaulniers Date: Wed, 9 Mar 2022 16:30:28 -0800 Message-ID: Subject: Re: [PATCH v4 00/45] x86: Kernel IBT To: Peter Zijlstra Cc: Alexei Starovoitov , x86@kernel.org, joao@overdrivepizza.com, hjl.tools@gmail.com, jpoimboe@redhat.com, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, keescook@chromium.org, samitolvanen@google.com, mark.rutland@arm.com, alyssa.milburn@intel.com, mbenes@suse.cz, rostedt@goodmis.org, mhiramat@kernel.org, daniel@iogearbox.net, andrii@kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" 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, T_SCC_BODY_TEXT_LINE,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, Mar 8, 2022 at 2:32 PM Peter Zijlstra wrote: > > On Tue, Mar 08, 2022 at 11:01:04PM +0100, Peter Zijlstra wrote: > > On Tue, Mar 08, 2022 at 12:00:52PM -0800, Alexei Starovoitov wrote: > > > On Tue, Mar 08, 2022 at 04:30:11PM +0100, Peter Zijlstra wrote: > > > > Hopefully last posting... > > > > > > > > Since last time: > > > > - verified clang-14-rc2 works > > > > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.ibt I observed the following error when building with CONFIG_LTO_CLANG_FULL=y enabled: ld.lld: error: ld-temp.o :7:2: symbol 'ibt_selftest_ip' is already defined ibt_selftest_ip: ^ Seems to come from commit a802350ba65a ("x86/ibt: Add IBT feature, MSR and #CP handling") Commenting out the label in the inline asm, I then observed: vmlinux.o: warning: objtool: identify_cpu()+0x6d0: sibling call from callable instruction with modified stack frame vmlinux.o: warning: objtool: identify_cpu()+0x6e0: stack state mismatch: cfa1=4+64 cfa2=4+8 These seemed to disappear when I kept CONFIG_LTO_CLANG_FULL=y but then disabled CONFIG_X86_KERNEL_IBT. (perhaps due to the way I hacked out the ibt_selftest_ip label). Otherwise defconfig and CONFIG_LTO_CLANG_THIN=y both built and booted in a vm WITHOUT IBT support. Any idea what's the status of IBT emulation in QEMU, and if it exists, what's the necessary `-cpu` flag to enable it? -- Thanks, ~Nick Desaulniers