lkml.org 
[lkml]   [2022]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 00/45] x86: Kernel IBT
    On Wed, Mar 16, 2022 at 01:28:08AM +0900, Masahiro Yamada wrote:
    > On Tue, Mar 15, 2022 at 5:15 PM Peter Zijlstra <peterz@infradead.org> 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.

    \
     
     \ /
      Last update: 2022-03-17 20:46    [W:4.048 / U:0.240 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site