From nobody Sat Apr 20 12:57:44 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:ab0:590e:0:0:0:0:0 with SMTP id n14csp1925246uad; Mon, 11 Jul 2022 01:12:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uUHQ6dv7S6I4gJbhItxVd9SjMp313hnw9tcUFjz/N/CuTnN0Nufm7eavAkapC7rB23PJjk X-Received: by 2002:a63:2684:0:b0:415:18d8:78dd with SMTP id m126-20020a632684000000b0041518d878ddmr15399725pgm.33.1657527149903; Mon, 11 Jul 2022 01:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657527149; cv=none; d=google.com; s=arc-20160816; b=LY2ASIru0EY2AEdCIIYu5AV87kXN0c8cf0tAfzo16fOpXb1pLDfOmxq5WDXloZ6KRa bmGw9T31uiVS4D/7UsAzMTyLCN7ZZTwFMCTIhu586s7Gb/vbAw50B8xEuWXD8FLjPyMK SP8rPjTvm/GaYjkudmqNVLxEMq647YJVHQoWPGIUG3ypq+NJ+swS19HQPiZCYPFwn6Gh gv13pA1ES81+yEKVIcph8F9n1LeYssntlcFjaRqcyhtMHffshLoFenSITMp6I5AKM7V9 ws+Q9zS31YlEmKRaPVCyTl7h4SqGJ4dvXhUdFVg3FH4Ppz5TrvpbsQdMpQpMhdJi/hwC nLFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=MPFKY/bHlsQhtgUJcy9UK+LhK0GjolHXo8PsK9MTO74=; b=BrjD6xqne8NN8rAFwDS+ehooUPq5Q6GlUz4eQ0iXic+GXFKUjTVVz/7AA7C4ndHJZn 0FIVjOVhtiV3lNbDaZpfhlMIg7dGdLG/nKH5lcbfpl3ssUCtIKkEmd4FDl6sK2dWM/FF UWy9UOqSVs2FH42pq+wbPHHyc0s7nOb3adFVwNZP6lTUjbI5q0Gziv2h0QfZvEDp4mg3 SsNSEg23E+ZF4ZnDtS0lp6ykexix+Ei9RW4cJdQP43CWcKn97m8PoqIxBzX1Mw1T0bpV gX7hWtKB8ynkZVYbkU/gGlj1Fk9FJSe8JkQj5S/HEJnoZs2/gt7fDZZWm5gUdd098nLr nAgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="3dWItNH/"; spf=pass (google.com: domain of mptcp+bounces-6001-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.88.99 as permitted sender) smtp.mailfrom="mptcp+bounces-6001-wpasupplicant.patchew=gmail.com@lists.linux.dev" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a26-20020a056a001d1a00b0050fac0168c6si8059848pfx.49.2022.07.11.01.12.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jul 2022 01:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-6001-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="3dWItNH/"; spf=pass (google.com: domain of mptcp+bounces-6001-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.88.99 as permitted sender) smtp.mailfrom="mptcp+bounces-6001-wpasupplicant.patchew=gmail.com@lists.linux.dev" 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 F323A280C54 for ; Mon, 11 Jul 2022 08:12:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8D271FCA; Mon, 11 Jul 2022 08:12:27 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 4462E1FB7 for ; Mon, 11 Jul 2022 08:12:25 +0000 (UTC) Received: by mail-wr1-f53.google.com with SMTP id bu1so4753711wrb.9 for ; Mon, 11 Jul 2022 01:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MPFKY/bHlsQhtgUJcy9UK+LhK0GjolHXo8PsK9MTO74=; b=3dWItNH/NrG2UXqFVsxOXWN+q2qqBj4vzooK3M0fqc0NW7nFtkiqcvWaIp93vV4X5t cvuXswhlr6y8zqUrdIAnLYVuT0/bBNWWTBvXhoMuA9ghuCH4JYnL2Co6bcDvoOC4NyNL 9bCZmbb8jxOvLj1zTcOoMyjoZjIdOAHWBXpO4ssyke6GlXpC73oLnxfit7nnRfO6iB7i 256ylzPv5rvMS0FCWr1MXcdyFEWc5plJLs5nVT7L83L2EGX4IHqfxBkkHMgW6NlmQk7h zCrXXf4WDBzabyhGC8I3ECzVLJqbg7Zl72pFR5tKA6tbrSzAQECZD2fYwxRbLLd9YFX/ FFbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MPFKY/bHlsQhtgUJcy9UK+LhK0GjolHXo8PsK9MTO74=; b=HWDuuKTGUgy5U1zr97MdXjXFLst3VBt7hSNJyj+v3+Ihu1hAzHPO59FYV2aFcHl632 e/RQOnkenJ7/vF5K0XAFrhDr9iHiTqMVzUN4PY20Uod2E9ONoGwFaX8o/HHgZ3GFF1ix ujB9FpuisofHiKLj2xLc7tgUROr+P2yVLX/5EYQYMY30fNwus0ZebNshlVBX8yao7qw9 54le0V3OiUUgsxcPBibo6bn18JnB4O9JNvnlc6kl2O2aCccHreqPLUE+h4jVROdm2lAL /NkSI2756NjFt8w9vJlEakUDGSdV4OYpsd0zeo/VwQeJY8+M/5CDlqzz8ysjGMrq5kav QMoQ== X-Gm-Message-State: AJIora8GiUQX6uoAZCCE2yfvlzZldmgqOSwEyaEpVL3DbV/9mFTR5jIE B9fo4NmDyPtu3+Y/lLoI/0lT6A== X-Received: by 2002:adf:e111:0:b0:21d:665e:2fa5 with SMTP id t17-20020adfe111000000b0021d665e2fa5mr16086610wrz.652.1657527144170; Mon, 11 Jul 2022 01:12:24 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id n4-20020a5d6604000000b0021d650e4df4sm5159809wru.87.2022.07.11.01.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 01:12:23 -0700 (PDT) From: Matthieu Baerts To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Eduard Zingerman Cc: mptcp@lists.linux.dev, Matthieu Baerts , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next v2] bpf: Fix 'dubious one-bit signed bitfield' warnings Date: Mon, 11 Jul 2022 10:12:00 +0200 Message-Id: <20220711081200.2081262-1-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.36.1 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Our CI[1] reported these warnings when using Sparse: $ touch net/mptcp/bpf.c $ make C=3D1 net/mptcp/bpf.o net/mptcp/bpf.c: note: in included file: include/linux/bpf_verifier.h:348:26: error: dubious one-bit signed bitfie= ld include/linux/bpf_verifier.h:349:29: error: dubious one-bit signed bitfie= ld Set them as 'unsigned' to avoid warnings. [1] https://github.com/multipath-tcp/mptcp_net-next/actions/runs/2643588487 Fixes: 1ade23711971 ("bpf: Inline calls to bpf_loop when callback is known") Signed-off-by: Matthieu Baerts Acked-by: Yonghong Song --- Notes: v2: switch from 'bool' to 'unsigned int' (Yonghong Song) include/linux/bpf_verifier.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 81b19669efba..2e3bad8640dc 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -345,10 +345,10 @@ struct bpf_verifier_state_list { }; =20 struct bpf_loop_inline_state { - int initialized:1; /* set to true upon first entry */ - int fit_for_inline:1; /* true if callback function is the same - * at each call and flags are always zero - */ + unsigned int initialized:1; /* set to true upon first entry */ + unsigned int fit_for_inline:1; /* true if callback function is the same + * at each call and flags are always zero + */ u32 callback_subprogno; /* valid when fit_for_inline is true */ }; =20 --=20 2.36.1