Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp732159rwl; Wed, 5 Apr 2023 07:05:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YwtlyEi3HpBrbonXAQg3Ucpl/Y0fQZkEz+8omXdhKMaBl3eiMexfi1IVMnrFXxE9/pKxYy X-Received: by 2002:a17:907:a4c:b0:8af:3382:e578 with SMTP id be12-20020a1709070a4c00b008af3382e578mr2869927ejc.4.1680703513380; Wed, 05 Apr 2023 07:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703513; cv=none; d=google.com; s=arc-20160816; b=pwE7UxrfDMFlEllk5/B39BpF9u/nc68BOBlwCiGfOtMXyV53pSfjWIMJBWnf2zVk2B vg3VCTq91ts4RvR7kryh3vWdBDZereS5Gbnmi5X81VIy/6n/r9elQ6GL9NElTF6YjqhD apSXzRoRl/zuoL7eIBxEN+Y4mxZNAKuqMxIT0OMAFFa2Q6/Q7Gh2hgVO29cJ+bUA4Zvw v1Blkw8D1ILK805Klm5yr0IprcbQUMWmhVt0vAY5b+y1+I0FuIdwgfuD5E3/3QWx3mMY GALvv993ohuApTAgcU0GIuQkkrfdBWt+VSuCUd1YDGF69x1HtrFjebuOfbxtiaL+7DBB 5WxQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=QbEKCKgOR/RZd2XV2KUW0c6rjIuZaoZ0ZU7bYYsh3QU=; b=bIKbDLr6Reib7ZpnEbt303G/13ixRB8yeL5q7BL08XsZ1zOaH8HiBNgT8t/mwGOGdg IiKdFXdvF/7OGRAj5JnOsQDXqc6Q5yIWLg5VWMNuLEl87PGIu050r2X5eQk0im+wTWnE ncE/Kh+sK8UGa8dJuSWOBCxoHrNB8dh3/SpgUlSsY74eBjQC0Q/rg2FTvkkOnK3aXdgb YaG5vQYvHQZQNC820QuRRTdmmcjxYyLGSqFEkuhr55fsTBv79m72R6jyEjwcrfjCl8qD 8iwMyNdIGXHqvyPgobFyL5pzQ9/n7WHl/2jx21flQj+0Hxs9eNZ5s07RDep7yQ91P9aj ENpA== ARC-Authentication-Results: i=1; mx.google.com; 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 e25-20020a50ec99000000b004fb56076a23si1234936edr.12.2023.04.05.07.04.47; Wed, 05 Apr 2023 07:05:13 -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; 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 S238367AbjDEOCD (ORCPT + 99 others); Wed, 5 Apr 2023 10:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238241AbjDEOBO (ORCPT ); Wed, 5 Apr 2023 10:01:14 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78A624ED0; Wed, 5 Apr 2023 07:00:58 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 39717a673489e56e; Wed, 5 Apr 2023 16:00:56 +0200 Received: from kreacher.localnet (unknown [213.134.163.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id BD76D1B4EA62; Wed, 5 Apr 2023 16:00:55 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 20/32] ACPICA: struct acpi_resource_vendor: Replace 1-element array with flexible array Date: Wed, 05 Apr 2023 15:48:10 +0200 Message-ID: <1964259.yKVeVyVuyW@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht fhhluhigrdhnvght X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 X-Spam-Status: No, score=0.0 required=5.0 tests=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 From: Kees Cook ACPICA commit 446d05d5ea77946b8b3b8d0c638d1a446b18503e Similar to commit 7ba2f3d91a32 ("Replace one-element array with flexible-array"), replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run-time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/446d05d5 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acrestyp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index f913983ef55e..77d735594ac2 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -194,7 +194,7 @@ struct acpi_resource_fixed_dma { struct acpi_resource_vendor { u16 byte_length; - u8 byte_data[1]; + u8 byte_data[]; }; /* Vendor resource with UUID info (introduced in ACPI 3.0) */ @@ -203,7 +203,7 @@ struct acpi_resource_vendor_typed { u16 byte_length; u8 uuid_subtype; u8 uuid[ACPI_UUID_LENGTH]; - u8 byte_data[1]; + u8 byte_data[]; }; struct acpi_resource_end_tag { -- 2.35.3