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 X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A536BC433DB for ; Mon, 29 Mar 2021 18:06:06 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3479E61920 for ; Mon, 29 Mar 2021 18:06:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3479E61920 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:In-Reply-To:Subject:CC: To:From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jfYJVk1YPjFJDCqPmgcsi28vsVHwVEwIP/v/VVbLxiU=; b=jamAWckiFmXbJNrYJnlOfEJOY HBuDT0KijyrMUIi1zL9YbNeXaFrt6H8qJxeIb14fOjwKIAON8Rw2JP3lc3oVQkK4+xglzMb4MeBfE r/b+o76ZpWqJZFKDAvKsA9/Rjm8dp9yyXp37LKFMFWleZAMvrUzez+Rzo8yBFSSRGbqyUMiuUljN0 ytt2nQUnGCmZMbI5pfK/cxnI7oL4j/fvH/KSMBldqEMgCGzUz6Tx12djT7izsJ9CWcQQ637b9MK6o G9doxyomsER0cIfr4oJysbs7Yx+v8ravi+2Bo3Rsm4RYT25QhWoxE6RhtSG80oa4Ee7gro6IInxeD FPw0i3osA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQwEB-000yFn-LP; Mon, 29 Mar 2021 18:03:03 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQp2m-000Zub-30 for linux-arm-kernel@lists.infradead.org; Mon, 29 Mar 2021 10:22:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1617013368; x=1648549368; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=c6s3GdekY5sl0ZyRTNIljGAgU0mzTPIY4Jit7VBh0ac=; b=UsT6g7JhaR2rQNaWSvgH0f8P+KWi2EDhiIuVxvIDPaQNauRTZ4RTD5BZ V7fgKF+8rAMtIPy3h6QmHIR+LXwaimawIlVhWZgCzLUQIddwQxs2b12P+ LG30kMyAEswQSbawFWGMyYEi0/ZJT4YBbgvGR7zrQpLF9VgnjHdwoSHbC JHZXfpQgIi7Q9KaEG8aKfXQZc6C9yYGVvLUrIHfb+MPs6jopOpHd14J80 YVXMiwqKaRZIw0Mk0uhXbraReCtSlVhmpSnJMFYG8n0Qlr5/kP3l17z0E jtQgSqFDbbsWXF1R19w6pzCng8VQb17MYy/rYFiDZrdZgE64xKprFQvDU Q==; IronPort-SDR: jvdrK6woNdbWT+lZeNTe8wqJBQxtDAOMTnrMdC8b/Bp37ttsfCqUyH5eD3krrM9gl10QJm3pT8 YcnxJPinm4UE5Tkd1C6sX8owmZ1nDDJlRyBmTWZ7vPg+fEaTst/uMt9rR2CJv6lJVBf76Z85ar ssulyFgxc30ABwIv94sU1G3eEgqewTvsUnry9pB/OEOzgP+FrEX5aq6oUG+/kHahHzE2PFyGw1 OKcNWQbVNfLa7yX+5R+u9eVdulqQJUXn/TwU/UqfKE+ZWZn9uuoZsSJ0p2HCj5e01qAFwktytL dzY= X-IronPort-AV: E=Sophos;i="5.81,285,1610434800"; d="scan'208";a="120796370" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Mar 2021 10:18:28 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Sun, 28 Mar 2021 10:18:28 -0700 Received: from soft-dev10.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2 via Frontend Transport; Sun, 28 Mar 2021 10:18:25 -0700 References: <20210323131002.2418896-1-arnd@kernel.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Lars Povlsen To: Linus Walleij CC: Arnd Bergmann , Lars Povlsen , Steen Hegelund , Microchip Linux Driver Support , Arnd Bergmann , Zou Wei , Linux ARM , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , "Gustavo A . R . Silva" Subject: Re: [PATCH] pinctrl: microchip: fix array overflow In-Reply-To: Date: Sun, 28 Mar 2021 19:18:24 +0200 Message-ID: <87h7kv5h9b.fsf@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210329_112248_637909_89064148 X-CRM114-Status: GOOD ( 11.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Linus Walleij writes: > On Tue, Mar 23, 2021 at 2:10 PM Arnd Bergmann wrote: > >> From: Arnd Bergmann >> >> Building with 'make W=1' shows an array overflow: >> >> drivers/pinctrl/pinctrl-microchip-sgpio.c: In function 'microchip_sgpio_irq_settype': >> drivers/pinctrl/pinctrl-microchip-sgpio.c:154:39: error: array subscript 10 is above array bounds of 'const u8[10]' {aka 'const unsigned char[10]'} [-Werror=array-bounds] >> 154 | u32 regoff = priv->properties->regoff[rno] + off; >> | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ >> drivers/pinctrl/pinctrl-microchip-sgpio.c:55:5: note: while referencing 'regoff' >> 55 | u8 regoff[MAXREG]; >> | ^~~~~~ >> >> It's not clear to me what was meant here, my best guess is that the >> offset should have been applied to the third argument instead of the >> second. >> >> Fixes: be2dc859abd4 ("pinctrl: pinctrl-microchip-sgpio: Add irq support (for sparx5)") >> Signed-off-by: Arnd Bergmann > > Patch applied. > > Yours, > Linus Walleij I don't understand - I submitted a fix for this already in February (reported by Gustavo). It took some time for you to get it ack'ed - but you did (Feb 1st). Did it end up getting dropped? ---Lars -- Lars Povlsen, Microchip _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel