From patchwork Mon Feb 3 08:55:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinghao Jia X-Patchwork-Id: 13957055 Received: from mx0b-00007101.pphosted.com (mx0b-00007101.pphosted.com [148.163.139.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB03F1FC11E; Mon, 3 Feb 2025 08:55:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.139.28 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738572951; cv=none; b=RPQndjJ2zHjIXBEtSbMCwYLQZMeXJwExDV7KCZzHebflcQ0Apuv4RrZYxMbtm8ju7UPyTvn0WJtW22CT7iGyGwRGNPgoCMOL25Io12GowzfyFNxtPpp9yyUK5gq4retbF1lZbuL4lvhMQkJ+tRVe5lIgDWnhhmSBU31eiCHM12E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738572951; c=relaxed/simple; bh=DwCoLwcXNGTa0TfQ4FCFmhswt8LEVnJuWU5KHLcGtfA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HtXAAB9BVeKNduaRefxQVRNllQy+Q4g1+4PS1CTdszXVX6bbsP9PSR0olFA89+dtBAedvSOwpDcz+bm9hA7inaNrmFYFUHYUKqmXm8ZuC/Bn1iTVHykMas7QFgqlaK8IlBOM4TPmVVlzE8pR0jATy6Iqvk+UB2iAM06QWRqukMc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=illinois.edu; spf=pass smtp.mailfrom=illinois.edu; dkim=pass (2048-bit key) header.d=illinois.edu header.i=@illinois.edu header.b=qNXa2KE8; arc=none smtp.client-ip=148.163.139.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=illinois.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=illinois.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=illinois.edu header.i=@illinois.edu header.b="qNXa2KE8" Received: from pps.filterd (m0272703.ppops.net [127.0.0.1]) by mx0b-00007101.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5134DPDw022317; Mon, 3 Feb 2025 08:55:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illinois.edu; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=campusrelays; bh=/QKn96iV LXUOLDfAuEjFOSwPTi0ktGJjTokNt8GuDHo=; b=qNXa2KE8/IDLXXYD766kBqtW Gj2LuDhm4qTddlOngh/mG9hJclBV2uLPm1TdTIwbG0hLlfDs+5/SYRV0OFF/d0Qa ooT2iAM2G3ND88lKbZytKvcbIltsl+cU4I6EFk5UjVJT7jDU/fmQK8dgL70uB/7I z5Dp+/RqjpNNc6ULrdiof8p04Ml09xs6Y9gp/m/fwPLEsBsUAqdccrfUKQ9s/1BE r5mquNMJUH60DZKfNhVUPKO1lSFJsWTzZsRDW6C/Hd6LAZObyOq6hWG9gy+n6Jdz kravZkPdyR/vY9GjJ9wdSmunA8cn9LzGwU+csKKv17qmhxVnWv9Vk55rVYeQyw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-00007101.pphosted.com (PPS) with ESMTPS id 44jjep9xem-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Feb 2025 08:55:11 +0000 (GMT) Received: from m0272703.ppops.net (m0272703.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 5138q1nQ024616; Mon, 3 Feb 2025 08:55:10 GMT Received: from localhost.localdomain (oasis.cs.illinois.edu [130.126.137.13]) by mx0b-00007101.pphosted.com (PPS) with ESMTP id 44jjep9xed-2; Mon, 03 Feb 2025 08:55:10 +0000 (GMT) From: Jinghao Jia To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jiri Kosina , Benjamin Tissoires , Masahiro Yamada , Nicolas Schier , Ruowen Qin , Jinghao Jia Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH v3 1/3] samples/hid: remove unnecessary -I flags from libbpf EXTRA_CFLAGS Date: Mon, 3 Feb 2025 02:55:04 -0600 Message-ID: <20250203085506.220297-2-jinghao7@illinois.edu> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250203085506.220297-1-jinghao7@illinois.edu> References: <20250203085506.220297-1-jinghao7@illinois.edu> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: tgXTfZ-fRZH_XRGNqPYsjKZr-08GAJGP X-Proofpoint-GUID: ecVygsEaCsSlGXp6PT4nmELIfD12glzA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-03_03,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=cautious_plus_nq_notspam policy=cautious_plus_nq score=0 adultscore=0 malwarescore=0 clxscore=1015 mlxscore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030071 X-Spam-Score: 0 X-Spam-OrigSender: jinghao7@illinois.edu X-Spam-Bar: Commit 5a6ea7022ff4 ("samples/bpf: Remove unnecessary -I flags from libbpf EXTRA_CFLAGS") fixed the build error caused by redundant include path for samples/bpf, but not samples/hid. Apply the same fix on samples/hid as well. Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Tested-by: Ruowen Qin Signed-off-by: Jinghao Jia --- samples/hid/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/samples/hid/Makefile b/samples/hid/Makefile index 8ea59e9631a3..69159c81d045 100644 --- a/samples/hid/Makefile +++ b/samples/hid/Makefile @@ -40,16 +40,17 @@ BPF_EXTRA_CFLAGS += -I$(srctree)/arch/mips/include/asm/mach-generic endif endif -TPROGS_CFLAGS += -Wall -O2 -TPROGS_CFLAGS += -Wmissing-prototypes -TPROGS_CFLAGS += -Wstrict-prototypes +COMMON_CFLAGS += -Wall -O2 +COMMON_CFLAGS += -Wmissing-prototypes +COMMON_CFLAGS += -Wstrict-prototypes +TPROGS_CFLAGS += $(COMMON_CFLAGS) TPROGS_CFLAGS += -I$(objtree)/usr/include TPROGS_CFLAGS += -I$(LIBBPF_INCLUDE) TPROGS_CFLAGS += -I$(srctree)/tools/include ifdef SYSROOT -TPROGS_CFLAGS += --sysroot=$(SYSROOT) +COMMON_CFLAGS += --sysroot=$(SYSROOT) TPROGS_LDFLAGS := -L$(SYSROOT)/usr/lib endif @@ -112,7 +113,7 @@ clean: $(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OUTPUT) # Fix up variables inherited from Kbuild that tools/ build system won't like - $(MAKE) -C $(LIBBPF_SRC) RM='rm -rf' EXTRA_CFLAGS="$(TPROGS_CFLAGS)" \ + $(MAKE) -C $(LIBBPF_SRC) RM='rm -rf' EXTRA_CFLAGS="$(COMMON_CFLAGS)" \ LDFLAGS=$(TPROGS_LDFLAGS) srctree=$(HID_SAMPLES_PATH)/../../ \ O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= \ $@ install_headers From patchwork Mon Feb 3 08:55:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinghao Jia X-Patchwork-Id: 13957057 Received: from mx0b-00007101.pphosted.com (mx0b-00007101.pphosted.com [148.163.139.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E771F2063D0; Mon, 3 Feb 2025 08:55:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.139.28 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738572954; cv=none; b=jG/9nAWL9kaSo87WuiPMWlO43qyM4K9nYs1wX4GbOIPt7vvaC96s9IuP6Kmt6ln7cxvE5fcDp8poeNNW73fTUQrHf7nesR4l/ktj7TbGpEoRT3L48Aub1WzpLME4PvckJFbNvw8B/y4i++FoXDd/rUoW+9aDAVf3GfNJGFFbaa0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738572954; c=relaxed/simple; bh=ZKHIR6wnVvJMF1XgF9zruT066nKXFM3lisQyFGX6mOE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n2iCOmZORnjlxHNuGhQ3hYIvqIIP/jas2obkVL1j9lt9YQKAxjAVe1gkAlPzPGGCDFrx0On3p5XVnU9j5PtKUSDe8/jIgNT+YMuJSXn8M/fAzNsd1xciopyz5M2s5qyh4ANYx+EsEjwy9YCX72k9gLD8qc9HqcJuGyEw9oVnflc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=illinois.edu; spf=pass smtp.mailfrom=illinois.edu; dkim=pass (2048-bit key) header.d=illinois.edu header.i=@illinois.edu header.b=YKceePOp; arc=none smtp.client-ip=148.163.139.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=illinois.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=illinois.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=illinois.edu header.i=@illinois.edu header.b="YKceePOp" Received: from pps.filterd (m0272703.ppops.net [127.0.0.1]) by mx0b-00007101.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5137Nkfu001149; Mon, 3 Feb 2025 08:55:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illinois.edu; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=campusrelays; bh=xwved6j1 Vt8e4dOW6wJuBUwbHU2XqUSDmxms8fZezwg=; b=YKceePOpo2CPne72M7EWQ6mN 246TFojjU46Ux+IEDK78qpcgOn9cGGJ6FFPP+dURjrJFuy8R+rNXKiegHnTbzJrF wUdV/+Aa5iq/xpqBG3MCQXOW64P23lSGiqTzNdYKDCRi9gnpryX8Ch9ERcGdJo0y wVyHiM4+M5uEru3PAioGEe1v2/0sZk4Vu37lQYil7ZmTIRErW3ioxMjcJ1dt5LJv sXQoZb0Nfe2VZw9p2C9c57tJEc9NFJws8NiVis9cnaEGGAMOelWPO4v3+Gyt0BPk B0VA5ORs/oSX9OqQIZzW7jSsjKMFt5gyOv8T4oZsTSKynju8fydUWOFpLzXQvw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-00007101.pphosted.com (PPS) with ESMTPS id 44jjep9xep-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Feb 2025 08:55:12 +0000 (GMT) Received: from m0272703.ppops.net (m0272703.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 5138q1nS024616; Mon, 3 Feb 2025 08:55:12 GMT Received: from localhost.localdomain (oasis.cs.illinois.edu [130.126.137.13]) by mx0b-00007101.pphosted.com (PPS) with ESMTP id 44jjep9xed-3; Mon, 03 Feb 2025 08:55:12 +0000 (GMT) From: Jinghao Jia To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jiri Kosina , Benjamin Tissoires , Masahiro Yamada , Nicolas Schier , Ruowen Qin , Jinghao Jia Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH v3 2/3] samples/bpf: fix broken vmlinux path for VMLINUX_BTF Date: Mon, 3 Feb 2025 02:55:05 -0600 Message-ID: <20250203085506.220297-3-jinghao7@illinois.edu> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250203085506.220297-1-jinghao7@illinois.edu> References: <20250203085506.220297-1-jinghao7@illinois.edu> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: utht8fX9U7PwpEQZV63AUlwJrZg3C2-I X-Proofpoint-GUID: WmLRWqbcIJhW6UCjyXSOmOiOV-Ol0VDR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-03_03,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=cautious_plus_nq_notspam policy=cautious_plus_nq score=0 adultscore=0 malwarescore=0 clxscore=1015 mlxscore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxlogscore=810 bulkscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030071 X-Spam-Score: 0 X-Spam-OrigSender: jinghao7@illinois.edu X-Spam-Bar: Commit 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") changed kbuild working directory of bpf sample programs to samples/bpf, which broke the vmlinux path for VMLINUX_BTF, as the Makefiles assume the current work directory to be the kernel output directory and use a relative path (i.e., ./vmlinux): Makefile:316: *** Cannot find a vmlinux for VMLINUX_BTF at any of " /path/to/linux/samples/bpf/vmlinux", build the kernel or set VMLINUX_BTF like "VMLINUX_BTF=/sys/kernel/btf/vmlinux" or VMLINUX_H variable. Stop. Correctly refer to the kernel output directory using $(objtree). Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Tested-by: Ruowen Qin Signed-off-by: Jinghao Jia --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index dd9944a97b7e..5b632635e00d 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -307,7 +307,7 @@ $(obj)/$(TRACE_HELPERS): TPROGS_CFLAGS := $(TPROGS_CFLAGS) -D__must_check= VMLINUX_BTF_PATHS ?= $(abspath $(if $(O),$(O)/vmlinux)) \ $(abspath $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux)) \ - $(abspath ./vmlinux) + $(abspath $(objtree)/vmlinux) VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS)))) $(obj)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) From patchwork Mon Feb 3 08:55:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinghao Jia X-Patchwork-Id: 13957056 Received: from mx0b-00007101.pphosted.com (mx0b-00007101.pphosted.com [148.163.139.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5731E202C40; Mon, 3 Feb 2025 08:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.139.28 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738572954; cv=none; b=SHML77EHtvOHUpn79lVGnkxi0FUCZIJd8fmaueuo43TW7t1cEyc5vnBT3SqtRe2qIaY9QYMI11eLCMHh1HEKnudzroucT3XQOyyUVyAtp0h5EtWeymPR1CN0d5ytu2ygKhXrrHr8K9w0jEyrL66hiCWawrmnYGUj8gPABPWlHzs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738572954; c=relaxed/simple; bh=1YTO9INez+CnwjPY9kI4ZOAcWBmKf/Llmb8zbEm1NCA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OCjkLnxfwJkYLINsvCr8lgfPJm6mIpnYlxCeq4dr8O1CMA1vQ/J9sAZFssBmwkac+TTDLGCfd5aXHW5nCcAyyhH1Bx+VsI6CnFfAsY37E5qH0Gu1Vzzq9UzGov3EDcUwwEKk4o1NxsNKkdm4oXbk/310hDz19Eqdc3BzZBlpOBA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=illinois.edu; spf=pass smtp.mailfrom=illinois.edu; dkim=pass (2048-bit key) header.d=illinois.edu header.i=@illinois.edu header.b=Zd2H/+Um; arc=none smtp.client-ip=148.163.139.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=illinois.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=illinois.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=illinois.edu header.i=@illinois.edu header.b="Zd2H/+Um" Received: from pps.filterd (m0272703.ppops.net [127.0.0.1]) by mx0b-00007101.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5135Lxn0004344; Mon, 3 Feb 2025 08:55:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illinois.edu; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=campusrelays; bh=RCfMUHG2 VmNAH/8CCuKfGREBh8Aoub4r2DhMd+5tnUw=; b=Zd2H/+UmzcjVU2FJnFAWQciM rptV47Fj48QoHSPd0Afw+zR39O2mrobwfbRwpyqm+vBw5Tso1kczntTVEnwXErsz eI3p2tLqnY8MssqxM08uqqBYlvnXvcsa95Ki6uUD9AYUmwE15dqz4tJFv5zzP0Rv ZQ8q7HybQ+Sa/f5r5E6SPwkmXUcEtCKo7dJVMoAHwCiyiN3qIu0UyYJae/hZ+Mwa E+ArBP7VDFpCMPjWjV+SYR2l0N9qjGUMCvoivwo/xhRjlaJME19h5L7EOnpDECrb K+XPMPHCkDH6df7bszzl0oAC66nuZJGKLK7hgwcYlPs/FAi8GTtj9yEoqAMaOQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-00007101.pphosted.com (PPS) with ESMTPS id 44jjep9xet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Feb 2025 08:55:13 +0000 (GMT) Received: from m0272703.ppops.net (m0272703.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 5138q1nU024616; Mon, 3 Feb 2025 08:55:13 GMT Received: from localhost.localdomain (oasis.cs.illinois.edu [130.126.137.13]) by mx0b-00007101.pphosted.com (PPS) with ESMTP id 44jjep9xed-4; Mon, 03 Feb 2025 08:55:13 +0000 (GMT) From: Jinghao Jia To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jiri Kosina , Benjamin Tissoires , Masahiro Yamada , Nicolas Schier , Ruowen Qin , Jinghao Jia Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH v3 3/3] samples/hid: fix broken vmlinux path for VMLINUX_BTF Date: Mon, 3 Feb 2025 02:55:06 -0600 Message-ID: <20250203085506.220297-4-jinghao7@illinois.edu> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250203085506.220297-1-jinghao7@illinois.edu> References: <20250203085506.220297-1-jinghao7@illinois.edu> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: OdQjC_8YDZj7se2XaZ61oCTyjWVSYnGU X-Proofpoint-GUID: c5o_IbYaaHI99HPpe15OxgXV0rmloE1j X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-03_03,2025-01-31_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=cautious_plus_nq_notspam policy=cautious_plus_nq score=0 adultscore=0 malwarescore=0 clxscore=1015 mlxscore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxlogscore=887 bulkscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502030071 X-Spam-Score: 0 X-Spam-OrigSender: jinghao7@illinois.edu X-Spam-Bar: Commit 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") changed kbuild working directory of hid-bpf sample programs to samples/hid, which broke the vmlinux path for VMLINUX_BTF, as the Makefiles assume the current work directory to be the kernel output directory and use a relative path (i.e., ./vmlinux): Makefile:173: *** Cannot find a vmlinux for VMLINUX_BTF at any of " /path/to/linux/samples/hid/vmlinux", build the kernel or set VMLINUX_BTF or VMLINUX_H variable. Stop. Correctly refer to the kernel output directory using $(objtree). Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Tested-by: Ruowen Qin Suggested-by: Daniel Borkmann Suggested-by: Andrii Nakryiko Signed-off-by: Jinghao Jia --- samples/hid/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/hid/Makefile b/samples/hid/Makefile index 69159c81d045..db5a077c77fc 100644 --- a/samples/hid/Makefile +++ b/samples/hid/Makefile @@ -164,7 +164,7 @@ $(obj)/hid_surface_dial.o: $(obj)/hid_surface_dial.skel.h VMLINUX_BTF_PATHS ?= $(abspath $(if $(O),$(O)/vmlinux)) \ $(abspath $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux)) \ - $(abspath ./vmlinux) + $(abspath $(objtree)/vmlinux) VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS)))) $(obj)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL)