All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Joe Lawrence <joe.lawrence@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	live-patching@vger.kernel.org,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH v4 03/10] livepatch: Add klp-convert tool
Date: Tue, 13 Aug 2019 10:15:47 +0900	[thread overview]
Message-ID: <CAK7LNARHQY_7E2ar47EZJmh=SD_Mf3p51AcKAecVLQip27+3Ug@mail.gmail.com> (raw)
In-Reply-To: <20190809184253.GA31811@redhat.com>

On Sat, Aug 10, 2019 at 3:42 AM Joe Lawrence <joe.lawrence@redhat.com> wrote:

> > > > diff --git a/scripts/livepatch/Makefile b/scripts/livepatch/Makefile
> > > > new file mode 100644
> > > > index 000000000000..2842ecdba3fd
> > > > --- /dev/null
> > > > +++ b/scripts/livepatch/Makefile
> > > > @@ -0,0 +1,7 @@
> > > > +hostprogs-y                    := klp-convert
> > > > +always                         := $(hostprogs-y)
> > > > +
> > > > +klp-convert-objs               := klp-convert.o elf.o
> > > > +
> > > > +HOST_EXTRACFLAGS               := -g -I$(INSTALL_HDR_PATH)/include -Wall
> > >
> > > This looks strange.
> > >
> > > Theoretically, you cannot include headers in $(INSTALL_HDR_PATH)/include
> > > from host programs.
> > >
> > > headers_install works for the target architecture, not host architecture.
> > > This may cause a strange result when you are cross-compiling the kernel.
> > >
> > > BTW, which header in $(INSTALL_HDR_PATH)/include do you need to include ?
> > >
> > >
> > > Also, -Wall is redundant because it is set by the top-level Makefile.
> >
> >
> > I deleted HOST_EXTRACFLAGS entirely,
> > and I was still able to build klp-convert.
> >
> >
> > What is the purpose of '-g' ?
> > If it is only needed for local debugging,
> > it should be removed from the upstream code, in my opinion.
> >
>
> HOST_EXTRACFLAGS looks like it was present in the patchset from the
> early RFC days and inherited through each revision.
>
> These are the files that the klp-convert code includes, mostly typical C
> usercode headers like stdio.h and a few local headers like elf.h:
>
>   % grep -h '^#include' scripts/livepatch/*.{c,h} | sort -u
>   #include "elf.h"
>   #include <fcntl.h>
>   #include <gelf.h>
>   #include "klp-convert.h"
>   #include "list.h"
>   #include <stdbool.h>
>   #include <stdio.h>
>   #include <stdlib.h>
>   #include <string.h>
>   #include <sys/stat.h>
>   #include <sys/types.h>
>   #include <unistd.h>
>
> If HOST_EXTRACFLAGS is really unneeded, we can easily drop it in the
> next patchset version.

Yes, please do so.

Thanks.



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2019-08-13  1:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 14:38 [PATCH v4 00/10] klp-convert livepatch build tooling Joe Lawrence
2019-05-09 14:38 ` [PATCH v4 01/10] livepatch: Create and include UAPI headers Joe Lawrence
2019-05-09 14:38 ` [PATCH v4 02/10] kbuild: Support for Symbols.list creation Joe Lawrence
2019-05-21 13:48   ` Masahiro Yamada
2019-05-09 14:38 ` [PATCH v4 03/10] livepatch: Add klp-convert tool Joe Lawrence
2019-07-31  2:50   ` Masahiro Yamada
2019-07-31  3:36     ` Masahiro Yamada
2019-08-09 18:42       ` Joe Lawrence
2019-08-13  1:15         ` Masahiro Yamada [this message]
2019-05-09 14:38 ` [PATCH v4 04/10] livepatch: Add klp-convert annotation helpers Joe Lawrence
2019-05-09 14:38 ` [PATCH v4 05/10] modpost: Integrate klp-convert Joe Lawrence
2019-05-09 14:38 ` [PATCH v4 06/10] modpost: Add modinfo flag to livepatch modules Joe Lawrence
2019-07-31  5:58   ` Masahiro Yamada
2019-08-12 15:56     ` Joe Lawrence
2019-08-15 15:05       ` Masahiro Yamada
2019-08-16  8:19         ` Miroslav Benes
2019-08-16 12:43           ` Joe Lawrence
2019-08-16 19:01             ` Joe Lawrence
2019-08-19  3:50               ` Masahiro Yamada
2019-08-19 15:55                 ` Joe Lawrence
2019-08-20  7:54                   ` Miroslav Benes
2019-08-19  3:49             ` Masahiro Yamada
2019-08-19  7:31               ` Miroslav Benes
2019-08-19 16:02                 ` Joe Lawrence
2019-08-22  3:35                   ` Masahiro Yamada
2019-08-13 10:26     ` Miroslav Benes
2019-05-09 14:38 ` [PATCH v4 07/10] livepatch: Add sample livepatch module Joe Lawrence
2019-08-16 11:35   ` Masahiro Yamada
2019-08-16 12:47     ` Joe Lawrence
2019-05-09 14:38 ` [PATCH v4 08/10] documentation: Update on livepatch elf format Joe Lawrence
2019-05-09 14:38 ` [PATCH v4 09/10] livepatch/selftests: add klp-convert Joe Lawrence
2019-05-09 14:38 ` [PATCH v4 10/10] livepatch/klp-convert: abort on special sections Joe Lawrence
2019-06-13 13:00 ` [PATCH v4 00/10] klp-convert livepatch build tooling Miroslav Benes
2019-06-13 13:15   ` Joe Lawrence
2019-06-13 20:48     ` Joe Lawrence
2019-06-14  8:34       ` Petr Mladek
2019-06-14 14:20         ` Joe Lawrence
2019-06-14 16:36           ` Libor Pechacek
2019-06-25 11:36         ` Miroslav Benes
2019-06-25 13:24           ` Joe Lawrence
2019-06-25 19:08           ` Joe Lawrence
2019-06-26 10:27             ` Miroslav Benes

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='CAK7LNARHQY_7E2ar47EZJmh=SD_Mf3p51AcKAecVLQip27+3Ug@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.