Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2254670pxm; Fri, 4 Mar 2022 12:25:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcOJ1m+4KdBfazTdbs7FoV+JX3nYokAhmDTxi03VlWYncEYScP0NF4cxVFguDhyIe0WEma X-Received: by 2002:a17:903:32c3:b0:151:58b1:adf8 with SMTP id i3-20020a17090332c300b0015158b1adf8mr169081plr.29.1646425534744; Fri, 04 Mar 2022 12:25:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646425534; cv=none; d=google.com; s=arc-20160816; b=fggGbJ4ADjNN0n6QIXn/mAiYpbsZHKIMw+/0P5107UUVuncwO9dBVuHwbguu6mLj7F uNVsea7vozBSbjk2Gb5F9RSOwLOla77QjvYwOahGfhcVbo8ZELXgyAWcz8ZmNoUmm02X peum5SS3vuDXRZVV8DH7C0YpT41+hHgUkDnN/JTsk/Ts0OriifaF5bk6Gx23H4RiRyFo b6X//vbQEp632l3/eAW53NMy5t7rarwPaHQEcI0eYq79Yx3H3HV3UzhtaCb+0MX98Kyl LifBheb4YCDOhnRNT9mHtzO9IE+vt9sgpg5PmMPlSA2pJqzJESZN3GKgOKCjhCHWUOj7 K5rg== 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=I4ZKVBEqpD+ysA4vir9PME5bQFpz3Ac3BNNdB3Q/6QU=; b=UOQypsKUbxB/w179KOKF/v9zsKA/mRUumCAc+xzuOk+SuIprBv4w1tirjbNO+RVH2m P8Aa2PhKCbe7LCoJgax4bH/4Rl3gf+sFKDjQXipBTaneeP/fKquYSCo2M/0TLgTWzqPh fjhWYvrD2yrM9MiCBvdxcRpOLObnfD1t4vfyxvuyGR/TueKLRPuo2W5F3KHMyLgSY+LE OcmJSuaUYDB9Hxm0QEjCa5InKVIhz/IwnP4i/FMOOsZpRY72yAg7gSoavrRBuN8VOrqW u8Y6jqllGhSYJkU7IsAdYCHBZVw8xi/vgufJ9a0wDcOfUKRLKNMASLURMTPXaQtC/RWv 4o7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvXliKjp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bh11-20020a170902a98b00b001491138a661si5095410plb.331.2022.03.04.12.25.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:25:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvXliKjp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B9CBD139CFC; Fri, 4 Mar 2022 11:33:23 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241415AbiCDR6c (ORCPT + 99 others); Fri, 4 Mar 2022 12:58:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239108AbiCDR6a (ORCPT ); Fri, 4 Mar 2022 12:58:30 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AD41919296 for ; Fri, 4 Mar 2022 09:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646416659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I4ZKVBEqpD+ysA4vir9PME5bQFpz3Ac3BNNdB3Q/6QU=; b=LvXliKjpT6pitk/1rd0tE3vM+Z5raSCnRzFyxT5UzrWTU6WaN57DDs6PKjvAjvD4iLLRzM xU+DLliYDcut43F59GIFYubDV52jSkldx6/yfOa3HVyJAlw/UG5cGP1FDnY8tHjDAvvjnf yhiZC/YB+YWX8cA2PWymiYaHqgq27jg= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-605-VHil7czXMcShmlpO99ebZg-1; Fri, 04 Mar 2022 12:57:38 -0500 X-MC-Unique: VHil7czXMcShmlpO99ebZg-1 Received: by mail-qt1-f199.google.com with SMTP id bb7-20020a05622a1b0700b002e04e16d3easo2434045qtb.16 for ; Fri, 04 Mar 2022 09:57:38 -0800 (PST) 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=I4ZKVBEqpD+ysA4vir9PME5bQFpz3Ac3BNNdB3Q/6QU=; b=SEC1B7j/gDEgF1x4svFOyfSzHJDtOwk1QSoHnDTCfrZi5hqQyhTpzcW9R7/r12Srpb 5RBMCi9VLFIkZgUljktaqTDUqyLEjek8GPMdSvVZV1qGpz0cqGh2o4/a+/XU0OAhK/96 9VqU/P30sahtmXy9mqHJ7wQxpVIzM4Uq5aSaeSkd0LlUA2SShTR4GJ3ODzXKRfjyMn70 fDtFH2W4S2R6LEq4QM9WFkLOa+qLvOUi1Rt46SZa7BCMQYNfqNmr1KRG+HYr8a21/NN0 tOc7Li+uex+LCRBopfjtNb17EVk46CHC4m23ca6TkmCnIahIh7L1CUmIu/XuUCGgbvIF Q6eg== X-Gm-Message-State: AOAM533q3tAW3eiYArRV/dthzmLOIAcbNc0Kfqf1DE5Ttf1piboC12OC SbOsreSPnere3HwLxkGL7b629e78lccJhQvbCAmHBLZaGF9L3A0uy5rttrh/QJY07lnKxENcgOf Hp9aueCLFyFUh9O8MxIAFh2KI X-Received: by 2002:a05:622a:10f:b0:2e0:29ea:5ea1 with SMTP id u15-20020a05622a010f00b002e029ea5ea1mr17369027qtw.670.1646416657963; Fri, 04 Mar 2022 09:57:37 -0800 (PST) X-Received: by 2002:a05:622a:10f:b0:2e0:29ea:5ea1 with SMTP id u15-20020a05622a010f00b002e029ea5ea1mr17369012qtw.670.1646416657727; Fri, 04 Mar 2022 09:57:37 -0800 (PST) Received: from treble ([2600:1700:6e32:6c00::45]) by smtp.gmail.com with ESMTPSA id b83-20020a376756000000b005f191ae430fsm2774671qkc.128.2022.03.04.09.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 09:57:37 -0800 (PST) Date: Fri, 4 Mar 2022 09:57:33 -0800 From: Josh Poimboeuf To: Peter Zijlstra Cc: x86@kernel.org, joao@overdrivepizza.com, hjl.tools@gmail.com, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, ndesaulniers@google.com, keescook@chromium.org, samitolvanen@google.com, mark.rutland@arm.com, alyssa.milburn@intel.com, mbenes@suse.cz, rostedt@goodmis.org, mhiramat@kernel.org, alexei.starovoitov@gmail.com Subject: Re: [PATCH v3 22/39] x86/ibt: Add IBT feature, MSR and #CP handling Message-ID: <20220304175733.zoik2fqpizygnlq7@treble> References: <20220303112321.422525803@infradead.org> <20220303112826.299051388@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220303112826.299051388@infradead.org> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Thu, Mar 03, 2022 at 12:23:43PM +0100, Peter Zijlstra wrote: > +bool ibt_selftest(void) > +{ > + unsigned long ret; > + > + asm (" lea ibt_selftest_ip(%%rip), %%rax\n\t" > + ANNOTATE_RETPOLINE_SAFE > + " jmp *%%rax\n\t" > + ASM_REACHABLE > + ANNOTATE_NOENDBR > + "ibt_selftest_ip: nop\n\t" Maybe pedantic, but I find the annotations to be less surprising if they come after the label: "ibt_selftest_ip:\n\t" ASM_REACHABLE ANNOTATE_NOENDBR "nop\n\t" -- Josh