Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1685313lqa; Mon, 29 Apr 2024 16:33:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkxW+Di+Y5hHXNyiCFuzzcyAvlEK/aju2od3ng6zfb/R5IrdwiR8RqQI+CQkVOhmInayrowaySItVfqDhQFPo5dQzh1zLJazk/6Ll25A== X-Google-Smtp-Source: AGHT+IECvPBSpacdtoHIQvX8opofcWV+U2vw0730K7qSg7njKmyZjADiOZ2szDOXhMT+wAs38sSC X-Received: by 2002:a05:6a00:938c:b0:6f3:ebc4:4406 with SMTP id ka12-20020a056a00938c00b006f3ebc44406mr1220837pfb.7.1714433629847; Mon, 29 Apr 2024 16:33:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714433629; cv=pass; d=google.com; s=arc-20160816; b=kZ3V4XjQUi1U1XO7Kouk3E+7z8X/aTrzUAZIazzQj4Du4IYOjXoVDpCcpzUJYogitm Vh8AienUO1pMumzNN4DF63LT+4xOxgufbly3TcgO4R+YiB+0JNHLk9Eu97Gi6U+N5K/q qJVOwHQZ3DHW/otD52ivoeudx496MODujpibnyRjxLDIJ9bSURLhSiofvBoKFX/yV7XO NsujhnvtTKBGbzDSrBZa2mxTItBMF5LXGpVasDPLZ7xtSWmw2Wdmzm7bEwmusL+xRlL4 qbACrmF4j8PIulpO8K7uPFm+xb142mtfBSxMO9XFCSuJ4b76tit0LJwC1YoQVaDMmMo3 YRYg== 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:dkim-signature; bh=YMYqB0LtWhc+0CjtDjGhsDw8CY6a/Sty9wtvCB7feAw=; fh=XhaUJGA66NJfCGIgLhhmENVCIu5MJTsAKoIcvZ2Mits=; b=dFfWdEo9glSEqMrqtrLX7ah5fBjmAtqB4C0DdXne0FxtCKen5kZUyx3qI8rlzinnD4 Du6UlyTkPV0JHjsVpE5sGFcku7Zp8AzCcnyMk+W0blEE/jeHYEEUkQhUNwkyD6ERpJy7 iqqLd4oHAly2x5526HMX5E7X33rNV3rStluqPVEjW8Og5b0v7URvjicz89i/Izw0F8OK U2lHfGD49tnllCIFamhKQ3/g3VQBs0heslX4ASRUqiF5SqJ4vOKSLUuve9UIEHWgSKJx vf7915HfuVv3C4x7DthNP2+KnGbHFBS7cxbqEXl4paIG1Udf5k7/AYQMFdX/bfgJ72+Z MEoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IHzkzMPb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-163141-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gb12-20020a056a00628c00b006e77d8947b5si20338876pfb.275.2024.04.29.16.33.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 16:33:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163141-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; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IHzkzMPb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-163141-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 57162282BD6 for ; Mon, 29 Apr 2024 23:33:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2A31194C7B; Mon, 29 Apr 2024 23:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IHzkzMPb" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 7809F17B503; Mon, 29 Apr 2024 23:33:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714433621; cv=none; b=pAVYZNokAkolTe25DUOBvaR+ZIiwG+KGXQAcWAW/OOR+/NrR0Ia0Dl1EKR9jwV3R6kAulwJ9MuQ0zD+juN/EHApCnWU/ALJSlficnX9kDykRPJEErtoUcW9EZkoY9diVVd6/J+FcIsQGpt2kRvFIe3T+Y4mXAzds8l9JesdNWVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714433621; c=relaxed/simple; bh=LOpbprS7VSgPmB3FadLGYcwxHBq+r2EtWuHVRQlITko=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=WLdXmkCnck+FLhbWDWYC+jBmH/WB95WMyeNKAHxDWg7Kl03VUMzENBJNDRcYvqoLHEUwU8a/pRds+fb27mZ3j9fimyLNxCTrt3xw3/7xxoYtac6wlU1bFKBMAOBl3mffU+YRv97CiyrSnc5GTbAkT2Bl9VYEXE8k0c9vZA9spIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IHzkzMPb; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a5872b74c44so568551066b.3; Mon, 29 Apr 2024 16:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714433618; x=1715038418; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YMYqB0LtWhc+0CjtDjGhsDw8CY6a/Sty9wtvCB7feAw=; b=IHzkzMPbd8I++QR/423FMQ1N5HYch9jjvEPtaIBkTsfbUGMf6xREvoUjX20tyABJCg bp6H3qoMhBF7p40PKBIt6j7IFN67yGiDgeRfCCsv+gMbMcRpeloW7jDnt0udixF3cKMS nyTztCJwfy1bxaOUbQgjRWWYaHNrQQgDUQHuks54/mEBIOMFvr0DOQN/rmJx5gWZGj4O QhgE9YWlReHF0wFegxop33WSl8Fl9+br5MddgcU93AtYkdJlO/8JdNuSLB45EexINocc Uc5Nq0LmPrDGgTXhWsgwZ+OWV8XJ8xR2H51wAHCpTUBj6waACKoUHc1ulivKFzqLGN8q uc1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714433618; x=1715038418; 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=YMYqB0LtWhc+0CjtDjGhsDw8CY6a/Sty9wtvCB7feAw=; b=YQotkFF3gFaNC0o7ZlzME5nYJTJ/kB7dL4FMufRQLzj+/Xrn0FrkhOeyOEfTSbZzWf rhq+/TGfaFIHcxUqhIay595ffMD2zOo8gOL7CyvvD9Py23wewXcQbrwkY/ha37decLma 18T7EZLu+v0HSsJWUMM1IhxID3bXwVwrd7tb8risNhUQx5zfR/Eqc80p9UitXchvDT2q 4TwOxD+r7YH71OwIkcBFEGN4ng76EH1wh6Bq+r1KIdn4nzDjBPUy58UuYkjbqBWz3rz5 9nU4yquzP46xSyW09oZ3ZmqZO+8oNyj/SoiEYcKfGWzk4cWiKIZx2fRBfuJfk5n7OZNv /9+A== X-Forwarded-Encrypted: i=1; AJvYcCWTllZsi6oUVdvCZwUSM+DYrltp/kAgTtnqPbZgLnV0HhgEMGC9yKD1L0HnKXKc7N3usG6Hxx6YEcBFf4+nzGTdp58xFs4cmRCftB7GKY2KjGm+rUQtpysiA95j6nnmLMnI X-Gm-Message-State: AOJu0Yzcot5s29Uj161GpWJaFsI8Sh5RnDYIJfTuqbAsdabXo3ODqvvL sgGHDfefhknnt7dep8GLt7gFnNmxvnTBJ8GvRYPZC05SYmww8iR9ngdybiHa0+nScg3elgBpfPJ icTRU7r/+RCt2iSTlSpbDMyRIgizq/FTS X-Received: by 2002:a17:906:ece4:b0:a58:ea99:6709 with SMTP id qt4-20020a170906ece400b00a58ea996709mr4906638ejb.3.1714433617560; Mon, 29 Apr 2024 16:33:37 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240420042457.3198883-1-dmitrii.bundin.a@gmail.com> <9ca4b5dd-20be-79ac-52eb-a19c0c82280f@iogearbox.net> In-Reply-To: <9ca4b5dd-20be-79ac-52eb-a19c0c82280f@iogearbox.net> From: Andrii Nakryiko Date: Mon, 29 Apr 2024 16:33:20 -0700 Message-ID: Subject: Re: [PATCH bpf-next v3] bpf: btf: include linux/types.h for u32 To: Daniel Borkmann Cc: Dmitrii Bundin , olsajiri@gmail.com, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 26, 2024 at 8:54=E2=80=AFAM Daniel Borkmann wrote: > > 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 62248b22d01e96a4d669cde0d7005bd= 51ebf9e76 > > > > Fixes: 9707ac4fe2f5 ("tools/resolve_btfids: Refactor set sorting with t= ypes 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 heade= r > from tooling a bit closer to the kernel one. Just to clarify, this does n= ot > fix a concrete issue today, so small 'cleanup' rather than 'fix'. > Adjusted commit message and pushed to bpf-next, thanks. > Thanks, > Daniel