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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CA5FC31E40 for ; Tue, 13 Aug 2019 01:16:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D175206A2 for ; Tue, 13 Aug 2019 01:16:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="Vw73LRF6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726771AbfHMBQi (ORCPT ); Mon, 12 Aug 2019 21:16:38 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:33910 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726296AbfHMBQh (ORCPT ); Mon, 12 Aug 2019 21:16:37 -0400 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (authenticated) by conssluserg-02.nifty.com with ESMTP id x7D1GOuZ007521; Tue, 13 Aug 2019 10:16:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com x7D1GOuZ007521 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1565658985; bh=x5smtKv6h2v/8yhnlgaNROKfkSxy4oSJJ2BG1gO1UMU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Vw73LRF6GvWcTkIk4YL9p7Mb6B2ipWQdGfpjJZARhYwmrBOfg7f4Zwb8QaZBAM+sS DocaYDtxt3u0Oqe7+VfbltV5qtgiq09xFQw1eR03H2dWzBaVouilThMbW+Qb3Loxnu LYvbmUw5nKY2i9tHHYmo7ZJIzyjZbmhC1lJXFJoN2X3/h977H1IFdPz5KKTPw0gAcE l+XVJTyCnan/GIxeyiUNQrIUqjrahZbG8c/N7S1StGE6NQuW2MKw8H3q4AwEx5JB2W R5+Yltnaw60YNIwD8qvlfesHtUzkUmAERkMUTfTMK1nA5jXb8w1LCdDm5V5s/DmIov WUp9kVtgm2wug== X-Nifty-SrcIP: [209.85.217.47] Received: by mail-vs1-f47.google.com with SMTP id i7so4739238vsp.0; Mon, 12 Aug 2019 18:16:24 -0700 (PDT) X-Gm-Message-State: APjAAAXGH32cVmxuQGHEKsYuZqLqqPCP7v7VpRos7avdHj2ZbIl1yiCa W0hd26kO86aMo20hMh84h+BFYpulUpU4t74VnsM= X-Google-Smtp-Source: APXvYqz0M1H6vtA4f5I9ILfLTT+esNuxyIIfdFn001huHK5PQ6k9uZlOmUoXF2iErLZKRfLW0k/uYpfT0pVky1QDD3I= X-Received: by 2002:a67:8e0a:: with SMTP id q10mr24146079vsd.215.1565658983739; Mon, 12 Aug 2019 18:16:23 -0700 (PDT) MIME-Version: 1.0 References: <20190509143859.9050-1-joe.lawrence@redhat.com> <20190509143859.9050-4-joe.lawrence@redhat.com> <20190809184253.GA31811@redhat.com> In-Reply-To: <20190809184253.GA31811@redhat.com> From: Masahiro Yamada Date: Tue, 13 Aug 2019 10:15:47 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 03/10] livepatch: Add klp-convert tool To: Joe Lawrence Cc: Linux Kernel Mailing List , live-patching@vger.kernel.org, Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 10, 2019 at 3:42 AM Joe Lawrence 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 > #include > #include "klp-convert.h" > #include "list.h" > #include > #include > #include > #include > #include > #include > #include > > 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