Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp536825rbb; Sat, 24 Feb 2024 11:19:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXW+o/znwT1kZmZuJM9kA4nRzpkerNDHHyj1L1tykuhtp539tPSQuC7fpV3G6aixn34XMgQZx6KsUe9NMPT5JLI28H8B0k586QFNNawLw== X-Google-Smtp-Source: AGHT+IHIfFzuT4Y922EumsvoTYUnXi+jumQ+xANBUuUfLERvWY0xwaVQYsFAqJzC8EQGBng5pDg/ X-Received: by 2002:a05:6e02:1e0b:b0:365:b9e:bdb7 with SMTP id g11-20020a056e021e0b00b003650b9ebdb7mr4266886ila.22.1708802357403; Sat, 24 Feb 2024 11:19:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708802357; cv=pass; d=google.com; s=arc-20160816; b=xeDIyY3OPKh/nnlDr62CxN8jORUK31etx3BX/2V0qyQvSRYNkHHIqEhXFoEZOwuSO9 EPOuPvyyTSPbkwkUovVHGFW/bkDzoiRsgaNNJYLm8fQ1o12w2dWBaECg/VYDt58LdW/y PFKq6iwPnbzWkL/7VZrdkKMBPzyq4gcfK4pbmQY+z1xy2yRJopQwpV+ZSGjvCfH+gJV0 MNoK+pmxDQKe7/3l769dDlxR4ybssP4lidtuoh9BxQTWuhAOfl36mS3FJMgbrTZaq8La DtqcEFfQwJWPa+7wdcEiqzgAL3NRdiQqa06uwr1USYWvYeHJjxUSgsKnMeTBckyBfxzE HkjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=qR6Uf/hJ5IVuBEGWnR8Fp0SCf+fS67gdVlvmoGdV0Io=; fh=kJ9/fc8HQnSwUMTM92UYn1tECNCab59+npqasmw2UjM=; b=qRCnp8lkyjKMP5aUythN9L48vOjNHgc3J2fQFUgSy7k1nyV6lu9RKdDpniItRFrn4A WVWigZRQ7zWKfSB7zQstAhDoULL28enVR25qYvvwVavGDUXUDIQ/aTjPMHcWg5BrckS/ 2LB61tdyI9OVKfKrBLlAsjuy2xtemhJ7LdHp3Jy/4ira80RCJEUHlaXrwVMmISzrh/4U XOSQr49IsqkCuQX6akFszZOHo/gjTq7EF7SKJWzH6vPWp8KvJeOv2zhB3rI3c7+YHQ6V OR753K+m51MZ816+0S+oYDu6P08YetUyL5VkyrpU1si3fFlL3MKA3Z930lOjpQIOwlrO JZrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79802-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79802-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bv63-20020a632e42000000b005dccfa9a75asi1213986pgb.845.2024.02.24.11.19.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 11:19:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79802-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-79802-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79802-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D97C2829F9 for ; Sat, 24 Feb 2024 19:19:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34377487A7; Sat, 24 Feb 2024 19:19:13 +0000 (UTC) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DCB94879B; Sat, 24 Feb 2024 19:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708802352; cv=none; b=a5tBvTuW9zQr3wk4MHoobovW/9K185PnslQA6Xlf1Af0jpwXWKZ8U02JmJ/cBH4aImerUHKv+EGVejdG4wfTiUCwkpI5xC/RrCtlST51wI2ra7K/TLmcasSM1Ayccr8U87jnGNgVLbHJ50E/FC8n4d/Ch6aKk5ncunMBsTR/zSw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708802352; c=relaxed/simple; bh=EIBC3ik/1IgUIYuIzkjpB25tXBwPX2pnTpaTkdtCpig=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IOmLIwgz9P+W1CUieD8WmAkk5ZbOgmt/aFBjZ9HU5++ScYp2R1zXTON+MiEPAerjrxWkcjzfZj1BNSwJuY3yr0DpesgzSV0OFleFNXHsEA1I5cor4mn8v78dGq6ZQ1s8J0YaqTntIRv8LWp7Yz7OmnAR9jPzd2X79PXygo/uzEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-29aa77e86b2so178949a91.0; Sat, 24 Feb 2024 11:19:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708802350; x=1709407150; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qR6Uf/hJ5IVuBEGWnR8Fp0SCf+fS67gdVlvmoGdV0Io=; b=P/rGLcq9GBPyuYJGFRYlxp9dCLUGl8P6xfvG2etlZpPyIZrxPWN64hm4sFwh10c8Jk KA9vX4IPDWawA9lEU5Z/GNskvA7ClGaa5O4qBmCq464m+6sC5eYf8z8A4miD4ZGsMb0I Z8FAMLiNoOdmuGTddnhy/M6r1ypHUHxhLMpph4S/1v+03zfZVoPDcS70ADkwEvdTQpax /HvNmn5Ktl9q+jXV2r7mgCrwAUZabZGMvqjQsqQ9Ov+oYsa/lZvN+L1ho/74N5JQKO99 W2HSNBBRwfm/3CdgIYfTtsjV03gQRBAmAu0DbI1FwHLBPDqgWPAikPx9ElR+iftX1l1y L25A== X-Forwarded-Encrypted: i=1; AJvYcCUETSyDTToRnzzkvQ0/Osqn7/Dn/YffaKojPlcacXEqWGPZoAuMbpJ66QO7faYtHcCSfHNZrgwdimctogLzOTNcxAB8yQKLxBBxqmWtdR4gCZgctskE1DJUKgfxNTI/qGq1gUcf4pzOdW5OVGLa5Q== X-Gm-Message-State: AOJu0YxzTGeXppjfAQLuGHHSFuhYR1r5J4MjYnI4dcqGEfUhqx+m6Wkf 2OzhcdSv0CA7Mp9hweYdEk7TTlEgS0IYvMJoZDwWGQto9it1aSyqWyPfUIHAo7o8KJuSs2PegqI Vg3gq2pGWpcSSnxi2ByQDNIg/44R8e/0x X-Received: by 2002:a17:90b:3017:b0:299:7c4f:c8ee with SMTP id hg23-20020a17090b301700b002997c4fc8eemr1967496pjb.19.1708802350152; Sat, 24 Feb 2024 11:19:10 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Sat, 24 Feb 2024 11:18:58 -0800 Message-ID: Subject: Re: [PATCH 1/1] perf bpf: Check that the minimal vmlinux.h installed is the latest one To: Ian Rogers Cc: Arnaldo Carvalho de Melo , Stephen Rothwell , Linux Kernel Mailing List , linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Feb 24, 2024 at 7:57=E2=80=AFAM Ian Rogers wro= te: > > On Sat, Feb 24, 2024 at 7:48=E2=80=AFAM Arnaldo Carvalho de Melo > wrote: > > > > When building BPF skels perf will, by default, install a minimalistic > > vmlinux.h file with the types needed by the BPF skels in > > tools/perf/util/bpf_skel/ in its build directory. > > > > When 29d16de26df17e94 ("perf augmented_raw_syscalls.bpf: Move 'struct > > timespec64' to vmlinux.h") was added, a type used in the augmented_raw_= syscalls > > BPF skel, 'struct timespec64' was not found when building from a pre-ex= isting > > build directory, because the vmlinux.h there didn't contain that type, > > ending up with this error, spotted in linux-next: > > > > CLANG /tmp/build/perf-tools-next/util/bpf_skel/.tmp/augmented_raw= _syscalls.bpf.o > > util/bpf_skel/augmented_raw_syscalls.bpf.c:329:15: error: invalid app= lication of 'sizeof' to an incomplete type 'struct timespec64' > > 329 | __u32 size =3D sizeof(struct timespec64); > > | ^ ~~~~~~~~~~~~~~~~~~~ > > util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward decl= aration of 'struct timespec64' > > 329 | __u32 size =3D sizeof(struct timespec64); > > | ^ > > util/bpf_skel/augmented_raw_syscalls.bpf.c:350:15: error: invalid app= lication of 'sizeof' to an incomplete type 'struct timespec64' > > 350 | __u32 size =3D sizeof(struct timespec64); > > | ^ ~~~~~~~~~~~~~~~~~~~ > > util/bpf_skel/augmented_raw_syscalls.bpf.c:350:29: note: forward decl= aration of 'struct timespec64' > > 350 | __u32 size =3D sizeof(struct timespec64); > > | ^ > > 2 errors generated. > > make[2]: *** [Makefile.perf:1158: /tmp/build/perf-tools-next/util/bpf= _skel/.tmp/augmented_raw_syscalls.bpf.o] Error 1 > > make[2]: *** Waiting for unfinished jobs.... > > make[1]: *** [Makefile.perf:261: sub-make] Error 2 > > make: *** [Makefile:113: install-bin] Error 2 > > make: Leaving directory '/home/acme/git/perf-tools-next/tools/perf' > > > > So add a Makefile dependency (Namhyung's suggestion) to make sure that > > the new tools/perf/util/bpf_skel/vmlinux/vmlinux.h minimal vmlinux is > > updated in the build directory, providing the moved 'struct timespec64' > > type. > > > > Fixes: 29d16de26df17e94 ("perf augmented_raw_syscalls.bpf: Move 'struct= timespec64' to vmlinux.h") > > Cc: Ian Rogers > > Cc: Namhyung Kim > > Reported-by: Stephen Rothwell > > Link: https://lore.kernel.org/lkml/CAM9d7ciaj80QZL0AS_T2HNBdMOyS-j1wBHQ= SYs=3DU3kHQimY1mQ@mail.gmail.com > > Signed-off-by: Arnaldo Carvalho de Melo > > Reviewed-by: Ian Rogers Suggested-by: Namhyung Kim Thanks, Namhyung