Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1655645pxp; Thu, 17 Mar 2022 13:44:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyfssXSbviredu/6Z/PJ7Oo69EuVTzGQifVav+W4TZZSzNWrZgz9mh4HzA39YF+clIMyZB X-Received: by 2002:a17:903:110d:b0:14d:ca32:cae9 with SMTP id n13-20020a170903110d00b0014dca32cae9mr6562709plh.30.1647549896065; Thu, 17 Mar 2022 13:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647549896; cv=none; d=google.com; s=arc-20160816; b=iGqyp02PUvy3AXDXUTsYCRVH0oyrPKI+flQZvuy3JLicTDNyPH+kwhX/QKXHRwfjX0 012mnvCziXmJi0EAB0LWfua/StJ1d3iq6gN/ktImpkDTnObhX4jOEqDTpeLrmj5CR+n0 ylZBT0h/jGvS2keKFQoKsubfYh2rA4+SSNXa1uXiOnWJjm9yDuJ9jU7JWSyBfawHEaKJ +fHZ4qGgEgRACdognnWkEAu/jLi5gYU5QsG4t2aEWXw3dpPM3hP/CLzUY+lWVndCK3gN INJe2U3MvlIJ3JBaB7ERumyhz4hckjErJ2bmKU/3a4uHOXbUfNvwOD1TfEk9KcwVLKrE Cf7Q== 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=JIZOHSN9Cp/RhF5NPH12ZhlfFlJw2FESR1XfKMbt/b0=; b=JW0yq1LwgyzizzGkW/LjAlyVziknCn71FudPn0xAgGYyrehwp9/ZIy1FUhhoNNLV3o 2JBVyuMivdo1nTmrZdH2fZnARHywHvE1m8oMQFnbnw6LGJsRIxZochdAwhBwj0YWiWMy fDu/GOE1AbYyViqjVOdUPPe0zLyAyOSB7onDgpUn5E+ONHDRYvpnjpG+X0dx77DM5fCx +eWfd8kuHLaKPwP6SShBXvIseqdroBvDZs+o1LIWM4ItYEr5sVKZbpiWDomLBbBIZykx I8hygKMSQwUCbZplLHifNrmbSFGr5O0rhZ+cCy8tBbbEZU5lt1nAismJML45iiLoDnUo YHSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Nnbn7Tho; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id fv13-20020a17090b0e8d00b001c64f1ecc09si3298249pjb.76.2022.03.17.13.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:44:56 -0700 (PDT) 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=@infradead.org header.s=desiato.20200630 header.b=Nnbn7Tho; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8FFDF1C5507; Thu, 17 Mar 2022 13:12:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbiCQTqm (ORCPT + 99 others); Thu, 17 Mar 2022 15:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiCQTql (ORCPT ); Thu, 17 Mar 2022 15:46:41 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64A5D23D461; Thu, 17 Mar 2022 12:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JIZOHSN9Cp/RhF5NPH12ZhlfFlJw2FESR1XfKMbt/b0=; b=Nnbn7ThouyfyEnMTAAbC/NugI/ ReXFd9lVFS2bfNkuzgeHtM5x0ZTmQ/bBF4G83n23OhSw/hGN1bKocVK1hePguJn/Pm7Gw/cLqU580 XSKL4YDgBE/HsRQd2DFIQR6IVCoT/B1eaVB2r1vZXID6aIOJ4T9ENGyY0ukV5TYZhVwm2q478CNmH NIFX1tkoTjnip9Dsr5xq/G6/B/aTqx9YD6f6os8lszxdGEKNIt92kqqMdh6h191C0LiJZR2gWRUgr OJHpv0Q/mtvNtxlzL5sreFFDINtblmHnPpxHVe4YnIpj723e7zUZtMV9T29wm8a+ZitvvUEuXZkqO PWXdfZ5w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUw3G-001yvc-Bh; Thu, 17 Mar 2022 19:44:50 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0B44530003A; Thu, 17 Mar 2022 20:44:47 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BF2DD30C650C5; Thu, 17 Mar 2022 20:44:47 +0100 (CET) Date: Thu, 17 Mar 2022 20:44:47 +0100 From: Peter Zijlstra To: Masahiro Yamada Cc: Alexei Starovoitov , Kumar Kartikeya Dwivedi , X86 ML , joao@overdrivepizza.com, "H . J . Lu" , Josh Poimboeuf , Andrew Cooper , LKML , Nick Desaulniers , Kees Cook , Sami Tolvanen , Mark Rutland , alyssa.milburn@intel.com, Miroslav Benes , Steven Rostedt , Masami Hiramatsu , Daniel Borkmann , Andrii Nakryiko , bpf Subject: Re: [PATCH v4 00/45] x86: Kernel IBT Message-ID: References: <20220312154407.GF28057@worktop.programming.kicks-ass.net> <20220313085214.GK28057@worktop.programming.kicks-ass.net> <20220315081522.GA8939@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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=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 Wed, Mar 16, 2022 at 01:28:08AM +0900, Masahiro Yamada wrote: > On Tue, Mar 15, 2022 at 5:15 PM Peter Zijlstra wrote: > > Index: linux-2.6/scripts/Makefile.build > > =================================================================== > > --- linux-2.6.orig/scripts/Makefile.build > > +++ linux-2.6/scripts/Makefile.build > > @@ -86,12 +86,18 @@ ifdef need-builtin > > targets-for-builtin += $(obj)/built-in.a > > endif > > > > -targets-for-modules := $(patsubst %.o, %.mod, $(filter %.o, $(obj-m))) > > +targets-for-modules := > > > Why do you need to change this line? > > > > > > > ifdef CONFIG_LTO_CLANG > > targets-for-modules += $(patsubst %.o, %.lto.o, $(filter %.o, $(obj-m))) > > endif > > > > +ifdef CONFIG_X86_KERNEL_IBT > > +targets-for-modules += $(patsubst %.o, %.objtool, $(filter %.o, $(obj-m))) > > +endif > > + > > +targets-for-modules += $(patsubst %.o, %.mod, $(filter %.o, $(obj-m))) > > + > > ifdef need-modorder > > targets-for-modules += $(obj)/modules.order > > endif The thinking was that by having the .objtool rule before the .mod rule, objtool runs first. If mod runs before objtool, objtool will change the timestamp and then mod will get remade, even if nothing's changed.