Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1897663pxp; Thu, 17 Mar 2022 20:48:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0XrwuXKBWc+for+VVpDNlTDJjRfFhmA1kBy6RUMNpgfLyQzsOK1l+Rufhx/M9nZJujqVv X-Received: by 2002:a17:90b:1a89:b0:1c6:4398:673 with SMTP id ng9-20020a17090b1a8900b001c643980673mr17211961pjb.40.1647575287122; Thu, 17 Mar 2022 20:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647575287; cv=none; d=google.com; s=arc-20160816; b=AbSnUL/HbNEDUI5AcIgyT5Ywjf/1BXvY+yLreVycNyL93aPwvGjko08z1EJQTjZJHT b0Vckg8RnFu3OpP5NKp72wEFUErD+4EjpMm+1vjJCjhlaDMn7eC+biYFWDFtwP/Vkwu2 Dr4rurctOsZvkwyYITCw2RaLejBsNRn84+OP80YjYufQQX/VnWUIp9UDOpjNpEk0JXZJ ZLCyKAL2Bkayea13GQS9B3NhhkS6yiRww3/aBoxFexf4lynPcR8jN1pMEdjVtTReQlur 74cn8SvBLgd527tBhMP/z013yQV147UOIIg9hXxO8Jngl72iKSNOKdzCePtfmcQmloCS Lcdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=sKOslQQPRho4HYmhQ6EYUTk2j9HeWAbVQlHwjrGkKZI=; b=Zlnb85M9W7HLAFAHTDHiJEpMR94q+owqSw60VEOgQDU5nfHTcLGeV31mCYuTwvk++i K+8J5peivtvDWoCHkKrf79912Dyvhip73Y4OADmVQZHQGhh2MkdahiDDONoQhN7tW/kD /ysbDk4u7fA1dUugk/y9948kcmm5npWm39ekOuE4MawVqbggmY0egH//4ftzMoPCZ1vx DEv8j3iSUB/J1wV0pMD+wYhSefmJgGrhruAO9S7S698yqIBKLMoRqozcoZkTDgOA+KXa BlCajej0t/vumEUzblquuPv3UfQdLLj72/g4kSe7b7FTRA6s4YwcFV2vg8V1j9Nqotam W7TA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e34-20020a630f22000000b003816043eea5si3860826pgl.154.2022.03.17.20.47.46; Thu, 17 Mar 2022 20:48:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231700AbiCRCJA convert rfc822-to-8bit (ORCPT + 99 others); Thu, 17 Mar 2022 22:09:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbiCRCI7 (ORCPT ); Thu, 17 Mar 2022 22:08:59 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 68EF81C5931 for ; Thu, 17 Mar 2022 19:07:41 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-138-muips4pANZGvgD4JdOOjog-1; Fri, 18 Mar 2022 02:07:38 +0000 X-MC-Unique: muips4pANZGvgD4JdOOjog-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 18 Mar 2022 02:07:37 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.033; Fri, 18 Mar 2022 02:07:37 +0000 From: David Laight To: 'Peter Zijlstra' , 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 Thread-Topic: [PATCH v4 00/45] x86: Kernel IBT Thread-Index: AQHYOjfxkjA80HyQbUOAw96zl/91g6zEYw+g Date: Fri, 18 Mar 2022 02:07:37 +0000 Message-ID: <260c9402b6d647a39b4a5cf51024963d@AcuMS.aculab.com> References: <20220312154407.GF28057@worktop.programming.kicks-ass.net> <20220313085214.GK28057@worktop.programming.kicks-ass.net> <20220315081522.GA8939@worktop.programming.kicks-ass.net> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 From: Peter Zijlstra > Sent: 17 March 2022 19:45 > > 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. I don't think it should make any difference. A quick peruse didn't show where targets-for-modules actually ends up being used (after being added to targets). But in a makefile, if you have: x: a b nothing requires make to generate 'a' before or after 'b'. gmake might have something similar to nmake's .ORDER directive but I don't remember seeing it defined anywhere. You can add 'b: a' to force the order (which is how .ORDER ends up being implemented). But I didn't spot anything of that nature. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)