Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1438558rwl; Wed, 5 Apr 2023 17:46:05 -0700 (PDT) X-Google-Smtp-Source: AKy350bcjm+bfQSYN40ezsHcq3E+fBp7+Ch90R6dvFadnQjvsH1r+GXTiq+4i1NANW6tJvcsjhzM X-Received: by 2002:a17:90b:4f83:b0:23f:9445:318e with SMTP id qe3-20020a17090b4f8300b0023f9445318emr4447727pjb.3.1680741965416; Wed, 05 Apr 2023 17:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680741965; cv=none; d=google.com; s=arc-20160816; b=j1pxWYAU7XK0RgBXvP0pW0ZYn4uGykjLrLyqTto8yzdQU9m94H9HdXKz6XsZE01lnR ut26Lgv6/moKFz74+9BXfPEJz0VeWG2ILRs96ULmcg2Q1Fu5MJmjuu18dkuG/kPEtm1C p1XjP7eiFSA2LAwDEj7DFwdGYSb3WXsd/2T3zuZ8EHSKnjVPJDq0p+NijHf2kKPzatxP 6Fotn0P2uVpUO81LzWOHjWBqhI7BuIEixrNBLqkebTt/iuj1Hzf/NSq9HsF7B2AQsYWy z46M449TQH1GTakcb+UIs6HlU9NAuo0z/5sOZx+hBhyV2KCdYW1ewUdreWS6iFCGwhfp rp5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:envelope-to:envelope-to:envelope-to:envelope-to :envelope-to:content-transfer-encoding:mime-version:message-id :references:in-reply-to:user-agent:subject:cc:to:from:date :dkim-signature; bh=cTFTsToUA6XKTJN0W+/7Qm3opsoCZjYfS1dyvnfSyQI=; b=VeinLprhKFBQiJlMSmMNKTM31mADDORW7sNwh2+Y2QCRQ2T/PX81a4VRfp7W0Au4Js k5diKEZBgvBcp6oWBg8QsJNT/0KP1+RmxahsOTwb0VWGO7tohVjhRnL76ra5enugy+vV xH48iMzW+q5LpA0TecYxSJ/aBu+GYALk3FdJ41EnaQyHnHRFAhzy+l2ckD/dCTolnCk3 NwkzOhsgSbCk2qtKfmo27nZO9SexxiTxrQiNykXfaBqt057Cv4HdMrrY9Klev4gQ5OrO Ee/S22DN0pYHovpnrz393RB07rnhqS23VKb1FOjItL3DqV8OxqlerC685SIHkY5jJe/Q X/gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@outflux.net header.s=2016010 header.b=ZDHRbzWd; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx13-20020a17090b46cd00b0023082ccac58si20355pjb.7.2023.04.05.17.45.53; Wed, 05 Apr 2023 17:46:05 -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=fail header.i=@outflux.net header.s=2016010 header.b=ZDHRbzWd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232876AbjDFApG (ORCPT + 99 others); Wed, 5 Apr 2023 20:45:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231574AbjDFApE (ORCPT ); Wed, 5 Apr 2023 20:45:04 -0400 X-Greylist: delayed 300 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 05 Apr 2023 17:45:03 PDT Received: from smtp.outflux.net (mta.outflux.net [IPv6:2001:19d0:2:6:c0de:0:736d:7471]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45A84E5E; Wed, 5 Apr 2023 17:45:03 -0700 (PDT) Received: from auth (localhost [127.0.0.1]) (authenticated bits=0) by vinyl.outflux.net (8.15.2/8.15.2/Debian-10) with ESMTPSA id 3360b1rX013185 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 5 Apr 2023 17:37:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=outflux.net; s=2016010; t=1680741422; bh=cTFTsToUA6XKTJN0W+/7Qm3opsoCZjYfS1dyvnfSyQI=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=ZDHRbzWdN+Fqse/yl1NHXy4F76LH4E8/lZuI0ckYEjqShwk3+kzJbrP0vVxpxGtpC Jj0sVrFWHmV5Ycnjj9BfKtb7zWwqR6QJ7kNFiyUbl7xGPkd8s4dRdSyjKa5mLLGjUX uzeAKgGbMbAOGKGhHlzgM7uF6WF1sjnZXjivFyK0= Date: Wed, 05 Apr 2023 17:37:01 -0700 From: Kees Cook To: Dan Williams , "Rafael J. Wysocki" , Linux ACPI CC: LKML , Bob Moore Subject: =?US-ASCII?Q?RE=3A_=5BPATCH_22/32=5D_ACPICA=3A_actbl2=3A_Repla?= =?US-ASCII?Q?ce_1-element_arrays_with_flexible_arrays?= User-Agent: K-9 Mail for Android In-Reply-To: <642e10dfc46d8_21a829451@dwillia2-xfh.jf.intel.com.notmuch> References: <4845957.31r3eYUQgx@kreacher> <14903668.tv2OnDr8pf@kreacher> <642e00331b335_29cc294b0@dwillia2-xfh.jf.intel.com.notmuch> <642e10dfc46d8_21a829451@dwillia2-xfh.jf.intel.com.notmuch> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MIMEDefang-Filter: outflux$Revision: 1.316 $ X-HELO: [IPv6:::1] Envelope-To: robert.moore@intel.com Envelope-To: linux-kernel@vger.kernel.org Envelope-To: linux-acpi@vger.kernel.org Envelope-To: rjw@rjwysocki.net Envelope-To: dan.j.williams@intel.com X-Scanned-By: MIMEDefang 2.83 X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, SPF_HELO_PASS,SPF_PASS 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 On April 5, 2023 5:22:55 PM PDT, Dan Williams wrote: >Dan Williams wrote: >> Rafael J=2E Wysocki wrote: >> > From: Kees Cook >> >=20 >> > ACPICA commit 44f1af0664599e87bebc3a1260692baa27b2f264 >> >=20 >> > Similar to "Replace one-element array with flexible-array", replace t= he >> > 1-element array with a proper flexible array member as defined by C99= =2E >> >=20 >> > This allows the code to operate without tripping compile-time and run= - >> > time bounds checkers (e=2Eg=2E via __builtin_object_size(), -fsanitiz= e=3Dbounds, >> > and/or -fstrict-flex-arrays=3D3)=2E >> >=20 >> > The sizeof() uses with struct acpi_nfit_flush_address and struct >> > acpi_nfit_smbios have been adjusted to drop the open-coded subtractio= n >> > of the trailing single element=2E The result is no binary differences= in >> > =2Etext nor =2Edata sections=2E >> >=20 >> > Link: https://github=2Ecom/acpica/acpica/commit/44f1af06 >> > Signed-off-by: Bob Moore >> > Signed-off-by: Rafael J=2E Wysocki >>=20 >> Reviewed-by: Dan Williams > >Unit tests say NAK, though=2E > >This causes a regression, but I think I see where=2E Will send a fixed >patch in a bit=2E Ah, which tests? I must have missed something! Thanks for digging in=2E -Kees --=20 Kees Cook