Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp5530184lfu; Mon, 28 Mar 2022 16:04:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSwcTv9l3rNVOCSXsR6YMrwPrcqHb8tgsWZ0hynvLXciihsJUY1dZY3WIHkulXmCsYTUP5 X-Received: by 2002:a05:6a00:18a5:b0:4fa:e6f0:d410 with SMTP id x37-20020a056a0018a500b004fae6f0d410mr24816204pfh.28.1648508678904; Mon, 28 Mar 2022 16:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648508678; cv=none; d=google.com; s=arc-20160816; b=yXuhzwhFmD7dmkIenmPYfAWjlHMbzyefdNINg2s7f6VBI8NjEFljCk+UwKYm5cK/SC e4bXANdNaQPKClhJhoAQwQFoFG9X6dn3cbtLEWcUMSm43Ol1HaCC/Qic1/gWOrFngpip MIBu17IBx7D0EdUXnUcXFUHs2aLKjratB+8YumxZGBNa1P0hJA9Ymise7TfZAwKdeCDK cXqYFgp5ozaBRJqcI4ARHvNpOlYWnUPppxmV9cEpNrDxTlxIuS9uprQdYTcBTWzbzhEY M0Zu+a0pHJQu1UFV/10amFdXPwiyfHjBkTyBB9RqTZhuxz5TzDT5LYfWSLFhUz3P4Asm ZozA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TDT9X13rC6d9ejM1+/I7rzxDkHPIqqEWkXpQAgLIEA0=; b=scwlpUnn3Vz2qX0V1O4SwWK0ET9pkupbhSe6XuKu7bxCSQDhxwbDsWAs4jK3B/07/B bhlAKvOORLSYEwSsr68bA1s85KmD+PHUgfNACpit/+XTqYLyEQojaro87zBx8y/MVxMm EglBmeIIFLnT2/6aeXWPXjWDRJP3LjQbeBIusJHqgo83M7Jv0BN/tULCvzZfUvWMxf1i doWumJzj6qORcVKED+vF8H2mF1O3o1g9JoRuhDQFumB1XdCwtRsA56elpHpajtiT6Mbt LynSZ7ZamVJ1/V1HefiO6po0AjAFb/crf6Civ5pDR6Avk/AZwKbnXMHGtXs97gNX0jZw Bo9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=awmlpNlz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t12-20020a63224c000000b0039854fb2001si5308595pgm.496.2022.03.28.16.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 16:04:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=awmlpNlz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8AA4545AEA; Mon, 28 Mar 2022 15:12:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229683AbiC1WN6 (ORCPT + 99 others); Mon, 28 Mar 2022 18:13:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbiC1WNt (ORCPT ); Mon, 28 Mar 2022 18:13:49 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 258C7147516; Mon, 28 Mar 2022 15:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648505000; bh=ikNTAPZNKF24qy3SSeVLpOY649ZPWA/t8khPYr08wEQ=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=awmlpNlzCwoLr6l0zmrsuN88doab8x7a+/BUsGAUmPf1be3v7tQoSV6IjOusgoNWb jFgQbFO1QW9eF1K6Ea7aYWKQxQ/F+8LprR0p+9SyRjp5ZCzWjI88YWKu112o51BiOI yZ105yLC/xU+VyTkjlHkDa2KsM//rqRDgjhIkXHg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.112]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MHGCo-1nm8ML34HQ-00DHd7; Mon, 28 Mar 2022 23:38:17 +0200 Date: Mon, 28 Mar 2022 23:38:17 +0200 From: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= To: Linus Torvalds Cc: Linus Walleij , Kees Cook , linux-kernel , "open list:GPIO SUBSYSTEM" Subject: Re: [GIT PULL] pin control bulk changes for v5.18 Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yvrgZB0uozz8tcri" Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:s4cTLq9e1kTz4rvikF7Mq9oKq7PlgRHhoQuBCNZQG2qEFBxDq3H RPEvTaIiJE1LzBT6NQkWXxZ2bupQWHQ6IgOiVIJNfulsVQFw89Jdi/ua5CWLmGZNhjnJS6D SLnx6k5/nZsGTJnBiBhgExiEo70kG09pPIC+F9dQAIXNBPSoEzc6Ks8JLAW9i7SyoUFBMX/ vWNIaRARIUaceOm+cHh+Q== X-UI-Out-Filter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nWKCQU7 ik/OXZYJFH4RsomRjIcWbofsxtZwe+C8yf1C249BM0Aslbk3+FVEiABdKR9v38VFDQDRPP6aZ 34/Ta0dc5hE8uE= X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yvrgZB0uozz8tcri Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Mar 28, 2022 at 12:11:49PM -0700, Linus Torvalds wrote: > On Mon, Mar 28, 2022 at 6:08 AM Linus Walleij = wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git > > tags/pinctrl-v5.18-1 >=20 > Hmm. >=20 > This clashes badly with the fact that we in the meantime have enabled > -Warray-bounds, and I got >=20 > drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c: In function =E2=80=98npcmgpi= o_irq_handler=E2=80=99: > ./include/linux/find.h:40:23: error: array subscript =E2=80=98long unsi= gned > int[0]=E2=80=99 is partly outside array bounds of =E2=80=98u32[1]=E2=80= =99 {aka =E2=80=98unsigned > int[1]=E2=80=99} [-Werror=3Darray-bounds] > 40 | val =3D *addr & GENMASK(size - 1, offset); > | ^~~~~ > drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c:219:13: note: while > referencing =E2=80=98sts=E2=80=99 > 219 | u32 sts, en, bit; > | ^~~ >=20 > as a result. >=20 > Was this not in linux-next? It was =E2=80=94 but when it was noticed, the fix went through the IRQ tree= , on top of a refactoring that happened there (the switch to generic_handle_doma= in_irq): https://lore.kernel.org/lkml/164751044707.389.16417510835118111853.tip-bot2= @tip-bot2/ So=E2=80=A6 the issue should resolve itself when the IRQ tree is pulled. > Or was the array bounds checking not there? >=20 > Anyway, that cast to "const void *" >=20 > for_each_set_bit(bit, (const void *)&sts, >=20 > in that driver is completely wrong. > > The bit operations are defined in arrays of 'unsigned long', and you > can't just cast the issue away, because the end result is not the same > on a big-endian machine. >=20 > I fixed it up in the merge, but what really confuses me (apart from > the apparent lack of testing in linux-next) is that I don't actually > see what made this happen now, and not before. Maybe that's why it > didn't show up in linux-next: it's some odd gcc heisenbug. >=20 > Because there seems to be no actual changes to that driver that would > explain why I get the warning now, but not before the pull. When I added the pinctrl-wpcm450 driver, I changed the pinctrl/nuvoton/ directory to obj-y and exposed the pinctrl-npcm7xx to CI bot testing. The bug existed, untouched, since the driver was added a few years ago. Jonathan --yvrgZB0uozz8tcri Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEvHAHGBBjQPVy+qvDCDBEmo7zX9sFAmJCKqgACgkQCDBEmo7z X9tAfRAA0Lwv6e2tpRvOKaLo/Ou9kPLpQCasdBSh/IgzKFoVlMsZmfGNbBZqU/bv dy6/AoTuVnwXRAJt7QM9MPd1N8ekXnMT0VMZOh+4hhBLhN8lAsB2fNaFCcjTNeA/ IxgTx1zqzdpjgQq7vWzX3om1graLj9OV4E59sD4Dl9/jeXP5ESz71yaq4WEYFW25 nxPnj6OxXhlS5CEkOVIUUO7mGzlv6a8+rtcU7tjXeNmZ1QlLZ/jhaOEo0tbPn2Gv AmDDscAS8olaFCHdcMWAP+YFbFD6sjWBzkBuCETk2CX3YnJuITMQsjjyUvEva/Hm aAgOQf+bZBRgcVnS1hI+RH1zpq5ahrNtXbAbMrGqSbMMaI/6VyPdsJyf3LXA6/id bp6zNuwSGber0yU2YFGtvNFKx7e5tBGuckNebu/E/VFQAwwB0jwSpK/pifWt3p3i LVbcOcauLddSQqUlejjs/buMOrSt+lWzhIY0m1ZuC6xqyCm1/LJz2LwoLMAfw0gi IEj93h+SzT5X+zeNuNojxCVaxuEa+DJdTTrA58ztzI5f8Hwy7D2Hq4JmrAQiJM+z v44tGk+W9ye8ONaQ2lL02oFDHgfic1QN0uJzflU7bpFY9EEqsGWps9GweMeYr7LD HIJrALebsg5geI0gKyAAf6gwWgF/GREiqF45IxuK5fdrc4enmRI= =gFUj -----END PGP SIGNATURE----- --yvrgZB0uozz8tcri--