Message ID | 20230127135755.79929-3-mathieu.desnoyers@efficios.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp846700wrn; Fri, 27 Jan 2023 06:00:28 -0800 (PST) X-Google-Smtp-Source: AK7set/ZZ47ZCu/DTR/L4JdqgwiZE/iI7Htk0/n9DNu1H11E2YAgqwqUqCODJXBOvq3X5+KDxBAB X-Received: by 2002:a17:907:3e90:b0:87b:dac5:eb86 with SMTP id hs16-20020a1709073e9000b0087bdac5eb86mr2245092ejc.22.1674828028720; Fri, 27 Jan 2023 06:00:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674828028; cv=none; d=google.com; s=arc-20160816; b=EpJkgrJvyDWeAKKTP2uLGYqMQGyg7DbE/lu3Tuop27oAmB824HynDnwxCEWqKX4qY9 mLmBCGlT4Ppu5vjE+ip/P7H3sS31oE8YBsaEt8A0Ms+ORRMmug+xdZt9Xo6HwuFveEDy b6qm3UHorK33B3GVHR07UM8yEgSEpHgC0TdlSlEhuG4p3tPgjsyyEUYYwTcQcqXzWUdi dpYC5UY+cGsfnZzlPn+ykjjuAd/W3rOYBnW/b4blB9at7kKoStM3dHBu9IB3BpiWRhiZ 7NCBin6q+kiAQh32y9P8mr4PCHHp9NNUhrzhP6yPE8qFdnit5JOuPidJUWrtfy4/WK+d XB8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=83Tw6YAyIKj4BkaNTzfHH5A8bbxwiYRbJYIRe/NyYmY=; b=cbxMykM54MxY+b4lX64Db/u0BEcbZ+rSJ6mufYLJlk4DfoqJb8zkJXbZKSGQc1YXOg GA3cjglX22vh/+y1vf/G2tGzZ/i/0uGwZiehitfe2mwTNOxsu/gK0+0D5C7pU89wIXZ3 XaYWOkoIHOUr1oCTHtXCfnJjqgxnGUOgBQru1kMYtjDA8T9asxP13v1YjCO74CBmPvSU sL8cbntPW+a9r+nDbs4ZlHhwI0rh7dJSLr3YsWezXhxFAt0LhGeCbU8uj/FulleU65AK H1SdMyVyQD55UTYPdhaFq8+6p63vTwogqPIeo5X8FXj/O6Zw7ymFHOMaPubK72dhimTY DmBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=RysuPHCt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fw32-20020a170907502000b008778924dd93si4538911ejc.918.2023.01.27.05.59.58; Fri, 27 Jan 2023 06:00:28 -0800 (PST) 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; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=RysuPHCt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233770AbjA0N6R (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Fri, 27 Jan 2023 08:58:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233493AbjA0N6H (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Jan 2023 08:58:07 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C76F55A1; Fri, 27 Jan 2023 05:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1674827881; bh=NTvVtxLLbeLVXq8WxJE95PgnDlR3Xl0NO3dxx2J8GXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RysuPHCtLlPlqo5mT+og4dspKqX/H0sYpROyzZIuhBkQdpU4ZlBpTU5tJ30Dx7fWB l951DGkZw3D/ZY8DN+kC5oqH6DFOvPqXijPN3EgSLzHqNqNLWVs9xMqFO3uTyXr3j1 6OO2CWFHM8Mv5w3z3W6rINZ/Tx/14nDK+Vk0vNNm1QGiC5crNned+VyX8aVl9Xt/Ri o/XKqFsSyECpdOITtsRkc7OrVwyCilzgkJBs2AHzQUILaa8zeskKM6BU0p1Ov6WyW6 PJ9w3mrMRsy241Jhhe0sDEuNurNVTMJe9Fw3HMmx1B6LjyvDhHFkfZUVTe8ZQCGwK9 GPCkKkejAFanw== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4P3K0T3xg5zhT7; Fri, 27 Jan 2023 08:58:01 -0500 (EST) From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> To: Shuah Khan <shuah@kernel.org>, linux-kselftest@vger.kernel.org, Ingo Molnar <mingo@redhat.com> Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, stable@vger.kernel.org Subject: [PATCH 02/34] selftests: bpf: Fix incorrect kernel headers search path Date: Fri, 27 Jan 2023 08:57:23 -0500 Message-Id: <20230127135755.79929-3-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127135755.79929-1-mathieu.desnoyers@efficios.com> References: <20230127135755.79929-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756184474985271198?= X-GMAIL-MSGID: =?utf-8?q?1756184474985271198?= |
Series |
selftests: Fix incorrect kernel headers search path
|
|
Commit Message
Mathieu Desnoyers
Jan. 27, 2023, 1:57 p.m. UTC
Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 1/27/23 06:57, Mathieu Desnoyers wrote: > Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents > building against kernel headers from the build environment in scenarios > where kernel headers are installed into a specific output directory > (O=...). > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > Cc: Shuah Khan <shuah@kernel.org> > Cc: linux-kselftest@vger.kernel.org > Cc: Ingo Molnar <mingo@redhat.com> > Cc: <stable@vger.kernel.org> [5.18+] > --- > tools/testing/selftests/bpf/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > index c22c43bbee19..6998c816afef 100644 > --- a/tools/testing/selftests/bpf/Makefile > +++ b/tools/testing/selftests/bpf/Makefile > @@ -327,7 +327,7 @@ endif > CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH)) > BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \ > -I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \ > - -I$(abspath $(OUTPUT)/../usr/include) > + $(KHDR_INCLUDES) > > CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \ > -Wno-compare-distinct-pointer-types Adding bpf maintainers - bpf patches usually go through bpf tree. Acked-by: Shuah Khan <skhan@linuxfoundation.org> thanks, -- Shuah
On Mon, Jan 30, 2023 at 8:12 AM Shuah Khan <skhan@linuxfoundation.org> wrote: > > On 1/27/23 06:57, Mathieu Desnoyers wrote: > > Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents > > building against kernel headers from the build environment in scenarios > > where kernel headers are installed into a specific output directory > > (O=...). > > > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > > Cc: Shuah Khan <shuah@kernel.org> > > Cc: linux-kselftest@vger.kernel.org > > Cc: Ingo Molnar <mingo@redhat.com> > > Cc: <stable@vger.kernel.org> [5.18+] > > --- > > tools/testing/selftests/bpf/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > > index c22c43bbee19..6998c816afef 100644 > > --- a/tools/testing/selftests/bpf/Makefile > > +++ b/tools/testing/selftests/bpf/Makefile > > @@ -327,7 +327,7 @@ endif > > CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH)) > > BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \ > > -I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \ > > - -I$(abspath $(OUTPUT)/../usr/include) > > + $(KHDR_INCLUDES) > > > > CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \ > > -Wno-compare-distinct-pointer-types > > > > Adding bpf maintainers - bpf patches usually go through bpf tree. > > Acked-by: Shuah Khan <skhan@linuxfoundation.org> Please resubmit as separate patch with [PATCH bpf-next] subj and cc bpf@vger, so that BPF CI can test it on various architectures and config combinations.
On 2023-01-30 11:26, Alexei Starovoitov wrote: > On Mon, Jan 30, 2023 at 8:12 AM Shuah Khan <skhan@linuxfoundation.org> wrote: >> >> On 1/27/23 06:57, Mathieu Desnoyers wrote: >>> Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents >>> building against kernel headers from the build environment in scenarios >>> where kernel headers are installed into a specific output directory >>> (O=...). >>> >>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> >>> Cc: Shuah Khan <shuah@kernel.org> >>> Cc: linux-kselftest@vger.kernel.org >>> Cc: Ingo Molnar <mingo@redhat.com> >>> Cc: <stable@vger.kernel.org> [5.18+] >>> --- >>> tools/testing/selftests/bpf/Makefile | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile >>> index c22c43bbee19..6998c816afef 100644 >>> --- a/tools/testing/selftests/bpf/Makefile >>> +++ b/tools/testing/selftests/bpf/Makefile >>> @@ -327,7 +327,7 @@ endif >>> CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH)) >>> BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \ >>> -I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \ >>> - -I$(abspath $(OUTPUT)/../usr/include) >>> + $(KHDR_INCLUDES) >>> >>> CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \ >>> -Wno-compare-distinct-pointer-types >> >> >> >> Adding bpf maintainers - bpf patches usually go through bpf tree. >> >> Acked-by: Shuah Khan <skhan@linuxfoundation.org> > > Please resubmit as separate patch with [PATCH bpf-next] subj > and cc bpf@vger, so that BPF CI can test it on various architectures > and config combinations. Hi Shuah, Do you have means to resubmit it on your end, or should I do it ? Thanks, Mathieu
On 1/30/23 10:00, Mathieu Desnoyers wrote: > On 2023-01-30 11:26, Alexei Starovoitov wrote: >> On Mon, Jan 30, 2023 at 8:12 AM Shuah Khan <skhan@linuxfoundation.org> wrote: >>> >>> On 1/27/23 06:57, Mathieu Desnoyers wrote: >>>> Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents >>>> building against kernel headers from the build environment in scenarios >>>> where kernel headers are installed into a specific output directory >>>> (O=...). >>>> >>>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> >>>> Cc: Shuah Khan <shuah@kernel.org> >>>> Cc: linux-kselftest@vger.kernel.org >>>> Cc: Ingo Molnar <mingo@redhat.com> >>>> Cc: <stable@vger.kernel.org> [5.18+] >>>> --- >>>> tools/testing/selftests/bpf/Makefile | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile >>>> index c22c43bbee19..6998c816afef 100644 >>>> --- a/tools/testing/selftests/bpf/Makefile >>>> +++ b/tools/testing/selftests/bpf/Makefile >>>> @@ -327,7 +327,7 @@ endif >>>> CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH)) >>>> BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \ >>>> -I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \ >>>> - -I$(abspath $(OUTPUT)/../usr/include) >>>> + $(KHDR_INCLUDES) >>>> >>>> CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \ >>>> -Wno-compare-distinct-pointer-types >>> >>> >>> >>> Adding bpf maintainers - bpf patches usually go through bpf tree. >>> >>> Acked-by: Shuah Khan <skhan@linuxfoundation.org> >> >> Please resubmit as separate patch with [PATCH bpf-next] subj >> and cc bpf@vger, so that BPF CI can test it on various architectures >> and config combinations. > > Hi Shuah, > > Do you have means to resubmit it on your end, or should I do it ? > Hi Mathieu, Please go ahead and resubmit. thanks, -- Shuah
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index c22c43bbee19..6998c816afef 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -327,7 +327,7 @@ endif CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH)) BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \ -I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \ - -I$(abspath $(OUTPUT)/../usr/include) + $(KHDR_INCLUDES) CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \ -Wno-compare-distinct-pointer-types