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 EBA53C7EE2D for ; Tue, 23 May 2023 17:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229560AbjEWRcU (ORCPT ); Tue, 23 May 2023 13:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237109AbjEWRcS (ORCPT ); Tue, 23 May 2023 13:32:18 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE6D0E65 for ; Tue, 23 May 2023 10:31:48 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-64d2e8a842cso12007b3a.3 for ; Tue, 23 May 2023 10:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684863105; x=1687455105; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BsLdbOtWZqGDDhIfd5JSowpIYslTFlwc+eis5/CXhg4=; b=mjGZ222BMeABgspQ4C00XVzXG5HI5E5DX4AnVojL6fCi7mMtye2/kuf3yZCxyLNWpm 8CewfWrrxrGpy8G5PCFtQRWfGQlLIpI7Oj5oZQwhtD140OXGZvb0tfuU0UiufDzMtL4T 9J58eSM5hSaBbQnFUcCeZcWoIZa6L/1wBYE3w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684863105; x=1687455105; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BsLdbOtWZqGDDhIfd5JSowpIYslTFlwc+eis5/CXhg4=; b=VsFy8Y2BEznH5q9Yzg13ymqS7zFmBfcNljW9JRwj709bJUqwjinPOF6j3EyyRkRIEy O//MMlzYF/lSHZTwxklAPW0AT+14TMXhJCyKEAz/xsXvWhdIyWLosh3T0tGYR00GzL5k JjNMVvL4+mes26JwlCK8ZG6N5kdxx4/4qDSYMTkCLQ1Ait+XXjugqFSQ/s4CI3V+6qNw pG5ndc1ihLQdl5fFyrT/WPVyWGzotlkHdha1p5sSo6q6Lw2t+gFRhT/VW7LEZLg9rxgo 12BoUnua3sHlikB+e6uuuDSlqwVuui65OjawMjGkb96MXNeu9HJdOY92tBcqYn1nJG4v hG0A== X-Gm-Message-State: AC+VfDw2xyvMVBx9rK1SObVh8uryX1xeR+ND9xD+vC1kXe5vWxpCnCts FktOTZKVGYxr900AxVttXImi/A== X-Google-Smtp-Source: ACHHUZ4yKB8IpGx14IYy5bz+N/arqjLssi9jJEin6ZmCQLH3NCJpVHrJTIVD/nZQfE595frik+Pj5A== X-Received: by 2002:a05:6a20:1590:b0:102:8f0a:5acf with SMTP id h16-20020a056a20159000b001028f0a5acfmr16420291pzj.62.1684863105011; Tue, 23 May 2023 10:31:45 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id g13-20020aa7874d000000b0063f2a5a59d1sm6064087pfo.190.2023.05.23.10.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 10:31:44 -0700 (PDT) Date: Tue, 23 May 2023 10:31:44 -0700 From: Kees Cook To: "Martin K. Petersen" Cc: "Gustavo A. R. Silva" , "James E.J. Bottomley" , Dick Kennedy , James Smart , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH 1/2][next] scsi: lpfc: Replace one-element array with flexible-array member Message-ID: <202305231031.C9E6124@keescook> References: <6c6dcab88524c14c47fd06b9332bd96162656db5.1684358315.git.gustavoars@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Mon, May 22, 2023 at 06:02:21PM -0400, Martin K. Petersen wrote: > > Gustavo, > > > One-element arrays are deprecated, and we are replacing them with flexible > > array members instead. So, replace one-element arrays with flexible-array > > members in a couple of structures, and refactor the rest of the code, > > accordingly. > > > > This helps with the ongoing efforts to tighten the FORTIFY_SOURCE > > routines on memcpy() and help us make progress towards globally > > enabling -fstrict-flex-arrays=3 [1]. > > > > This results in no differences in binary output. > > Applied to 6.5/scsi-staging, thanks! Martin, I think this patch is not right -- can you drop this from staging for the moment? -- Kees Cook