From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F056C433F5 for ; Mon, 23 May 2022 22:23:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230317AbiEWWXH (ORCPT ); Mon, 23 May 2022 18:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiEWWXG (ORCPT ); Mon, 23 May 2022 18:23:06 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62BE07C17D; Mon, 23 May 2022 15:23:03 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4L6X014vHXz4xXj; Tue, 24 May 2022 08:22:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1653344578; bh=fiBBP1CwLxOOiEJzduELiG5+UCGaqySIgp41nnB4s84=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fV92vlENlHuJ/QYqjGAOoE54AhITOz1ZMBUtx7JwoPdqvG5cSXnR10GKPe0T7icwE BIBcAqNb2K/bPAJPyLCtgqo8ZkD4vXnt1LqH0pPspg5pP0lb9367N54IyIMUyWenWc 4NC/fyPqa89L6D43W4Ac7Oz38Okct59hpRoh5ux1IlqukIdSwGGlBvWDUs3M9Y5b5a PKq+t7zutTPM+2+MZXiRKKLihlnk1o8/nTaQHcixYGKJ5ZmeYvhSqweXrIlwmuh5CB 2vQ1YN35aTEs1nLq6BboqAdKIhSQcsc1goBO0/cCZeJ8AHJbwEHimyjZ54/3G3Vc5X CbRMj8nWyTK/A== Date: Tue, 24 May 2022 08:22:56 +1000 From: Stephen Rothwell To: Marcel Holtmann , Johan Hedberg , Yury Norov Cc: Luiz Augusto von Dentz , Linux Kernel Mailing List , Linux Next Mailing List , David Miller , Networking Subject: Re: linux-next: build warning after merge of the bluetooth tree Message-ID: <20220524082256.3b8033a9@canb.auug.org.au> In-Reply-To: <20220516175757.6d9f47b3@canb.auug.org.au> References: <20220516175757.6d9f47b3@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/zscRXC6yYxWnLTKDmeusqjf"; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org --Sig_/zscRXC6yYxWnLTKDmeusqjf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, On Mon, 16 May 2022 17:57:57 +1000 Stephen Rothwell = wrote: >=20 > After merging the bluetooth tree, today's linux-next build (arm > multi_v7_defconfig) produced this warning: >=20 > In file included from include/linux/cpumask.h:12, > from include/linux/mm_types_task.h:14, > from include/linux/mm_types.h:5, > from include/linux/buildid.h:5, > from include/linux/module.h:14, > from net/bluetooth/mgmt.c:27: > In function 'bitmap_copy', > inlined from 'bitmap_copy_clear_tail' at include/linux/bitmap.h:270:2, > inlined from 'bitmap_from_u64' at include/linux/bitmap.h:622:2, > inlined from 'set_device_flags' at net/bluetooth/mgmt.c:4534:4: > include/linux/bitmap.h:261:9: warning: 'memcpy' forming offset [4, 7] is = out of the bounds [0, 4] of object 'flags' with type 'long unsigned int[1]'= [-Warray-bounds] > 261 | memcpy(dst, src, len); > | ^~~~~~~~~~~~~~~~~~~~~ > In file included from include/linux/kasan-checks.h:5, > from include/asm-generic/rwonce.h:26, > from ./arch/arm/include/generated/asm/rwonce.h:1, > from include/linux/compiler.h:248, > from include/linux/build_bug.h:5, > from include/linux/container_of.h:5, > from include/linux/list.h:5, > from include/linux/module.h:12, > from net/bluetooth/mgmt.c:27: > net/bluetooth/mgmt.c: In function 'set_device_flags': > net/bluetooth/mgmt.c:4532:40: note: 'flags' declared here > 4532 | DECLARE_BITMAP(flags, __HCI_CONN_NUM_FLAG= S); > | ^~~~~ > include/linux/types.h:11:23: note: in definition of macro 'DECLARE_BITMAP' > 11 | unsigned long name[BITS_TO_LONGS(bits)] > | ^~~~ >=20 > Introduced by commit >=20 > a9a347655d22 ("Bluetooth: MGMT: Add conditions for setting HCI_CONN_FLA= G_REMOTE_WAKEUP") >=20 > Bitmaps consist of unsigned longs (in this case 32 bits) ... >=20 > (This warning only happens due to chnges in the bitmap tree.) I still got this warning yesterday ... --=20 Cheers, Stephen Rothwell --Sig_/zscRXC6yYxWnLTKDmeusqjf Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmKMCUAACgkQAVBC80lX 0Gzm/Af/c9T/h9Tg15i2XoL+FySraisx0potlPbWJtmaPxVay9I4VcEwikcJyyIr b19gSux7jkvkPvhKEe0HY5qPZucDZi5mYutpphPx/wMkgCDfmamX4He/di2zlZtQ OV0tJN0eiUTT9XQGmImzLywV8feb2Pe+rjuvXn9P2Y6MmI17axPvHXM9MOC7ViLr 7d8YXqyb2KLfmrSqwqeO8w918wom5Eb0HNYG1zWZHwgq/b/twN4fsQvAy6zJYweK tXNFt2JLunfLsHqxqQiC0E5uPLbmd79ZOv6BZPAG+mqlE7W7T+A7xaHUhCWL4pbo XVQiDcuwuxbRJwjPKVpg+ZrleAxjeQ== =lsMX -----END PGP SIGNATURE----- --Sig_/zscRXC6yYxWnLTKDmeusqjf--