From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Douglas Anderson <dianders@chromium.org>,
Robin Meijboom <robin@meijboom.info>,
Borislav Petkov <bp@alien8.de>, "H . Peter Anvin" <hpa@zytor.com>,
X86 ML <x86@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Sam Ravnborg <sam@ravnborg.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Michal Marek <michal.lkml@markovi.net>
Subject: Re: [PATCH 3/3] objtool: move tools/objtool/ to scripts/objtool/
Date: Tue, 5 Mar 2019 10:36:09 -0600 [thread overview]
Message-ID: <20190305163609.gz2cvpj7bxrnzdvm@treble> (raw)
In-Reply-To: <CAK7LNAS=K2Hp+idOsHQBCYwk5YndzSdHL=GmJZRxsF6De3isNA@mail.gmail.com>
On Wed, Mar 06, 2019 at 01:08:27AM +0900, Masahiro Yamada wrote:
> > I do see the benefits. In many ways objtool is a more natural fit in
> > the scripts dir. But there are also some downsides to this change:
> >
> > - This will make it harder to package objtool as a standalone tool. It
> > has a lot of functionality that could be useful to other non-kernel
> > projects.
>
>
> If it is really useful for other projects,
> I'd like to see it as a real standalone tool,
> i.e. split as a separate project.
Fine, but who's going to do it? I don't have time for creating such a
project anytime soon. And anyway, moving the code to scripts in the
meantime would just make that harder when we do it eventually.
> > - It shares libsubcmd with perf. Including the subcmd .c files from
> > tools is hacky.
>
> Yes, hacky. We are shifting the ugliness between C and Build system.
>
> But, this hack can be solved; if subcmd library is useful, you can copy
> only necessary code into the objtool directory. You do not need all
> helpers from libsubcmd.
But then we are duplicating code...
> > - It's disruptive: it will break all the out-of-tree distro kernel
> > packaging scripts which now look for objtool in tools.
>
> All artifacts under scripts/ should be contained in the package.
> So, it should work.
It *will* break distro scripts which already expect objtool to be
located at tools/objtool/objtool.
> > You're right that objtool isn't a natural fit in tools, because it's
> > also used as part of the build. But it's not a natural fit in scripts
> > either. I think we've resolved most of those issues and it seems to be
> > working well these days.
> >
> > So instead of disrupting everything because "make mrproper" doesn't
> > work, I think I'd rather just do the following:
> >
> > diff --git a/Makefile b/Makefile
> > index ac5ac28a24e9..7e6696c9b862 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1364,7 +1364,7 @@ PHONY += $(mrproper-dirs) mrproper
> > $(mrproper-dirs):
> > $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
> >
> > -mrproper: clean $(mrproper-dirs)
> > +mrproper: clean $(mrproper-dirs) tools/objtool_clean
> > $(call cmd,rmdirs)
> > $(call cmd,rmfiles)
> >
>
> Works, and the clean log is also brilliant.
>
> I see the same log even when
> there is nothing to clean.
>
>
> masahiro@grover:~/ref/linux$ make mrproper
> CLEAN .
> CLEAN arch/x86/entry/vdso
> CLEAN usr
> CLEAN arch/x86/tools
> CLEAN .tmp_versions
> CLEAN scripts/basic
> CLEAN scripts/kconfig
> CLEAN scripts/mod
> CLEAN scripts/selinux/genheaders
> CLEAN scripts/selinux/mdp
> CLEAN scripts
> DESCEND objtool
> CLEAN objtool
> CLEAN include/config include/generated arch/x86/include/generated
> CLEAN .config
> masahiro@grover:~/ref/linux$ make mrproper
> DESCEND objtool
> CLEAN objtool
> masahiro@grover:~/ref/linux$ make mrproper
> DESCEND objtool
> CLEAN objtool
Ok, but I'm sure that could be fixed. That's hardly a justification to
move objtool.
Anyway I would like to hear what Ingo and Peter think about moving it.
--
Josh
next prev parent reply other threads:[~2019-03-05 16:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 5:48 [PATCH 1/3] tools: move initial declarations out of 'for' loop Masahiro Yamada
2019-03-05 5:48 ` [PATCH 2/3] objtool: move stack-validation.txt to Documentation/ Masahiro Yamada
2019-03-05 14:44 ` Jonathan Corbet
2019-03-05 5:48 ` [PATCH 3/3] objtool: move tools/objtool/ to scripts/objtool/ Masahiro Yamada
2019-03-05 14:46 ` Josh Poimboeuf
2019-03-05 16:08 ` Masahiro Yamada
2019-03-05 16:36 ` Josh Poimboeuf [this message]
2019-03-05 16:59 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190305163609.gz2cvpj7bxrnzdvm@treble \
--to=jpoimboe@redhat.com \
--cc=bp@alien8.de \
--cc=dianders@chromium.org \
--cc=hpa@zytor.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=robin@meijboom.info \
--cc=sam@ravnborg.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).