From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F43C433EF for ; Thu, 17 Mar 2022 19:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229629AbiCQTqn (ORCPT ); Thu, 17 Mar 2022 15:46:43 -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: 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.