From patchwork Wed Mar 31 21:43:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 12176543 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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 0E1C3C43470 for ; Wed, 31 Mar 2021 22:44:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1C4E6108B for ; Wed, 31 Mar 2021 22:44:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbhCaWoR (ORCPT ); Wed, 31 Mar 2021 18:44:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:37268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232786AbhCaWnl (ORCPT ); Wed, 31 Mar 2021 18:43:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 717E461007; Wed, 31 Mar 2021 22:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617230621; bh=wIF7G0wE4NoaNmMeOVZyn1oo+mSAjvyT3b4OXOh5EB4=; h=Date:From:To:Cc:Subject:From; b=YNJ/5eCjxFOIVZgf9wldlNdP96DKPUI0aRTkJ4Y7ncOzt0hzrGf2j0E9KXkqeyzC9 xdzu9Spu0xjP2XSGz9KpRCPykC/TUw14Vm7U5Zvl8+7uvFFKIyVSNcd38QVZtE+oWs 7V2FGgK0+nlQ83whfEgNEjSuchuxjCaqyWqXRhq1yYXZEPWztFxOTahGJSlShKpMMT 4hiGx4SOjL0VTsT7kqoArRqhG5vS1IhSSSGOpgsedwOvDBaLgEjJ+uyMe0Vm1mRpmA OsSdQlmEvT9xmPkGxSPsea0VQh4nJvkDv5VZMk0nJ61H5vSpW/fJ5bOg4ldzjK9Hh2 EDj3we9orM5pQ== Date: Wed, 31 Mar 2021 16:43:43 -0500 From: "Gustavo A. R. Silva" To: linux-kernel@vger.kernel.org Cc: Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-hardening@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH v2 0/2][next] wl3501_cs: Fix out-of-bounds warnings Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix the a couple of out-of-bounds warnings by making the code a bit more structured. This helps with the ongoing efforts to enable -Warray-bounds and avoid confusing the compiler. Link: https://github.com/KSPP/linux/issues/109 Changes in v2: - Update changelog text in patch 1/2. - Replace a couple of magic numbers with new variable sig_addr_len. Gustavo A. R. Silva (2): wl3501_cs: Fix out-of-bounds warning in wl3501_send_pkt wl3501_cs: Fix out-of-bounds warning in wl3501_mgmt_join drivers/net/wireless/wl3501.h | 28 ++++++++++++++++------------ drivers/net/wireless/wl3501_cs.c | 11 ++++++----- 2 files changed, 22 insertions(+), 17 deletions(-)