Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7362930rwl; Thu, 23 Mar 2023 03:22:19 -0700 (PDT) X-Google-Smtp-Source: AK7set/7y18JLUewQxLV7tocg/J59lFIWryb++P4OIL5ln9fnX7jvXkAqa0B5MSUt/sNBrquPtd4 X-Received: by 2002:a05:6a20:3156:b0:db:4fae:ad15 with SMTP id 22-20020a056a20315600b000db4faead15mr2694374pzk.42.1679566939389; Thu, 23 Mar 2023 03:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679566939; cv=none; d=google.com; s=arc-20160816; b=VKklpbJJ2e99wqFsD8M34QYwSxEXnyI2gkUnp9XdPbgqHExnxLXuyYVnOGwuCGDxsC 3vrfQXOT6wsi259JYPbUPgbK+0njiBYuK9X6QQ3zPSnXoykwzpFyhvh3TpGfhLmyCBcO iSsANFmELKme7z6Gi3qjTe2ruid+2vXqcAHSmhoHxjdgVvk2aNmESxswuNEU5ziRjByq r/2eZVRJq+ua3Sr6cja1cuk0AxiWKv2558MA0+Mt+2z9CecsUcSWbjsFanwToueoLEZc yq1951SuhX+32BwRFUou83SFw9KNw/gVyfYp1ia6aOA/nVSoOFuVT1SQ9/daQbfzSCRd mMDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=JERR48c8zhBVoQlXyGsgVwu2LX9bv0viqvzu7bCmkBk=; b=C4jnbg9lRah0OCrw12RtQHdmssnDgZTVGLiKjHHKBPyvl8Ihkff9LZfkQ1sHZaerSO 9qR5sgxsQ5q9dmhKyTbH2ueUAk0TGA1jUWSidSjYs8q3nn6UsXwxPJBai/WYN/zEteRZ lkJAueNBcjl95MxenMLZyTWio72+S6QDyoLqQCjhhv27GWSatwAjf3Ki+HROmOTE18Nf gX+pKOUjJtvIicFUE3YzXEDkrteDlsgj63xWvOxwYPZBvDMg37yJwNNa+BgY6cc+eAvo MzeFEu6uj8g+9A8QL7Rypy72i2jgIpyGAJM40Y/dbu5clhAUFC2NnyqTHG1pYnct5Yzk Gg6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d3uWBLyT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0051308dbae18si1993109pgq.549.2023.03.23.03.22.07; Thu, 23 Mar 2023 03:22:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d3uWBLyT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230016AbjCWKUs (ORCPT + 99 others); Thu, 23 Mar 2023 06:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjCWKUq (ORCPT ); Thu, 23 Mar 2023 06:20:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D45DD52B; Thu, 23 Mar 2023 03:20:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ABB0D6259D; Thu, 23 Mar 2023 10:20:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B02EC433EF; Thu, 23 Mar 2023 10:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679566845; bh=vneMdXeEr1dmIAZE0iPop9xJ7JZjUeKpHnQwSXXFD34=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=d3uWBLyTOCMoMHel6zJXx6PdpRg5xcjZF56KLNLRkdFylulkIw42yuINAQTJ6rNbF PgXrpqJ2TQpBntC3R5YyYPddEyC93q5LaKxM2bjkDJRBrkWJ6mobHIIWMaxtAfPJQW bkoACNaG6ZRdh8+/MIe6u6u/N4zdejUDilBU0d28YROuIqdXPYtNYAVTprEywpnluC h8l/zb4Mw7GEVH+QMg1m8J8vwn9JDNuZ0JvyY14Y33Mm3EDAwKIW4uwy83Lvg5vrbM hlcqgptk4F151ZURhhYE6zJOzKtWz16tNMEoiEisrYkg4OQirSQTRKo49aSjC5/qR5 CX9RuBj/y/0cw== From: Leon Romanovsky To: Jason Gunthorpe , "Gustavo A. R. Silva" Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org In-Reply-To: References: Subject: Re: [PATCH v2][next] RDMA/core: Fix multiple -Warray-bounds warnings Message-Id: <167956684067.1736808.5456264646526617079.b4-ty@kernel.org> Date: Thu, 23 Mar 2023 12:20:40 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12-dev-a055d X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On Tue, 21 Mar 2023 17:47:03 -0600, Gustavo A. R. Silva wrote: > GCC-13 (and Clang)[1] does not like to access a partially allocated > object, since it cannot reason about it for bounds checking. > > In this case 140 bytes are allocated for an object of type struct > ib_umad_packet: > > packet = kzalloc(sizeof(*packet) + IB_MGMT_RMPP_HDR, GFP_KERNEL); > > [...] Applied, thanks! [1/1] RDMA/core: Fix multiple -Warray-bounds warnings https://git.kernel.org/rdma/rdma/c/aa4d540b415005 Best regards, -- Leon Romanovsky