Received: by 2002:ab2:1c04:0:b0:1f7:53ba:1ebe with SMTP id f4csp65707lqg; Fri, 26 Apr 2024 08:54:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWv29xYprvDrrn5zfj8CeiBoIQWrUtn9bxeRz0gj9ZqEnFYev6lhyHTser/bNmX8+5ioGdkzNTiyl9IV2CaXP8crkfUnGSLCDXlBfLd0Q== X-Google-Smtp-Source: AGHT+IG05k+L6AURNic/nZvXjU3lu9YJYTCkkkFsNe7OhXENYoNUwedzmo/9D9fhfiPw1JzlERPK X-Received: by 2002:a05:6a21:3e04:b0:1ac:3b6e:3e4a with SMTP id bk4-20020a056a213e0400b001ac3b6e3e4amr3765260pzc.9.1714146891237; Fri, 26 Apr 2024 08:54:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714146891; cv=pass; d=google.com; s=arc-20160816; b=IgDGWf0qdZlUrZT8Zw+G/JBpF0JnQr1dMuZbXAoXA5Db3IwvppK8tJEN8imHibSYaY Yap65k1jUlhC9GrvYFeCS7FJIORBS47xKXoCaIw0LnVn1BJVOMun29mvHk1VpaCORlti ZIhNN+DuJIihEM7E/C8rXrVcsLj+/6QNzMoMRIUut+oPSI1CkWaGPYobXCxF3WSGKF2i rYP2NwnJF1BOBjty83nJcTViIjnBijxSMcK1tgdqHOktgQCiHdHaFk3XX4U8dY7acnZr j2AVAfgTeOZSp53cn4AQGqbXC3XLA4kXISUmVgnXosY43vbumtYwxqmIKx3SPlxwbxDp wSBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=xHnvLf7Wr6viAvKpwEcbiqJa9JjHx2np031W4DhJ6oE=; fh=F+X3PjwJaFbrSHUCGrkgMEPNU3D7yt2UUA3EJpsSalI=; b=UjlgbstVPGvo95ZUcsCbig8VxCvNxO2wiZk9fLxSif5GEaOi0/FUu+Uj2RMxKYUGwT GRA/4jzdLnxianmX5mrdJ256FMnldyMrns9CjLf7cuo0/4BwoxyfPGTxPYPV5Fu8qWGG PWNSvU+09+yAyjc0cMu6PXw3AdSWPn/PDLvSX9/skWlu5/ZgemfUb+zD0BNB6cNwymMz kKtxnZVGoCG4YXNTGPUw8zUYPaJbq1mgkv9JFz1+NFD6JEzGm8xN+rNoRdt8f9zZzj6D B65lh3UksT7mR8w6UysZvWrB2DsxkXNQlgAV+ic7eWuYb6CnjwX+dHVBHoCYsWCRtmym dJHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iogearbox.net header.s=default2302 header.b=ZkIkNbVd; arc=pass (i=1 spf=pass spfdomain=iogearbox.net dkim=pass dkdomain=iogearbox.net dmarc=pass fromdomain=iogearbox.net); spf=pass (google.com: domain of linux-kernel+bounces-160334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=iogearbox.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id gq6-20020a056a003bc600b006eb00065c4esi15170703pfb.298.2024.04.26.08.54.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:54:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iogearbox.net header.s=default2302 header.b=ZkIkNbVd; arc=pass (i=1 spf=pass spfdomain=iogearbox.net dkim=pass dkdomain=iogearbox.net dmarc=pass fromdomain=iogearbox.net); spf=pass (google.com: domain of linux-kernel+bounces-160334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=iogearbox.net 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 D6F4128377A for ; Fri, 26 Apr 2024 15:54:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E822514AD26; Fri, 26 Apr 2024 15:54:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=iogearbox.net header.i=@iogearbox.net header.b="ZkIkNbVd" Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) (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 D91ED1DFFC; Fri, 26 Apr 2024 15:54:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.133.104.62 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714146882; cv=none; b=fv1GRo7p9qGnClkR+wKy+QO03AGenjEsRNBrCW+Umy43NczdYipssBLSha8hzPw8/d8V311PICjyl1IbNUTi3MawCK60F/JBjmaSXYO3ggXfAiY0lMLyte3JM+1G9MkyeKwWBd8StoP3WoELfbmXfbva0J7yQB5V+VuuW9EGrAg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714146882; c=relaxed/simple; bh=/pT6qmm86/1dcB/Ev+EycfykmNlxY3DJMFoMITVHi9c=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=I1kT0XOoKySdfI924r4tPISi+Hz/bdHbHsG4mRk+WMBVzBYPgm5IlwYyzEJAEGR8oqfqKyx+LrIQan8KWezBsUefUL0fY4K5VsgTfLRZDpypEGPlBydlKBazVYAUGPS9ir0nkL1PGTVHSmYqV1b9H9OHedf7YXUvZRYHSuyQO18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=iogearbox.net; spf=pass smtp.mailfrom=iogearbox.net; dkim=pass (2048-bit key) header.d=iogearbox.net header.i=@iogearbox.net header.b=ZkIkNbVd; arc=none smtp.client-ip=213.133.104.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=iogearbox.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iogearbox.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=iogearbox.net; s=default2302; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=xHnvLf7Wr6viAvKpwEcbiqJa9JjHx2np031W4DhJ6oE=; b=ZkIkNbVdnmCqLHtNBDrPqBzOnn JCrup+nnr/p5SdAepZuWIZlanKeOF3Eh1RTf0K1BVnJ+E35HNo/66SIx10WDzeg6JRT/lYxF25X6f ZC7uO+HUmrexwZzHzMKNyTi75486ZoHpEe6n9dzpxaoCskliu4mkj4u60jqkSo0rLpqRJ7Z+dUPXO Q3TNtJ4DiuonOwR1PcFVrn908Zre7LAwtn+Z6bwFegSI699Fdna1YJmAS6dDgrms1L+Xio+z9P2FI yBqnViPwRMmDPKyWdr3fJhPLa8ugyfD21wkBfBIk9TTu/himbzBQrYtCIKrD0MG+aZtQA8Tw6Q+88 i8fajPyw==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www62.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s0NuA-000Bek-HI; Fri, 26 Apr 2024 17:54:30 +0200 Received: from [178.197.249.19] (helo=linux.home) by sslproxy04.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s0Nu9-0009yq-1F; Fri, 26 Apr 2024 17:54:29 +0200 Subject: Re: [PATCH bpf-next v3] bpf: btf: include linux/types.h for u32 To: Dmitrii Bundin , olsajiri@gmail.com Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, dxu@dxuuu.xyz, eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com, khazhy@chromium.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, martin.lau@linux.dev, ncopa@alpinelinux.org, ndesaulniers@google.com, sdf@google.com, song@kernel.org, vmalik@redhat.com, yonghong.song@linux.dev References: <20240420042457.3198883-1-dmitrii.bundin.a@gmail.com> From: Daniel Borkmann Message-ID: <9ca4b5dd-20be-79ac-52eb-a19c0c82280f@iogearbox.net> Date: Fri, 26 Apr 2024 17:54:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240420042457.3198883-1-dmitrii.bundin.a@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.10/27257/Fri Apr 26 10:25:03 2024) On 4/20/24 6:24 AM, Dmitrii Bundin wrote: > Inclusion of the header linux/btf_ids.h relies on indirect inclusion of > the header linux/types.h. Including it directly on the top level helps > to avoid potential problems if linux/types.h hasn't been included > before. > > The main motiviation to introduce this it is to avoid similar problems that nit: spelling > was shown up in the bpf tool where GNU libc indirectly pulls > linux/types.h causing compile error of the form: > > error: unknown type name 'u32' > u32 cnt; > ^~~ > > The bpf tool compile error was fixed at 62248b22d01e96a4d669cde0d7005bd51ebf9e76 > > Fixes: 9707ac4fe2f5 ("tools/resolve_btfids: Refactor set sorting with types from btf_ids.h") > > Signed-off-by: Dmitrii Bundin > --- > > Changes in v2: Add bpf-next to the subject > Changes in v3: Add Fixes tag and bpf tool commit reference > > include/linux/btf_ids.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h > index e24aabfe8ecc..c0e3e1426a82 100644 > --- a/include/linux/btf_ids.h > +++ b/include/linux/btf_ids.h > @@ -3,6 +3,8 @@ > #ifndef _LINUX_BTF_IDS_H > #define _LINUX_BTF_IDS_H > > +#include /* for u32 */ > + > struct btf_id_set { > u32 cnt; > u32 ids[]; > Lgtm, not sure if its worth it but also doesn't hurt and aligns the header from tooling a bit closer to the kernel one. Just to clarify, this does not fix a concrete issue today, so small 'cleanup' rather than 'fix'. Thanks, Daniel