From patchwork Wed Apr 5 13:32:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79646 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344097vqo; Wed, 5 Apr 2023 07:19:55 -0700 (PDT) X-Google-Smtp-Source: AKy350YHC4qQ+a4gba98s/vFFD3SvxZa37vVdQOn5sWpTXGzK4CzkwKN+maWqC2QAUYCHmNsSCsj X-Received: by 2002:a05:6a20:a894:b0:d6:7264:f44e with SMTP id ca20-20020a056a20a89400b000d67264f44emr4699205pzb.3.1680704395248; Wed, 05 Apr 2023 07:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704395; cv=none; d=google.com; s=arc-20160816; b=Ap3drRox6kiMJ/sz44KEeB4S/FDAGTa7KLirfsHiZTv5+zmhEkXalDkOzl9U9qnvaW bLewToyRgJUgnbM+lR0YBh/SGMe1WoEryB/jfRJ0daIPtWgb5Y6ehjFk22aQJBkzXqr8 8HxRZ+vQ7BGnz1CBeYak6hUZTatXpIbVpAh7QVZxsZCsnMYTUG/+g0b0rpiqBrjzQZFm n2FVUIle2++9TCY2JKDqW7VIaWV1bz5g5+2fsRtLMpFW7YkTOLBs3LGjdffLFFG/UpmF S7KaMaaFxzkRG7+PyMnX1M2v6eycDHTi7qbtQQGx4Hv/uX7RtivjMj6aNdD1E/2hRUYk OvbA== 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=3d0gHGFyDgi/EH3tVLp5MHiQ1g5s1cZ8XJbW7EC7rsE=; b=n2RQTOyx83k66msgdoKY+fqWfn0W/ZNciZs0V/kgX0nP9Hw0p1JVt3Lgk2UyLUoaq+ PDeR+fl1H+/AHcstAQrUsZzBQ8jxPE26wbj8lI+/En8LrIhbm7dNYXeQvbHpDu8K2jM9 Wh8XmBJl61PFfskDFyoMpB6MKEl09UoGem0c0R5ozk3bn3R6sh0UrKh4tsnz4WRs3iQE r8jD0Y2BVM95N+m1RII/bxmevJVMD1SpCP7tEFfKdJDaMm5NKKjBq2Sw6NUWayRnXVlA E8Hyj6sWQOb+iQY4hIc20/9YcBSRGJY1qI1tY4znebVeOpNpDxSZLKzyQn0g+ig4Ceyw 0BWQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c134-20020a621c8c000000b0062ae6345c78si12632441pfc.403.2023.04.05.07.19.41; Wed, 05 Apr 2023 07:19:55 -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 S238473AbjDEOFZ (ORCPT + 99 others); Wed, 5 Apr 2023 10:05:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238472AbjDEOEn (ORCPT ); Wed, 5 Apr 2023 10:04:43 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF0876A3; Wed, 5 Apr 2023 07:02:07 -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 2e12dc83af149271; Wed, 5 Apr 2023 16:01:33 +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 512971B4EA6F; Wed, 5 Apr 2023 16:01:32 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 01/32] ACPICA: Headers: Delete bogus node_array array of pointers from AEST table Date: Wed, 05 Apr 2023 15:32:06 +0200 Message-ID: <4818517.GXAFRqVoOG@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346291936328680?= X-GMAIL-MSGID: =?utf-8?q?1762346291936328680?= From: Jessica Clarke ACPICA commit f0c4a06f1dfc4886d4e0c2aa30bc57b10c5a8c53 Like many tables, this is a header followed by multiple subtables of varying self-identifying types, and ACPICA does not normally add a field for the subtables, instead relying on pointer arithmetic past the end of the first header struct, since indexing a flexible array member is meaningless for variable-length entries. If we really wanted a field for this, we could use a u8 flexible array member, but it contradicts the current style. Using void *, however, is categorically wrong, as ACPI tables never contain native C-language pointers. Link: https://github.com/acpica/acpica/commit/f0c4a06f Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index b2973dbe37ee..2e7e0d5674f6 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -82,7 +82,6 @@ struct acpi_table_aest { struct acpi_table_header header; - void *node_array[]; }; /* Common Subtable header - one per Node Structure (Subtable) */ From patchwork Wed Apr 5 13:33:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp334519vqo; Wed, 5 Apr 2023 07:08:04 -0700 (PDT) X-Google-Smtp-Source: AKy350aQ8bhQOwy7UYmufwn450dtxpeoOp4D8KTF+5toZcGzTWZeTSfD5T4n8sbQku1UUHjL/Dmo X-Received: by 2002:a05:6402:1001:b0:501:d43e:d1e5 with SMTP id c1-20020a056402100100b00501d43ed1e5mr1997007edu.2.1680703684187; Wed, 05 Apr 2023 07:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703684; cv=none; d=google.com; s=arc-20160816; b=h/0uaXluoZ6CNDrMTPKJLFjtXb/VAAaHlStZyOygCMIHF7Ek1Q7YZfq8jB/JNy3V3B C9iE5y9QmZwkkKjreRdFPCYOehL+dXhVy6JfdFy9T5oPxpNwjVfO3zKA3RqROf+mGMHT N6BB5dC+bz48SaYQPgJqwhCI1s3rqw0EfAhIM4Pz/bLkqTDi0p5qDY9WAnb4ZGcSGUr3 w1W6iB4Qvch70kRmHBXUjRXk3D+DxDdkhS1QSaqHV+yEbiDlv9ny1zjTY6B9vf7Ewgho AMuoon6hi0jEhu7at1IafNQlWYWJ7oHPjZJNNrdzsMwRLrLwUaKxi/M7+znmy92YVGci IbyA== 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=DVhRopPZLegGOfvj4G0oMCYgtOAMRAh5Q7PZC1Cxoto=; b=zGdUn+vOhJU+ulvuod6trmjd9JoGvkkXDMxy6M7EqxKdy7cPX+z6BfV+1VCcWNmStd NbEW7j1+nzl+ypOzhUJ7SdddtK4Y9KuYuqmB9OPvFe/+ju8mxTWoxFEwWwNtrs5QABi9 SBjraZyUNsXACBKB+kxLNyLrxSlsAZ+fV3Li/pfQ3SgVkmY9PTZkagYxJKLx4CBD4lq2 4CT9VCpevjE/AobHBj5+ywLcPHDCP+66nYhX7ClIF2Z+t0864gdgdo3ZLya28/Flma/6 IeqJhb37JVs87AJ6P7EkEV+AKL/FRW7HSf5y47mYo7iBYYTiTthaGYX99br39O87CwrC pO+w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a50fa8c000000b0050245e7f729si2669878edr.615.2023.04.05.07.07.36; Wed, 05 Apr 2023 07:08:04 -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 S238320AbjDEOFD (ORCPT + 99 others); Wed, 5 Apr 2023 10:05:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238182AbjDEOD7 (ORCPT ); Wed, 5 Apr 2023 10:03:59 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4548658A; Wed, 5 Apr 2023 07:01:56 -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 f57cfd1615ca829f; Wed, 5 Apr 2023 16:01:27 +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 00E301B4EA6F; Wed, 5 Apr 2023 16:01:26 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 02/32] ACPICA: ACPI 6.5: MADT: add support for trace buffer extension in GICC Date: Wed, 05 Apr 2023 15:33:07 +0200 Message-ID: <2165774.irdbgypaU6@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345546320921361?= X-GMAIL-MSGID: =?utf-8?q?1762345546320921361?= From: Xiongfeng Wang ACPICA commit 1363e35dc6976143d118588b5124d72017365588 Link: https://github.com/acpica/acpica/commit/1363e35d Signed-off-by: Xiongfeng Wang Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 2e7e0d5674f6..65f9e834e921 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1012,7 +1012,7 @@ struct acpi_madt_local_x2apic_nmi { u8 reserved[3]; /* reserved - must be zero */ }; -/* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ +/* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 + ACPI 6.5 changes) */ struct acpi_madt_generic_interrupt { struct acpi_subtable_header header; @@ -1032,6 +1032,7 @@ struct acpi_madt_generic_interrupt { u8 efficiency_class; u8 reserved2[1]; u16 spe_interrupt; /* ACPI 6.3 */ + u16 trbe_interrupt; /* ACPI 6.5 */ }; /* Masks for Flags field above */ From patchwork Wed Apr 5 13:34:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344792vqo; Wed, 5 Apr 2023 07:20:49 -0700 (PDT) X-Google-Smtp-Source: AKy350Y007AtUJwVYDJdiSoxIt0GilN9TQ6hgnzIV8Uk3i0IB7w/EhplxvP9GN2PkB53BFIn0a2T X-Received: by 2002:a17:90a:e7cd:b0:23f:5fe7:25a1 with SMTP id kb13-20020a17090ae7cd00b0023f5fe725a1mr6855456pjb.13.1680704449556; Wed, 05 Apr 2023 07:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704449; cv=none; d=google.com; s=arc-20160816; b=SZo0NKQ4nP7UU1o5wmBtCxX2D6dPfEIE03kXb9LjBNadUYD6RM7L0OyYfgLGDE/sXW 8XZ2WOuCnw7e//PZju1KD0vRhK2ijw3CLaOagp8Z2R22pDUylawEfLNVjq0V77A1czys xnv5pqrHx0mulYhJAJcRUJMKJKgQcJ2ffypOsnEsZzz2fn8drSmozMnptUtmxEbqcKJz Cr4+a2FlU2kTFqK/NKNWlx0RVKZ7mo1nDplTZ1Mx8/1EgRQ8iN4hWDCMSBKQI88jFjJS ed4BypvuntgG4VN0VLyng4J+y/dziSTTLwnhgrsr09T6oSM417fAHpOr6y/0F+nhHDMK ajAA== 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=FNEqHRugooNuG7XIPGsc3CgobiXEPjMZcrC482z3M4I=; b=jVPq+A6TntyFMmLyMqaIqywlx5Fg0qj8y1V/ZNWoQAVlLhtrTtlyaZP5rwjXnMWb8X 2iBQk+GyjcAw59Vq4bbWdqvdLU7chQRKUolpx6ZTrBeUJSDZr97p9emuM6hRuSqYrYCV d3bo3tO0i+WUAisSg3mEtkBV/p1njC/N/ROSKoi6+J5z3A6PfvWe2cm5jOYx38zlTIhm xHkir93pRN1M5itYrHrmHYiP0D+NmVfwig3FNah+A4Vtf/i2U21hm+ECAEP3D/sOs3R5 RB4DDv8IWKS8F42PAQPdlUmo6/Ar5WFg82vfVk14VLsoFEI9/W7UJNmnQXcez1KoBE6R P9dA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020a17090a4d8400b0023fb18a6581si1408029pjh.112.2023.04.05.07.20.37; Wed, 05 Apr 2023 07:20:49 -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 S238356AbjDEOE5 (ORCPT + 99 others); Wed, 5 Apr 2023 10:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238239AbjDEODy (ORCPT ); Wed, 5 Apr 2023 10:03:54 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABE0E6587; Wed, 5 Apr 2023 07:01:51 -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 85bf5c05fd45d395; Wed, 5 Apr 2023 16:01:26 +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 A41471B4EA6F; Wed, 5 Apr 2023 16:01:25 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 03/32] ACPICA: Add missing macro ACPI_FUNCTION_TRACE() for acpi_ns_repair_HID() Date: Wed, 05 Apr 2023 15:34:51 +0200 Message-ID: <2903188.e9J7NaK4W3@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346348429825245?= X-GMAIL-MSGID: =?utf-8?q?1762346348429825245?= From: Xiongfeng Wang ACPICA commit 2d85f3d30cdf9ceeb516e76bdc3c5c5d1d9b9fea The following commit add function tracing macros for the namespace repiar mechanism. commit 87b8dba05b4cf8c111948327023c710e2b6b5a05 Add function trace macros to improve namespace debugging But it missed the trace macro for the entry of ns_repair_HID(). Let's add it. Link: https://github.com/acpica/acpica/commit/2d85f3d3 Signed-off-by: Xiongfeng Wang Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsrepair2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c index dd533c887e3a..957d7eb4861f 100644 --- a/drivers/acpi/acpica/nsrepair2.c +++ b/drivers/acpi/acpica/nsrepair2.c @@ -499,7 +499,7 @@ acpi_ns_repair_HID(struct acpi_evaluate_info *info, char *source; char *dest; - ACPI_FUNCTION_NAME(ns_repair_HID); + ACPI_FUNCTION_TRACE(ns_repair_HID); /* We only care about string _HID objects (not integers) */ From patchwork Wed Apr 5 13:35:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp333221vqo; Wed, 5 Apr 2023 07:06:44 -0700 (PDT) X-Google-Smtp-Source: AKy350aowNaKvW5A/5o1gimM1xiC8W/kvJUGXQjZQzfz8vOoXST3g/iY5FgTd1E150hpMHyQWzeg X-Received: by 2002:a17:90b:314a:b0:240:7f0d:9235 with SMTP id ip10-20020a17090b314a00b002407f0d9235mr7085777pjb.22.1680703604074; Wed, 05 Apr 2023 07:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703604; cv=none; d=google.com; s=arc-20160816; b=TkrZRIBNYGRe5YDEuwJyXtEAyB3OIdisxlzpg4YJm28Wtu2KWbip+0aKgGdbgQatbq dmfiFcoCmpdtZ7PK1ktDwv1br/dK0ZiF+tMJNrCQ2mfUVG4BttUiiSEPJxQLPgSMXlrT caR2NIVoXKDeOFlWafXwsdVRqxckTCi+hBnfDmpOK05DU0YFw1iRYlY+JdflpIFPvcV0 xSrSA35AcwspiUAbw2nCpLJ8pmR0K9w8Aez2blN1LFEsESfnqDHRjQHNAaTfIdP+RCoY sw4UbJJnqqUCq4Nu83blH6hVApK6qqLYkeJtkEvM5yhVSSG5wl4ncuVDsczgR39e65nM wpKA== 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=Z3S1/sA0zLIoOSWLVglFzyqunXc6hq4O9FAGg+tZuv0=; b=j+VIoCCRTdQf28Vz5FJQ+2C/BFWJEwNY1V1bTQHnAfJxXzGJQEi5B0lgb+GfKmCuKR uuGBeL1bT2002ZnySSqIk++hYKAwUf4f82jVmJTw1qmJAkAdnoy/dJI2irMy1c7Jnar7 05Ck9OEWr+C/r+YQzI3Dkhnu1tgoi1hsNk+tL8IUNa50bBv5qOtazDoW56RxcgqXemFk x5DAswuTY3RIeXHRye/K4kIC/+NEaZ2R0AQJCy5H+5zkLQdmcVLxI5TlLU2Lm9X8wUpG +OXQ2n5UIHdUTqux3AeUC8fTAyv34DJEWcxFYMvHMcyH3GsP3QhRWvAajTMtFbzlGAWU qoGQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm10-20020a17090b3eca00b0023312fad927si1418637pjb.100.2023.04.05.07.06.29; Wed, 05 Apr 2023 07:06:44 -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 S238477AbjDEOEp (ORCPT + 99 others); Wed, 5 Apr 2023 10:04:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237448AbjDEODj (ORCPT ); Wed, 5 Apr 2023 10:03:39 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02A1E525B; Wed, 5 Apr 2023 07:01:46 -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 6bc4c385f572d997; Wed, 5 Apr 2023 16:01:24 +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 CA9B11B4EA6F; Wed, 5 Apr 2023 16:01:23 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 04/32] ACPICA: acpisrc: Add missing tables to astable Date: Wed, 05 Apr 2023 15:35:31 +0200 Message-ID: <3256109.44csPzL39Z@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345461982675233?= X-GMAIL-MSGID: =?utf-8?q?1762345461982675233?= From: Pedro Falcato ACPICA commit d4a2c93198cdd9c6f4a83798345851fee96d5ca5 Also renames struct acpi_data_table_mapping's struct to struct acpi_data_table_mapping, just so conversion goes smoothly. Link: https://github.com/acpica/acpica/commit/d4a2c931 Signed-off-by: Pedro Falcato Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/evrgnini.c | 4 ++-- drivers/acpi/acpica/exregion.c | 4 ++-- include/acpi/actypes.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c index ca4ba6b351fe..792d1a5f0052 100644 --- a/drivers/acpi/acpica/evrgnini.c +++ b/drivers/acpi/acpica/evrgnini.c @@ -430,7 +430,7 @@ acpi_ev_data_table_region_setup(acpi_handle handle, { union acpi_operand_object *region_desc = (union acpi_operand_object *)handle; - struct acpi_data_table_space_context *local_region_context; + struct acpi_data_table_mapping *local_region_context; ACPI_FUNCTION_TRACE(ev_data_table_region_setup); @@ -445,7 +445,7 @@ acpi_ev_data_table_region_setup(acpi_handle handle, /* Create a new context */ local_region_context = - ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_data_table_space_context)); + ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_data_table_mapping)); if (!(local_region_context)) { return_ACPI_STATUS(AE_NO_MEMORY); } diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c index 4ff35852c0b3..6d4a4cc14850 100644 --- a/drivers/acpi/acpica/exregion.c +++ b/drivers/acpi/acpica/exregion.c @@ -509,12 +509,12 @@ acpi_ex_data_table_space_handler(u32 function, u64 *value, void *handler_context, void *region_context) { - struct acpi_data_table_space_context *mapping; + struct acpi_data_table_mapping *mapping; char *pointer; ACPI_FUNCTION_TRACE(ex_data_table_space_handler); - mapping = (struct acpi_data_table_space_context *) region_context; + mapping = (struct acpi_data_table_mapping *) region_context; pointer = ACPI_CAST_PTR(char, mapping->pointer) + (address - ACPI_PTR_TO_PHYSADDR(mapping->pointer)); diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 95e4f56f9754..46878cbb7d39 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -1240,7 +1240,7 @@ struct acpi_mem_space_context { struct acpi_mem_mapping *first_mm; }; -struct acpi_data_table_space_context { +struct acpi_data_table_mapping { void *pointer; }; From patchwork Wed Apr 5 13:36:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344657vqo; Wed, 5 Apr 2023 07:20:39 -0700 (PDT) X-Google-Smtp-Source: AKy350azPQsj+hYtBWeVRlUgduegD45+omQXWJpkfusCteH2I2+S3B/csWJuIENGBOFQMx0o8Zst X-Received: by 2002:a17:90a:13:b0:233:f786:35ca with SMTP id 19-20020a17090a001300b00233f78635camr6543472pja.35.1680704439515; Wed, 05 Apr 2023 07:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704439; cv=none; d=google.com; s=arc-20160816; b=GT9nlSbMIvuEx+T0bZuqqQNc4OKlB8FNkSOmVkaRXJsVcWcVlLpzoFIsJxulpCc7o6 eH5XB7UkpSyC8cxEjHBUCXwNr1GIGMDFMwwqrCbMsgXeGh5nwSu0axUAzSi7AlPcL4QC 8/F//hitDHcthK9gtuMu6gkc+614lwOFToyLXovBgiWXRQxiipWSh//9Iw/QEWa2VvI6 fEPVUaLAMRD9heQYvYVfU/kYqCb8oOeTVUtq6gUe/mQSXPORmvEobT1eJ6fv+Wvfjgne 2Sl49rTUs8X/oQnfObqi9LTJwCyT6Z0LUJnGBEs1TzZOpW7QmeMKgbEz2rhfubjRQlan 3uFA== 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=I2ImebhGhlKTvHxvTGv19G/jykq1quAYCVB14fzFVc0=; b=BuewFebkE0KZydrVq3JvP+bY4JR9LWcOxF+YtmDJZNU+CEECEROvST27k6F9U60Nfj cK68PsnXkyVer9corCeIwK+7QMptth0jn09eNt3hVdTFJBgHx5YmCZaNEacCvKWT6RWP O2n45UUXNzhMd47AmPuMvLZLUL61sE/bKi8l08DKg5NUpELHkelbjcHTRB/Q2hSNGb4U xm1Ibc0jNVfNgQI0VqAIkEIUKikv236EhHjlnNBnqJ3IK3fbf8Aw5kYBh47lID8rTavK aPN/AIGBiXacKpMaq8prmSQcqstIMu7ygXYdVgz9fvQB2tQkbUeJBPTEHqemic/pyXdV +tew== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a17090ad98500b00240262caf83si1441450pjv.82.2023.04.05.07.20.27; Wed, 05 Apr 2023 07:20:39 -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 S238335AbjDEOEf (ORCPT + 99 others); Wed, 5 Apr 2023 10:04:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238403AbjDEODQ (ORCPT ); Wed, 5 Apr 2023 10:03:16 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3117972B5; Wed, 5 Apr 2023 07:01:39 -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 16fa3e09ab760ded; Wed, 5 Apr 2023 16:01:23 +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 8710F1B4EA6F; Wed, 5 Apr 2023 16:01:22 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 05/32] ACPICA: Add support for 64 bit loong_arch compilation Date: Wed, 05 Apr 2023 15:36:09 +0200 Message-ID: <10278375.nUPlyArG6x@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpeegnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346338308848771?= X-GMAIL-MSGID: =?utf-8?q?1762346338308848771?= From: Huacai Chen ACPICA commit d809b69cf43c632c8fe5b42372a891216fdd9223 Add 64 bit loong_arch architecture by defining ACPI_MACHINE_WIDTH to 64. Useful for acpica tools and incorporating ACPICA into the Firmware Test Suite. Link: https://github.com/acpica/acpica/commit/d809b69c Signed-off-by: Huacai Chen Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/platform/aclinux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index a5550dd4d507..14ac657a7ded 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -199,7 +199,7 @@ #if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\ defined(__aarch64__) || defined(__PPC64__) ||\ - defined(__s390x__) ||\ + defined(__s390x__) || defined(__loongarch__) ||\ (defined(__riscv) && (defined(__LP64__) || defined(_LP64))) #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long From patchwork Wed Apr 5 13:36:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79638 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343332vqo; Wed, 5 Apr 2023 07:18:49 -0700 (PDT) X-Google-Smtp-Source: AKy350Y1X2yCIiO+2Qggs2MbRL9LjkxxdHEXeKFsMI1emFJvjZaGOYiT3XopzHUW8NZGHWQ5pSTK X-Received: by 2002:a05:6a20:c526:b0:d0:11bc:eed6 with SMTP id gm38-20020a056a20c52600b000d011bceed6mr4744923pzb.50.1680704328988; Wed, 05 Apr 2023 07:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704328; cv=none; d=google.com; s=arc-20160816; b=qlbCb84DbljptOe7jHZXVux6m7buHFjZ9KDKssyngbaKlCjcKHUdMJqWnY6SxcjD+M e7+GVMePqW0LxYFg2J8RjG6JYAbItbwM3O+rDknphqrYUYbfXt0mUNt31lDTNeIKXFWF BhVTm9ugR1V9VkuXPWD5rCey4teOEQeG1kRJ5cb16onYMZM6aVXyn5+tjT+3/BbeN3OM aFkTsEPr1jrC4f4cGRcmBdvBkcgSh5z8R7srBx3DodVyujLXDdYuFHUp1cjDQSUNnRJ9 UfmOsuS4TFcbW8K2xzOgKQ6YlnwDiDNwwFMBvJXxAkPCpK+28LNhyJDO7W44zFk3t8kN shaQ== 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=e28HCo03CZKMfysfy0D5Xq2YWe2WUcaPHttdPLju2WM=; b=oB1N22QWOvPz4O509l+uqRdn6UqgVIgrh0aGl9rrkdhQKLm2j/zj90XibdSFYmSmbo sq9YojXTReEdAwvEp3rZsUmZAQT4wwlBtv4QFgTw1dOSA0NT7kA2Zz3uXTTlI3imBnrP a+m+AOQnuH6ptVHZh/QZcvcNxALstWsaKLvbwhskHiCaEHrHyNdKf3iSeevA8JPxFTgs yIDg7mCZkkX9Xu7UkOD9kzGJT1Rq8fWXgOVMhnEtg96cN9xnaKIGrqjm6PB+m56DQZjL G5o1K2B5/21bpQCtTMMQ+dyAgo/cECCOdtM0HGgP7JpfGDDhzx8QYmkwvr2opes460+0 JH/A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a133-20020a621a8b000000b005a919052520si12324777pfa.317.2023.04.05.07.18.36; Wed, 05 Apr 2023 07:18:48 -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 S238437AbjDEOEW (ORCPT + 99 others); Wed, 5 Apr 2023 10:04:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238232AbjDEODO (ORCPT ); Wed, 5 Apr 2023 10:03:14 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A412372A0; Wed, 5 Apr 2023 07:01:35 -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 e95ffb0460b9d498; Wed, 5 Apr 2023 16:01:21 +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 EFB311B4EA6F; Wed, 5 Apr 2023 16:01:20 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 06/32] ACPICA: Add support for ASPT table in disassembler Date: Wed, 05 Apr 2023 15:36:51 +0200 Message-ID: <1953193.PYKUYFuaPT@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepieeuhedtkeejffdtieehheegveegueegteehudeikeetvdffgfdtgeffudehteeunecuffhomhgrihhnpehgihhthhhusgdrtghomhdpmhhitghrohhsohhfthdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346222613017791?= X-GMAIL-MSGID: =?utf-8?q?1762346222613017791?= From: Jeremi Piotrowski ACPICA commit 6771f8b758299bd383bab145d5fd36ec229b2d70 ASPT is the AMD Secure Processor table, found in Hyper-V VMs when SNP isolation is exposed to the VM and in some high-end AMD servers. This commit adds support for rev 1 of the ASPT spec in the disassembler. Link: https://github.com/acpica/acpica/commit/6771f8b7 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl1.h | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 81b9e794424d..b5e011da5271 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -26,6 +26,7 @@ */ #define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */ #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ +#define ACPI_SIG_ASPT "ASPT" /* AMD Secure Processor Table */ #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ @@ -109,6 +110,51 @@ struct acpi_whea_header { u64 mask; /* Bitmask required for this register instruction */ }; +/* https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/acpitabl/ns-acpitabl-aspt_table */ +#define ASPT_REVISION_ID 0x01 +struct acpi_table_aspt { + struct acpi_table_header header; + u32 num_entries; +}; + +struct acpi_aspt_header { + u16 type; + u16 length; +}; + +enum acpi_aspt_type { + ACPI_ASPT_TYPE_GLOBAL_REGS = 0, + ACPI_ASPT_TYPE_SEV_MBOX_REGS = 1, + ACPI_ASPT_TYPE_ACPI_MBOX_REGS = 2, +}; + +/* 0: ASPT Global Registers */ +struct acpi_aspt_global_regs { + struct acpi_aspt_header header; + u32 reserved; + u64 feature_reg_addr; + u64 irq_en_reg_addr; + u64 irq_st_reg_addr; +}; + +/* 1: ASPT SEV Mailbox Registers */ +struct acpi_aspt_sev_mbox_regs { + struct acpi_aspt_header header; + u8 mbox_irq_id; + u8 reserved[3]; + u64 cmd_resp_reg_addr; + u64 cmd_buf_lo_reg_addr; + u64 cmd_buf_hi_reg_addr; +}; + +/* 2: ASPT ACPI Mailbox Registers */ +struct acpi_aspt_acpi_mbox_regs { + struct acpi_aspt_header header; + u32 reserved1; + u64 cmd_resp_reg_addr; + u64 reserved2[2]; +}; + /******************************************************************************* * * ASF - Alert Standard Format table (Signature "ASF!") From patchwork Wed Apr 5 13:37:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp331927vqo; Wed, 5 Apr 2023 07:05:28 -0700 (PDT) X-Google-Smtp-Source: AKy350YLsh0nGfBMY8MlWMiM5gj7FaXKuKpDKWKqyWJTaDh8fuAzfYd0LAuw9/zm3KcEQo7sEN1h X-Received: by 2002:a17:90b:3807:b0:240:883:8ff8 with SMTP id mq7-20020a17090b380700b0024008838ff8mr7200748pjb.3.1680703528060; Wed, 05 Apr 2023 07:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703528; cv=none; d=google.com; s=arc-20160816; b=UOSFmsOwzj0FktbsAk9Iiq95QeOo86JoBgKM5geBjGcQe/RKQ5KIC+bU8fnqhouonV GAqYvizZJmymFnXZhKke9yPbInix9Rd+HpOxg1+9L0GvB2+7hSkX41aXgRV8hmIGfa99 FO3qc+vTvlYQljXLojxvL70J4GuVkbdR5i+QxcO65bJzKusaI8xzUDpxiBIUwpW/va11 RhO/dCyCvBW85Raa5OJNHHlDxdbUlsG5I9j77FsAn2nMf/rZNcE0Q3he4hkYFDCiTe0n pkj+nMOW9/UfZL1Mk9iPWa/0Er5YZsTOoxJSlTNsfYYAtyqUaMLg60Ab/nky2PYqT1Ck MEwg== 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=/ntdMVgZfyq3ge2y5N3QO6KAMQBzlfposb4McQVq74Q=; b=eu0/MB9oVl7lObVgHs7LL1uWORSrLnz7izqcvdnFgRX/RTlYM8h42/spxBy91dL4TW b6nc2uPogR+Rz6AFFXipMCKw5UIFhqI+dh/M4IGu73LLPxzQvAOnrA5NPFVZWtiSSjrB +3vwrTY8T78T8vgeU1IIyeFTl7FGECnly8JakgqPYx6OFU16URfvUylySyu+SPrGdZbb FC9CbkiuTY0GhMScwYSTt5C/2eDPVAbKBR4d5WSYmRuwiVVnbsn+uUS2J5/C1YFHfC2U pA7ynh97poUoPMZS4KoyNMpKOzRjR+NpoKVGGbDGFBhxyWpKZASgOmQ5YNpNUY6kwP+l HZ9g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a170902c20600b001960fd737b6si12045800pll.330.2023.04.05.07.05.13; Wed, 05 Apr 2023 07:05:28 -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 S238394AbjDEOEB (ORCPT + 99 others); Wed, 5 Apr 2023 10:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238116AbjDEODM (ORCPT ); Wed, 5 Apr 2023 10:03:12 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F40972A2; Wed, 5 Apr 2023 07:01:32 -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 23896dadccd63884; Wed, 5 Apr 2023 16:01:19 +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 E75991B4EA6F; Wed, 5 Apr 2023 16:01:18 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 07/32] ACPICA: Add support for Arm's MPAM ACPI table version 2 Date: Wed, 05 Apr 2023 15:37:35 +0200 Message-ID: <7533327.EvYhyI6sBW@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdfhjedtgfekvdeitdeiiefgkeeljeegffelleeuheehfedugffhfeefvedtgfehnecuffhomhgrihhnpegrrhhmrdgtohhmpdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345383002457253?= X-GMAIL-MSGID: =?utf-8?q?1762345383002457253?= From: Hesham Almatary ACPICA commit 005e24bcaa6e4c7db327b4f81fb63b2715aac7e6 Complies with ACPI for Memory System Resource Partitioning and Monitoring 2.0 [1]. Document number: DEN0065, as of December 2022. Support for all types of MPAM resources. No support yet for: 1) MPAM PCC Interface Type 2) The optional Resource-specific data per MSC node, introduced in v2 of the MPAM ACPI spec. [1] https://developer.arm.com/documentation/den0065/latest Link: https://github.com/acpica/acpica/commit/005e24bc Signed-off-by: Hesham Almatary Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 116 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 65f9e834e921..b082175906ba 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -35,6 +35,7 @@ #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ +#define ACPI_SIG_MPAM "MPAM" /* Memory System Resource Partitioning and Monitoring Table */ #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ @@ -1332,6 +1333,121 @@ struct acpi_table_mchi { u8 pci_function; }; +/******************************************************************************* + * + * MPAM - Memory System Resource Partitioning and Monitoring + * + * Conforms to "ACPI for Memory System Resource Partitioning and Monitoring 2.0" + * Document number: ARM DEN 0065, December, 2022. + * + ******************************************************************************/ + +/* MPAM RIS locator types. Table 11, Location types */ +enum acpi_mpam_locator_type { + ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE = 0, + ACPI_MPAM_LOCATION_TYPE_MEMORY = 1, + ACPI_MPAM_LOCATION_TYPE_SMMU = 2, + ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE = 3, + ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE = 4, + ACPI_MPAM_LOCATION_TYPE_INTERCONNECT = 5, + ACPI_MPAM_LOCATION_TYPE_UNKNOWN = 0xFF +}; + +/* MPAM Functional dependency descriptor. Table 10 */ +struct acpi_mpam_func_deps { + u32 producer; + u32 reserved; +}; + +/* MPAM Processor cache locator descriptor. Table 13 */ +struct acpi_mpam_resource_cache_locator { + u64 cache_reference; + u32 reserved; +}; + +/* MPAM Memory locator descriptor. Table 14 */ +struct acpi_mpam_resource_memory_locator { + u64 proximity_domain; + u32 reserved; +}; + +/* MPAM SMMU locator descriptor. Table 15 */ +struct acpi_mpam_resource_smmu_locator { + u64 smmu_interface; + u32 reserved; +}; + +/* MPAM Memory-side cache locator descriptor. Table 16 */ +struct acpi_mpam_resource_memcache_locator { + u8 reserved[7]; + u8 level; + u32 reference; +}; + +/* MPAM ACPI device locator descriptor. Table 17 */ +struct acpi_mpam_resource_acpi_locator { + u64 acpi_hw_id; + u32 acpi_unique_id; +}; + +/* MPAM Interconnect locator descriptor. Table 18 */ +struct acpi_mpam_resource_interconnect_locator { + u64 inter_connect_desc_tbl_off; + u32 reserved; +}; + +/* MPAM Locator structure. Table 12 */ +struct acpi_mpam_resource_generic_locator { + u64 descriptor1; + u32 descriptor2; +}; + +union acpi_mpam_resource_locator { + struct acpi_mpam_resource_cache_locator cache_locator; + struct acpi_mpam_resource_memory_locator memory_locator; + struct acpi_mpam_resource_smmu_locator smmu_locator; + struct acpi_mpam_resource_memcache_locator mem_cache_locator; + struct acpi_mpam_resource_acpi_locator acpi_locator; + struct acpi_mpam_resource_interconnect_locator interconnect_ifc_locator; + struct acpi_mpam_resource_generic_locator generic_locator; +}; + +/* Memory System Component Resource Node Structure Table 9 */ +struct acpi_mpam_resource_node { + u32 identifier; + u8 ris_index; + u16 reserved1; + u8 locator_type; + union acpi_mpam_resource_locator locator; + u32 num_functional_deps; +}; + +/* Memory System Component (MSC) Node Structure. Table 4 */ +struct acpi_mpam_msc_node { + u16 length; + u8 interface_type; + u8 reserved; + u32 identifier; + u64 base_address; + u32 mmio_size; + u32 overflow_interrupt; + u32 overflow_interrupt_flags; + u32 reserved1; + u32 overflow_interrupt_affinity; + u32 error_interrupt; + u32 error_interrupt_flags; + u32 reserved2; + u32 error_interrupt_affinity; + u32 max_nrdy_usec; + u64 hardware_id_linked_device; + u32 instance_id_linked_device; + u32 num_resouce_nodes; +}; + +struct acpi_table_mpam { + struct acpi_table_header header; /* Common ACPI table header */ +}; + /******************************************************************************* * * MPST - Memory Power State Table (ACPI 5.0) From patchwork Wed Apr 5 13:38:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79639 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343357vqo; Wed, 5 Apr 2023 07:18:52 -0700 (PDT) X-Google-Smtp-Source: AKy350aP9cLaDxE4/SaNvq5wBbPz+dZ6b1wBhbRnQ54nAkwbokrAB3Ibhe8K9BiB3ZUv+x9XgBth X-Received: by 2002:a17:903:52:b0:1a1:bb4e:4eb8 with SMTP id l18-20020a170903005200b001a1bb4e4eb8mr5200760pla.62.1680704332386; Wed, 05 Apr 2023 07:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704332; cv=none; d=google.com; s=arc-20160816; b=A+8b4+sSzBMatO5SMB/pWPsh06vOh58LUAMimNMaIpD4gMT+RWZ1pO67ocA9a/Y/5I 1bE8TAazOI7xwkOfq9QGdm8YcuCrWR2xbf3euK8+THHoMkYVeoUoH74kBDhwCNCppfTP nXNtgbYTl3raNI2fe8Zs/zKBnZo/hj2pOqJH0HUk92GM7wCp7G0++swH6lwf4rD3Xf4b kGEmRVPJ+Qz6mCj4ZIw+4zo6Di0AbYq77pY1ED8HUUsLCDut6hKjNcsvk/X2MTVLpPEJ ULuBZAz4VNzUtLfPYCLITUJSG06q0dyRF+M47bAQAWaDAPVHt6BMCIQEdJ6k5X71Lw0C Jdpw== 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=QGgwrs6/KWUBoKVvcBnJbKgvvLftF8CMs010oAwfm2c=; b=kn0ZVXR9EweJMMv/3LJyegJXa+f6GxSgt69qgqaQBCTVHKveyv6UsD9T0Tq7gSOGr+ QMFX3S0fI0mjIHTKUPhrbDRT/8RkchYXMbf1XoBkDVDEm/BFoyqD4a4sFcj81oEzSeW+ BMI2+f9NkyEX/W4JSOsuraVfayNChHJhPxYuj5WuBuX6qKyfEvKNxS9jNlNsjU8E00zc syE8XYz9ne4NXHujwR9t615QEsV63xHraYROy2F6EHLxNicE12WuBmH1ZoXHjLHfJo5Y O0oTkBiXWLOoS1Onr1xA8qbgZaMHKL1uPfQzzZadkYP33sEQyVtWVFCla+NlcofUfDLc cZ8Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ld8-20020a170902fac800b001a1aa5d3babsi11954238plb.294.2023.04.05.07.18.39; Wed, 05 Apr 2023 07:18:52 -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 S238423AbjDEOEF (ORCPT + 99 others); Wed, 5 Apr 2023 10:04:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238395AbjDEODN (ORCPT ); Wed, 5 Apr 2023 10:03:13 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDC6E7299; Wed, 5 Apr 2023 07:01:29 -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 0304bcb383289d58; Wed, 5 Apr 2023 16:01:18 +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 E10031B4EA73; Wed, 5 Apr 2023 16:01:16 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 08/32] ACPICA: Update all copyrights/signons to 2023 Date: Wed, 05 Apr 2023 15:38:21 +0200 Message-ID: <3517127.iIbC2pHGDl@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346226274156828?= X-GMAIL-MSGID: =?utf-8?q?1762346226274156828?= From: Bob Moore ACPICA commit 25bddd1824b1e450829468a64bbdcb38074ba3d2 Copyright updates to 2023. Link: https://github.com/acpica/acpica/commit/25bddd18 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/acapps.h | 2 +- drivers/acpi/acpica/accommon.h | 2 +- drivers/acpi/acpica/acconvert.h | 2 +- drivers/acpi/acpica/acdebug.h | 2 +- drivers/acpi/acpica/acdispat.h | 2 +- drivers/acpi/acpica/acevents.h | 2 +- drivers/acpi/acpica/acglobal.h | 2 +- drivers/acpi/acpica/achware.h | 2 +- drivers/acpi/acpica/acinterp.h | 2 +- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acmacros.h | 2 +- drivers/acpi/acpica/acnamesp.h | 2 +- drivers/acpi/acpica/acobject.h | 2 +- drivers/acpi/acpica/acopcode.h | 2 +- drivers/acpi/acpica/acparser.h | 2 +- drivers/acpi/acpica/acpredef.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/acstruct.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/acutils.h | 2 +- drivers/acpi/acpica/amlcode.h | 2 +- drivers/acpi/acpica/amlresrc.h | 2 +- drivers/acpi/acpica/dbhistry.c | 2 +- drivers/acpi/acpica/dsargs.c | 2 +- drivers/acpi/acpica/dscontrol.c | 2 +- drivers/acpi/acpica/dsdebug.c | 2 +- drivers/acpi/acpica/dsfield.c | 2 +- drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/dsmethod.c | 2 +- drivers/acpi/acpica/dsobject.c | 2 +- drivers/acpi/acpica/dsopcode.c | 2 +- drivers/acpi/acpica/dspkginit.c | 2 +- drivers/acpi/acpica/dswexec.c | 2 +- drivers/acpi/acpica/dswload.c | 2 +- drivers/acpi/acpica/dswload2.c | 2 +- drivers/acpi/acpica/dswscope.c | 2 +- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/evevent.c | 2 +- drivers/acpi/acpica/evglock.c | 2 +- drivers/acpi/acpica/evgpe.c | 2 +- drivers/acpi/acpica/evgpeblk.c | 2 +- drivers/acpi/acpica/evgpeinit.c | 2 +- drivers/acpi/acpica/evgpeutil.c | 2 +- drivers/acpi/acpica/evhandler.c | 2 +- drivers/acpi/acpica/evmisc.c | 2 +- drivers/acpi/acpica/evregion.c | 2 +- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evxface.c | 2 +- drivers/acpi/acpica/evxfevnt.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- drivers/acpi/acpica/evxfregn.c | 2 +- drivers/acpi/acpica/exconcat.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exconvrt.c | 2 +- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exdebug.c | 2 +- drivers/acpi/acpica/exdump.c | 2 +- drivers/acpi/acpica/exfield.c | 2 +- drivers/acpi/acpica/exfldio.c | 2 +- drivers/acpi/acpica/exmisc.c | 2 +- drivers/acpi/acpica/exmutex.c | 2 +- drivers/acpi/acpica/exnames.c | 2 +- drivers/acpi/acpica/exoparg1.c | 2 +- drivers/acpi/acpica/exoparg2.c | 2 +- drivers/acpi/acpica/exoparg3.c | 2 +- drivers/acpi/acpica/exoparg6.c | 2 +- drivers/acpi/acpica/exprep.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresnte.c | 2 +- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/exserial.c | 2 +- drivers/acpi/acpica/exstore.c | 2 +- drivers/acpi/acpica/exstoren.c | 2 +- drivers/acpi/acpica/exstorob.c | 2 +- drivers/acpi/acpica/exsystem.c | 2 +- drivers/acpi/acpica/extrace.c | 2 +- drivers/acpi/acpica/exutils.c | 2 +- drivers/acpi/acpica/hwacpi.c | 2 +- drivers/acpi/acpica/hwesleep.c | 2 +- drivers/acpi/acpica/hwgpe.c | 2 +- drivers/acpi/acpica/hwsleep.c | 2 +- drivers/acpi/acpica/hwtimer.c | 2 +- drivers/acpi/acpica/hwvalid.c | 2 +- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/hwxfsleep.c | 2 +- drivers/acpi/acpica/nsarguments.c | 2 +- drivers/acpi/acpica/nsconvert.c | 2 +- drivers/acpi/acpica/nsdump.c | 2 +- drivers/acpi/acpica/nsdumpdv.c | 2 +- drivers/acpi/acpica/nsinit.c | 2 +- drivers/acpi/acpica/nsload.c | 2 +- drivers/acpi/acpica/nsparse.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsprepkg.c | 2 +- drivers/acpi/acpica/nsrepair.c | 2 +- drivers/acpi/acpica/nsrepair2.c | 2 +- drivers/acpi/acpica/nsutils.c | 2 +- drivers/acpi/acpica/nswalk.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/psloop.c | 2 +- drivers/acpi/acpica/psobject.c | 2 +- drivers/acpi/acpica/psopcode.c | 2 +- drivers/acpi/acpica/psopinfo.c | 2 +- drivers/acpi/acpica/psparse.c | 2 +- drivers/acpi/acpica/psscope.c | 2 +- drivers/acpi/acpica/pstree.c | 2 +- drivers/acpi/acpica/psutils.c | 2 +- drivers/acpi/acpica/pswalk.c | 2 +- drivers/acpi/acpica/psxface.c | 2 +- drivers/acpi/acpica/tbdata.c | 2 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 2 +- drivers/acpi/acpica/tbprint.c | 2 +- drivers/acpi/acpica/tbutils.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/tbxfload.c | 2 +- drivers/acpi/acpica/tbxfroot.c | 2 +- drivers/acpi/acpica/utaddress.c | 2 +- drivers/acpi/acpica/utalloc.c | 2 +- drivers/acpi/acpica/utascii.c | 2 +- drivers/acpi/acpica/utbuffer.c | 2 +- drivers/acpi/acpica/utcache.c | 2 +- drivers/acpi/acpica/utcksum.c | 2 +- drivers/acpi/acpica/utcopy.c | 2 +- drivers/acpi/acpica/utdebug.c | 2 +- drivers/acpi/acpica/utdecode.c | 2 +- drivers/acpi/acpica/uteval.c | 2 +- drivers/acpi/acpica/utglobal.c | 2 +- drivers/acpi/acpica/uthex.c | 2 +- drivers/acpi/acpica/utids.c | 2 +- drivers/acpi/acpica/utinit.c | 2 +- drivers/acpi/acpica/utlock.c | 2 +- drivers/acpi/acpica/utobject.c | 2 +- drivers/acpi/acpica/utosi.c | 2 +- drivers/acpi/acpica/utpredef.c | 2 +- drivers/acpi/acpica/utprint.c | 2 +- drivers/acpi/acpica/uttrack.c | 2 +- drivers/acpi/acpica/utuuid.c | 2 +- drivers/acpi/acpica/utxface.c | 2 +- drivers/acpi/acpica/utxfinit.c | 2 +- include/acpi/acbuffer.h | 2 +- include/acpi/acconfig.h | 2 +- include/acpi/acexcep.h | 2 +- include/acpi/acnames.h | 2 +- include/acpi/acoutput.h | 2 +- include/acpi/acpi.h | 2 +- include/acpi/acpiosxf.h | 2 +- include/acpi/acpixf.h | 2 +- include/acpi/acrestyp.h | 2 +- include/acpi/actbl.h | 2 +- include/acpi/actbl1.h | 2 +- include/acpi/actbl2.h | 2 +- include/acpi/actbl3.h | 2 +- include/acpi/actypes.h | 2 +- include/acpi/acuuid.h | 2 +- include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acenvex.h | 2 +- include/acpi/platform/acgcc.h | 2 +- include/acpi/platform/acgccex.h | 2 +- include/acpi/platform/aclinux.h | 2 +- include/acpi/platform/aclinuxex.h | 2 +- tools/power/acpi/common/cmfsize.c | 2 +- tools/power/acpi/common/getopt.c | 2 +- tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixdir.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixmap.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixxf.c | 2 +- tools/power/acpi/tools/acpidump/acpidump.h | 2 +- tools/power/acpi/tools/acpidump/apdump.c | 2 +- tools/power/acpi/tools/acpidump/apfiles.c | 2 +- tools/power/acpi/tools/acpidump/apmain.c | 2 +- 174 files changed, 174 insertions(+), 174 deletions(-) diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h index 0a50b4912515..9d4cbd956627 100644 --- a/drivers/acpi/acpica/acapps.h +++ b/drivers/acpi/acpica/acapps.h @@ -3,7 +3,7 @@ * * Module Name: acapps - common include for ACPI applications/tools * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/accommon.h b/drivers/acpi/acpica/accommon.h index bb329e34ee7d..4536dc9d3979 100644 --- a/drivers/acpi/acpica/accommon.h +++ b/drivers/acpi/acpica/accommon.h @@ -3,7 +3,7 @@ * * Name: accommon.h - Common include files for generation of ACPICA source * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acconvert.h b/drivers/acpi/acpica/acconvert.h index 476d21e67767..c6ba6a36cfb5 100644 --- a/drivers/acpi/acpica/acconvert.h +++ b/drivers/acpi/acpica/acconvert.h @@ -3,7 +3,7 @@ * * Module Name: acapps - common include for ACPI applications/tools * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h index d629716aa5b2..22f1f7a9e5a3 100644 --- a/drivers/acpi/acpica/acdebug.h +++ b/drivers/acpi/acpica/acdebug.h @@ -3,7 +3,7 @@ * * Name: acdebug.h - ACPI/AML debugger * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acdispat.h b/drivers/acpi/acpica/acdispat.h index fe2c3630a38d..73eecbf62f06 100644 --- a/drivers/acpi/acpica/acdispat.h +++ b/drivers/acpi/acpica/acdispat.h @@ -3,7 +3,7 @@ * * Name: acdispat.h - dispatcher (parser to interpreter interface) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h index 922f559a3e59..ddd072cbc738 100644 --- a/drivers/acpi/acpica/acevents.h +++ b/drivers/acpi/acpica/acevents.h @@ -3,7 +3,7 @@ * * Name: acevents.h - Event subcomponent prototypes and defines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 777457a58340..778241173ed4 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h @@ -3,7 +3,7 @@ * * Name: acglobal.h - Declarations for global variables * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/achware.h b/drivers/acpi/acpica/achware.h index 6f2787506b50..ebf8fd373cf7 100644 --- a/drivers/acpi/acpica/achware.h +++ b/drivers/acpi/acpica/achware.h @@ -3,7 +3,7 @@ * * Name: achware.h -- hardware specific interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h index 6bdf133a2767..955114c926bd 100644 --- a/drivers/acpi/acpica/acinterp.h +++ b/drivers/acpi/acpica/acinterp.h @@ -3,7 +3,7 @@ * * Name: acinterp.h - Interpreter subcomponent prototypes and defines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 901b1543b869..2b876dac7558 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h @@ -3,7 +3,7 @@ * * Name: aclocal.h - Internal data types used across the ACPI subsystem * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index 2f3e609df47d..de83dd22292b 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/drivers/acpi/acpica/acmacros.h @@ -3,7 +3,7 @@ * * Name: acmacros.h - C macros for the entire subsystem. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acnamesp.h b/drivers/acpi/acpica/acnamesp.h index 7b27b9cc5916..9448bc026b9b 100644 --- a/drivers/acpi/acpica/acnamesp.h +++ b/drivers/acpi/acpica/acnamesp.h @@ -3,7 +3,7 @@ * * Name: acnamesp.h - Namespace subcomponent prototypes and defines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h index 6af5dc995085..1bdfeee5d7c5 100644 --- a/drivers/acpi/acpica/acobject.h +++ b/drivers/acpi/acpica/acobject.h @@ -3,7 +3,7 @@ * * Name: acobject.h - Definition of union acpi_operand_object (Internal object only) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acopcode.h b/drivers/acpi/acpica/acopcode.h index a224926bd9c8..da96d80e6b3a 100644 --- a/drivers/acpi/acpica/acopcode.h +++ b/drivers/acpi/acpica/acopcode.h @@ -3,7 +3,7 @@ * * Name: acopcode.h - AML opcode information for the AML parser and interpreter * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acparser.h b/drivers/acpi/acpica/acparser.h index 4511c2bd8bc3..6dad786a382c 100644 --- a/drivers/acpi/acpica/acparser.h +++ b/drivers/acpi/acpica/acparser.h @@ -3,7 +3,7 @@ * * Module Name: acparser.h - AML Parser subcomponent prototypes and defines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h index f7d65a20026b..e64aabe3d33a 100644 --- a/drivers/acpi/acpica/acpredef.h +++ b/drivers/acpi/acpica/acpredef.h @@ -3,7 +3,7 @@ * * Name: acpredef - Information table for ACPI predefined methods and objects * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h index f7749c63d277..c2e6c8455587 100644 --- a/drivers/acpi/acpica/acresrc.h +++ b/drivers/acpi/acpica/acresrc.h @@ -3,7 +3,7 @@ * * Name: acresrc.h - Resource Manager function prototypes * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h index b859de96a1e4..f8fee94ba708 100644 --- a/drivers/acpi/acpica/acstruct.h +++ b/drivers/acpi/acpica/acstruct.h @@ -3,7 +3,7 @@ * * Name: acstruct.h - Internal structs * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h index 1c29325e4c7f..b6ae979b01b6 100644 --- a/drivers/acpi/acpica/actables.h +++ b/drivers/acpi/acpica/actables.h @@ -3,7 +3,7 @@ * * Name: actables.h - ACPI table management * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 71175b664f49..dd060844189e 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h @@ -3,7 +3,7 @@ * * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/amlcode.h b/drivers/acpi/acpica/amlcode.h index 62a7ec277513..effe52b40dce 100644 --- a/drivers/acpi/acpica/amlcode.h +++ b/drivers/acpi/acpica/amlcode.h @@ -5,7 +5,7 @@ * Declarations and definitions contained herein are derived * directly from the ACPI specification. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index b31779ce204a..89093111bfd2 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h @@ -3,7 +3,7 @@ * * Module Name: amlresrc.h - AML resource descriptors * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dbhistry.c b/drivers/acpi/acpica/dbhistry.c index 105e6ceaa887..e874c1dddefa 100644 --- a/drivers/acpi/acpica/dbhistry.c +++ b/drivers/acpi/acpica/dbhistry.c @@ -3,7 +3,7 @@ * * Module Name: dbhistry - debugger HISTORY command * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c index 2963d1579c05..4354c175e12e 100644 --- a/drivers/acpi/acpica/dsargs.c +++ b/drivers/acpi/acpica/dsargs.c @@ -4,7 +4,7 @@ * Module Name: dsargs - Support for execution of dynamic arguments for static * objects (regions, fields, buffer fields, etc.) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c index 8492619149d1..80c69af06948 100644 --- a/drivers/acpi/acpica/dscontrol.c +++ b/drivers/acpi/acpica/dscontrol.c @@ -4,7 +4,7 @@ * Module Name: dscontrol - Support for execution control opcodes - * if/else/while/return * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dsdebug.c b/drivers/acpi/acpica/dsdebug.c index 2d99ccf5bde7..c5c8380a3114 100644 --- a/drivers/acpi/acpica/dsdebug.c +++ b/drivers/acpi/acpica/dsdebug.c @@ -3,7 +3,7 @@ * * Module Name: dsdebug - Parser/Interpreter interface - debugging * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c index de175f1b4beb..532401ecdab0 100644 --- a/drivers/acpi/acpica/dsfield.c +++ b/drivers/acpi/acpica/dsfield.c @@ -3,7 +3,7 @@ * * Module Name: dsfield - Dispatcher field routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c index dffd54fdbd51..6e0e362e461f 100644 --- a/drivers/acpi/acpica/dsinit.c +++ b/drivers/acpi/acpica/dsinit.c @@ -3,7 +3,7 @@ * * Module Name: dsinit - Object initialization namespace walk * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index 9332bc688713..e809c2aed78a 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c @@ -3,7 +3,7 @@ * * Module Name: dsmethod - Parser/Interpreter interface - control method parsing * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c index e3dfc734ace9..555f148d666b 100644 --- a/drivers/acpi/acpica/dsobject.c +++ b/drivers/acpi/acpica/dsobject.c @@ -3,7 +3,7 @@ * * Module Name: dsobject - Dispatcher object management routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c index 2b9b6a974ca9..dd3059000885 100644 --- a/drivers/acpi/acpica/dsopcode.c +++ b/drivers/acpi/acpica/dsopcode.c @@ -3,7 +3,7 @@ * * Module Name: dsopcode - Dispatcher support for regions and fields * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dspkginit.c b/drivers/acpi/acpica/dspkginit.c index 1624d6e7dc46..ecf793fe9919 100644 --- a/drivers/acpi/acpica/dspkginit.c +++ b/drivers/acpi/acpica/dspkginit.c @@ -3,7 +3,7 @@ * * Module Name: dspkginit - Completion of deferred package initialization * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c index b082eb942a0f..a43336f05206 100644 --- a/drivers/acpi/acpica/dswexec.c +++ b/drivers/acpi/acpica/dswexec.c @@ -4,7 +4,7 @@ * Module Name: dswexec - Dispatcher method execution callbacks; * dispatch to interpreter. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index 9f6573646ab5..f7b8496c8bdd 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -3,7 +3,7 @@ * * Module Name: dswload - Dispatcher first pass namespace load callbacks * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c index 778df616aaa0..541235f498c2 100644 --- a/drivers/acpi/acpica/dswload2.c +++ b/drivers/acpi/acpica/dswload2.c @@ -3,7 +3,7 @@ * * Module Name: dswload2 - Dispatcher second pass namespace load callbacks * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dswscope.c b/drivers/acpi/acpica/dswscope.c index 634b9100f674..1fdd07ae862c 100644 --- a/drivers/acpi/acpica/dswscope.c +++ b/drivers/acpi/acpica/dswscope.c @@ -3,7 +3,7 @@ * * Module Name: dswscope - Scope stack manipulation * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c index 0aa735d3b93c..95af370a7dce 100644 --- a/drivers/acpi/acpica/dswstate.c +++ b/drivers/acpi/acpica/dswstate.c @@ -3,7 +3,7 @@ * * Module Name: dswstate - Dispatcher parse tree walk management routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c index 82d1728b9bc6..015a3338a732 100644 --- a/drivers/acpi/acpica/evevent.c +++ b/drivers/acpi/acpica/evevent.c @@ -3,7 +3,7 @@ * * Module Name: evevent - Fixed Event handling and dispatch * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evglock.c b/drivers/acpi/acpica/evglock.c index 9aab54797ded..989dc01af03f 100644 --- a/drivers/acpi/acpica/evglock.c +++ b/drivers/acpi/acpica/evglock.c @@ -3,7 +3,7 @@ * * Module Name: evglock - Global Lock support * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index a6bb480d631c..934b201d3820 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c @@ -3,7 +3,7 @@ * * Module Name: evgpe - General Purpose Event handling and dispatch * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c index 39fe4566310b..58e1890ab25b 100644 --- a/drivers/acpi/acpica/evgpeblk.c +++ b/drivers/acpi/acpica/evgpeblk.c @@ -3,7 +3,7 @@ * * Module Name: evgpeblk - GPE block creation and initialization. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c index 2f1a75fee61c..0dbc4d88919a 100644 --- a/drivers/acpi/acpica/evgpeinit.c +++ b/drivers/acpi/acpica/evgpeinit.c @@ -3,7 +3,7 @@ * * Module Name: evgpeinit - System GPE initialization and update * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c index c32eb57aa21d..ee3b1ea656d4 100644 --- a/drivers/acpi/acpica/evgpeutil.c +++ b/drivers/acpi/acpica/evgpeutil.c @@ -3,7 +3,7 @@ * * Module Name: evgpeutil - GPE utilities * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c index be9a05498adc..1c8cb6d924df 100644 --- a/drivers/acpi/acpica/evhandler.c +++ b/drivers/acpi/acpica/evhandler.c @@ -3,7 +3,7 @@ * * Module Name: evhandler - Support for Address Space handlers * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c index 6172cddc1b39..e68e876d3b84 100644 --- a/drivers/acpi/acpica/evmisc.c +++ b/drivers/acpi/acpica/evmisc.c @@ -3,7 +3,7 @@ * * Module Name: evmisc - Miscellaneous event manager support functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c index d035092799eb..18fdf2bc2d49 100644 --- a/drivers/acpi/acpica/evregion.c +++ b/drivers/acpi/acpica/evregion.c @@ -3,7 +3,7 @@ * * Module Name: evregion - Operation Region support * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c index 792d1a5f0052..46d1b3f5582d 100644 --- a/drivers/acpi/acpica/evrgnini.c +++ b/drivers/acpi/acpica/evrgnini.c @@ -3,7 +3,7 @@ * * Module Name: evrgnini- ACPI address_space (op_region) init * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 18219abba108..24fa6433d562 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c @@ -3,7 +3,7 @@ * * Module Name: evxface - External interfaces for ACPI events * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index 8187b081e0a6..48bf845191d2 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c @@ -3,7 +3,7 @@ * * Module Name: evxfevnt - External Interfaces, ACPI event disable/enable * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 340947e412bb..4eeeb3b7ab7e 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c @@ -3,7 +3,7 @@ * * Module Name: evxfgpe - External Interfaces for General Purpose Events (GPEs) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c index a5c19f46ec17..3197e6303c5b 100644 --- a/drivers/acpi/acpica/evxfregn.c +++ b/drivers/acpi/acpica/evxfregn.c @@ -4,7 +4,7 @@ * Module Name: evxfregn - External Interfaces, ACPI Operation Regions and * Address Spaces. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exconcat.c b/drivers/acpi/acpica/exconcat.c index 66201742f499..2fb78b35565b 100644 --- a/drivers/acpi/acpica/exconcat.c +++ b/drivers/acpi/acpica/exconcat.c @@ -3,7 +3,7 @@ * * Module Name: exconcat - Concatenate-type AML operators * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c index e82faabdf907..473115309860 100644 --- a/drivers/acpi/acpica/exconfig.c +++ b/drivers/acpi/acpica/exconfig.c @@ -3,7 +3,7 @@ * * Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c index 8de5d47ad485..3729bf3b74f7 100644 --- a/drivers/acpi/acpica/exconvrt.c +++ b/drivers/acpi/acpica/exconvrt.c @@ -3,7 +3,7 @@ * * Module Name: exconvrt - Object conversion routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c index fb2453fa9442..1bea9d97652c 100644 --- a/drivers/acpi/acpica/excreate.c +++ b/drivers/acpi/acpica/excreate.c @@ -3,7 +3,7 @@ * * Module Name: excreate - Named object creation * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exdebug.c b/drivers/acpi/acpica/exdebug.c index 8a99aadb9d15..3f86bfada510 100644 --- a/drivers/acpi/acpica/exdebug.c +++ b/drivers/acpi/acpica/exdebug.c @@ -3,7 +3,7 @@ * * Module Name: exdebug - Support for stores to the AML Debug Object * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c index 24b3d041b3e5..2e2da8790224 100644 --- a/drivers/acpi/acpica/exdump.c +++ b/drivers/acpi/acpica/exdump.c @@ -3,7 +3,7 @@ * * Module Name: exdump - Interpreter debug output routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c index 657f4002f9dc..61ff36189ace 100644 --- a/drivers/acpi/acpica/exfield.c +++ b/drivers/acpi/acpica/exfield.c @@ -3,7 +3,7 @@ * * Module Name: exfield - AML execution - field_unit read/write * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c index d769cea1468b..cf6c812a8b6d 100644 --- a/drivers/acpi/acpica/exfldio.c +++ b/drivers/acpi/acpica/exfldio.c @@ -3,7 +3,7 @@ * * Module Name: exfldio - Aml Field I/O * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c index b4bac8c60a13..c6f2a9166ac0 100644 --- a/drivers/acpi/acpica/exmisc.c +++ b/drivers/acpi/acpica/exmisc.c @@ -3,7 +3,7 @@ * * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exmutex.c b/drivers/acpi/acpica/exmutex.c index e9dcfa1e93eb..65c487facdda 100644 --- a/drivers/acpi/acpica/exmutex.c +++ b/drivers/acpi/acpica/exmutex.c @@ -3,7 +3,7 @@ * * Module Name: exmutex - ASL Mutex Acquire/Release functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exnames.c b/drivers/acpi/acpica/exnames.c index 318eb769058d..9a448165bfeb 100644 --- a/drivers/acpi/acpica/exnames.c +++ b/drivers/acpi/acpica/exnames.c @@ -3,7 +3,7 @@ * * Module Name: exnames - interpreter/scanner name load/execute * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c index d108a1a86f12..20fb34b68bee 100644 --- a/drivers/acpi/acpica/exoparg1.c +++ b/drivers/acpi/acpica/exoparg1.c @@ -3,7 +3,7 @@ * * Module Name: exoparg1 - AML execution - opcodes with 1 argument * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c index ebf7c89d52d9..743c258bf2e8 100644 --- a/drivers/acpi/acpica/exoparg2.c +++ b/drivers/acpi/acpica/exoparg2.c @@ -3,7 +3,7 @@ * * Module Name: exoparg2 - AML execution - opcodes with 2 arguments * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c index 4b069bd6bc71..d3091f619909 100644 --- a/drivers/acpi/acpica/exoparg3.c +++ b/drivers/acpi/acpica/exoparg3.c @@ -3,7 +3,7 @@ * * Module Name: exoparg3 - AML execution - opcodes with 3 arguments * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exoparg6.c b/drivers/acpi/acpica/exoparg6.c index 2a506ef386cf..1af35e143ba9 100644 --- a/drivers/acpi/acpica/exoparg6.c +++ b/drivers/acpi/acpica/exoparg6.c @@ -3,7 +3,7 @@ * * Module Name: exoparg6 - AML execution - opcodes with 6 arguments * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c index 08f06797386a..08196fa17080 100644 --- a/drivers/acpi/acpica/exprep.c +++ b/drivers/acpi/acpica/exprep.c @@ -3,7 +3,7 @@ * * Module Name: exprep - ACPI AML field prep utilities * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c index 6d4a4cc14850..8907b8bf4267 100644 --- a/drivers/acpi/acpica/exregion.c +++ b/drivers/acpi/acpica/exregion.c @@ -3,7 +3,7 @@ * * Module Name: exregion - ACPI default op_region (address space) handlers * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exresnte.c b/drivers/acpi/acpica/exresnte.c index b81506d73447..873de01b8ad2 100644 --- a/drivers/acpi/acpica/exresnte.c +++ b/drivers/acpi/acpica/exresnte.c @@ -3,7 +3,7 @@ * * Module Name: exresnte - AML Interpreter object resolution * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c index 61ee7fb46006..24a78b5e266c 100644 --- a/drivers/acpi/acpica/exresolv.c +++ b/drivers/acpi/acpica/exresolv.c @@ -3,7 +3,7 @@ * * Module Name: exresolv - AML Interpreter object resolution * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c index 3342780230af..3a437e6ace5c 100644 --- a/drivers/acpi/acpica/exresop.c +++ b/drivers/acpi/acpica/exresop.c @@ -3,7 +3,7 @@ * * Module Name: exresop - AML Interpreter operand/object resolution * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exserial.c b/drivers/acpi/acpica/exserial.c index fd63f2042514..5d99b1a76c83 100644 --- a/drivers/acpi/acpica/exserial.c +++ b/drivers/acpi/acpica/exserial.c @@ -3,7 +3,7 @@ * * Module Name: exserial - field_unit support for serial address spaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c index f99e8cf27a6c..575c7a39f1aa 100644 --- a/drivers/acpi/acpica/exstore.c +++ b/drivers/acpi/acpica/exstore.c @@ -3,7 +3,7 @@ * * Module Name: exstore - AML Interpreter object store support * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exstoren.c b/drivers/acpi/acpica/exstoren.c index c848b328e760..b01ae015e1b5 100644 --- a/drivers/acpi/acpica/exstoren.c +++ b/drivers/acpi/acpica/exstoren.c @@ -4,7 +4,7 @@ * Module Name: exstoren - AML Interpreter object store support, * Store to Node (namespace object) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exstorob.c b/drivers/acpi/acpica/exstorob.c index 45c757bbf9a9..37c3131a82fa 100644 --- a/drivers/acpi/acpica/exstorob.c +++ b/drivers/acpi/acpica/exstorob.c @@ -3,7 +3,7 @@ * * Module Name: exstorob - AML object store support, store to object * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c index 7b5470f404f3..f665ffd9a396 100644 --- a/drivers/acpi/acpica/exsystem.c +++ b/drivers/acpi/acpica/exsystem.c @@ -3,7 +3,7 @@ * * Module Name: exsystem - Interface to OS services * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/extrace.c b/drivers/acpi/acpica/extrace.c index b570d7a7e134..f1730221ff13 100644 --- a/drivers/acpi/acpica/extrace.c +++ b/drivers/acpi/acpica/extrace.c @@ -3,7 +3,7 @@ * * Module Name: extrace - Support for interpreter execution tracing * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c index 87f01ce1c1aa..f4d4a033f166 100644 --- a/drivers/acpi/acpica/exutils.c +++ b/drivers/acpi/acpica/exutils.c @@ -3,7 +3,7 @@ * * Module Name: exutils - interpreter/scanner utilities * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c index 2f1c2fc8bd2a..790f342dcd25 100644 --- a/drivers/acpi/acpica/hwacpi.c +++ b/drivers/acpi/acpica/hwacpi.c @@ -3,7 +3,7 @@ * * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwesleep.c b/drivers/acpi/acpica/hwesleep.c index d8597e052912..a9ba9190408b 100644 --- a/drivers/acpi/acpica/hwesleep.c +++ b/drivers/acpi/acpica/hwesleep.c @@ -4,7 +4,7 @@ * Name: hwesleep.c - ACPI Hardware Sleep/Wake Support functions for the * extended FADT-V5 sleep registers. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c index 13d54a48e6e9..e0c847ab8324 100644 --- a/drivers/acpi/acpica/hwgpe.c +++ b/drivers/acpi/acpica/hwgpe.c @@ -3,7 +3,7 @@ * * Module Name: hwgpe - Low level GPE enable/disable/clear functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 37b3f641feaa..c4d7c29f398e 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c @@ -4,7 +4,7 @@ * Name: hwsleep.c - ACPI Hardware Sleep/Wake Support functions for the * original/legacy sleep/PM registers. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c index 46f3ae03ab99..192c04b5a599 100644 --- a/drivers/acpi/acpica/hwtimer.c +++ b/drivers/acpi/acpica/hwtimer.c @@ -3,7 +3,7 @@ * * Name: hwtimer.c - ACPI Power Management Timer Interface * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index 0d392e7b0747..b8de458f0368 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c @@ -3,7 +3,7 @@ * * Module Name: hwvalid - I/O request validation * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c index 55d9b897e70f..c31f803995c6 100644 --- a/drivers/acpi/acpica/hwxface.c +++ b/drivers/acpi/acpica/hwxface.c @@ -3,7 +3,7 @@ * * Module Name: hwxface - Public ACPICA hardware interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index aff51ceea02c..36ea48f64110 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c @@ -3,7 +3,7 @@ * * Name: hwxfsleep.c - ACPI Hardware Sleep/Wake External Interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsarguments.c b/drivers/acpi/acpica/nsarguments.c index 22586b90e532..3efb46f0dc54 100644 --- a/drivers/acpi/acpica/nsarguments.c +++ b/drivers/acpi/acpica/nsarguments.c @@ -3,7 +3,7 @@ * * Module Name: nsarguments - Validation of args for ACPI predefined methods * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsconvert.c b/drivers/acpi/acpica/nsconvert.c index b02555fe38f0..7e5a683ae957 100644 --- a/drivers/acpi/acpica/nsconvert.c +++ b/drivers/acpi/acpica/nsconvert.c @@ -4,7 +4,7 @@ * Module Name: nsconvert - Object conversions for objects returned by * predefined methods * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c index f154824d4eb6..90a26cb0c472 100644 --- a/drivers/acpi/acpica/nsdump.c +++ b/drivers/acpi/acpica/nsdump.c @@ -3,7 +3,7 @@ * * Module Name: nsdump - table dumping routines for debug * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c index b9a88b7b518b..fa116ebe49a3 100644 --- a/drivers/acpi/acpica/nsdumpdv.c +++ b/drivers/acpi/acpica/nsdumpdv.c @@ -3,7 +3,7 @@ * * Module Name: nsdump - table dumping routines for debug * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c index 3e6207ad18d8..86d126fdb27d 100644 --- a/drivers/acpi/acpica/nsinit.c +++ b/drivers/acpi/acpica/nsinit.c @@ -3,7 +3,7 @@ * * Module Name: nsinit - namespace initialization * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c index 880260a30c0c..fcb9de0f77a2 100644 --- a/drivers/acpi/acpica/nsload.c +++ b/drivers/acpi/acpica/nsload.c @@ -3,7 +3,7 @@ * * Module Name: nsload - namespace loading/expanding/contracting procedures * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c index 4b893676ab5c..31e551cf4ea6 100644 --- a/drivers/acpi/acpica/nsparse.c +++ b/drivers/acpi/acpica/nsparse.c @@ -3,7 +3,7 @@ * * Module Name: nsparse - namespace interface to AML parser * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index c0db6690bb32..cf57bd69616d 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c @@ -3,7 +3,7 @@ * * Module Name: nspredef - Validation of ACPI predefined methods and objects * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsprepkg.c b/drivers/acpi/acpica/nsprepkg.c index 82932c9a774b..dd37fc108fce 100644 --- a/drivers/acpi/acpica/nsprepkg.c +++ b/drivers/acpi/acpica/nsprepkg.c @@ -3,7 +3,7 @@ * * Module Name: nsprepkg - Validation of package objects for predefined names * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c index ec512e06a48e..b8657004190d 100644 --- a/drivers/acpi/acpica/nsrepair.c +++ b/drivers/acpi/acpica/nsrepair.c @@ -3,7 +3,7 @@ * * Module Name: nsrepair - Repair for objects returned by predefined methods * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c index 957d7eb4861f..1bb7b71f07f1 100644 --- a/drivers/acpi/acpica/nsrepair2.c +++ b/drivers/acpi/acpica/nsrepair2.c @@ -4,7 +4,7 @@ * Module Name: nsrepair2 - Repair for objects returned by specific * predefined methods * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index ef531b145add..06ffdb6808f5 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c @@ -4,7 +4,7 @@ * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing * parents and siblings and Scope manipulation * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c index 82a0dae349e2..eee396a77bae 100644 --- a/drivers/acpi/acpica/nswalk.c +++ b/drivers/acpi/acpica/nswalk.c @@ -3,7 +3,7 @@ * * Module Name: nswalk - Functions for walking the ACPI namespace * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c index a0592d15dd37..5d5bcf165298 100644 --- a/drivers/acpi/acpica/nsxfname.c +++ b/drivers/acpi/acpica/nsxfname.c @@ -4,7 +4,7 @@ * Module Name: nsxfname - Public interfaces to the ACPI subsystem * ACPI Namespace oriented interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c index f7ec5606098c..422c074ed289 100644 --- a/drivers/acpi/acpica/psargs.c +++ b/drivers/acpi/acpica/psargs.c @@ -3,7 +3,7 @@ * * Module Name: psargs - Parse AML opcode arguments * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c index 840512fa9fc6..d0fd55636129 100644 --- a/drivers/acpi/acpica/psloop.c +++ b/drivers/acpi/acpica/psloop.c @@ -3,7 +3,7 @@ * * Module Name: psloop - Main AML parse loop * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c index bca249e67c6b..54471083ba54 100644 --- a/drivers/acpi/acpica/psobject.c +++ b/drivers/acpi/acpica/psobject.c @@ -3,7 +3,7 @@ * * Module Name: psobject - Support for parse objects * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psopcode.c b/drivers/acpi/acpica/psopcode.c index bef69e87a0a2..09029fe545f1 100644 --- a/drivers/acpi/acpica/psopcode.c +++ b/drivers/acpi/acpica/psopcode.c @@ -3,7 +3,7 @@ * * Module Name: psopcode - Parser/Interpreter opcode information table * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psopinfo.c b/drivers/acpi/acpica/psopinfo.c index f10afe699ad7..bccf606e08b4 100644 --- a/drivers/acpi/acpica/psopinfo.c +++ b/drivers/acpi/acpica/psopinfo.c @@ -3,7 +3,7 @@ * * Module Name: psopinfo - AML opcode information functions and dispatch tables * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c index ba93f359760a..10a072953d78 100644 --- a/drivers/acpi/acpica/psparse.c +++ b/drivers/acpi/acpica/psparse.c @@ -3,7 +3,7 @@ * * Module Name: psparse - Parser top level AML parse routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psscope.c b/drivers/acpi/acpica/psscope.c index 400f001631ea..a0035bde7556 100644 --- a/drivers/acpi/acpica/psscope.c +++ b/drivers/acpi/acpica/psscope.c @@ -3,7 +3,7 @@ * * Module Name: psscope - Parser scope stack management routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/pstree.c b/drivers/acpi/acpica/pstree.c index 3012a9342367..7f7f5ecd4011 100644 --- a/drivers/acpi/acpica/pstree.c +++ b/drivers/acpi/acpica/pstree.c @@ -3,7 +3,7 @@ * * Module Name: pstree - Parser op tree manipulation/traversal/search * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c index 49b39aeded12..d550c4af4702 100644 --- a/drivers/acpi/acpica/psutils.c +++ b/drivers/acpi/acpica/psutils.c @@ -3,7 +3,7 @@ * * Module Name: psutils - Parser miscellaneous utilities (Parser only) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/pswalk.c b/drivers/acpi/acpica/pswalk.c index 7735a01dab90..d92817c72b8d 100644 --- a/drivers/acpi/acpica/pswalk.c +++ b/drivers/acpi/acpica/pswalk.c @@ -3,7 +3,7 @@ * * Module Name: pswalk - Parser routines to walk parsed op tree(s) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c index a6509aeb2955..6f4eace0ba69 100644 --- a/drivers/acpi/acpica/psxface.c +++ b/drivers/acpi/acpica/psxface.c @@ -3,7 +3,7 @@ * * Module Name: psxface - Parser external interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c index 1f7677e0dbbe..a1f10e4409a3 100644 --- a/drivers/acpi/acpica/tbdata.c +++ b/drivers/acpi/acpica/tbdata.c @@ -3,7 +3,7 @@ * * Module Name: tbdata - Table manager data structure functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c index f04dc6051320..44267a92bce5 100644 --- a/drivers/acpi/acpica/tbfadt.c +++ b/drivers/acpi/acpica/tbfadt.c @@ -3,7 +3,7 @@ * * Module Name: tbfadt - FADT table utilities * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c index c31a5ddb0ffd..1c1b2e284bd9 100644 --- a/drivers/acpi/acpica/tbfind.c +++ b/drivers/acpi/acpica/tbfind.c @@ -3,7 +3,7 @@ * * Module Name: tbfind - find table * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index 499efcaf798d..0dc003c20e4d 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c @@ -3,7 +3,7 @@ * * Module Name: tbinstal - ACPI table installation and removal * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c index f07aa9b46f3f..58b02e4b254b 100644 --- a/drivers/acpi/acpica/tbprint.c +++ b/drivers/acpi/acpica/tbprint.c @@ -3,7 +3,7 @@ * * Module Name: tbprint - Table output utilities * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 17ad9c227d42..cfe50c53ad4d 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c @@ -3,7 +3,7 @@ * * Module Name: tbutils - ACPI Table utilities * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c index 37da09dca940..275b52dc42e9 100644 --- a/drivers/acpi/acpica/tbxface.c +++ b/drivers/acpi/acpica/tbxface.c @@ -3,7 +3,7 @@ * * Module Name: tbxface - ACPI table-oriented external interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c index 258796e02be1..0f2a7343de3a 100644 --- a/drivers/acpi/acpica/tbxfload.c +++ b/drivers/acpi/acpica/tbxfload.c @@ -3,7 +3,7 @@ * * Module Name: tbxfload - Table load/unload external interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c index 53afd75bbc06..5b413bbab338 100644 --- a/drivers/acpi/acpica/tbxfroot.c +++ b/drivers/acpi/acpica/tbxfroot.c @@ -3,7 +3,7 @@ * * Module Name: tbxfroot - Find the root ACPI table (RSDT) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c index 915321806cd7..be94d2fd99a7 100644 --- a/drivers/acpi/acpica/utaddress.c +++ b/drivers/acpi/acpica/utaddress.c @@ -3,7 +3,7 @@ * * Module Name: utaddress - op_region address range check * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c index 2bab6017d827..c1fb70457e20 100644 --- a/drivers/acpi/acpica/utalloc.c +++ b/drivers/acpi/acpica/utalloc.c @@ -3,7 +3,7 @@ * * Module Name: utalloc - local memory allocation routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utascii.c b/drivers/acpi/acpica/utascii.c index 72fb7e9ec485..2be37676edd7 100644 --- a/drivers/acpi/acpica/utascii.c +++ b/drivers/acpi/acpica/utascii.c @@ -3,7 +3,7 @@ * * Module Name: utascii - Utility ascii functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utbuffer.c b/drivers/acpi/acpica/utbuffer.c index 59c4050b8e91..b054bb5eeaf0 100644 --- a/drivers/acpi/acpica/utbuffer.c +++ b/drivers/acpi/acpica/utbuffer.c @@ -3,7 +3,7 @@ * * Module Name: utbuffer - Buffer dump routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c index 5425968dd2a8..85a85f7cf750 100644 --- a/drivers/acpi/acpica/utcache.c +++ b/drivers/acpi/acpica/utcache.c @@ -3,7 +3,7 @@ * * Module Name: utcache - local cache allocation routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utcksum.c b/drivers/acpi/acpica/utcksum.c index c166e4c05ab6..b483894c3629 100644 --- a/drivers/acpi/acpica/utcksum.c +++ b/drivers/acpi/acpica/utcksum.c @@ -3,7 +3,7 @@ * * Module Name: utcksum - Support generating table checksums * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c index 63c17f420fb8..2e17e657dfa4 100644 --- a/drivers/acpi/acpica/utcopy.c +++ b/drivers/acpi/acpica/utcopy.c @@ -3,7 +3,7 @@ * * Module Name: utcopy - Internal to external object translation utilities * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c index 64ed546cf19c..1bbba8585fa6 100644 --- a/drivers/acpi/acpica/utdebug.c +++ b/drivers/acpi/acpica/utdebug.c @@ -3,7 +3,7 @@ * * Module Name: utdebug - Debug print/trace routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c index 3176393a729d..95a4b7509e01 100644 --- a/drivers/acpi/acpica/utdecode.c +++ b/drivers/acpi/acpica/utdecode.c @@ -3,7 +3,7 @@ * * Module Name: utdecode - Utility decoding routines (value-to-string) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c index df20d46ed8b7..3e5173d03953 100644 --- a/drivers/acpi/acpica/uteval.c +++ b/drivers/acpi/acpica/uteval.c @@ -3,7 +3,7 @@ * * Module Name: uteval - Object evaluation * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c index 53afa5edb6ec..ae46cef891e2 100644 --- a/drivers/acpi/acpica/utglobal.c +++ b/drivers/acpi/acpica/utglobal.c @@ -3,7 +3,7 @@ * * Module Name: utglobal - Global variables for the ACPI subsystem * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/uthex.c b/drivers/acpi/acpica/uthex.c index c811ee2a8160..e62802791dcf 100644 --- a/drivers/acpi/acpica/uthex.c +++ b/drivers/acpi/acpica/uthex.c @@ -3,7 +3,7 @@ * * Module Name: uthex -- Hex/ASCII support functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c index b6caab49f1bd..15c2ce91d403 100644 --- a/drivers/acpi/acpica/utids.c +++ b/drivers/acpi/acpica/utids.c @@ -3,7 +3,7 @@ * * Module Name: utids - support for device Ids - HID, UID, CID, SUB, CLS * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c index 18177e4f26f7..92fbaef161a7 100644 --- a/drivers/acpi/acpica/utinit.c +++ b/drivers/acpi/acpica/utinit.c @@ -3,7 +3,7 @@ * * Module Name: utinit - Common ACPI subsystem initialization * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utlock.c b/drivers/acpi/acpica/utlock.c index 84abdbf5cfca..ee6d72385c5c 100644 --- a/drivers/acpi/acpica/utlock.c +++ b/drivers/acpi/acpica/utlock.c @@ -3,7 +3,7 @@ * * Module Name: utlock - Reader/Writer lock interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c index d3667bfff401..f4aae8f0d3a8 100644 --- a/drivers/acpi/acpica/utobject.c +++ b/drivers/acpi/acpica/utobject.c @@ -3,7 +3,7 @@ * * Module Name: utobject - ACPI object create/delete/size/cache routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index b8ab0a3cb5b9..251bd396c6fd 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c @@ -3,7 +3,7 @@ * * Module Name: utosi - Support for the _OSI predefined control method * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utpredef.c b/drivers/acpi/acpica/utpredef.c index 2524f013be7a..29d2977d0746 100644 --- a/drivers/acpi/acpica/utpredef.c +++ b/drivers/acpi/acpica/utpredef.c @@ -3,7 +3,7 @@ * * Module Name: utpredef - support functions for predefined names * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c index d5aa2109847f..42b30b9f9312 100644 --- a/drivers/acpi/acpica/utprint.c +++ b/drivers/acpi/acpica/utprint.c @@ -3,7 +3,7 @@ * * Module Name: utprint - Formatted printing routines * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/uttrack.c b/drivers/acpi/acpica/uttrack.c index a06988ac409d..f5f5da441458 100644 --- a/drivers/acpi/acpica/uttrack.c +++ b/drivers/acpi/acpica/uttrack.c @@ -3,7 +3,7 @@ * * Module Name: uttrack - Memory allocation tracking routines (debug only) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utuuid.c b/drivers/acpi/acpica/utuuid.c index e24bc670b53e..8f10b413e928 100644 --- a/drivers/acpi/acpica/utuuid.c +++ b/drivers/acpi/acpica/utuuid.c @@ -3,7 +3,7 @@ * * Module Name: utuuid -- UUID support functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c index 86e76b443da7..aa2e923462b7 100644 --- a/drivers/acpi/acpica/utxface.c +++ b/drivers/acpi/acpica/utxface.c @@ -3,7 +3,7 @@ * * Module Name: utxface - External interfaces, miscellaneous utility functions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c index f2acec3a0ee3..1915bec2b279 100644 --- a/drivers/acpi/acpica/utxfinit.c +++ b/drivers/acpi/acpica/utxfinit.c @@ -3,7 +3,7 @@ * * Module Name: utxfinit - External interfaces for ACPICA initialization * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h index 8cbfcbca7b7e..252b235dce5a 100644 --- a/include/acpi/acbuffer.h +++ b/include/acpi/acbuffer.h @@ -3,7 +3,7 @@ * * Name: acbuffer.h - Support for buffers returned by ACPI predefined names * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 151e40385673..d768d9c568cf 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -3,7 +3,7 @@ * * Name: acconfig.h - Global configuration constants * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 28943c900be7..c5ecd0a0170c 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -3,7 +3,7 @@ * * Name: acexcep.h - Exception codes returned by the ACPI subsystem * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 6f22e92b1744..d71291f25a80 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h @@ -3,7 +3,7 @@ * * Name: acnames.h - Global names and strings * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 73781aae2119..b1571dd96310 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -3,7 +3,7 @@ * * Name: acoutput.h -- debug output * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index 416e59bcf149..8b4a497c1300 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h @@ -3,7 +3,7 @@ * * Name: acpi.h - Master public include file used to interface to ACPICA * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 52844cc5eeb5..914c029f64c9 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -5,7 +5,7 @@ * interfaces must be implemented by OSL to interface the * ACPI components to the host operating system. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 8e364cbdd14a..c961f0d99c5e 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -3,7 +3,7 @@ * * Name: acpixf.h - External interfaces to the ACPI subsystem * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index a7fb8ddb3dc6..e5c875f91203 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -3,7 +3,7 @@ * * Name: acrestyp.h - Defines, types, and structures for resource descriptors * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index c6af579f74f4..e5dfb6f4de52 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h @@ -3,7 +3,7 @@ * * Name: actbl.h - Basic ACPI Table Definitions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index b5e011da5271..7a3ad28b86c6 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -3,7 +3,7 @@ * * Name: actbl1.h - Additional ACPI table definitions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index b082175906ba..e0f205f9ab4c 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -3,7 +3,7 @@ * * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index 832c6464f063..f51c46f4e3e4 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -3,7 +3,7 @@ * * Name: actbl3.h - ACPI Table Definitions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 46878cbb7d39..ce1db1c2e9d3 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -3,7 +3,7 @@ * * Name: actypes.h - Common data types for the entire ACPI subsystem * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acuuid.h b/include/acpi/acuuid.h index 171bb0b708a2..52a84523bfac 100644 --- a/include/acpi/acuuid.h +++ b/include/acpi/acuuid.h @@ -3,7 +3,7 @@ * * Name: acuuid.h - ACPI-related UUID/GUID definitions * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 9e4f7564201a..0fa7bbf85c83 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -3,7 +3,7 @@ * * Name: acenv.h - Host and compiler configuration * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h index 72cc7bab469e..7e67e3503f7b 100644 --- a/include/acpi/platform/acenvex.h +++ b/include/acpi/platform/acenvex.h @@ -3,7 +3,7 @@ * * Name: acenvex.h - Extra host and compiler configuration * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index ac80111f503c..c9d418f9395e 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h @@ -3,7 +3,7 @@ * * Name: acgcc.h - GCC specific defines, etc. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acgccex.h b/include/acpi/platform/acgccex.h index 302ea1b724b9..7c9f10e9633a 100644 --- a/include/acpi/platform/acgccex.h +++ b/include/acpi/platform/acgccex.h @@ -3,7 +3,7 @@ * * Name: acgccex.h - Extra GCC specific defines, etc. * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 14ac657a7ded..66285e054e1e 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -3,7 +3,7 @@ * * Name: aclinux.h - OS specific defines, etc. for Linux * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h index 28c72744decf..600d4e2641da 100644 --- a/include/acpi/platform/aclinuxex.h +++ b/include/acpi/platform/aclinuxex.h @@ -3,7 +3,7 @@ * * Name: aclinuxex.h - Extra OS specific defines, etc. for Linux * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/common/cmfsize.c b/tools/power/acpi/common/cmfsize.c index 38f9b9da8170..68b9ea86b86c 100644 --- a/tools/power/acpi/common/cmfsize.c +++ b/tools/power/acpi/common/cmfsize.c @@ -3,7 +3,7 @@ * * Module Name: cmfsize - Common get file size function * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/common/getopt.c b/tools/power/acpi/common/getopt.c index 96fd6cec78e2..6a0cdba6fdfd 100644 --- a/tools/power/acpi/common/getopt.c +++ b/tools/power/acpi/common/getopt.c @@ -3,7 +3,7 @@ * * Module Name: getopt * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c index bd08f36df4a7..9d70d8c945af 100644 --- a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c +++ b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c @@ -3,7 +3,7 @@ * * Module Name: oslinuxtbl - Linux OSL for obtaining ACPI tables * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/os_specific/service_layers/osunixdir.c b/tools/power/acpi/os_specific/service_layers/osunixdir.c index 5107892d054b..39f3bffd9355 100644 --- a/tools/power/acpi/os_specific/service_layers/osunixdir.c +++ b/tools/power/acpi/os_specific/service_layers/osunixdir.c @@ -3,7 +3,7 @@ * * Module Name: osunixdir - Unix directory access interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/os_specific/service_layers/osunixmap.c b/tools/power/acpi/os_specific/service_layers/osunixmap.c index 6ff4edd8dc3b..2b7d56252684 100644 --- a/tools/power/acpi/os_specific/service_layers/osunixmap.c +++ b/tools/power/acpi/os_specific/service_layers/osunixmap.c @@ -3,7 +3,7 @@ * * Module Name: osunixmap - Unix OSL for file mappings * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c index b3651a04d68c..46429417c71a 100644 --- a/tools/power/acpi/os_specific/service_layers/osunixxf.c +++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c @@ -3,7 +3,7 @@ * * Module Name: osunixxf - UNIX OSL interfaces * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/tools/acpidump/acpidump.h b/tools/power/acpi/tools/acpidump/acpidump.h index 153249c87fd7..643e3e722340 100644 --- a/tools/power/acpi/tools/acpidump/acpidump.h +++ b/tools/power/acpi/tools/acpidump/acpidump.h @@ -3,7 +3,7 @@ * * Module Name: acpidump.h - Include file for acpi_dump utility * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/tools/acpidump/apdump.c b/tools/power/acpi/tools/acpidump/apdump.c index ea44b0ed5dcb..0742b00b61a1 100644 --- a/tools/power/acpi/tools/acpidump/apdump.c +++ b/tools/power/acpi/tools/acpidump/apdump.c @@ -3,7 +3,7 @@ * * Module Name: apdump - Dump routines for ACPI tables (acpidump) * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c index 2d9b45a9b526..13817f9112c0 100644 --- a/tools/power/acpi/tools/acpidump/apfiles.c +++ b/tools/power/acpi/tools/acpidump/apfiles.c @@ -3,7 +3,7 @@ * * Module Name: apfiles - File-related functions for acpidump utility * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c index 44b23fc53dd9..666a9675e743 100644 --- a/tools/power/acpi/tools/acpidump/apmain.c +++ b/tools/power/acpi/tools/acpidump/apmain.c @@ -3,7 +3,7 @@ * * Module Name: apmain - Main module for the acpidump utility * - * Copyright (C) 2000 - 2022, Intel Corp. + * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ From patchwork Wed Apr 5 13:39:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79657 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp345191vqo; Wed, 5 Apr 2023 07:21:22 -0700 (PDT) X-Google-Smtp-Source: AKy350bgxcOZsar7nHFUbfR0jQrlN9UoRZtO1kdxY/AeMlro34wqysczkkNQSgFAmJe/1jRcVTlX X-Received: by 2002:a17:902:e88c:b0:1a0:67fb:444b with SMTP id w12-20020a170902e88c00b001a067fb444bmr2802431plg.2.1680704482349; Wed, 05 Apr 2023 07:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704482; cv=none; d=google.com; s=arc-20160816; b=FGMXJ7nkC9S4CK+PYiRx58l72593Uk2ZwYYKeepcf+wjqGh5IrEMyNOFRKImUSjhwr IzAstS0byG1MrIkQfHOjrhhbDRjBRMILLokRK5PAvdCEfy2A85YIIdloWUMqCIhEqrLT zZgtTdBw5JjTX15UE9q/YpVUDUAS/fgzBQ6iEg5nZWHIaaCFgeRhLmBLqewSCrvHik/6 3WPk1H3BJVVXIOUi8kJ8PMnPdYt9GqV+HztO5AJ3v+c8LMvxsJ4d4GgQrbs2tV7jqnB3 uSRi0V0MYmSu3qaopLWUbsqCkCB2fXqJxAwCJotD1LKk/ZJts65cO+yoX8mOybwtJclh RU/A== 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=gs+VQv+exF8i+9yebt84rSuPNc5BaK2G3O7rFU3/p0M=; b=QKOxvDrkIcuFij5q7TItPYfO2BqB5hOBo8Fbe35mFS2Ow8M0drvB/aIsKnEjHOGoR4 DsLgBpUTWypiIHfBz7GmFaD1swCGXkXWO/51oT3IEHxGUTIref/iyIKPg9lXgJUcu7Ju 1bQKmqNpizCS38fWBC+//IFJ04jbutBaOVs5WsDaNNvpl+odXccvCcquRQPNR4CTy+GY tzKdKthQqYiF56vFBi/xrq9UWWGVT/yagBF1uIEU6Y0Vr7MDMMFyim/x//N3pnFzIhAi U/ng2hgROBdK9XHun2Nc0tklVNgwyba/XCi6tY7w3fEbPVrRbVeUz1szjqx3Z1VDkHYD d0mA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v30-20020a63481e000000b0050bf5a43800si9378386pga.242.2023.04.05.07.21.10; Wed, 05 Apr 2023 07:21:22 -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 S238414AbjDEODl (ORCPT + 99 others); Wed, 5 Apr 2023 10:03:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238164AbjDEOCj (ORCPT ); Wed, 5 Apr 2023 10:02:39 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 387BC6E9B; Wed, 5 Apr 2023 07:01:24 -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 9ea673bad7a70f96; Wed, 5 Apr 2023 16:01:16 +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 3A03C1B4EA6F; Wed, 5 Apr 2023 16:01:15 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 09/32] ACPICA: add support for ClockInput resource (v6.5) Date: Wed, 05 Apr 2023 15:39:23 +0200 Message-ID: <3183480.5fSG56mABF@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346383275120787?= X-GMAIL-MSGID: =?utf-8?q?1762346383275120787?= From: Niyas Sait ACPICA commit 661feab5ee01a34af95a389a18c82e79f1aba05a Link: https://github.com/acpica/acpica/commit/661feab5 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/aclocal.h | 3 +- drivers/acpi/acpica/acresrc.h | 2 ++ drivers/acpi/acpica/acutils.h | 2 ++ drivers/acpi/acpica/amlresrc.h | 17 +++++++++++ drivers/acpi/acpica/rscalc.c | 17 +++++++++++ drivers/acpi/acpica/rsdumpinfo.c | 17 +++++++++++ drivers/acpi/acpica/rsinfo.c | 5 ++++ drivers/acpi/acpica/rsserial.c | 49 +++++++++++++++++++++++++++++++ drivers/acpi/acpica/utresdecode.c | 11 +++++++ drivers/acpi/acpica/utresrc.c | 3 ++ include/acpi/acrestyp.h | 13 +++++++- 11 files changed, 137 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 2b876dac7558..12d4a024f029 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h @@ -1122,7 +1122,8 @@ struct acpi_port_info { #define ACPI_RESOURCE_NAME_PIN_GROUP 0x90 #define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91 #define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG 0x92 -#define ACPI_RESOURCE_NAME_LARGE_MAX 0x92 +#define ACPI_RESOURCE_NAME_CLOCK_INPUT 0x93 +#define ACPI_RESOURCE_NAME_LARGE_MAX 0x94 /***************************************************************************** * diff --git a/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h index c2e6c8455587..d772ff9ca07d 100644 --- a/drivers/acpi/acpica/acresrc.h +++ b/drivers/acpi/acpica/acresrc.h @@ -306,6 +306,7 @@ extern struct acpi_rsconvert_info acpi_rs_convert_pin_config[]; extern struct acpi_rsconvert_info acpi_rs_convert_pin_group[]; extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_function[]; extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_config[]; +extern struct acpi_rsconvert_info acpi_rs_convert_clock_input[]; /* These resources require separate get/set tables */ @@ -361,6 +362,7 @@ extern struct acpi_rsdump_info acpi_rs_dump_pin_config[]; extern struct acpi_rsdump_info acpi_rs_dump_pin_group[]; extern struct acpi_rsdump_info acpi_rs_dump_pin_group_function[]; extern struct acpi_rsdump_info acpi_rs_dump_pin_group_config[]; +extern struct acpi_rsdump_info acpi_rs_dump_clock_input[]; #endif #endif /* __ACRESRC_H__ */ diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index dd060844189e..edfdbbef81c1 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h @@ -53,6 +53,8 @@ extern const char *acpi_gbl_sb_decode[]; extern const char *acpi_gbl_fc_decode[]; extern const char *acpi_gbl_pt_decode[]; extern const char *acpi_gbl_ptyp_decode[]; +extern const char *acpi_gbl_clock_input_mode[]; +extern const char *acpi_gbl_clock_input_scale[]; #endif /* diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index 89093111bfd2..48df447ef5bb 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h @@ -70,6 +70,8 @@ #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */ #define ACPI_RESTAG_VENDORDATA "_VEN" +#define ACPI_RESTAG_FQN "_FQN" +#define ACPI_RESTAG_FQD "_FQD" /* Default sizes for "small" resource descriptors */ @@ -427,6 +429,20 @@ struct aml_resource_pin_config { */ }; +#define AML_RESOURCE_CLOCK_INPUT_REVISION 1 /* ACPI 6.5 */ + +struct aml_resource_clock_input { + AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id; + u16 flags; + u16 frequency_divisor; + u32 frequency_numerator; + /* + * Optional fields follow immediately: + * 1) Resource Source index + * 2) Resource Source String + */ +}; + #define AML_RESOURCE_PIN_CONFIG_REVISION 1 /* ACPI 6.2 */ struct aml_resource_pin_group { @@ -533,6 +549,7 @@ union aml_resource { struct aml_resource_pin_group pin_group; struct aml_resource_pin_group_function pin_group_function; struct aml_resource_pin_group_config pin_group_config; + struct aml_resource_clock_input clock_input; /* Utility overlays */ diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c index 90583db459a2..ffb448fa51fd 100644 --- a/drivers/acpi/acpica/rscalc.c +++ b/drivers/acpi/acpica/rscalc.c @@ -320,6 +320,16 @@ acpi_rs_get_aml_length(struct acpi_resource *resource, break; + case ACPI_RESOURCE_TYPE_CLOCK_INPUT: + + total_size = (acpi_rs_length)(total_size + + resource->data. + clock_input. + resource_source. + string_length); + + break; + case ACPI_RESOURCE_TYPE_SERIAL_BUS: total_size = @@ -650,6 +660,13 @@ acpi_rs_get_list_length(u8 *aml_buffer, break; + case ACPI_RESOURCE_NAME_CLOCK_INPUT: + extra_struct_bytes = + acpi_rs_stream_option_length(resource_length, + minimum_aml_resource_length); + + break; + default: break; diff --git a/drivers/acpi/acpica/rsdumpinfo.c b/drivers/acpi/acpica/rsdumpinfo.c index b8b37449011b..998a79cc09c2 100644 --- a/drivers/acpi/acpica/rsdumpinfo.c +++ b/drivers/acpi/acpica/rsdumpinfo.c @@ -301,6 +301,23 @@ struct acpi_rsdump_info acpi_rs_dump_pin_function[10] = { "VendorData", NULL}, }; +struct acpi_rsdump_info acpi_rs_dump_clock_input[7] = { + {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_clock_input), + "ClockInput", NULL}, + {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(clock_input.revision_id), "RevisionId", + NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(clock_input.frequency_numerator), + "FrequencyNumerator", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(clock_input.frequency_divisor), + "FrequencyDivisor", NULL}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(clock_input.scale), "Scale", + acpi_gbl_clock_input_scale}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(clock_input.mode), "Mode", + acpi_gbl_clock_input_mode}, + {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(clock_input.resource_source), + "ResourceSource", NULL}, +}; + struct acpi_rsdump_info acpi_rs_dump_pin_config[11] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_pin_config), "PinConfig", NULL}, diff --git a/drivers/acpi/acpica/rsinfo.c b/drivers/acpi/acpica/rsinfo.c index eaeb7ab58c2a..ad7465ddfe13 100644 --- a/drivers/acpi/acpica/rsinfo.c +++ b/drivers/acpi/acpica/rsinfo.c @@ -49,6 +49,7 @@ struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = { acpi_rs_convert_pin_group, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */ acpi_rs_convert_pin_group_function, /* 0x17, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ acpi_rs_convert_pin_group_config, /* 0x18, ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + acpi_rs_convert_clock_input, /* 0x19, ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ @@ -94,6 +95,7 @@ struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = { acpi_rs_convert_pin_group, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ acpi_rs_convert_pin_group_function, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */ acpi_rs_convert_pin_group_config, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */ + acpi_rs_convert_clock_input, /* 0x13, ACPI_RESOURCE_NAME_CLOCK_INPUT */ }; /* Subtype table for serial_bus -- I2C, SPI, UART, and CSI2 */ @@ -136,6 +138,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = { acpi_rs_dump_pin_group, /* ACPI_RESOURCE_TYPE_PIN_GROUP */ acpi_rs_dump_pin_group_function, /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ acpi_rs_dump_pin_group_config, /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + acpi_rs_dump_clock_input, /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = { @@ -178,6 +181,7 @@ const u8 acpi_gbl_aml_resource_sizes[] = { sizeof(struct aml_resource_pin_group), /* ACPI_RESOURCE_TYPE_PIN_GROUP */ sizeof(struct aml_resource_pin_group_function), /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ sizeof(struct aml_resource_pin_group_config), /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + sizeof(struct aml_resource_clock_input), /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; const u8 acpi_gbl_resource_struct_sizes[] = { @@ -221,6 +225,7 @@ const u8 acpi_gbl_resource_struct_sizes[] = { ACPI_RS_SIZE(struct acpi_resource_pin_group), ACPI_RS_SIZE(struct acpi_resource_pin_group_function), ACPI_RS_SIZE(struct acpi_resource_pin_group_config), + ACPI_RS_SIZE(struct acpi_resource_clock_input), }; const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = { diff --git a/drivers/acpi/acpica/rsserial.c b/drivers/acpi/acpica/rsserial.c index f9267956535c..279bfa27da94 100644 --- a/drivers/acpi/acpica/rsserial.c +++ b/drivers/acpi/acpica/rsserial.c @@ -109,6 +109,55 @@ struct acpi_rsconvert_info acpi_rs_convert_gpio[18] = { 0}, }; +/******************************************************************************* + * + * acpi_rs_convert_clock_input + * + ******************************************************************************/ + +struct acpi_rsconvert_info acpi_rs_convert_clock_input[8] = { + {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_CLOCK_INPUT, + ACPI_RS_SIZE(struct acpi_resource_clock_input), + ACPI_RSC_TABLE_SIZE(acpi_rs_convert_clock_input)}, + + {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_CLOCK_INPUT, + sizeof(struct aml_resource_clock_input), + 0} + , + + {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.clock_input.revision_id), + AML_OFFSET(clock_input.revision_id), + 1} + , + + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.clock_input.mode), + AML_OFFSET(clock_input.flags), + 0} + , + + {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.clock_input.scale), + AML_OFFSET(clock_input.flags), + 1} + , + + {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.clock_input.frequency_divisor), + AML_OFFSET(clock_input.frequency_divisor), + 2} + , + + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.clock_input.frequency_numerator), + AML_OFFSET(clock_input.frequency_numerator), + 4} + , + + /* Resource Source */ + {ACPI_RSC_SOURCE, ACPI_RS_OFFSET(data.clock_input.resource_source), + 0, + sizeof(struct aml_resource_clock_input)} + , + +}; + /******************************************************************************* * * acpi_rs_convert_pinfunction diff --git a/drivers/acpi/acpica/utresdecode.c b/drivers/acpi/acpica/utresdecode.c index 85730fcd7d00..d801d9069841 100644 --- a/drivers/acpi/acpica/utresdecode.c +++ b/drivers/acpi/acpica/utresdecode.c @@ -284,4 +284,15 @@ const char *acpi_gbl_ptyp_decode[] = { "Input Schmitt Trigger", }; +const char *acpi_gbl_clock_input_mode[] = { + "Fixed", + "Variable", +}; + +const char *acpi_gbl_clock_input_scale[] = { + "Hz", + "KHz", + "MHz", +}; + #endif diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c index 16f9a7035b39..e1cc3d348750 100644 --- a/drivers/acpi/acpica/utresrc.c +++ b/drivers/acpi/acpica/utresrc.c @@ -57,6 +57,8 @@ const u8 acpi_gbl_resource_aml_sizes[] = { ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group), ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group_function), ACPI_AML_SIZE_LARGE(struct aml_resource_pin_group_config), + ACPI_AML_SIZE_LARGE(struct aml_resource_clock_input), + }; const u8 acpi_gbl_resource_aml_serial_bus_sizes[] = { @@ -114,6 +116,7 @@ static const u8 acpi_gbl_resource_types[] = { ACPI_VARIABLE_LENGTH, /* 10 pin_group */ ACPI_VARIABLE_LENGTH, /* 11 pin_group_function */ ACPI_VARIABLE_LENGTH, /* 12 pin_group_config */ + ACPI_VARIABLE_LENGTH, /* 13 clock_input */ }; /******************************************************************************* diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index e5c875f91203..f913983ef55e 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -536,6 +536,15 @@ struct acpi_resource_pin_config { u8 *vendor_data; }; +struct acpi_resource_clock_input { + u8 revision_id; + u8 mode; + u8 scale; + u16 frequency_divisor; + u32 frequency_numerator; + struct acpi_resource_source resource_source; +}; + /* Values for pin_config_type field above */ #define ACPI_PIN_CONFIG_DEFAULT 0 @@ -613,7 +622,8 @@ struct acpi_resource_pin_group_config { #define ACPI_RESOURCE_TYPE_PIN_GROUP 22 /* ACPI 6.2 */ #define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION 23 /* ACPI 6.2 */ #define ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG 24 /* ACPI 6.2 */ -#define ACPI_RESOURCE_TYPE_MAX 24 +#define ACPI_RESOURCE_TYPE_CLOCK_INPUT 25 /* ACPI 6.5 */ +#define ACPI_RESOURCE_TYPE_MAX 25 /* Master union for resource descriptors */ @@ -647,6 +657,7 @@ union acpi_resource_data { struct acpi_resource_pin_group pin_group; struct acpi_resource_pin_group_function pin_group_function; struct acpi_resource_pin_group_config pin_group_config; + struct acpi_resource_clock_input clock_input; /* Common fields */ From patchwork Wed Apr 5 13:40:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79650 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344466vqo; Wed, 5 Apr 2023 07:20:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ZAVBPGoMRy7XOIqd0BWVnfux6s2sc8XoqXF3jwrVLr1SRB7/mpWOOp0DpFCYwIl4z0TGbD X-Received: by 2002:a17:903:244d:b0:1a2:8c7e:f310 with SMTP id l13-20020a170903244d00b001a28c7ef310mr8214579pls.35.1680704424146; Wed, 05 Apr 2023 07:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704424; cv=none; d=google.com; s=arc-20160816; b=Vytt2+Jf72DATp6G82sTp8FEgxoMRZXzuvEF3e8FxIPZGxs52f/qZlBYO5Vk61tPFY VePZUT8jFv+GQtjkSs/G8H4SPnV7PT7qJt8VCBf0plvzi9jOdZniMY7gtwHvvrQYE3n7 nXbHfI/vUGcZ1BJ9YWfvCt7AMqnKtSXUfdfawnbLyH1y8k58TNvzZ5yjueiJMKcv5K1E 8hlF9mE4nSr1GUOElWbPjoJp1QAg2h+NrolxZCBFggVfq+LARoxcDFQ38bl1vS32M5e6 Vxd89801N1nMcTZSNyTPFpR042rsc10m2zaqKskRNkFvq0UEMNdIte2VXsWYetnNeAQD rRsw== 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=Vqha6W088/AWzBcB+m+3O+R+3sUbk1kFwR1j6RZ5hLw=; b=kNjo8eYyVNPaL9ZvbYn6TGbN+TVxgCNZtedLq8ve3dbGTEtbxJNYfNnR4kYjQ+8feJ CA77LY/qVhuw3eXlvJfcUwUKtdn+dbxPv1YVgBU+nfd1+g1pr6RK3OKtABbCWKTLx8hO 8riENkTydKI4uWXb+QafkrOKHHl3XyxcgQdOZyLbx6cR6keUBm42tkqaABEXMLwWSP3/ 62vC568+TADnREgOFoz9Rt/0N4Bq72g/YJprbDp+AFWvAYzu9SB3eVH+/KIVgY57gwhG PanZqG+WKqMjwIh8H7xPJiBUZykzMXQrnVYu+ijxNV1h3lkZ0JU4X2rOJ6a9RwLd2ATR /z2g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k70-20020a638449000000b0050f64740c13si12346002pgd.622.2023.04.05.07.20.11; Wed, 05 Apr 2023 07:20:24 -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 S238411AbjDEODg (ORCPT + 99 others); Wed, 5 Apr 2023 10:03:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238371AbjDEOCW (ORCPT ); Wed, 5 Apr 2023 10:02:22 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FA556EAC; Wed, 5 Apr 2023 07:01:19 -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 86045bb57f15bc7f; Wed, 5 Apr 2023 16:01:14 +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 A96F61B4E9E1; Wed, 5 Apr 2023 16:01:13 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 10/32] ACPICA: MADT: Add RISC-V INTC interrupt controller Date: Wed, 05 Apr 2023 15:40:12 +0200 Message-ID: <1782750.VLH7GnMWUR@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346322521237155?= X-GMAIL-MSGID: =?utf-8?q?1762346322521237155?= From: Sunil V L ACPICA commit bd6d1ae1e13abe78e149c8b61b4bc7bc7feab015 The ECR to add RISC-V INTC interrupt controller is approved by the UEFI forum and will be available in the next revision of the ACPI specification. Link: https://github.com/acpica/acpica/commit/bd6d1ae1 Signed-off-by: Sunil V L Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index e0f205f9ab4c..9af17cb66faa 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -891,7 +891,8 @@ enum acpi_madt_type { ACPI_MADT_TYPE_MSI_PIC = 21, ACPI_MADT_TYPE_BIO_PIC = 22, ACPI_MADT_TYPE_LPC_PIC = 23, - ACPI_MADT_TYPE_RESERVED = 24, /* 24 to 0x7F are reserved */ + ACPI_MADT_TYPE_RINTC = 24, + ACPI_MADT_TYPE_RESERVED = 25, /* 25 to 0x7F are reserved */ ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */ }; @@ -1251,6 +1252,24 @@ enum acpi_madt_lpc_pic_version { ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ }; +/* 24: RISC-V INTC */ +struct acpi_madt_rintc { + struct acpi_subtable_header header; + u8 version; + u8 reserved; + u32 flags; + u64 hart_id; + u32 uid; /* ACPI processor UID */ +}; + +/* Values for RISC-V INTC Version field above */ + +enum acpi_madt_rintc_version { + ACPI_MADT_RINTC_VERSION_NONE = 0, + ACPI_MADT_RINTC_VERSION_V1 = 1, + ACPI_MADT_RINTC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + /* 80: OEM data */ struct acpi_madt_oem_data { From patchwork Wed Apr 5 13:40:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344290vqo; Wed, 5 Apr 2023 07:20:10 -0700 (PDT) X-Google-Smtp-Source: AKy350aL3/FMRHPNi+UScqVEP7O3JLjaHmophwCPQrs9qvH3LqAAFx3gVPtPai3xItmDYbMvidIc X-Received: by 2002:a05:6a20:66a7:b0:e1:204e:ddd5 with SMTP id o39-20020a056a2066a700b000e1204eddd5mr5929531pzh.15.1680704410610; Wed, 05 Apr 2023 07:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704410; cv=none; d=google.com; s=arc-20160816; b=SGorZIBEPdPQJqFRdQKvXG/QN2TV1dPsTpPZ9F6F4Rqrba/BZ2yEpJwS4l2Ij6Fu2e TcWlTK21ol/OjMC+OJk/FCs0DKB9TMV7oRXqVD3TdM4LhGIlZuYNEkO6ZX884NdViES+ yihXN4OYCR3gGt0Y5W3NSzCJW2xI6J5FHDJCBqEhNAbzJ9zkaK1VFXmU+lBvyXKf6nSa gf61LgM+BokNUluFp9AeKqFujNH4bwOr9I9ZmDdHj1evJB9flHMzpJoSR6KoyN3fJFCM y7lWTMIZ2T0IQz0wk7u+ABZL8CvSz5mpmVXJvB0vZUJOXqmWbY+dFwvtDKCJKvQIZ4nY kJwA== 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=hyEvZ1/JxdvEZ3QrBJlNvgjtkzc8ARbzdkWtSCfUT8g=; b=DJb0WicxptFBQ/IkVdF+n4fpHLvFvxsB+5s8U+kWGkkfkk8poRnwRv3g8K2aYLpQll gasZrb7xH7qYpr1HMEiokkgtZfCuKlQmZv+HiAfkSNryka3SrYLGn5u8QZ5RKs4mo/Y5 rLNJdLEhduZ+c/WSUPWwii2/vVKPuDKayxpkLBEerjCaMg0la0WYJIM7f3Psfp2dLapg NcoxKpILHuTrkDB6qK8bpInif20KLcW7L/n4abZRg2KErBumDUkfJSvWqPV6vVL1NJaS SrW7ZMWJR9hDD5sto6whSv0HEQ6Eq/MmSC7Y3bkRVUTi+DlJeyKA+FetVgc5pIvR1Shq PSHw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020aa79a05000000b00627debf9bd7si12304027pfj.233.2023.04.05.07.19.58; Wed, 05 Apr 2023 07:20:10 -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 S238207AbjDEODS (ORCPT + 99 others); Wed, 5 Apr 2023 10:03:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238019AbjDEOCS (ORCPT ); Wed, 5 Apr 2023 10:02:18 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34086E9D; Wed, 5 Apr 2023 07:01:15 -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 90603c724ad88f93; Wed, 5 Apr 2023 16:01:12 +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 351E71B4E9E1; Wed, 5 Apr 2023 16:01:12 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 11/32] ACPICA: Add structure definitions for RISC-V RHCT Date: Wed, 05 Apr 2023 15:40:57 +0200 Message-ID: <1973202.usQuhbGJ8B@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346307702037061?= X-GMAIL-MSGID: =?utf-8?q?1762346307702037061?= From: Sunil V L ACPICA commit 82afd0434e79f74b96a6be88115ddc8343a1ba40 RISC-V Hart Capabilities Table (RHCT) is a new static table. The ECR to add RHCT is approved by the UEFI forum and will be available in the next version of the ACPI spec. Link: https://github.com/acpica/acpica/commit/82afd043 Signed-off-by: Sunil V L Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 9af17cb66faa..db292f325696 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -48,6 +48,7 @@ #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ +#define ACPI_SIG_RHCT "RHCT" /* RISC-V Hart Capabilities Table */ #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */ #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */ @@ -2720,6 +2721,53 @@ enum acpi_rgrt_image_type { ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ }; +/******************************************************************************* + * + * RHCT - RISC-V Hart Capabilities Table + * Version 1 + * + ******************************************************************************/ + +struct acpi_table_rhct { + struct acpi_table_header header; /* Common ACPI table header */ + u32 reserved; + u64 time_base_freq; + u32 node_count; + u32 node_offset; +}; + +/* + * RHCT subtables + */ +struct acpi_rhct_node_header { + u16 type; + u16 length; + u16 revision; +}; + +/* Values for RHCT subtable Type above */ + +enum acpi_rhct_node_type { + ACPI_RHCT_NODE_TYPE_ISA_STRING = 0x0000, + ACPI_RHCT_NODE_TYPE_HART_INFO = 0xFFFF, +}; + +/* + * RHCT node specific subtables + */ + +/* ISA string node structure */ +struct acpi_rhct_isa_string { + u16 isa_length; + char isa[]; +}; + +/* Hart Info node structure */ +struct acpi_rhct_hart_info { + u16 num_offsets; + u32 uid; /* ACPI processor UID */ +}; + /******************************************************************************* * * SBST - Smart Battery Specification Table From patchwork Wed Apr 5 13:41:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp346062vqo; Wed, 5 Apr 2023 07:22:33 -0700 (PDT) X-Google-Smtp-Source: AKy350bI2L0hktBADixfe1RdxUjEss1XU5qVFf3IxvKaAHibQ+42T81CfTl0Tb+RrEKKOXrn71pU X-Received: by 2002:a17:902:f90d:b0:1a2:1674:3900 with SMTP id kw13-20020a170902f90d00b001a216743900mr5816393plb.41.1680704552865; Wed, 05 Apr 2023 07:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704552; cv=none; d=google.com; s=arc-20160816; b=AWzG51l+X/jdgcIwXfZKFdTVMvA2X34NkF+ogMEvr/jVM4snWNlICJ7uiaLhuFVXzJ Swzyvg0CEl/IF2kKNa43DklWegAheWbozsEHEYEF/mXAzBX36wdugnshxU7SqfO44NgJ HJoIaFOKBU8+Qk+mSVUd2CJYRl9fMFNpQPtd/66l3h11fxDTVOrC4b8jkQgTtyGH94+t ek9Qe0FB3LPC7hxsVwmW9VpbI/bpPJUITFupUdlkMEseKkRGGWwqy2NdAohCUH1WNzDh cuP0ZH4aMx/Nk8wUc05nzyDzDkboO4InzXT5feb7eCfKdOiSU7+9UFIZA/c68E8yKjDd PJ8Q== 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=17DLghmRIOkaihr44acaj06UZENhEg9AHEPPiDILdTU=; b=eR7Vlayn3zh45SqzBN3BSC7kQ6XSmh+0it/LngYXPC20Lr2dZ7JYgbb+BP29FL/eLB g+evGjJYdW3laQ2zXW3T7jV79n+RKJHwK4Ou8VEkU8VoQRCmESsVujsTlFgiAsoLd1QP j7Dye05QoQWEzFyBN9KFsLjOqSLMZJeaEM5Q0Qi7OjIDB3jHpBleL//9C76JF6q80sVI Q0eIFjuhKRuTr70ekZY1YaYL1r9p1vA8dFSueTn7Sfd9xwji4/Y5IQjPE6m8rKIvl9Vw rY35OjhE/gSSL0QEs9OmWREuKwguS1u05bMwJhzrkpurQqS1Cuv23sjqlWdkGMYfQ5vZ b3vw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 194-20020a6301cb000000b0050fa589bc92si2584829pgb.815.2023.04.05.07.22.20; Wed, 05 Apr 2023 07:22:32 -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 S238328AbjDEODO convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Apr 2023 10:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237972AbjDEOCP (ORCPT ); Wed, 5 Apr 2023 10:02:15 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A55DB6E92; Wed, 5 Apr 2023 07:01:12 -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 e9a06f4bd0d167b5; Wed, 5 Apr 2023 16:01:11 +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 996111B4E9E1; Wed, 5 Apr 2023 16:01:10 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 12/32] ACPICA: Avoid undefined behavior: load of misaligned address Date: Wed, 05 Apr 2023 15:41:50 +0200 Message-ID: <1879151.CQOukoFCf9@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepfeetteevgfelhfefveeutefhudekleejgfeviedufefgleeuteeftedvieelleeinecuffhomhgrihhnpegrshgrnhdrshhopdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 X-Spam-Status: No, score=1.7 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLACK,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346115666593902?= X-GMAIL-MSGID: =?utf-8?q?1762346457115451851?= From: Tamir Duberstein ACPICA commit 807665510f1ea71bbdc063c27782a1da56e8e10a Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x00002234800696e6 in acpi_tb_get_root_table_entry(u8*, u32) ../../third_party/acpica/source/components/tables/tbutils.c:231 +0x9106e6 #1.2 0x0000233d72c8777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x0000233d72c8777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x0000233d72c8777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x0000233d72c88385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x0000233d72c87ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x00002234800696e6 in acpi_tb_get_root_table_entry(u8*, u32) ../../third_party/acpica/source/components/tables/tbutils.c:231 +0x9106e6 #5 0x00002234800691dd in acpi_tb_parse_root_table(acpi_physical_address) ../../third_party/acpica/source/components/tables/tbutils.c:385 +0x9101dd #6 0x0000223480070b06 in acpi_initialize_tables(struct acpi_table_desc*, u32, u8) ../../third_party/acpica/source/components/tables/tbxface.c:160 +0x917b06 #7 0x000022347fb803b4 in acpi::acpi_impl::initialize_acpi(acpi::acpi_impl*) ../../src/devices/board/lib/acpi/acpi-impl.cc:200 +0x4273b4 #8 0x000022347fa30d14 in x86::X86::early_acpi_init(x86::X86*) ../../src/devices/board/drivers/x86/init.cc:34 +0x2d7d14 #9 0x000022347fa310cf in x86::X86::early_init(x86::X86*) ../../src/devices/board/drivers/x86/init.cc:43 +0x2d80cf #10 0x000022347fa79410 in x86::X86::Bind(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:144 +0x320410 #11 0x000022347fa78ec0 in x86::X86::create_and_bind(void*, zx_device_t*) ../../src/devices/board/drivers/x86/x86.cc:123 +0x31fec0 #12 0x000020dc8908502f in λ(const zx_driver::bind_op::(anon class)*) ../../src/devices/bin/driver_host/zx_driver.cc:36 <>+0x41502f #13 0x000020dc89084e03 in fit::internal::target<(lambda at../../src/devices/bin/driver_host/zx_driver.cc:34:61), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 <>+0x414e03 #14 0x000020dc8935a930 in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 <>+0x6ea930 #15 0x000020dc893e2f8a in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 <>+0x772f8a #16 0x000020dc8948dec5 in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 <>+0x81dec5 #17 0x000023ab5abcf91e in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0xed91e #18 0x000023ab5abcf621 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xed621 #19 0x000023ab5abaa482 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xc8482 #20 0x000023ab5abaa0f8 in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0xc80f8 #21 0x000023ab5ab81c76 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x9fc76 #22 0x000023ab5ab8e7ef in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0xac7ef #23 0x000023ab5ab91d67 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0xafd67 #24 0x000023ab5abbe9a2 in λ(const driver_runtime::Dispatcher::create_with_adder::(anon class)*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0xdc9a2 #25 0x000023ab5abbe6d2 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xdc6d2 #26 0x000023ab5abac1e5 in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xca1e5 #27 0x000023ab5ababe32 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0xc9e32 #28 0x000023ab5ab95444 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0xb3444 #29 0x000023ab5ab94feb in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0xb2feb #30 0x000023ab5abbef74 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0xdcf74 #31 0x000023ab5abbf1cb in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0xdd1cb #32 0x000023ab5ac323a9 in async_loop_dispatch_wait(async_loop_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async-loop/loop.c:381 +0x1503a9 #33 0x000023ab5ac2ba82 in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:330 +0x149a82 #34 0x000023ab5ac2b102 in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x149102 #35 0x000023ab5ac2ceb7 in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x14aeb7 #36 0x000040b3be411f1c in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7f1c #37 0x000040b3be53ce8d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x202e8d Link: https://github.com/acpica/acpica/commit/80766551 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/tbutils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index cfe50c53ad4d..bb4a56e5673a 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c @@ -165,6 +165,7 @@ struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index) static acpi_physical_address acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) { + u32 address32; u64 address64; /* @@ -176,8 +177,8 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) * 32-bit platform, RSDT: Return 32-bit table entry * 64-bit platform, RSDT: Expand 32-bit to 64-bit and return */ - return ((acpi_physical_address) - (*ACPI_CAST_PTR(u32, table_entry))); + ACPI_MOVE_32_TO_32(&address32, table_entry); + return address32; } else { /* * 32-bit platform, XSDT: Truncate 64-bit to 32-bit and return From patchwork Wed Apr 5 13:42:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79633 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp341990vqo; Wed, 5 Apr 2023 07:17:07 -0700 (PDT) X-Google-Smtp-Source: AKy350a4HznPnEv6xyVxL2gvN1g2sB9RpotWpiJVuO5tGaPg4l23EHtQbE3/4BEb8NwKbSKUCjNi X-Received: by 2002:a17:90b:38c2:b0:23b:38b2:f0bd with SMTP id nn2-20020a17090b38c200b0023b38b2f0bdmr7111113pjb.15.1680704226897; Wed, 05 Apr 2023 07:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704226; cv=none; d=google.com; s=arc-20160816; b=YPyjrE0bt7osiuxF0T+qzwUZ0e3d7M7mH28Cwnfj/M+nDDiCcy+PpRjvIBXbFv8KaR Ln3zT9Wc2gM/sxda61814R8xOTBpBT0RYILMI32XctJ6rVKg8ZxBIpTiw3y6AWJeauwy xq3+3QTVbNlcl1HKl1lKj4i0D3Mtw2MlnImRv0qhlnKux5wp3OngXovT9j+kbl9nte+j sMztP0U+nTOP+gxFpDfP3cTAXmTYS4KSzK6wa84HJ5LkdYK1rGVFiA3eVFwGSLVXSQt8 a74zJ+Mallsro3pMM+eH0D7Zbbduw6O4ezykE72CEwhP6bLemE/bjTApz/LrPeukgACS SVgw== 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=vl7sEfS8LUpDD4oeBIKBmFF3gFodLzyU8OESjqbKaME=; b=uu22R8BYZrZCHS6FC88tAHVr5epXr7XNeVTRy2YcUiVV+6QZerhh47cElMaitaAjTI C5IpVv56EtO8F+fTjkJGnMsYkcGW5GyJ+Il5OfNWqnyaC/TY2MMrFgBJff3EXAqBd+dZ shI2q6dR6xKQM3V+JfGhhyhWGsPXdx9fDhkaO2nsid3b9VYWoUuPfmRwR0Z++o0nGZ+V N9DM830doaA8unifBcU9diMV6t0ZmjlXfab0eXYoOispG+1kG/zH+DGSEeThD0r8j/Cn M3BrXkz+83vdcSvkKkmS6FbJ2HGrYP0rdrSMM+Xg+BxMqRvnIl7m6P2bp8NYUxvMRJki sHlg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb11-20020a17090ae7cb00b00234b74321f8si1509815pjb.28.2023.04.05.07.16.53; Wed, 05 Apr 2023 07:17:06 -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 S238391AbjDEODM (ORCPT + 99 others); Wed, 5 Apr 2023 10:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjDEOCI (ORCPT ); Wed, 5 Apr 2023 10:02:08 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B6046A60; Wed, 5 Apr 2023 07:01:12 -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 0a9710086bac5137; Wed, 5 Apr 2023 16:01:09 +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 2172C1B4EA4C; Wed, 5 Apr 2023 16:01:09 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 13/32] ACPICA: Avoid undefined behavior: applying zero offset to null pointer Date: Wed, 05 Apr 2023 15:42:43 +0200 Message-ID: <2580576.Lt9SDvczpP@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepleduvdfhudehvddukeetffdtffejkedttefgveeftdeuvedvleelgeeiteelueelnecuffhomhgrihhnpegrshgrnhdrshhopdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, WEIRD_PORT 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346115403440272?= X-GMAIL-MSGID: =?utf-8?q?1762346115403440272?= From: Tamir Duberstein ACPICA commit 770653e3ba67c30a629ca7d12e352d83c2541b1e Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x000021e4213b3302 in acpi_ds_init_aml_walk(struct acpi_walk_state*, union acpi_parse_object*, struct acpi_namespace_node*, u8*, u32, struct acpi_evaluate_info*, u8) ../../third_party/acpica/source/components/dispatcher/dswstate.c:682 +0x233302 #1.2 0x000020d0f660777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000020d0f660777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000020d0f660777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000020d0f660b96d in handlepointer_overflow_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:809 +0x4196d #3 0x000020d0f660b50d in compiler-rt/lib/ubsan/ubsan_handlers.cpp:815 +0x4150d #4 0x000021e4213b3302 in acpi_ds_init_aml_walk(struct acpi_walk_state*, union acpi_parse_object*, struct acpi_namespace_node*, u8*, u32, struct acpi_evaluate_info*, u8) ../../third_party/acpica/source/components/dispatcher/dswstate.c:682 +0x233302 #5 0x000021e4213e2369 in acpi_ds_call_control_method(struct acpi_thread_state*, struct acpi_walk_state*, union acpi_parse_object*) ../../third_party/acpica/source/components/dispatcher/dsmethod.c:605 +0x262369 #6 0x000021e421437fac in acpi_ps_parse_aml(struct acpi_walk_state*) ../../third_party/acpica/source/components/parser/psparse.c:550 +0x2b7fac #7 0x000021e4214464d2 in acpi_ps_execute_method(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/parser/psxface.c:244 +0x2c64d2 #8 0x000021e4213aa052 in acpi_ns_evaluate(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/namespace/nseval.c:250 +0x22a052 #9 0x000021e421413dd8 in acpi_ns_init_one_device(acpi_handle, u32, void*, void**) ../../third_party/acpica/source/components/namespace/nsinit.c:735 +0x293dd8 #10 0x000021e421429e98 in acpi_ns_walk_namespace(acpi_object_type, acpi_handle, u32, u32, acpi_walk_callback, acpi_walk_callback, void*, void**) ../../third_party/acpica/source/components/namespace/nswalk.c:298 +0x2a9e98 #11 0x000021e4214131ac in acpi_ns_initialize_devices(u32) ../../third_party/acpica/source/components/namespace/nsinit.c:268 +0x2931ac #12 0x000021e42147c40d in acpi_initialize_objects(u32) ../../third_party/acpica/source/components/utilities/utxfinit.c:304 +0x2fc40d #13 0x000021e42126d603 in acpi::acpi_impl::initialize_acpi(acpi::acpi_impl*) ../../src/devices/board/lib/acpi/acpi-impl.cc:224 +0xed603 Add a simple check that avoids incrementing a pointer by zero, but otherwise behaves as before. Note that our findings are against ACPICA 20221020, but the same code exists on master. Link: https://github.com/acpica/acpica/commit/770653e3 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/dswstate.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c index 95af370a7dce..d3841ded3a81 100644 --- a/drivers/acpi/acpica/dswstate.c +++ b/drivers/acpi/acpica/dswstate.c @@ -576,9 +576,14 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state, ACPI_FUNCTION_TRACE(ds_init_aml_walk); walk_state->parser_state.aml = - walk_state->parser_state.aml_start = aml_start; - walk_state->parser_state.aml_end = - walk_state->parser_state.pkg_end = aml_start + aml_length; + walk_state->parser_state.aml_start = + walk_state->parser_state.aml_end = + walk_state->parser_state.pkg_end = aml_start; + /* Avoid undefined behavior: applying zero offset to null pointer */ + if (aml_length != 0) { + walk_state->parser_state.aml_end += aml_length; + walk_state->parser_state.pkg_end += aml_length; + } /* The next_op of the next_walk will be the beginning of the method */ From patchwork Wed Apr 5 13:43:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343122vqo; Wed, 5 Apr 2023 07:18:31 -0700 (PDT) X-Google-Smtp-Source: AKy350awcCGkgSwoyOL5fJGQ5F74lpJvuzY0nkxc8o1WhjBz/vQEI/a1XQDq5kecsd4EkZ0EQWPr X-Received: by 2002:a17:90a:e7cb:b0:234:ac93:d715 with SMTP id kb11-20020a17090ae7cb00b00234ac93d715mr6951005pjb.45.1680704311148; Wed, 05 Apr 2023 07:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704311; cv=none; d=google.com; s=arc-20160816; b=ayeHw5ICVBKjQm9ox/CQyeDz4bRcKEVtpzzYttf5Xesiz5crPO5Zrb3ZAbzpUpKxff U6z1ERpWRl0HXdJ3oPKFUuzzvREpTJylQpPGCsq0bIGqT8I/AMCrXwZv2iaj2MO06CpX nETYj6pNGme3qk/1r8DuBhbGaQjue/4ZbvS1wiVGo0osOA4BfvBnZHs6IRO1Q5PbgIeG BLunJMdPCvbCXRqiip3/2JmBVWP/HWj4Kt/NMtVgrSqSKAMuefhlarUpQiEaPV4C9WLV E3YTcmzo0nDUyFHznU3x/7WuVIFhWsz9oR6WzPhLp+2j5jAyRbVRpy7n436VU7HLgeGX GUoQ== 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=9NdycrAzO8JePUhGTxC97kqVk7klNlIRiU6c1k2tHIc=; b=V5pLx/cKvajL7qbmwMYBkwlfOxb4+iVCiPtDhjIFqhLjwdyPIBvBJrN7M8kdobpLsz GFGrbx1q8ZdtJbwHFfy/KrkLXtklDhxx0LkuHvXqCYIQajmf4Yx8ZNvXQST9FSV9g+i5 rrUXhxEK+B7zhNUh51qsQLwJhUoesDbKRDt4oe29NKSuDjlpD2WCsYIEbofSUziVqrp7 pxgBmEvkABtWeNypzyOAUFeCz4VBkNX0ZBl3KApiadAXToBiw9Ht5g8fm+QHJrtmC+Xv h4FpuhM1hF5jup3/CNCawOgC81QuLIW4UqdifEoUgjdi/nbP7/yAVNdGeKzo6apOcB2e 9Bkw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a63e712000000b005138c1f1fc4si12508174pgi.573.2023.04.05.07.18.14; Wed, 05 Apr 2023 07:18:31 -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 S238319AbjDEODF (ORCPT + 99 others); Wed, 5 Apr 2023 10:03:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238317AbjDEOCD (ORCPT ); Wed, 5 Apr 2023 10:02:03 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6660C6E8B; Wed, 5 Apr 2023 07:01:09 -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 ed0487bf64cd18fb; Wed, 5 Apr 2023 16:01:08 +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 BECD71B4EA15; Wed, 5 Apr 2023 16:01:07 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 14/32] ACPICA: Avoid undefined behavior: member access within null pointer Date: Wed, 05 Apr 2023 15:43:28 +0200 Message-ID: <2173946.Mh6RI2rZIc@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346203627452635?= X-GMAIL-MSGID: =?utf-8?q?1762346203627452635?= From: Tamir Duberstein ACPICA commit 2411e11ef88f42b08f33c38ed9c0d40282780e8c 84449c1eef1c0d092b037dc4c2c60cec5d5cc6c4 fixed this for Linux kernel builds, but not Linux userspace builds. Before this change we see the following UBSAN stack trace in Fuchsia: ../../third_party/acpica/source/components/tables/tbfadt.c:536:39: runtime error: member access within null pointer of type 'struct acpi_table_fadt' (aka 'struct acpi_table_fadt') #0 0x564860b5ee9b in acpi_tb_convert_fadt ../../third_party/acpica/source/components/tables/tbfadt.c:536:39 #1 0x564860b5edb4 in acpi_tb_create_local_fadt ../../third_party/acpica/source/components/tables/tbfadt.c:461:5 #2 0x564860b5e5c6 in acpi_tb_parse_fadt ../../third_party/acpica/source/components/tables/tbfadt.c:371:5 #3 0x564860b5c485 in acpi_tb_parse_root_table ../../third_party/acpica/source/components/tables/tbutils.c:407:13 #4 0x564860b6401a in acpi_initialize_tables ../../third_party/acpica/source/components/tables/tbxface.c:160:14 #5 0x5648608fb417 in acpi_host_test::acpi_host_test::init_acpi_with_tables(char const*) ../../src/devices/board/tests/acpi-host-tests/acpi-host-test.cc:36:5 #6 0x5648608f9095 in acpi_host_test::acpi_host_test_device_is_child_of_scope_test_Test::test_body() ../../src/devices/board/tests/acpi-host-tests/acpi-host-test.cc:85:3 #7 0x564860c6007e in void testing::internal::handle_seh_exceptions_in_method_if_supported(testing::Test*, void (testing::Test::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2609:10 #8 0x564860bbd5df in void testing::internal::handle_exceptions_in_method_if_supported(testing::Test*, void (testing::Test::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2664:12 #9 0x564860bbd141 in testing::Test::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:2684:5 #10 0x564860bbff0a in testing::test_info::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:2864:11 #11 0x564860bc40f1 in testing::test_suite::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:3023:30 #12 0x564860beba40 in testing::internal::unit_test_impl::run_all_tests() ../../third_party/googletest/src/googletest/src/gtest.cc:5882:44 #13 0x564860c7db6e in bool testing::internal::handle_seh_exceptions_in_method_if_supported(testing::internal::unit_test_impl*, bool (testing::internal::unit_test_impl::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2609:10 #14 0x564860bea71f in bool testing::internal::handle_exceptions_in_method_if_supported(testing::internal::unit_test_impl*, bool (testing::internal::unit_test_impl::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2664:12 #15 0x564860bea1c5 in testing::unit_test::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:5456:10 #16 0x5648608fccc0 in RUN_ALL_TESTS() ../../third_party/googletest/src/googletest/include/gtest/gtest.h:2304:73 #17 0x5648608fcb7e in main ../../src/devices/board/tests/acpi-host-tests/acpi-host-test.cc:121:10 #18 0x7f6defa2d189 (/lib/x86_64-linux-gnu/libc.so.6+0x27189) (build_id: c4f6727c560b1c33527ff9e0ca0cef13a7db64d2) #19 0x7f6defa2d244 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27244) (build_id: c4f6727c560b1c33527ff9e0ca0cef13a7db64d2) #20 0x56486082e598 (/usr/local/google/home/tamird/src/fuchsia/out/core.x64/host_x64/acpi-host-test-bin+0x359598) (build_id: 851423b0e664df6a) Link: https://github.com/acpica/acpica/commit/2411e11e Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/platform/aclinux.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 66285e054e1e..1ca450e35c0d 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -180,7 +180,10 @@ #define ACPI_USE_STANDARD_HEADERS #ifdef ACPI_USE_STANDARD_HEADERS +#include #include + +#define ACPI_OFFSET(d, f) offsetof(d, f) #endif /* Define/disable kernel-specific declarators */ From patchwork Wed Apr 5 13:44:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344471vqo; Wed, 5 Apr 2023 07:20:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ZsOUMbpF4zZ4qwQBP883o78oRJUWfIGBBDc3rhtv0q9mD+4u25eZJArB9tFD5upTaNRL7i X-Received: by 2002:a17:90a:19de:b0:23f:aa93:6cfd with SMTP id 30-20020a17090a19de00b0023faa936cfdmr6916170pjj.18.1680704424471; Wed, 05 Apr 2023 07:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704424; cv=none; d=google.com; s=arc-20160816; b=fqGdcv70CxyKaXHGpeOn8yfLDSwaXcHnS/yul4b6Ij6vYnpbq82FMAqu1NQHnlG8rA OHBTDaVI+GOT2lcKXv+MLL+AwqNIuuFS9//omQplFqEapHbrTaILBmX3g2T62urCiasw EVcMC0bhomBwZ5VmcJBsINV1TbVAl0xjMZsCIZpTDkQLp51vF91OEAGFYRBvvNPc10wD Z1dD99APCmXBfrZfcqzx08Y/KUKIIdqGfOXsOWZ9zQ6zQOb1cXTBf9lrWmS9Y0UkODK7 4nQciQXSFXcVcZLmzrzeJrHsfrBKZxnKF+3my2O6+IgDuRURLlupNQaNQP5jQcBkyf4F ycLg== 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=AZpmQJremFpiY5ScH1CPvH5uc12c31bekF2s+4FChH0=; b=oR7pSq0LLI6DUEODtu5DGZyvRoZJs9bP4cfLnhsSyLrCHb1rfQELU/UtiFn24cwn13 2tdx9EhqYIAsqPatBy/1cSfg/SZOSPwaDyEhsynK+SfGhimooGYQ0BVyIVLysROSA5SC 3IQZuK78w8e9Z0T4tmCgDLWXZVNY5tRy2eukJR/zLUtKwEZJotAfdoGpgRVWa9FvKGk7 c2Bwx83VbgUAcYT/84XJFbd/vsJPavl/2AtownNWgcdD9Lx9/QrGe/DEJ516CtmB67LT EutENk4wGvW5w0dxSLyXc08uZsHX+Tu5b71JFQVlGT5wVQhyrnOxg642NHe5+fkpRDbs khhg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a63d00d000000b00502d6998a4asi12322300pgf.458.2023.04.05.07.20.09; Wed, 05 Apr 2023 07:20:24 -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 S238380AbjDEOCs convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Apr 2023 10:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237865AbjDEOCB (ORCPT ); Wed, 5 Apr 2023 10:02:01 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBE4E6A61; Wed, 5 Apr 2023 07:01:08 -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 e471cee2a487451d; Wed, 5 Apr 2023 16:01:07 +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 574111B4E9E1; Wed, 5 Apr 2023 16:01:06 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 15/32] ACPICA: Avoid undefined behavior: member access within misaligned address Date: Wed, 05 Apr 2023 15:44:12 +0200 Message-ID: <3699849.MHq7AAxBmi@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepveffueegtddtgfdtgfejudefveetuedvleefieekudeuhffhiedvudfffeeiteelnecuffhomhgrihhnpegrshgrnhdrshhopdhgihhthhhusgdrtghomhdprgguughrvghsshdrihhnfhhonecukfhppedvudefrddufeegrdduieefrddvudelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeifedrvdduledphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepfedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrohgsvghrthdrmhhoohhrvgesihhnthgv lhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=1.7 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLACK,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345306641195351?= X-GMAIL-MSGID: =?utf-8?q?1762346322891321652?= From: Tamir Duberstein ACPICA commit c14708336bd18552b28643575de7b5beb9b864e9 Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x0000220c98288eba in acpi_rs_get_address_common(struct acpi_resource*, union aml_resource*) ../../third_party/acpica/source/components/resources/rsaddr.c:331 +0x8f6eba #1.2 0x000023625f46077f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000023625f46077f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000023625f46077f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000023625f461385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000023625f460ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x0000220c98288eba in acpi_rs_get_address_common(struct acpi_resource*, union aml_resource*) ../../third_party/acpica/source/components/resources/rsaddr.c:331 +0x8f6eba #5 0x0000220c9828ea57 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:352 +0x8fca57 #6 0x0000220c9828992c in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:132 +0x8f792c #7 0x0000220c982d1cfc in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x93fcfc #8 0x0000220c98281e46 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x8efe46 #9 0x0000220c98293b51 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x901b51 #10 0x0000220c9829438d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x90238d #11 0x0000220c97db272b in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0x42072b #12 0x0000220c97dcec59 in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0x43cc59 #13 0x0000220c97f94a3f in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x602a3f #14 0x0000220c97c642c7 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0x2d22c7 #15 0x0000220c97caf3e6 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0x31d3e6 #16 0x0000220c97cd72ae in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0x3452ae #17 0x0000220c97cd7223 in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0x345223 #18 0x0000220c97f48eb0 in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x5b6eb0 #19 0x0000220c97f48d2a in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x5b6d2a #20 0x0000220c982f9245 in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x967245 #21 0x000022e2aa1cd91e in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0xed91e #22 0x000022e2aa1cd621 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xed621 #23 0x000022e2aa1a8482 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xc8482 #24 0x000022e2aa1a80f8 in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0xc80f8 #25 0x000022e2aa17fc76 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x9fc76 #26 0x000022e2aa18c7ef in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0xac7ef #27 0x000022e2aa18fd67 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0xafd67 #28 0x000022e2aa1bc9a2 in λ(const driver_runtime::Dispatcher::create_with_adder::(anon class)*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0xdc9a2 #29 0x000022e2aa1bc6d2 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xdc6d2 #30 0x000022e2aa1aa1e5 in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xca1e5 #31 0x000022e2aa1a9e32 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0xc9e32 #32 0x000022e2aa193444 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0xb3444 #33 0x000022e2aa192feb in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0xb2feb #34 0x000022e2aa1bcf74 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0xdcf74 #35 0x000022e2aa1bd1cb in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0xdd1cb #36 0x000022e2aa2303a9 in async_loop_dispatch_wait(async_loop_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async-loop/loop.c:381 +0x1503a9 #37 0x000022e2aa229a82 in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:330 +0x149a82 #38 0x000022e2aa229102 in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x149102 #39 0x000022e2aa22aeb7 in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x14aeb7 #40 0x000041a874980f1c in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7f1c #41 0x000041a874aabe8d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x202e8d Link: https://github.com/acpica/acpica/commit/c1470833 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/rsaddr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/rsaddr.c b/drivers/acpi/acpica/rsaddr.c index 5737c3af1902..fff48001d7ef 100644 --- a/drivers/acpi/acpica/rsaddr.c +++ b/drivers/acpi/acpica/rsaddr.c @@ -272,12 +272,17 @@ u8 acpi_rs_get_address_common(struct acpi_resource *resource, union aml_resource *aml) { + struct aml_resource_address address; + ACPI_FUNCTION_ENTRY(); + /* Avoid undefined behavior: member access within misaligned address */ + + memcpy(&address, aml, sizeof(address)); + /* Validate the Resource Type */ - if ((aml->address.resource_type > 2) && - (aml->address.resource_type < 0xC0)) { + if ((address.resource_type > 2) && (address.resource_type < 0xC0)) { return (FALSE); } @@ -298,7 +303,7 @@ acpi_rs_get_address_common(struct acpi_resource *resource, /* Generic resource type, just grab the type_specific byte */ resource->data.address.info.type_specific = - aml->address.specific_flags; + address.specific_flags; } return (TRUE); From patchwork Wed Apr 5 13:44:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp332502vqo; Wed, 5 Apr 2023 07:06:01 -0700 (PDT) X-Google-Smtp-Source: AKy350a1HEgV+SSsLei9sLuAvInVsneyzhEe3GElUips03MNNEgdayaXtc5GHQvTMlPNpTDJ+/xl X-Received: by 2002:a17:90a:1042:b0:237:3dfb:9095 with SMTP id y2-20020a17090a104200b002373dfb9095mr6981860pjd.6.1680703561066; Wed, 05 Apr 2023 07:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703561; cv=none; d=google.com; s=arc-20160816; b=OLGNa2gL9sNj0GCvQnMn4PpQfj85dOIAOAip32vyN4/snFv426eo8fMGv9Ac63t1at 70FZfOrK/oa/5ETdBF+Upu/+R0nQpMwtVk6cZShHg7/WmWaft5BL7gPxkl5UmcEvhhtU h6CzFxPOkZUwH8rb63+bfA/jknG4nWuh9bPdnKWWadvoDFWlP2ChSJ5NmlxIP/pfU8N8 24CyAokADzAl+nA30JLBuRh5rMCiDFL7ZItiHAd+/NM6TeK0tHDEJ1iyro/T2NVqIGvN oKTd2wag6/hex3rCMRczuUPCa3Juaqoq1G7v+0NhpHYuw2AAtyGSCYD3SlFahdsT55H9 i5hw== 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=MHgrvxRtISHRCK1SVuOosx8ZDvXjQePmk8okDiwcruw=; b=mEPC1cUnBblgFODNlNpuQlK1ro8GEoHAzgqeXuQIoLG6wrjqVWMXG2//5UC02gkSEc w/uAFdlxzHQBF1cmDgE+KCcQCgkfL8ZfSELiupBt08CFRfG//b2O8ZVYc0eHpWFgJzPi ECeadwo9ClYeej5cnkuYRxL/H7twQkhwYtO277FmQ74sk739qS5WNXvi7T42XnsaQec+ HgIamus34Kd98w9Y7YlI2Hh9IeUZHgNu9sz5Sjev9eDtV2ibLPj6QjwFo3xiZbBu40aw LujE9M+fc5Ts+mCmz4o+xQ/yln+nXJEkBdcEb2/OGvpPMZb4go5AfLZ1jS76rHcbUZ4K d0Qg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm10-20020a17090b3eca00b0023312fad927si1418637pjb.100.2023.04.05.07.05.47; Wed, 05 Apr 2023 07:06:01 -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 S238300AbjDEOCk convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Apr 2023 10:02:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237998AbjDEOBv (ORCPT ); Wed, 5 Apr 2023 10:01:51 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 144136A6B; Wed, 5 Apr 2023 07:01:06 -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 760e9e0b5e635999; Wed, 5 Apr 2023 16:01:05 +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 9A4891B4E9E1; Wed, 5 Apr 2023 16:01:04 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 16/32] ACPICA: Avoid undefined behavior: member access within misaligned address Date: Wed, 05 Apr 2023 15:44:55 +0200 Message-ID: <1849135.atdPhlSkOF@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepfeetteevgfelhfefveeutefhudekleejgfeviedufefgleeuteeftedvieelleeinecuffhomhgrihhnpegrshgrnhdrshhopdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=1.7 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLACK,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345306641195351?= X-GMAIL-MSGID: =?utf-8?q?1762345417338773013?= From: Tamir Duberstein ACPICA commit 7b23bdc37432f0b7fb6c3b6aa76debdcb7eb18c3 Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x00002132da6299a1 in acpi_ut_validate_resource(struct acpi_walk_state*, void*, u8*) ../../third_party/acpica/source/components/utilities/utresrc.c:426 +0x2f79a1 #1.2 0x000023e6cd58577f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000023e6cd58577f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000023e6cd58577f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000023e6cd586385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000023e6cd585ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x00002132da6299a1 in acpi_ut_validate_resource(struct acpi_walk_state*, void*, u8*) ../../third_party/acpica/source/components/utilities/utresrc.c:426 +0x2f79a1 #5 0x00002132da628ffe in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:216 +0x2f6ffe #6 0x00002132da5b2405 in acpi_ex_concat_template(union acpi_operand_object*, union acpi_operand_object*, union acpi_operand_object**, struct acpi_walk_state*) ../../third_party/acpica/source/components/executer/exconcat.c:414 +0x280405 #7 0x00002132da5ad5a4 in acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state*) ../../third_party/acpica/source/components/executer/exoparg2.c:383 +0x27b5a4 #8 0x00002132da57ee7d in acpi_ds_exec_end_op(struct acpi_walk_state*) ../../third_party/acpica/source/components/dispatcher/dswexec.c:482 +0x24ce7d #9 0x00002132da5ed196 in acpi_ps_parse_loop(struct acpi_walk_state*) ../../third_party/acpica/source/components/parser/psloop.c:554 +0x2bb196 #10 0x00002132da5ea458 in acpi_ps_parse_aml(struct acpi_walk_state*) ../../third_party/acpica/source/components/parser/psparse.c:525 +0x2b8458 #11 0x00002132da5f8a92 in acpi_ps_execute_method(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/parser/psxface.c:244 +0x2c6a92 #12 0x00002132da55c2b2 in acpi_ns_evaluate(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/namespace/nseval.c:250 +0x22a2b2 #13 0x00002132da61fd45 in acpi_ut_evaluate_object(struct acpi_namespace_node*, const char*, u32, union acpi_operand_object**) ../../third_party/acpica/source/components/utilities/uteval.c:100 +0x2edd45 #14 0x00002132da606197 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:757 +0x2d4197 #15 0x00002132da60652d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d452d #16 0x00002132da41dd48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #17 0x00002132da42394d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #18 0x00002132da4afaf2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #19 0x00002132da3d7b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #20 0x00002132da3e96f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #21.1 0x00002132da3f38ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #21 0x00002132da3f38ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #22.2 0x00002132da638c6c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x306c6c #22.1 0x00002132da638c6c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x306c6c #22 0x00002132da638c6c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x306c6c #23.1 0x000022c67b305d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #23 0x000022c67b305d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #24 0x000022c67b2febc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #25 0x000022c67b2fe8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #26 0x000022c67b2ef6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #27 0x000022c67b2f64c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #28 0x000022c67b2f72c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #29.1 0x000022c67b30281e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #29 0x000022c67b30281e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #30 0x000022c67b2fee7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #31.1 0x000022c67b2f8964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #31 0x000022c67b2f8964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #32 0x000022c67b2f835d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #33.1 0x000022c67b302c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #33 0x000022c67b302c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #34.1 0x000022c67b324ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #34 0x000022c67b324ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #35 0x000022c67b32678f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #36 0x0000431cc3246edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #37 0x0000431cc337796d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/7b23bdc3 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/utresrc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c index e1cc3d348750..cff7901f7866 100644 --- a/drivers/acpi/acpica/utresrc.c +++ b/drivers/acpi/acpica/utresrc.c @@ -361,16 +361,20 @@ acpi_ut_validate_resource(struct acpi_walk_state *walk_state, aml_resource = ACPI_CAST_PTR(union aml_resource, aml); if (resource_type == ACPI_RESOURCE_NAME_SERIAL_BUS) { + /* Avoid undefined behavior: member access within misaligned address */ + + struct aml_resource_common_serialbus common_serial_bus; + memcpy(&common_serial_bus, aml_resource, + sizeof(common_serial_bus)); + /* Validate the bus_type field */ - if ((aml_resource->common_serial_bus.type == 0) || - (aml_resource->common_serial_bus.type > - AML_RESOURCE_MAX_SERIALBUSTYPE)) { + if ((common_serial_bus.type == 0) || + (common_serial_bus.type > AML_RESOURCE_MAX_SERIALBUSTYPE)) { if (walk_state) { ACPI_ERROR((AE_INFO, "Invalid/unsupported SerialBus resource descriptor: BusType 0x%2.2X", - aml_resource->common_serial_bus. - type)); + common_serial_bus.type)); } return (AE_AML_INVALID_RESOURCE_TYPE); } From patchwork Wed Apr 5 13:45:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79656 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp345107vqo; Wed, 5 Apr 2023 07:21:16 -0700 (PDT) X-Google-Smtp-Source: AKy350ZA6cRMJmHRag/g/GOwu0RPXDcJCmepsC750o0V0kOwUh0wH60GMpSLorbklUjCs4Fc/rN+ X-Received: by 2002:a17:90b:350d:b0:22b:b832:d32 with SMTP id ls13-20020a17090b350d00b0022bb8320d32mr7408052pjb.9.1680704475410; Wed, 05 Apr 2023 07:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704475; cv=none; d=google.com; s=arc-20160816; b=t8smE5uY4oY+MfFWCZOaLfXAU8m+qtWLaMupLwL40ihWfiRJLqn8BHlvOmX2Fw5fZt kSjM0fZDt3ysnpLcZoyiUwxbbBe4r8cN6O4I881c9tDCHU4mJFbPn9wLbeGiD0xgoOlK tAJPmUZ4caZ3V3kdrs0XoaSac+7bsCC96Z5sptXL8soSJulgJ8IN3udcjtEas9BIY9Kr d12yE2KSye2mYnF2NRCcXgKfBOoTuW0EmC+8x+eZ2wrW2naTMmSqz6X71V/fnIZJvPST NkJ6kOsYC6TOXADMN5ONAGk+1nyHUPVnmaGQX4m3lRpLaJONBi9vGXYN9Hed+W41xVfT BfUA== 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=a64UNT7Fy1wbz6qy+c1kX4FajKlNa8BqD+MQnTzz2u4=; b=rhwiFhjhu2FNgwm5xTDzkw3YEsdWx3AwTWs7Lri/JCp40Alofu3wy0UOlPtteFuSvj pADmvQS+kwrQFQI8dCASFo8nzmG29olL3Off7n6x78HngkwQApaqyhon+PSLMH3XIpp3 fdrHWuYZiRWTqYbheV66tAkNC69IqbHtewIg7wjTI9JhaBdc9ru9kWoO+SwvAh7D25Ql Zx8X4uGDXDhqHjdzbuAwPoE2B7fAtPycLIs6+1V+MJ16cTBrcrqdlZ/zGcNMGvq/2NNs VFpV0x2lyqTGWFL9F+jc4d3sFadAlmVly9bJA/0rSOSJ8lLnbjrGDEt1PSMRfueZQT9+ D1ag== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a631d0d000000b005034a5a0a58si11798200pgd.434.2023.04.05.07.21.02; Wed, 05 Apr 2023 07:21:15 -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 S238360AbjDEOCo convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Apr 2023 10:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238156AbjDEOBv (ORCPT ); Wed, 5 Apr 2023 10:01:51 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2FF46A64; Wed, 5 Apr 2023 07:01:05 -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 47d973e81acfa915; Wed, 5 Apr 2023 16:01:03 +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 0248C1B4E9E1; Wed, 5 Apr 2023 16:01:01 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 17/32] ACPICA: Avoid undefined behavior: member access within misaligned address Date: Wed, 05 Apr 2023 15:45:45 +0200 Message-ID: <2176684.Icojqenx9y@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepfeetteevgfelhfefveeutefhudekleejgfeviedufefgleeuteeftedvieelleeinecuffhomhgrihhnpegrshgrnhdrshhopdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=1.7 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLACK,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345306641195351?= X-GMAIL-MSGID: =?utf-8?q?1762346376164832645?= From: Tamir Duberstein ACPICA commit 60cbb20c009fd67e7b973d67b5dcb4a7b12681d9 Before this change we see the following UBSAN stack traces in Fuchsia: #0 0x0000219ce3426bd7 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:631 +0x2cbbd7 #1.2 0x00002240d84b077f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x00002240d84b077f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x00002240d84b077f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x00002240d84b1385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x00002240d84b0ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x0000219ce3426bd7 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:631 +0x2cbbd7 #5 0x0000219ce3423777 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:178 +0x2c8777 #6 0x0000219ce342f1b2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d41b2 #7 0x0000219ce342f52d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d452d #8 0x0000219ce3246d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #9 0x0000219ce324c94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #10 0x0000219ce32d8af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #11 0x0000219ce3200b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #12 0x0000219ce32126f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #13.1 0x0000219ce321c8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #13 0x0000219ce321c8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #14.2 0x0000219ce3461b2c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x306b2c #14.1 0x0000219ce3461b2c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x306b2c #14 0x0000219ce3461b2c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x306b2c #15.1 0x000022cc55016d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #15 0x000022cc55016d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #16 0x000022cc5500fbc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #17 0x000022cc5500f8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #18 0x000022cc550006a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #19 0x000022cc550074c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #20 0x000022cc550082c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #21.1 0x000022cc5501381e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #21 0x000022cc5501381e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #22 0x000022cc5500fe7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #23.1 0x000022cc55009964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #23 0x000022cc55009964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #24 0x000022cc5500935d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #25.1 0x000022cc55013c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #25 0x000022cc55013c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #26.1 0x000022cc55035ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #26 0x000022cc55035ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #27 0x000022cc5503778f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #28 0x000042d43f9f1edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #29 0x000042d43fb2296d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d and #0 0x000022db2bfa3753 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:704 +0x2cb753 #1.2 0x000020c421f9777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000020c421f9777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000020c421f9777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000020c421f98385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000020c421f97ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000022db2bfa3753 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:704 +0x2cb753 #5 0x000022db2bfa0777 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:178 +0x2c8777 #6 0x000022db2bfac0f2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d40f2 #7 0x000022db2bfac46d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d446d #8 0x000022db2bdc3d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #9 0x000022db2bdc994d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #10 0x000022db2be55af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #11 0x000022db2bd7db44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #12 0x000022db2bd8f6f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #13.1 0x000022db2bd998ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #13 0x000022db2bd998ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #14.2 0x000022db2bfdea6c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x306a6c #14.1 0x000022db2bfdea6c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x306a6c #14 0x000022db2bfdea6c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x306a6c #15.1 0x0000216d819f2d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #15 0x0000216d819f2d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #16 0x0000216d819ebbc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #17 0x0000216d819eb8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #18 0x0000216d819dc6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #19 0x0000216d819e34c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #20 0x0000216d819e42c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #21.1 0x0000216d819ef81e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #21 0x0000216d819ef81e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #22 0x0000216d819ebe7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #23.1 0x0000216d819e5964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #23 0x0000216d819e5964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #24 0x0000216d819e535d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #25.1 0x0000216d819efc00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #25 0x0000216d819efc00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #26.1 0x0000216d81a11ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #26 0x0000216d81a11ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #27 0x0000216d81a1378f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #28 0x0000417ba4b4bedc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #29 0x0000417ba4c7c96d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/60cbb20c Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/rscalc.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c index ffb448fa51fd..6e7a152d6459 100644 --- a/drivers/acpi/acpica/rscalc.c +++ b/drivers/acpi/acpica/rscalc.c @@ -606,15 +606,23 @@ acpi_rs_get_list_length(u8 *aml_buffer, } break; - case ACPI_RESOURCE_NAME_SERIAL_BUS: + case ACPI_RESOURCE_NAME_SERIAL_BUS:{ - minimum_aml_resource_length = - acpi_gbl_resource_aml_serial_bus_sizes - [aml_resource->common_serial_bus.type]; - extra_struct_bytes += - aml_resource->common_serial_bus.resource_length - - minimum_aml_resource_length; - break; + /* Avoid undefined behavior: member access within misaligned address */ + + struct aml_resource_common_serialbus + common_serial_bus; + memcpy(&common_serial_bus, aml_resource, + sizeof(common_serial_bus)); + + minimum_aml_resource_length = + acpi_gbl_resource_aml_serial_bus_sizes + [common_serial_bus.type]; + extra_struct_bytes += + common_serial_bus.resource_length - + minimum_aml_resource_length; + break; + } case ACPI_RESOURCE_NAME_PIN_CONFIG: @@ -680,10 +688,16 @@ acpi_rs_get_list_length(u8 *aml_buffer, */ if (acpi_ut_get_resource_type(aml_buffer) == ACPI_RESOURCE_NAME_SERIAL_BUS) { + + /* Avoid undefined behavior: member access within misaligned address */ + + struct aml_resource_common_serialbus common_serial_bus; + memcpy(&common_serial_bus, aml_resource, + sizeof(common_serial_bus)); + buffer_size = acpi_gbl_resource_struct_serial_bus_sizes - [aml_resource->common_serial_bus.type] + - extra_struct_bytes; + [common_serial_bus.type] + extra_struct_bytes; } else { buffer_size = acpi_gbl_resource_struct_sizes[resource_index] + From patchwork Wed Apr 5 13:46:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79607 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp330767vqo; Wed, 5 Apr 2023 07:04:15 -0700 (PDT) X-Google-Smtp-Source: AKy350bnIZjkXNjYQlxNrBO46fV6iK/mDRWjJqDndSVkxzJWmdbUu8anZ00nSklRodEEleFKIkww X-Received: by 2002:a17:902:fa87:b0:1a1:7899:f001 with SMTP id lc7-20020a170902fa8700b001a17899f001mr6048854plb.42.1680703455278; Wed, 05 Apr 2023 07:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703455; cv=none; d=google.com; s=arc-20160816; b=r8SI/uK5r59L63DY1pHIwMY+wfmzLgRxnurgAae4mWi9vnOHIN2yEMVg5lG8NLQl93 9OmY1dfwYEX347vZRjaAdXrdIecEgEBqMGATrBr3orNkNbVygbbcD+hD4SGFYB4Z+4cp Lg5I4T1ciuDVyRjTUPrrHRWkqrHMEsazoTrIUKeZyAEWoIrJNqI7i8SwcoLeprJDnva9 DG/jBy7yZIoQWy7PBwjQmuj3b/m7EOY1d7LzpD8D4Xqrzgt8y68VDFlYoe2NL/Q3YoFs NQyDFZBi57WLJTC8ar6R7aQeVOc9EJHqVVQ1XKV+6F4kfBuSEsjwMLj9g8PntJuV8/cE SoEg== 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=ZkR6R9jdA1Ld+zyA8vOlKosO5AjurYNhnxxe4dHGHNY=; b=elrjHHcfUGN1hTygwVUgdQhe2jDA3G5kNnknELN+okpDm4J3iKH83e3zV/sKC/nOQn 21kBI9gJgr+HkkdLSJ3YLPXim6sqXfVPfpzpXdWO4EHg/XZiDdsL5M6CbcSVQuJdZbL8 uejk56m/lXK4imTV4lZRqFi380BkDkjRkRQ53b/BQpX4o+C5OilOVbEBLDhfsJtZH1c2 Ztha/SzSQhlh9ho8NIaGrsZTy+qjS1x4f5f/9wqGX6JOywqZLltM7D5+VnVqUEGKiv6W ixu7w/ZXb5oyVjcIH+UYygiz1acU1mb0JGwW5aeAvs4TzMp7IOkso9nRs6Etv8Ataib+ /5sg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a630d55000000b0050bc150235dsi12077629pgn.104.2023.04.05.07.04.00; Wed, 05 Apr 2023 07:04:15 -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 S237800AbjDEOC0 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Apr 2023 10:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238185AbjDEOBo (ORCPT ); Wed, 5 Apr 2023 10:01:44 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4263165A8; Wed, 5 Apr 2023 07:01:03 -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 ba15fa655ef25601; Wed, 5 Apr 2023 16:01:01 +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 2969D1B4E9E1; Wed, 5 Apr 2023 16:01:00 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 18/32] ACPICA: Avoid undefined behavior: member access within misaligned address Date: Wed, 05 Apr 2023 15:46:30 +0200 Message-ID: <2438077.jE0xQCEvom@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepfeetteevgfelhfefveeutefhudekleejgfeviedufefgleeuteeftedvieelleeinecuffhomhgrihhnpegrshgrnhdrshhopdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 X-Spam-Status: No, score=1.7 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLACK,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345306641195351?= X-GMAIL-MSGID: =?utf-8?q?1762345306641195351?= From: Tamir Duberstein ACPICA commit 8ea5ada64b48dada42dbd5f0f58a9ce18f882ede Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x000020d00518f81a in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:104 +0x2cd81a #1.2 0x00002348b567277f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x00002348b567277f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x00002348b567277f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x00002348b5673385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x00002348b5672ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000020d00518f81a in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:104 +0x2cd81a #5 0x000020d0051b8ea9 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6ea9 #6 0x000020d00518a806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #7 0x000020d005195ff2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3ff2 #8 0x000020d00519636d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d436d #9 0x000020d004fadd48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #10 0x000020d004fb394d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #11 0x000020d00503faf2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #12 0x000020d004f67b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #13 0x000020d004f796f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #14.1 0x000020d004f838ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #14 0x000020d004f838ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #15.2 0x000020d0051c896c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x30696c #15.1 0x000020d0051c896c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x30696c #15 0x000020d0051c896c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x30696c #16.1 0x00002061a33d3d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #16 0x00002061a33d3d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #17 0x00002061a33ccbc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #18 0x00002061a33cc8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #19 0x00002061a33bd6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #20 0x00002061a33c44c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #21 0x00002061a33c52c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #22.1 0x00002061a33d081e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #22 0x00002061a33d081e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #23 0x00002061a33cce7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #24.1 0x00002061a33c6964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #24 0x00002061a33c6964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #25 0x00002061a33c635d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #26.1 0x00002061a33d0c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #26 0x00002061a33d0c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #27.1 0x00002061a33f2ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #27 0x00002061a33f2ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #28 0x00002061a33f478f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #29 0x00004262135b7edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #30 0x00004262136e896d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/8ea5ada6 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/rslist.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/rslist.c b/drivers/acpi/acpica/rslist.c index e46efaa889cd..164c96e063c6 100644 --- a/drivers/acpi/acpica/rslist.c +++ b/drivers/acpi/acpica/rslist.c @@ -55,15 +55,21 @@ acpi_rs_convert_aml_to_resources(u8 * aml, aml_resource = ACPI_CAST_PTR(union aml_resource, aml); if (acpi_ut_get_resource_type(aml) == ACPI_RESOURCE_NAME_SERIAL_BUS) { - if (aml_resource->common_serial_bus.type > - AML_RESOURCE_MAX_SERIALBUSTYPE) { + + /* Avoid undefined behavior: member access within misaligned address */ + + struct aml_resource_common_serialbus common_serial_bus; + memcpy(&common_serial_bus, aml_resource, + sizeof(common_serial_bus)); + + if (common_serial_bus.type > AML_RESOURCE_MAX_SERIALBUSTYPE) { conversion_table = NULL; } else { /* This is an I2C, SPI, UART, or CSI2 serial_bus descriptor */ conversion_table = acpi_gbl_convert_resource_serial_bus_dispatch - [aml_resource->common_serial_bus.type]; + [common_serial_bus.type]; } } else { conversion_table = From patchwork Wed Apr 5 13:47:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79634 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp341996vqo; Wed, 5 Apr 2023 07:17:07 -0700 (PDT) X-Google-Smtp-Source: AKy350ZOO9m73njucMgXVVueMCjiLT9FDxnBxOYuLVRLfaU/AGOg7UneqRNPLIOks8VK/xBstmXb X-Received: by 2002:a05:6a20:3a93:b0:e7:4f8a:d04d with SMTP id d19-20020a056a203a9300b000e74f8ad04dmr2591258pzh.57.1680704227058; Wed, 05 Apr 2023 07:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704227; cv=none; d=google.com; s=arc-20160816; b=cixSEk8cqHFTVvofI65LCrm8ZaN2hgL+BVFtPpfpZHQ5vcREC+53YoPNsFKcPXk4P1 pncV3ZziNAghyYMKHqpMlmv3W0Rd4lkZeQrwIr6be+btlYoU9IAlgtXU6obSc5GxqNyu f+wpKAhCMbEee3s6MHoZlFU3Shfjh5D0/WHBRvSjXabZU9ZEW3RYcVCOshcGcqps4fqH IOzptgsi/i2bHfrEekCW6+6+R6cuEWrN5pdEacS6KaGHg35bRGf4VRqpli3VmRJdBR/t raKciDazDY9Y4a8TeYL6/itSM+ly0+Z63JYzhlhbOcc2EOzmvFlke7nKsN9rSs+uNcE2 /qYw== 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=Zpi+PXnNVF+Q9PoI6V8TarZeCDgmJz9JfJZM/trKEDM=; b=X2pVl0Gw13S8WXQrXnA5ISODr5wb4pbwhC4zYD9ra9e8xstJwoEX0joVsr9XlAyqHl lVEjYfSORCHysSEZ+ujWxZOIpP4PY9xLdS75ydtCD6zFhmSquaCcMnJndbdD5rQWmylZ rTJx2dFrRoHdsDQfjlOJp49fIwDUxMaVTmXDUcSAfblkNS3D2VBYKk001YUzh1qhFzT5 wJB/If7UKpA6jRxnhENd5XobkdHv/aS72hspW4fiIvPhAzAVHAOgyKK2SRU8sd063Tm5 HkyhP5vaKP6lyNuikUO0g8Pfupw6ud/amF+6prqMP/q2rks7l446Yq1XdubchZRKEPgr BOFA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g27-20020a63521b000000b005002c935408si12007763pgb.292.2023.04.05.07.16.52; Wed, 05 Apr 2023 07:17:07 -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 S238285AbjDEOCV convert rfc822-to-8bit (ORCPT + 99 others); Wed, 5 Apr 2023 10:02:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238242AbjDEOBn (ORCPT ); Wed, 5 Apr 2023 10:01:43 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1CE765AD; Wed, 5 Apr 2023 07:01:00 -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 9912572ad5d7b4d6; Wed, 5 Apr 2023 16:00:58 +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 B9AA71B4EA62; Wed, 5 Apr 2023 16:00:57 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 19/32] ACPICA: Avoid undefined behavior: load of misaligned address Date: Wed, 05 Apr 2023 15:47:18 +0200 Message-ID: <840381413.0ifERbkFSE@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepfeetteevgfelhfefveeutefhudekleejgfeviedufefgleeuteeftedvieelleeinecuffhomhgrihhnpegrshgrnhdrshhopdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=1.7 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLACK,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346115666593902?= X-GMAIL-MSGID: =?utf-8?q?1762346115666593902?= From: Tamir Duberstein ACPICA commit b3317239749d1907ec95e7aa2057d7ea29d3c638 Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x000020c1f68c9959 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:244 +0x2d0959 #1.2 0x000020e5d259f77f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000020e5d259f77f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000020e5d259f77f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000020e5d25a0385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000020e5d259fead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000020c1f68c9959 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:244 +0x2d0959 #5 0x000020c1f68c65a9 in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:137 +0x2cd5a9 #6 0x000020c1f68efda9 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6da9 #7 0x000020c1f68c1806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #8 0x000020c1f68ccef2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3ef2 #9 0x000020c1f68cd26d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d426d #10 0x000020c1f66e4d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #11 0x000020c1f66ea94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #12 0x000020c1f6776af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #13 0x000020c1f669eb44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #14 0x000020c1f66b06f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #15.1 0x000020c1f66ba8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #15 0x000020c1f66ba8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #16.2 0x000020c1f68ff86c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x30686c #16.1 0x000020c1f68ff86c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x30686c #16 0x000020c1f68ff86c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x30686c #17.1 0x000022d99b37bd91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #17 0x000022d99b37bd91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #18 0x000022d99b374bc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #19 0x000022d99b3748dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #20 0x000022d99b3656a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #21 0x000022d99b36c4c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #22 0x000022d99b36d2c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #23.1 0x000022d99b37881e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #23 0x000022d99b37881e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #24 0x000022d99b374e7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #25.1 0x000022d99b36e964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #25 0x000022d99b36e964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #26 0x000022d99b36e35d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #27.1 0x000022d99b378c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #27 0x000022d99b378c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #28.1 0x000022d99b39aead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #28 0x000022d99b39aead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #29 0x000022d99b39c78f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #30 0x00004230f4a33edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #31 0x00004230f4b6496d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d and #0 0x00002357f60edb6d in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:257 +0x2d0b6d #1.2 0x0000212756f4777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x0000212756f4777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x0000212756f4777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x0000212756f48385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x0000212756f47ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x00002357f60edb6d in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:257 +0x2d0b6d #5 0x00002357f60ea5a9 in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:137 +0x2cd5a9 #6 0x00002357f6113d09 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6d09 #7 0x00002357f60e5806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #8 0x00002357f60f0e52 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3e52 #9 0x00002357f60f11cd in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d41cd #10 0x00002357f5f08d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #11 0x00002357f5f0e94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #12 0x00002357f5f9aaf2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #13 0x00002357f5ec2b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #14 0x00002357f5ed46f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #15.1 0x00002357f5ede8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #15 0x00002357f5ede8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #16.2 0x00002357f61237cc in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x3067cc #16.1 0x00002357f61237cc in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3067cc #16 0x00002357f61237cc in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x3067cc #17.1 0x000023df096b1d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #17 0x000023df096b1d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #18 0x000023df096aabc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #19 0x000023df096aa8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #20 0x000023df0969b6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #21 0x000023df096a24c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #22 0x000023df096a32c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #23.1 0x000023df096ae81e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #23 0x000023df096ae81e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #24 0x000023df096aae7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #25.1 0x000023df096a4964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #25 0x000023df096a4964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #26 0x000023df096a435d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #27.1 0x000023df096aec00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #27 0x000023df096aec00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #28.1 0x000023df096d0ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #28 0x000023df096d0ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #29 0x000023df096d278f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #30 0x0000424c7690eedc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #31 0x0000424c76a3f96d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d and #0 0x000020883e0b9c01 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:334 +0x2d0c01 #1.2 0x000022cae2d8677f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000022cae2d8677f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000022cae2d8677f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000022cae2d87385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000022cae2d86ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000020883e0b9c01 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:334 +0x2d0c01 #5 0x000020883e0b65a9 in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:137 +0x2cd5a9 #6 0x000020883e0dfd89 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6d89 #7 0x000020883e0b1806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #8 0x000020883e0bced2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3ed2 #9 0x000020883e0bd24d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d424d #10 0x000020883ded4d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #11 0x000020883deda94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #12 0x000020883df66af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #13 0x000020883de8eb44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #14 0x000020883dea06f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #15.1 0x000020883deaa8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #15 0x000020883deaa8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #16.2 0x000020883e0ef84c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x30684c #16.1 0x000020883e0ef84c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x30684c #16 0x000020883e0ef84c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x30684c #17.1 0x000021ae7c20cd91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #17 0x000021ae7c20cd91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #18 0x000021ae7c205bc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #19 0x000021ae7c2058dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #20 0x000021ae7c1f66a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #21 0x000021ae7c1fd4c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #22 0x000021ae7c1fe2c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #23.1 0x000021ae7c20981e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #23 0x000021ae7c20981e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #24 0x000021ae7c205e7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #25.1 0x000021ae7c1ff964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #25 0x000021ae7c1ff964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #26 0x000021ae7c1ff35d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #27.1 0x000021ae7c209c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #27 0x000021ae7c209c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #28.1 0x000021ae7c22bead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #28 0x000021ae7c22bead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #29 0x000021ae7c22d78f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #30 0x000042b2518e3edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #31 0x000042b251a1496d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/b3317239 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/rsmisc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c index c2dd9aae4745..6e8e98cf598d 100644 --- a/drivers/acpi/acpica/rsmisc.c +++ b/drivers/acpi/acpica/rsmisc.c @@ -194,7 +194,8 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, case ACPI_RSC_COUNT_SERIAL_VEN: - item_count = ACPI_GET16(source) - info->value; + ACPI_MOVE_16_TO_16(&temp16, source); + item_count = temp16 - info->value; resource->length = resource->length + item_count; ACPI_SET16(destination, item_count); @@ -202,9 +203,10 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, case ACPI_RSC_COUNT_SERIAL_RES: + ACPI_MOVE_16_TO_16(&temp16, source); item_count = (aml_resource_length + sizeof(struct aml_resource_large_header)) - - ACPI_GET16(source) - info->value; + - temp16 - info->value; resource->length = resource->length + item_count; ACPI_SET16(destination, item_count); @@ -289,9 +291,9 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, /* Copy the resource_source string */ + ACPI_MOVE_16_TO_16(&temp16, source); source = - ACPI_ADD_PTR(void, aml, - (ACPI_GET16(source) + info->value)); + ACPI_ADD_PTR(void, aml, (temp16 + info->value)); acpi_rs_move_data(target, source, item_count, info->opcode); break; From patchwork Wed Apr 5 13:48:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79609 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp330951vqo; Wed, 5 Apr 2023 07:04:27 -0700 (PDT) X-Google-Smtp-Source: AKy350ZgmxfRGptxQYJkx1aHFUkJ9anR/WW9ZR2T0JIihCOiVl+Tuy5xiXXFZTZn7wqqjIwcq3e+ X-Received: by 2002:aa7:de8c:0:b0:4fa:785d:121 with SMTP id j12-20020aa7de8c000000b004fa785d0121mr1829665edv.16.1680703466903; Wed, 05 Apr 2023 07:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703466; cv=none; d=google.com; s=arc-20160816; b=SE8bNMbyD68LKA/MEWWGL8m2nmnA6kQJuZ8M0WuqYKj4a/A4OBtBxrpiH+KZhfTurF fVIfBYO7pew3DKoaJFK+3ltmf+u5m2EDBs4HMRk8mdOycz29JFQtwFSPTIY3VO2A7bLo DqP3Nzj8830JATN18irtf8ELm9VSMoEzeFBUntgtKFsETGsGu6CwS+iOQSEcpK40VLN6 pWWjwD5H/L7GIHxqcafOwwGEmmF9HwdZdki5WLc0dhquiAqLP7a1VHlE155d0PE5Q76y 3WY/2rVkh5wJxhy11j5QShmuFdOlbdbmfKpwnc5V8BND11cl4fNVqRreVN495NGzBBZS 9CXQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m22-20020a170906721600b008e6bdf85401si361516ejk.869.2023.04.05.07.03.52; Wed, 05 Apr 2023 07:04:26 -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 S238322AbjDEOCE (ORCPT + 99 others); Wed, 5 Apr 2023 10:02:04 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345318340095186?= X-GMAIL-MSGID: =?utf-8?q?1762345318340095186?= 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 { From patchwork Wed Apr 5 13:48:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp333233vqo; Wed, 5 Apr 2023 07:06:45 -0700 (PDT) X-Google-Smtp-Source: AKy350YQFLJMXvnbwneOAVvqKHyuy8i/0wnq4kDCNPMXoD3GY646xA/kSN6541Yocv3QRwUnU8kW X-Received: by 2002:a17:907:76a5:b0:92e:a1d8:bf1 with SMTP id jw5-20020a17090776a500b0092ea1d80bf1mr2934656ejc.13.1680703604894; Wed, 05 Apr 2023 07:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703604; cv=none; d=google.com; s=arc-20160816; b=w+G/Rx/aM8pks1cWEpAoLPtYhVDj/3HLSUr0ED5i81a/4dunrmUb75S+YFNVTQ45Gt 6omPmES2QLISDQdplighcqEAR+th2FK7SbC3az2+m09e6Dl7YU2VbxYcvmqhkMb91dvK HK01X+/gm7EbC0lE5yUFbu+hkkOslkxaME2qSWMKe7LLkh3RTZNns1JxigYlTjB+jKAI ps8BAcn4deNxWS7ip2he3GS4GWepx6kkGotzRnQ7e6HX2geiDwcYOqMJIGKb3ei5NBbA 1gakwXZ9TtFyjrxIyhD8N4wIKUFBsYFIs3KCc4hH8gObRLpxvjWrpxI+gxHjyMCWlCsR mAzw== 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=pzZY75IoHJgyP3WuTjxWqotOqtiWcJfb6Z6QBiqRcnw=; b=GxdVQEwG9CMloJrf18vOfbaGUvYoHljZpftBTYWrJRwgKMAlgDlu0T0okfImlFBHdI UgX+tDz7Nd8SZEQb17qNzGNmLN5rfOWb6RpyoAkElz2dS6mCqOveIKZ1hlCCtar1gZrI uN1vvsFf6UVFcfF3hw/dgfQox/5j1/THEKeEqBVL/KAtUb+MHzw3zjgArU8nezfBL8z3 rH/URRyZbZlJVMRbxb5F7kJotjvKFm3bKoQbqLpxUCVPbKTniiZDi5DCcC5IoK7s9V8A uyS6ZKMnUPOHb3KjHe6ga/0tvbaivL3ojG2NF0wdiGAPzXtbnmUniLbZpPimKWjFK/+b 7cuQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020aa7c608000000b004c698b50187si2196561edq.335.2023.04.05.07.06.19; Wed, 05 Apr 2023 07:06:44 -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 S238303AbjDEOBz (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238200AbjDEOBN (ORCPT ); Wed, 5 Apr 2023 10:01:13 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C7065FED; Wed, 5 Apr 2023 07:00:56 -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 80b6ae4ee35ab9c8; Wed, 5 Apr 2023 16:00:54 +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 EEAAE1B4EA62; Wed, 5 Apr 2023 16:00:53 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 21/32] ACPICA: actbl1: Replace 1-element arrays with flexible arrays Date: Wed, 05 Apr 2023 15:48:56 +0200 Message-ID: <2196047.NgBsaNRSFp@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345463548027262?= X-GMAIL-MSGID: =?utf-8?q?1762345463548027262?= From: Kees Cook ACPICA commit 8c9bd5d151f77767b2fd937911848b7159dc8ee9 Similar to "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 .text nor .data differences result from this change. Link: https://github.com/acpica/acpica/commit/8c9bd5d1 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl1.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 7a3ad28b86c6..6ee7437537db 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -944,7 +944,7 @@ struct acpi_table_drtm { struct acpi_drtm_vtable_list { u32 validated_table_count; - u64 validated_tables[1]; + u64 validated_tables[]; }; /* 2) Resources List (of Resource Descriptors) */ @@ -959,7 +959,7 @@ struct acpi_drtm_resource { struct acpi_drtm_resource_list { u32 resource_count; - struct acpi_drtm_resource resources[1]; + struct acpi_drtm_resource resources[]; }; /* 3) Platform-specific Identifiers List */ @@ -982,7 +982,7 @@ struct acpi_table_ecdt { struct acpi_generic_address data; /* Address of EC data register */ u32 uid; /* Unique ID - must be same as the EC _UID method */ u8 gpe; /* The GPE for the EC */ - u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ + u8 id[]; /* Full namepath of the EC in the ACPI namespace */ }; /******************************************************************************* From patchwork Wed Apr 5 13:50:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79642 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343640vqo; Wed, 5 Apr 2023 07:19:17 -0700 (PDT) X-Google-Smtp-Source: AKy350ZWCGHsGuskSy4fWIjbjiYTawFTnsAyGyK3zSJ7sqMuZ3PaIh0O9UFipaTpI9bNy+PKICga X-Received: by 2002:a17:902:b28a:b0:1a2:86c6:7b65 with SMTP id u10-20020a170902b28a00b001a286c67b65mr5842218plr.60.1680704357439; Wed, 05 Apr 2023 07:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704357; cv=none; d=google.com; s=arc-20160816; b=GIojinV9UYWq/aVTwm5jbEoRE7BWDDRQoZkdEJXQfb4KgoXv4v0jT67Cse/LQaC57p ldbIlNHBOtKa4BzUpS2j1PQqQsWg9ZwsyRT/Ev1KIJo1o68wR72uxCh7tDEZbSXk/QkC d/GsavG0OdUm7rpMilll1bHV38me8l1GtdnCD3kSuvZ7JggNGL6I1f1qTTOon32wbTzF 9ty2BZ7728XXd+AN0Rn13WH/Q/DKk5pycGHt9lrneBlgEV8mFfY1Xt/MQLAKtfIqIcO1 LwKwQ5aD2IgQfVeQgEMNm7AwotGn9UHP5PzmysiRcDQvvfbDdAnxAzCIvDxSerz1Kc05 zGQw== 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=KMfaSss/ItInhJ+FJ8ETBIdDkLv1mDXDaFobnObDV0A=; b=N/qpMAfAgTxP4WwjbRc9RTvSHk6TeNhU0Y7ZKjGWg3xLZUpsqbdEaLJ9bNtQvrsGlO 3D1x540lotzxqPezi8WvONWPfLn/3BMA+knhkAUbCRf+jF7NKVQbUvJwJFIy7LqpEs2w enoVr8Q20o3hlv7b684yam+eong+/QTbT8ro/ZWFbNgVqbVMb5yC1vofDN8c82nHg2tx lBBNpolNLZwTqyiVe+gMr3i0eS+EP28QLn+Xd8te/0sy3bCp2wIDe9LiOyACxiaT3Oox Q8kwOJNXDu3rYCX8sivf4fO1KV0ILLkQGh1HxDFPG4RJAJGJA2hPzkXLEtJoWrqsJNSC f94g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ld8-20020a170902fac800b001a1aa5d3babsi11954238plb.294.2023.04.05.07.19.05; Wed, 05 Apr 2023 07:19:17 -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 S238357AbjDEOBp (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238292AbjDEOBD (ORCPT ); Wed, 5 Apr 2023 10:01:03 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8838A659D; Wed, 5 Apr 2023 07:00:54 -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 dbc24bc88e5a9a01; Wed, 5 Apr 2023 16:00:52 +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 0B0B11B4EA62; Wed, 5 Apr 2023 16:00:52 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook , Dan Williams Subject: [PATCH 22/32] ACPICA: actbl2: Replace 1-element arrays with flexible arrays Date: Wed, 05 Apr 2023 15:50:18 +0200 Message-ID: <14903668.tv2OnDr8pf@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht fhhluhigrdhnvghtpdhrtghpthhtohepuggrnhdrjhdrfihilhhlihgrmhhssehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346252548774019?= X-GMAIL-MSGID: =?utf-8?q?1762346252548774019?= From: Kees Cook ACPICA commit 44f1af0664599e87bebc3a1260692baa27b2f264 Similar to "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). The sizeof() uses with struct acpi_nfit_flush_address and struct acpi_nfit_smbios have been adjusted to drop the open-coded subtraction of the trailing single element. The result is no binary differences in .text nor .data sections. Link: https://github.com/acpica/acpica/commit/44f1af06 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki Reviewed-by: Dan Williams Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c | 2 +- include/acpi/actbl2.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 4e48d6db05eb..981f8b0f595d 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -3477,7 +3477,7 @@ static __init int nfit_init(void) BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 64); BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48); BUILD_BUG_ON(sizeof(struct acpi_nfit_interleave) != 20); - BUILD_BUG_ON(sizeof(struct acpi_nfit_smbios) != 9); + BUILD_BUG_ON(sizeof(struct acpi_nfit_smbios) != 8); BUILD_BUG_ON(sizeof(struct acpi_nfit_control_region) != 80); BUILD_BUG_ON(sizeof(struct acpi_nfit_data_region) != 40); BUILD_BUG_ON(sizeof(struct acpi_nfit_capabilities) != 16); diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index db292f325696..6d3251ea4c53 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -397,7 +397,7 @@ struct acpi_iort_node { u32 identifier; u32 mapping_count; u32 mapping_offset; - char node_data[1]; + char node_data[]; }; /* Values for subtable Type above */ @@ -453,14 +453,14 @@ struct acpi_iort_memory_access { */ struct acpi_iort_its_group { u32 its_count; - u32 identifiers[1]; /* GIC ITS identifier array */ + u32 identifiers[]; /* GIC ITS identifier array */ }; struct acpi_iort_named_component { u32 node_flags; u64 memory_properties; /* Memory access properties */ u8 memory_address_limit; /* Memory address size limit */ - char device_name[1]; /* Path of namespace object */ + char device_name[]; /* Path of namespace object */ }; /* Masks for Flags field above */ @@ -474,7 +474,7 @@ struct acpi_iort_root_complex { u32 pci_segment_number; u8 memory_address_limit; /* Memory address size limit */ u16 pasid_capabilities; /* PASID Capabilities */ - u8 reserved[1]; /* Reserved, must be zero */ + u8 reserved[]; /* Reserved, must be zero */ }; /* Masks for ats_attribute field above */ @@ -496,7 +496,7 @@ struct acpi_iort_smmu { u32 context_interrupt_offset; u32 pmu_interrupt_count; u32 pmu_interrupt_offset; - u64 interrupts[1]; /* Interrupt array */ + u64 interrupts[]; /* Interrupt array */ }; /* Values for Model field above */ @@ -975,7 +975,7 @@ struct acpi_madt_local_sapic { u8 reserved[3]; /* Reserved, must be zero */ u32 lapic_flags; u32 uid; /* Numeric UID - ACPI 3.0 */ - char uid_string[1]; /* String UID - ACPI 3.0 */ + char uid_string[]; /* String UID - ACPI 3.0 */ }; /* 8: Platform Interrupt Source */ @@ -1708,7 +1708,7 @@ struct acpi_nfit_interleave { struct acpi_nfit_smbios { struct acpi_nfit_header header; u32 reserved; /* Reserved, must be zero */ - u8 data[1]; /* Variable length */ + u8 data[]; /* Variable length */ }; /* 4: NVDIMM Control Region Structure */ @@ -1765,7 +1765,7 @@ struct acpi_nfit_flush_address { u32 device_handle; u16 hint_count; u8 reserved[6]; /* Reserved, must be zero */ - u64 hint_address[1]; /* Variable length */ + u64 hint_address[]; /* Variable length */ }; /* 7: Platform Capabilities Structure */ From patchwork Wed Apr 5 13:51:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp346026vqo; Wed, 5 Apr 2023 07:22:29 -0700 (PDT) X-Google-Smtp-Source: AKy350ZQismmx+ELWSBO3H9I5Mn+nzubUKT4Gq1VU/jp0QSKD2TdwfLXT4I2kZt+g83r8BahhWih X-Received: by 2002:a05:6a21:868f:b0:d4:fcb2:7966 with SMTP id ox15-20020a056a21868f00b000d4fcb27966mr2753778pzb.11.1680704549040; Wed, 05 Apr 2023 07:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704549; cv=none; d=google.com; s=arc-20160816; b=jxZtJ9E+cEQOWn7HBUpnO3ASUp8xTR9oX3Xxv7CBgGLB0rTVjWYkuJX2dJ9WqaF2EF jLJuJSj7POhsWpHq4WeZMwbfRRJNvqZo76023PmcBZxaXQ7vyu+xt64vsroRDN2w5ajc V1LYXCSFXeoHgOGbXcoPNYHVdS7HpfXx2wXqtuAM1Bnt+MYYnidvx1e6RMV6VE+EMviD mn2ZXilFPPr0+TJDJywVrvcnLnqyCdLdfN1XsLOy8GKyWfC5pm05ENy21xlEKyDu9EqR QDLHyJdFaRZ/q7qdJ+sTabsrx2CP5lubR2wn1Ct6rbNEDwXAVBOXqmKg6AW57PezyBfx lzkQ== 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=A6FvSd3JGFigbHlJPqVT5mg94ehGHiiiGiumNqHZu9k=; b=Z2/vkgVJtvL/CMkbai/wzc9gumBotRLrgh9sc0vUS/AzI8/zXPUZizXC4SOGhPTr8X Qbkkgpv4N9k0zbI5IW+L5Btyhvm15oyevwKzvPbNcxHlo2nB4zL2nV36xkyTTAPkkUAm 3CgRJeTqEqIU4J2rdlDm/G8fH2ve7tGElPChRZD1eGa6KyTP6MF8aQnK2o4Ydpp5vrqw E257h2eWCPHmR+hEyJb2BlRE0wKMOG04ZawicyyXSc05eXZ4MNPb5EVwq81EUPgLx3Jj Q8MvocIbYNagKCNmq9qphGZJvQIOYsWSZ3bn7ije6qAMzyopkCchw9IAWMdpf0w/Mc64 DNOg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020aa795a1000000b0062ab3f36b11si12504830pfk.129.2023.04.05.07.22.16; Wed, 05 Apr 2023 07:22:29 -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 S238343AbjDEOBf (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238278AbjDEOBC (ORCPT ); Wed, 5 Apr 2023 10:01:02 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AB786182; Wed, 5 Apr 2023 07:00:52 -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 2baca87f8f83e7cf; Wed, 5 Apr 2023 16:00:51 +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 7FD111B4EA62; Wed, 5 Apr 2023 16:00:50 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook , Dan Williams Subject: [PATCH 23/32] ACPICA: struct acpi_nfit_interleave: Replace 1-element array with flexible array Date: Wed, 05 Apr 2023 15:51:25 +0200 Message-ID: <2652195.BddDVKsqQX@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht fhhluhigrdhnvghtpdhrtghpthhtohepuggrnhdrjhdrfihilhhlihgrmhhssehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346453163383941?= X-GMAIL-MSGID: =?utf-8?q?1762346453163383941?= From: Kees Cook ACPICA commit e66decc6fca36b59194b0947d87d6a9bec078bc3 Similar to "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). Unlike struct acpi_nfit_flush_address and struct acpi_nfit_smbios, which had their sizeof() uses adjusted in code, struct acpi_nfit_interleave did not. This appears to have been a bug. After this change, there is a binary difference in acpi_dm_dump_nfit() since the size of the structure now has the correct size, as the prior result was including the trailing U32: - mov $0x14,%ebp + mov $0x10,%ebp Link: https://github.com/acpica/acpica/commit/e66decc6 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki Reviewed-by: Dan Williams Tested-by: Dan Williams --- drivers/acpi/nfit/core.c | 2 +- include/acpi/actbl2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 981f8b0f595d..a398f32dfd68 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -3476,7 +3476,7 @@ static __init int nfit_init(void) BUILD_BUG_ON(sizeof(struct acpi_table_nfit) != 40); BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 64); BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48); - BUILD_BUG_ON(sizeof(struct acpi_nfit_interleave) != 20); + BUILD_BUG_ON(sizeof(struct acpi_nfit_interleave) != 16); BUILD_BUG_ON(sizeof(struct acpi_nfit_smbios) != 8); BUILD_BUG_ON(sizeof(struct acpi_nfit_control_region) != 80); BUILD_BUG_ON(sizeof(struct acpi_nfit_data_region) != 40); diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 6d3251ea4c53..a51fd4090d27 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1700,7 +1700,7 @@ struct acpi_nfit_interleave { u16 reserved; /* Reserved, must be zero */ u32 line_count; u32 line_size; - u32 line_offset[1]; /* Variable length */ + u32 line_offset[]; /* Variable length */ }; /* 3: SMBIOS Management Information Structure */ From patchwork Wed Apr 5 13:52:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79614 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp333195vqo; Wed, 5 Apr 2023 07:06:43 -0700 (PDT) X-Google-Smtp-Source: AKy350avde6kQBAv9164HFoN3pzOHQUW6Y7t/uf0obgQltm249u+1R9z45g/gImE1G2E4L4T9Jgm X-Received: by 2002:aa7:c64c:0:b0:502:100c:53a with SMTP id z12-20020aa7c64c000000b00502100c053amr1990202edr.41.1680703602646; Wed, 05 Apr 2023 07:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703602; cv=none; d=google.com; s=arc-20160816; b=QBpg9TXP+AaWTPuS+INYFUmq4sIZ1ZThagS1j5RQa2IWH4cOTEv402P33eLWVjIWu5 DJ/F8dTmnIB1+FUodNMZy0KFYGgh3QoE0aXnmzg11K5DclRcht2kqn+n5a1snKlOlhwY lr17Nn9QFAEc8KSRHFlvmfzy7zRpGMZ0EQQxFEKzkZe+YxmHtyZA991IpycP5r293RMI spKFpRNQPKdp3r44GZNmy9HZv0Cg6blASvYERH5jFmL0qkaUO+CcyuiRKXk7XDVRP4Dc l00q2B/fP0QRX8psekDhlNaJM03CkLbIr0xmHJu2PBSXrFEtSGPSs6RdSSNIqqHty3cL 8Ilg== 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=sbfRMAoUuLYYpb8z5zfyeisUSdGX3TAl7rxAgZEIEqU=; b=g7wwpkNxEXPxOx4BhbzyYtjo44NCTB7ttQkbWdEfxcmninnFb9kJ4xS8AO86RFz2BI h2VOuVjXIYxPetIggvEoWQsrrMv9wXAo4neEKj2ZKoErzEFRKd1T6bkjV7Aj6j2paAlD IbLK+SE2dGXIWBuQaM/PRNi+8gs3/8HKxL+bX8hlsF88hIT+PB2uviMU3YWP1we7l5mi ArIhPG2MY51tFQ0xeuPfBHt9kLnfRQ8dSz1Hbq3AhHIO9AWcqowhixJTYiDvVAunhsIL sTO+qXvdMD0ftjozqk15rN9a632wklAJe/xq1Tp+OrvsnDEgdeUOSSzYKwSMjGu0Z1nA xjng== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a50fa8c000000b0050245e7f729si2669878edr.615.2023.04.05.07.06.17; Wed, 05 Apr 2023 07:06:42 -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 S238265AbjDEOBP (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238237AbjDEOA5 (ORCPT ); Wed, 5 Apr 2023 10:00:57 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76E40619F; Wed, 5 Apr 2023 07:00:51 -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 7f235b38e99b158a; Wed, 5 Apr 2023 16:00:49 +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 0635D1B4EA62; Wed, 5 Apr 2023 16:00:48 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 24/32] ACPICA: Introduce ACPI_FLEX_ARRAY Date: Wed, 05 Apr 2023 15:52:23 +0200 Message-ID: <9164448.rMLUfLXkoz@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345460835765586?= X-GMAIL-MSGID: =?utf-8?q?1762345460835765586?= From: Kees Cook ACPICA commit e73b227e8e475c20cc394f237ea35d592fdf9ec3 In order to enable using -fstrict-flex-arrays with GCC and Clang in the Linux kernel, each trailing dynamically sized array must be defined as proper C99 "flexible array members" (FAM). Unfortunately, ACPICA has a bunch of technical debt, dating back to before even the GNU extension of 0-length arrays, meaning the code base has many 1-element and 0-length arrays defined at the end of structures that should actually be FAMs. One limitation of the C99 FAM specification is the accidental requirement that they cannot be in unions or alone in structs. There is no real-world reason for this, though, and, actually, the existing GNU extension permits this for 0-length arrays (which get treated as FAMs). Add the ACPI_FLEX_ARRAY() helper macro to work around this requirement so that FAMs can be defined in unions or alone in structs. Since this behavior still depends on GNU extensions, keep the macro specific to GCC (and Clang) builds. In this way, MSVC will continue to use 0-length arrays (since it does not support the union work-around). When MSVC grows support for this in the future, the macro can be updated. Link: https://github.com/acpica/acpica/commit/e73b227e Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actypes.h | 4 ++++ include/acpi/platform/acgcc.h | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index ce1db1c2e9d3..cf6ee2cb0eb9 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -1323,4 +1323,8 @@ typedef enum { #define ACPI_FALLTHROUGH do {} while(0) #endif +#ifndef ACPI_FLEX_ARRAY +#define ACPI_FLEX_ARRAY(TYPE, NAME) TYPE NAME[0] +#endif + #endif /* __ACTYPES_H__ */ diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index c9d418f9395e..04b4bf620517 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h @@ -61,4 +61,15 @@ #define ACPI_FALLTHROUGH __attribute__((__fallthrough__)) #endif +/* + * Flexible array members are not allowed to be part of a union under + * C99, but this is not for any technical reason. Work around the + * limitation. + */ +#define ACPI_FLEX_ARRAY(TYPE, NAME) \ + struct { \ + struct { } __Empty_ ## NAME; \ + TYPE NAME[]; \ + } + #endif /* __ACGCC_H__ */ From patchwork Wed Apr 5 13:53:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79643 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343811vqo; Wed, 5 Apr 2023 07:19:32 -0700 (PDT) X-Google-Smtp-Source: AKy350bNzJr/JPgfYeB9jB9SywJZZ/chCZYQ7W/jbPmujrjWO0z875wJIg1MPWeDwtj4ZaadGShh X-Received: by 2002:a17:902:e80d:b0:1a1:dfb6:b804 with SMTP id u13-20020a170902e80d00b001a1dfb6b804mr7621572plg.11.1680704372480; Wed, 05 Apr 2023 07:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704372; cv=none; d=google.com; s=arc-20160816; b=n+vMNYaca6BUgvF4Ue7Wj+JRXaJJfU19mfEg87fiURykVrPQ3TTpHwj9z59eEr4uLl Boil1lGveDu26TvEQ/0SwYWPkxPSwS9fyY9zMDmhTEW9szVlWhn2JJzWhXhK6kJ+YMji o8WEAQnqoSFbak+SvNkXfUHANqq/nyKlwhHuTHoLg8zT+k6AtSEw798+FZjFPv9WAJF3 S9ipzEM6DxFg+P3zDef2uhj/hGUoFtQA82gBgeNVgSlhToSwYUewfcJVi6Wuh/Ij+TTN 8TSGyrHSbo4CpyOxI91hCWERDyZVw2qQD+usn+XtyvzsxQcWktcHo7wQUfMmXYZIJXX+ jGaQ== 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=HN56+93jFXQkpc6gcQGmVk3yulxcx4JRx4yjtU47PXc=; b=RG2HowwYXFYXKL6Z+LrTIDSKpg7jOc6vPwA8B8kkGLcKVQi4atFdIfCq0VlJihAkjM UwlNZy3YV2ckxrpMNRa844uUS1gxi9wf2hiOOUFzY237nAitxntJdL+xKbd16RqieEqf 2fMtFNWjQ5SO+jMMqdpNQz9/fZEeRM/O/CgjYBSUNt27VtOXi23J1A2Rk4keg5QN9VJw pzt+w/1rfqjoSA6Xi2NfyEasWkBYMfkf/74YlIe1GPpM+qm1S3gmF9gylg7lBJYD4CNs PM7WrT+ge4g90WPSSH8NUa09enWOY1wtrzd6B8nN5J9UI83m2ZOwL0Jic12cY2RAarwd +fHg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a170903010a00b001a1799a0db6si11653403plc.63.2023.04.05.07.19.19; Wed, 05 Apr 2023 07:19:32 -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 S238225AbjDEOBK (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238212AbjDEOA4 (ORCPT ); Wed, 5 Apr 2023 10:00:56 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38336198; Wed, 5 Apr 2023 07:00:49 -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 61b86c548d00002b; Wed, 5 Apr 2023 16:00:48 +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 3CDD61B4EA5B; Wed, 5 Apr 2023 16:00:47 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 25/32] ACPICA: struct acpi_resource_dma: Replace 1-element array with flexible array Date: Wed, 05 Apr 2023 15:53:20 +0200 Message-ID: <4524051.cEBGB3zze1@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346267898683168?= X-GMAIL-MSGID: =?utf-8?q?1762346267898683168?= From: Kees Cook ACPICA commit 8409bb869a1790f6e02391c3f0eaf9c5fa63e33f Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99, but without changing the structure size. 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). As with IRQs, leave a single element in a union. No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/8409bb86 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acrestyp.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 77d735594ac2..52e82d65016b 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -150,7 +150,10 @@ struct acpi_resource_dma { u8 bus_master; u8 transfer; u8 channel_count; - u8 channels[1]; + union { + u8 channel; + ACPI_FLEX_ARRAY(u8, channels); + }; }; struct acpi_resource_start_dependent { From patchwork Wed Apr 5 13:54:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp330850vqo; Wed, 5 Apr 2023 07:04:20 -0700 (PDT) X-Google-Smtp-Source: AKy350bC8ZT/MOq+YSDkspEGnoDDAUZFlUBq0O3jRe2pbdiajy5KCM9SRXNXs0lXYqVsD08lpiMm X-Received: by 2002:a17:906:f1d5:b0:870:d9a:9ebb with SMTP id gx21-20020a170906f1d500b008700d9a9ebbmr3491589ejb.38.1680703460091; Wed, 05 Apr 2023 07:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703460; cv=none; d=google.com; s=arc-20160816; b=zxRvK0BLZxHg65Q5kpM6rDfo4buGQ3AP+Oq42k1zU7Q2mZgN2S2nxZGOpv+xYXEtMb khEaV1ytgXkRswAPa4Bmjesrk9nMKMlHzskmlKwfUsvs/mWuxFT8yMswZxN+F2aa4GIR GgzMNgKG8t5kJdWGA5A+/sCO7FJkoape2bV0jXtaTZZukRF+J/1Monwri4Pwe4PS5xpp sTFYDNK/UTDLynvpuSpGmSMVDDOHbli6t/gNfoXpeF1tu7civ16Kyugy0Tw8E7CW+y/v QRd5WL6/ggJQcz6+G6OynqIrPY9h7a9TSNeiDmMv9WjKUqAh+ubBFzDq+wVLIcYmijPk fOjA== 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=HYSMPMeHX/0HLWIE1l4pijnGU+H8cea/XdX8cwt5ORk=; b=PdEnqYa4HOmXsHWTPRrMNuGYYy2yYklOC6sYULz1FZ24WvgvD9Oze+TX36G8zTGxgk ATT/lY7RXD0tkmFJu7CaDs4f6jmcNdD4CfmjSWQ9ipzvSVOdEuNZm1dqLlm9DAs3DXPh 4yGOVmr4YJ4xEQwkmUtycAFETFI/ln+MhlJIaEZuwtXm6G4NxBFn2fU5XgiDa4OP2miF w2mJC1KJ1w8Oh2A62wJW6YjNKOPhtjpGpLpfLiJ8YY3E61P9lgrLWbEHSUJtmYE9tN01 +bbVZ29rluyDxeyB6ObBgp9GTj0q0gaH9VfVo+8DQIrNY5+8tfTOS6RyRyhEBM+yXPo+ OWaQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kw7-20020a170907770700b0093959594e50si2691436ejc.248.2023.04.05.07.03.47; Wed, 05 Apr 2023 07:04:20 -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 S237872AbjDEOBH (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237860AbjDEOAz (ORCPT ); Wed, 5 Apr 2023 10:00:55 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E45F5525D; Wed, 5 Apr 2023 07:00:47 -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 5d14c08f8e88d672; Wed, 5 Apr 2023 16:00:46 +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 911C91B4EA5B; Wed, 5 Apr 2023 16:00:45 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 26/32] ACPICA: acpi_pci_routing_table: Replace fixed-size array with flex array member Date: Wed, 05 Apr 2023 15:54:25 +0200 Message-ID: <2656292.X9hSmTKtgW@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345311482203369?= X-GMAIL-MSGID: =?utf-8?q?1762345311482203369?= From: Kees Cook ACPICA commit f4a3afd78c28dede0907f47951f0b73c9a776d4e The "Source" array is actually a dynamically sized array, but it is defined as a fixed-size 4 byte array. This results in tripping both compile-time and run-time bounds checkers (e.g. via either __builtin_object_size() or -fsanitize=bounds). To retain the padding, create a union with an unused Pad variable of size 4, and redefine Source as a proper flexible array member. No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/f4a3afd7 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acrestyp.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 52e82d65016b..4c3b7b393f82 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -693,7 +693,10 @@ struct acpi_pci_routing_table { u32 pin; u64 address; /* here for 64-bit alignment */ u32 source_index; - char source[4]; /* pad to 64 bits so sizeof() works in all cases */ + union { + char pad[4]; /* pad to 64 bits so sizeof() works in all cases */ + ACPI_FLEX_ARRAY(char, source); + }; }; #endif /* __ACRESTYP_H__ */ From patchwork Wed Apr 5 13:55:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79655 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp345115vqo; Wed, 5 Apr 2023 07:21:16 -0700 (PDT) X-Google-Smtp-Source: AKy350acqb3k+utlRWyapAKYXqTXAEYAR2vVVA6JwuW7zr2DzIXgUA3bHcEhEnygzoWgmOX2Ohhc X-Received: by 2002:a05:6a20:7523:b0:da:5ef4:69f5 with SMTP id r35-20020a056a20752300b000da5ef469f5mr4853745pzd.21.1680704476332; Wed, 05 Apr 2023 07:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704476; cv=none; d=google.com; s=arc-20160816; b=TSg4sc5gcTmJUYoQzcsJthBkJ0pDBcBZNmNHJrqpiCrMVUAiJRfTxyyGjqLIcqJvya /ByBFBNFLbKPMVg41H4+X3SQ2x4KA+HNnhCZo98Ru8zlBN4B1tcTJNZkxASwVMX6E74V 9gTCNvQVgm6intbdrg1LQNkya3TTNms+7xfevYbdjg702TrMR2aLdBuMCWzCV+UV1Bog PGE+O/u+WMzvLtkORa6o4OFz7mxshrAwSAJadzYnDtrOj/RSKwI394V/j3T47/KztkFO oRoV9jdX9eBbQtCP9VR3H1UbSZRiSSc8cW/M2X7Wa5FZ+j70FSewIp4vVS0HhXZsUjBT N9ZA== 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=vecJ8liaxAOeAjtJ/0BEdJGIEdMyyXbCMhngB9aENUI=; b=rT3nc8E1B7CNKqvRfYFqABCVvAvH1l0+nw94V9Yot43FunK9mWy9Zu/bnTmqLgmnYL bHQO6IauwiukmN0YjajcdoXP98BR99ECxLZbdAmML2i7PGmN6j9MAJZTGT+envy/dvcP w5zy/btL4lijmfLN+zSVLkFBc5KBE56M3BIzLwEBu7SMraTBrweG5bjVjAC6RwLqDDgJ ClLWRVGeZUoE0dynWAIyG36RZcO+n2PkF4CW7+L1OsDuG5C94q82p0CowA/2tNCuT0XO HQXn1kKmr7wtPEhhfT/XJSHQFwoG2UAgOCcD1Rn85yKoFI7pAZBiDHIclDxBMUgMY0AE ugwg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c134-20020a621c8c000000b0062ae6345c78si12632441pfc.403.2023.04.05.07.21.02; Wed, 05 Apr 2023 07:21:16 -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 S238183AbjDEOBE (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237218AbjDEOAz (ORCPT ); Wed, 5 Apr 2023 10:00:55 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C51759C4; Wed, 5 Apr 2023 07:00:46 -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 1656c586a3f367bf; Wed, 5 Apr 2023 16:00:44 +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 114041B4EA5B; Wed, 5 Apr 2023 16:00:43 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 27/32] ACPICA: acpi_dmar_andd: Replace 1-element array with flexible array Date: Wed, 05 Apr 2023 15:55:13 +0200 Message-ID: <13264075.dW097sEU6C@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346376953526479?= X-GMAIL-MSGID: =?utf-8?q?1762346376953526479?= From: Kees Cook ACPICA commit 3c19ae70424e9ab1e1b805203d300d2660f9a2f7 Similar to "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). The handling of struct acpi_dmar_andd by acpi_dm_dump_dmar() appears to expect a single trailing char for calculating table offsets. Keep a char in the union to avoid any code changes appearing in the .text or .data sections. Link: https://github.com/acpica/acpica/commit/3c19ae70 Signed-off-by: Kees Cook Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl1.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 6ee7437537db..58b0490a2ad1 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -901,7 +901,10 @@ struct acpi_dmar_andd { struct acpi_dmar_header header; u8 reserved[3]; u8 device_number; - char device_name[1]; + union { + char __pad; + ACPI_FLEX_ARRAY(char, device_name); + }; }; /* 5: SOC Integrated Address Translation Cache Reporting Structure */ From patchwork Wed Apr 5 13:56:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79651 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344629vqo; Wed, 5 Apr 2023 07:20:37 -0700 (PDT) X-Google-Smtp-Source: AKy350ZbglqaGqJX5V70AuFWIrI4HrXq5q1mohZtU6XarlC1Q3BSQ90dtpb1+rp8WGzUIuKqzM82 X-Received: by 2002:a17:903:3093:b0:1a1:f5dd:2dd5 with SMTP id u19-20020a170903309300b001a1f5dd2dd5mr5621827plc.13.1680704437458; Wed, 05 Apr 2023 07:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704437; cv=none; d=google.com; s=arc-20160816; b=obBo6Jm9Mc3xusi0LQSDM9764fGw8njXVw+BP8l9OcfzXlmYDOUu3+j6khJRWRHRa4 vOLKl9j1U8bHiWiSlp/USjsTOnEpd9+dHo4kvcrRkid/8BLqVcnkZCZCcTMVge+XhKyU NXeJEdvnpgOPygy75AbjL94S9kWozbY35QkqWMS4NLmLqMdrezXTbk3q04lmX36ZaOUu kctnUAgr6kRK6F9YjT6hUPOuarntZEZWX/XIzGPqWA+sTZdE6vQ0ktZ4cI6bMrnr8Let eOyRYpURq72GqjCTJTWqMPKCEvQgkOZozEon6zKfgVPbVEoHzlJLq6DUN1H0R+AwIIH3 lYOw== 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=8k+ea+emh7/8/N6py13AFOKb8HPDuudO8BKgg0M86zc=; b=waavbvR/62VYXqslYtiLgD0to7ZZbuRe1pCmXOGnA/9ZKuOX39KUf56H6h8lIzJ2kQ Z0b6CHg3wtCRtR/zWVJ3KH+3iu53JBXnrbuCrkBWyMls43IW6ON+Wc0a05ThxIPv5nLi /wsijOw0lSIlWg7Co/sP29i0VyMfmuNUdl2jeczgqe42VrEZ1r1MFFjEpo2dgRM0EX5y DrK673DDZz0d599laLwVB2ir2x9YnRsUY0sPBSsba8XH4hO6j7MW69k9ZWDki5TWO4Ba v5NqtbVIIxphlm10FRrV/1xYMHQhpFJDoCBBuoYG8UkXfaKpH80Hp05joUFCHOoqAGIN 4jPQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a170902db1200b001a1e867f287si12506591plx.460.2023.04.05.07.20.25; Wed, 05 Apr 2023 07:20:37 -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 S238257AbjDEOBB (ORCPT + 99 others); Wed, 5 Apr 2023 10:01:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238199AbjDEOAq (ORCPT ); Wed, 5 Apr 2023 10:00:46 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFDBD1BDD; Wed, 5 Apr 2023 07:00:44 -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 942f2422d11c465e; Wed, 5 Apr 2023 16:00:43 +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 8BB6E1B4EA5B; Wed, 5 Apr 2023 16:00:42 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 28/32] ACPICA: acpi_madt_oem_data: Fix flexible array member definition Date: Wed, 05 Apr 2023 15:56:06 +0200 Message-ID: <2094939.KlZ2vcFHjT@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346336305724701?= X-GMAIL-MSGID: =?utf-8?q?1762346336305724701?= From: Kees Cook ACPICA commit e7f6d8c1b7f79eb4b9b07f1bc09c549a2acbd6e8 Use ACPI_FLEX_ARRAY() helper to define flexible array member alone in a struct. Fixes issue #812. No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/e7f6d8c1 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index a51fd4090d27..0029336775a9 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1274,7 +1274,7 @@ enum acpi_madt_rintc_version { /* 80: OEM data */ struct acpi_madt_oem_data { - u8 oem_data[0]; + ACPI_FLEX_ARRAY(u8, oem_data); }; /* From patchwork Wed Apr 5 13:56:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79645 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344054vqo; Wed, 5 Apr 2023 07:19:51 -0700 (PDT) X-Google-Smtp-Source: AKy350b8RNAWEz9uXN6fftO2RBo5U8BZTIJZAGUpiWBEyFvwUopu/2XJ6v4cRziPaRj8uGjQYs8l X-Received: by 2002:aa7:970d:0:b0:627:e024:98ca with SMTP id a13-20020aa7970d000000b00627e02498camr5424142pfg.32.1680704391460; Wed, 05 Apr 2023 07:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704391; cv=none; d=google.com; s=arc-20160816; b=POKAYqYw/NrX8gW334wknNuzD/7Ga1nVMFtl3fXmlQgh+1Op7imj2RH87AlIiCgd6k ZfbOzaIDKJZhLJ61lWfT9ycm0W8wpqWOz59zY0rt4U0x1LhieGbZhHuZkshtqkGvAvbt X98JCkQArop+AC86hrTlTGn6vpGKQr6B5MAtwzVpa2aX4dSdGj7fn48GI2t9ugk9wTAS DMxS2EONe7akMJnp46wjIYSliw871nWzo/NCxCplQkx79f7wgLwF9HYR8dUe8CS/klad PuQjjMK0mYMiTMMONFyVOuZcWxdkdZ4DM9HtfBH22uVKqgC1EACC4He7SY03MH8Nbsoh 8npg== 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=tO+bXxw5lxVmZmAFpzL2DOv91Gl7+4UE5Bf6SNws8eQ=; b=yMZ38YMc+MUN60JjJu8huIXknSuFb+8vGziwLMGYxDbempxrxg5W6Oi+/eHvzaqRBn iqG9tQPJtcUFO6SrV+qEMCbT/5fuS5IenZZoEBUfCqyqyO3EtNlKPD+0+HxgngzWomXV ydF/4onjTa8TMJGs9IsTrz6K7EspswJEY3AZViHTa/NxX7gu7edoq3RxU9OIddpnq24/ 8zoEfQ5AG/muL/v62VCzXRfXuMQslMzbuJLUeWeLI+u3T4k/0RnLfg72xbYoiC4+brR6 /XU1Fxc8nJ/S9Hw/MRLZmQXJAx9gyiN7moDxrAd5E0y8RbBa9FctO+OOK7G6ahBiDZBI r+uw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 131-20020a630289000000b005139713f0ffsi13071673pgc.805.2023.04.05.07.19.38; Wed, 05 Apr 2023 07:19:51 -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 S238230AbjDEOA5 (ORCPT + 99 others); Wed, 5 Apr 2023 10:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238151AbjDEOAp (ORCPT ); Wed, 5 Apr 2023 10:00:45 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A4E04C19; Wed, 5 Apr 2023 07:00:43 -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 1a7314477c9562e1; Wed, 5 Apr 2023 16:00:41 +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 E3CF01B4EA57; Wed, 5 Apr 2023 16:00:40 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Kees Cook Subject: [PATCH 29/32] ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array Date: Wed, 05 Apr 2023 15:56:59 +0200 Message-ID: <2105135.bB369e8A3T@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepkhgvvghssehouhht 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346287738924863?= X-GMAIL-MSGID: =?utf-8?q?1762346287738924863?= From: Kees Cook ACPICA commit bfdd3446e7caf795c85c70326c137023942972c5 Similar to "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). Note that the spec requires there be at least one interrupt, so use a union to keep space allocated for this. The only binary change in .text and .data sections is some rearrangement by the compiler of acpi_dm_address_common(), but appears to be harmless. Link: https://github.com/acpica/acpica/commit/bfdd3446 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/amlresrc.h | 5 ++++- include/acpi/acrestyp.h | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index 48df447ef5bb..4e88f9fc2a28 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h @@ -261,7 +261,10 @@ struct aml_resource_address16 { struct aml_resource_extended_irq { AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; u8 interrupt_count; - u32 interrupts[1]; + union { + u32 interrupt; + ACPI_FLEX_ARRAY(u32, interrupts); + }; /* res_source_index, res_source optional fields follow */ }; diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 4c3b7b393f82..b84cd316217f 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -142,7 +142,10 @@ struct acpi_resource_irq { u8 shareable; u8 wake_capable; u8 interrupt_count; - u8 interrupts[1]; + union { + u8 interrupt; + ACPI_FLEX_ARRAY(u8, interrupts); + }; }; struct acpi_resource_dma { @@ -335,7 +338,10 @@ struct acpi_resource_extended_irq { u8 wake_capable; u8 interrupt_count; struct acpi_resource_source resource_source; - u32 interrupts[1]; + union { + u32 interrupt; + ACPI_FLEX_ARRAY(u32, interrupts); + }; }; struct acpi_resource_generic_register { From patchwork Wed Apr 5 13:57:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79661 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp345710vqo; Wed, 5 Apr 2023 07:22:03 -0700 (PDT) X-Google-Smtp-Source: AKy350ZI3RuCPyDNF0mkEB9c1fWwLXxsUHnxtNYHycPXlGVjZuK2EeiF0EQ1GIcfQ9QgCvJ9jRE5 X-Received: by 2002:a17:902:cec5:b0:19c:bcb1:d8c3 with SMTP id d5-20020a170902cec500b0019cbcb1d8c3mr7546636plg.54.1680704523417; Wed, 05 Apr 2023 07:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704523; cv=none; d=google.com; s=arc-20160816; b=pR/Z5J5BlzwXBbj3SwnN1r9BWY+KQgjhgUWqIT86VxsWR0sbC5zC6R6VGb7ZcoOjaK NSo5Uk/qE8oaVe9vIybiBWZVNzkduF8Jb2k/86oAEdAnIi4G2bBcPplDnzlcMm5HNpON 4ISwojJ5X9S0owZ0T9Wuw9HwAI+TDi+v/E0coEpdcS/uLPgUdere/5IB/3hBi7SZMkVV VCZGA1pOsKnOApYaoA0XMw7Vd3NLKDjjviUop7inat87Zet6uruRQJ7W2hvznsmvnK/g Nw+Rq1RfrnJR9lyU0SngTechnuVQb1H+QJTUqWsnxLxGsWg5brFVuVuyVo8O/25Bxbfu hEKQ== 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=A9j4Dy4j5hqa3xtUvECBaY59L/Bdcpss3s4DZ+YqOa4=; b=gE2DAwwFH/HEsWT9FDfpfu2TIdAAUUqihub2EKir2+zR8on4AY5AeDF01Hu76U9B1I 1Dx/7TXk8EdzBv6t3BuICaOMNpA94JykuvnNFJyvSVYLb3A/slw094Ki0hNPD87KpoYT 0YhUtNIBxFHXLgnwIriQ2Go71YDdJHqj8toaizzbKMYar0nmwR6ahpsxHt4KLfACpjxv 8rPtSB5NnIh/7W0TmWRvDDEkKaBFF77QGzfyEy1rZBP+aJ2sOu2C+gX1huTLabwMrsfO 9X7qI9XOA76EGWmiztGTX+m1iRmCKIJN19FdO/sPkVu9oyDq83L1itfUWiCLHg3q5jHE aRSg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a170902864700b001a046724ae4si11936260plt.238.2023.04.05.07.21.49; Wed, 05 Apr 2023 07:22:03 -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 S238037AbjDEOAs (ORCPT + 99 others); Wed, 5 Apr 2023 10:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238144AbjDEOAm (ORCPT ); Wed, 5 Apr 2023 10:00:42 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7188613E; Wed, 5 Apr 2023 07:00:41 -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 dcf2d61551abffaa; Wed, 5 Apr 2023 16:00:39 +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 42FEE1B4EA57; Wed, 5 Apr 2023 16:00:39 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 30/32] ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects Date: Wed, 05 Apr 2023 15:57:57 +0200 Message-ID: <3219383.AJdgDx1Vlc@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346426639733125?= X-GMAIL-MSGID: =?utf-8?q?1762346426639733125?= From: void0red <30990023+void0red@users.noreply.github.com> ACPICA commit 0d5f467d6a0ba852ea3aad68663cbcbd43300fd4 ACPI_ALLOCATE_ZEROED may fails, object_info might be null and will cause null pointer dereference later. Link: https://github.com/acpica/acpica/commit/0d5f467d Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/dbnames.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/acpica/dbnames.c b/drivers/acpi/acpica/dbnames.c index 3615e1a6efd8..b91155ea9c34 100644 --- a/drivers/acpi/acpica/dbnames.c +++ b/drivers/acpi/acpica/dbnames.c @@ -652,6 +652,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg) object_info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info)); + if (!object_info) + return (AE_NO_MEMORY); + /* Walk the namespace from the root */ (void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, From patchwork Wed Apr 5 13:59:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79637 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343311vqo; Wed, 5 Apr 2023 07:18:47 -0700 (PDT) X-Google-Smtp-Source: AKy350YyctHY3am6XD9QFbpgLcwKu1EyQSTrjE4H04PotSyh2picHp9yiq3xw+u2Pak6m8H+8IdB X-Received: by 2002:a17:90b:4d09:b0:241:c25:14c0 with SMTP id mw9-20020a17090b4d0900b002410c2514c0mr6818056pjb.24.1680704327532; Wed, 05 Apr 2023 07:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704327; cv=none; d=google.com; s=arc-20160816; b=PoX5cO7Bxf0nRyocWvYQ1RiKdqgd7rRRVM9aP98tXhcpkzGJIH/TQSWHEPK0UKqUnz iHrSonLiQDX1gjlNqrj3BJtT3G15VAyIEJMBoYsNexXMZPvzGgp1gSo7hikOtaPhm2KV GDc3UEu9wPdEjoyBkSuDkklUqxMXnrUSCY5W5tNWpazdx7kOJpgF7/KXhwV8cO7sRqcu AFPugtDRbqUcwftDzgju87OQCH1XrRLlPUMKPzZCjyCsTbb8xeyG1zRqmbjXHWTEVIE4 Vjm4H0t4gBR4hsoyLdziYcVPn1OqwjoaFPcEh7fbBamGLwrr5VkBofxB3XH2rj9P9Uk4 Vt4w== 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=eVnSb1iZ+x+TEkKcjlvDcIH4gcExH03B4IwDgX1wYs4=; b=bkOK+yAKRM8iS4vVq+R9Ak24uwek8KaPkwejyziUOQSO9+aTKzt7vSoxOTByDm3QjP UC/BjRH0ugAKJ2scZWVU9k5NJ6Z2ycq685JGNfO4YEBsHQQaHBRh6YS4xmQ5XIIBpZl3 cC+NUgDN9Df7a7nJ76tmS5zsa7PntUB5RbqHXxm0fv7r5pALghBX698K3IsvhUp2/3uI +IgL8cLoKRLNltaItvwOYzhn17Z34BymJH8U8XIYgqRkUIyzoogBZn9bXuVQgganlxAH BOB2JLLG2avjZXvMJWArcbSHcWgnVAOMP72iZYyME6pKNfb9jtKiz6pC0IgusDeTMp/A KIng== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a17090abd0f00b002340f45c0ffsi1418663pjr.90.2023.04.05.07.18.34; Wed, 05 Apr 2023 07:18:47 -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 S238153AbjDEOAp (ORCPT + 99 others); Wed, 5 Apr 2023 10:00:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237980AbjDEOAl (ORCPT ); Wed, 5 Apr 2023 10:00:41 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D961AE5D; Wed, 5 Apr 2023 07:00:39 -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 6ad874797a78371e; Wed, 5 Apr 2023 16:00:38 +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 7E7D81B4EA57; Wed, 5 Apr 2023 16:00:37 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 31/32] ACPICA: add os specific support for Zephyr RTOS Date: Wed, 05 Apr 2023 15:59:00 +0200 Message-ID: <6519395.G0QQBjFxQf@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346220954676751?= X-GMAIL-MSGID: =?utf-8?q?1762346220954676751?= From: Najumon ACPICA commit 463d30f0a8edc5dccad20c2d189dc55111d51aae The acpica will be integrated as module into Zephyr project for enable acpi bus driver. This patch is for enable os specific support layer for Zephyr. Link: https://github.com/acpica/acpica/commit/463d30f0 Signed-off-by: Najumon Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/platform/acenv.h | 2 ++ include/acpi/platform/aczephyr.h | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 include/acpi/platform/aczephyr.h diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 0fa7bbf85c83..337ffa931ee8 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -209,6 +209,8 @@ #elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI) #include "acefi.h" +#elif defined(__ZEPHYR__) +#include "aczephyr.h" #else /* Unknown environment */ diff --git a/include/acpi/platform/aczephyr.h b/include/acpi/platform/aczephyr.h new file mode 100644 index 000000000000..2f0d30c3c5fd --- /dev/null +++ b/include/acpi/platform/aczephyr.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ +/****************************************************************************** + * + * Module Name: aczephyr.h - OS specific defines, etc. + * + * Copyright (C) 2000 - 2023, Intel Corp. + * + *****************************************************************************/ + +#ifndef __ACZEPHYR_H__ +#define __ACZEPHYR_H__ + +#define SEEK_SET FS_SEEK_SET +#define SEEK_END FS_SEEK_END + +#define ACPI_MACHINE_WIDTH 64 + +#define ACPI_NO_ERROR_MESSAGES +#undef ACPI_DEBUG_OUTPUT +#define ACPI_USE_SYSTEM_CLIBRARY +#undef ACPI_DBG_TRACK_ALLOCATIONS +#define ACPI_SINGLE_THREADED +#define ACPI_USE_NATIVE_RSDP_POINTER + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/****************************************************************************** + * + * FUNCTION: acpi_enable_dbg_print + * + * PARAMETERS: Enable, - Enable/Disable debug print + * + * RETURN: None + * + * DESCRIPTION: Enable/disable debug print + * + *****************************************************************************/ + +void acpi_enable_dbg_print(bool enable); +#endif From patchwork Wed Apr 5 13:59:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79606 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp330377vqo; Wed, 5 Apr 2023 07:03:47 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4DYJjknrsbwvmZIWgTV891tv1pqQtigdvWqvVmFqkqsWYjY1FfNMyWzgyYZerxPu6pYlB X-Received: by 2002:a17:906:9be0:b0:945:5510:2b9f with SMTP id de32-20020a1709069be000b0094555102b9fmr3381071ejc.54.1680703427040; Wed, 05 Apr 2023 07:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703427; cv=none; d=google.com; s=arc-20160816; b=XTfd1iOz/yf+vDoDCJTvraSUoHuMNqxcOefuc+HFz73b+LO+KIwdB7bioE8k0lU1F5 BZSdlHbY0zRuA8ouz9ouEYMzKWGTmNBzGarn9hflG6MXBqkb6r5z6ycAegaCzYYaGFak E/mVynw9yaaEg/sy3vW6y3zyQ9qpVk5ISSpljwrDVw79HCzSbkP2z/cUMCTpo4q0CLxV iVZj7YiS8dXRgVLXlBPvvbEi//IKkeH9sgiyAggMSI75lqLEwzxmAzZqnVXkdUPPlipp APwAOdncAeyAQitqwzmFNH5Pm4JDswVcleqjfHhuPncgNVnaCml/0ZLQYaP1rDuW2xlF mTDw== 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=QdKwtcwdayGrsZtMMS4Ehet7ICMEphYCHe86WDkLtg4=; b=hgjExMVSYCdFPd0sjUGo9qvfpvCzBZJwfUna1yE6ydQqPx1BMzfabHrZot9iBSIjZV RYnq2P/T1BJeXvLVzzfIyUB5/dXAGKi7NERjqCde6km//9WOdU3Q2wbskYoK85R/+YAS qo6xikn7oiNbZShHiJLYGAyIU2pdRN6A4w9Qaey89+2MlRxIvPe2IVFBxTokUUIyt70O +mkoeuzfL5+kf2ou+6ezBOlZio+cgMzyAbbtViTVa1h7LTa1ZJMB+NU/uIlfU7sZHw76 DT3fj5mbnq0/9V7OeDttOvK2w6Fi26GhLcP0yZQB9s10cUtdle/D2UyeNM9Jdl49UM4f o/MA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m26-20020aa7c2da000000b004fbf06895ffsi12896778edp.329.2023.04.05.07.03.15; Wed, 05 Apr 2023 07:03:47 -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 S238081AbjDEOAl (ORCPT + 99 others); Wed, 5 Apr 2023 10:00:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237965AbjDEOAj (ORCPT ); Wed, 5 Apr 2023 10:00:39 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B31613E; Wed, 5 Apr 2023 07:00:38 -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 7fbc18f8911fe2e6; Wed, 5 Apr 2023 16:00:36 +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 A138C1B4EA47; Wed, 5 Apr 2023 16:00:35 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 32/32] ACPICA: Update version to 20230331 Date: Wed, 05 Apr 2023 15:59:37 +0200 Message-ID: <38227993.10thIPus4b@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762345276538156010?= X-GMAIL-MSGID: =?utf-8?q?1762345276538156010?= From: Bob Moore ACPICA commit 4578e0e94d945e56547749316691017880c8ee74 Version 20230331. Link: https://github.com/acpica/acpica/commit/4578e0e9 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index c961f0d99c5e..e6098a08c914 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -12,7 +12,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20221020 +#define ACPI_CA_VERSION 0x20230331 #include #include