Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1230232imm; Mon, 9 Jul 2018 20:45:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeESIvWP0q3iSnvLc3qqzHjPBiQqF8nkYpJIyJ6GvI8PG3rf+RyiQjd2at5nsd+EsdM9kr8 X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr23234266plb.273.1531194310309; Mon, 09 Jul 2018 20:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531194310; cv=none; d=google.com; s=arc-20160816; b=Sa3r5HKNRYs0Cl95njZnCDw+IuYMdDccppTTCqwuf53KC+3/kGPD+qDTReTvj5UGUv 5BS1W3ZpFwaXcbMHzkYvwhOTahvnY+g/qTehrfzamUurCah+uBTmBhOutANDg1KLhkcH 6kBF+6tbZuCa/rjISLiQwgoMR1SAO2v0T6gJQxFb3SloV5Fje3Es609gFSrfJ7ZSOg8s a8igMWuFjvOE39iHjUxjvn0p4Y9tmb7xfba7AuGNO5X6Dz+dlVxomChReXz33Ee9rqkJ /98Ec4t7ns0cKciYpH+8+lmMA6HqmyoBGk2AU4SH59VfxCTw68PipscCggNPjEbgiPjR PUrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=kcEvL323p9I73fo359j8yvVYN1JwxPDlFF9/XxXDHqA=; b=eG+aANA5Y0mMGvPDAQ/pvrUHystmvSb2rhlIbo/u5VsZzuq3BurDOez3jTs27OrzDF duF6bdEfxDYeZiRbBzHJkJRzD1vneLPjY6zd48DvelTylTnc1RF6x4mMd3sVCCaB+9Bs jDaZNtye5Hw08ZIJTGZzovFXia+RW2JuVl1tOQRNlaOeZV/+bX4ZHVulGWjcGitOLhPk WBsopz16hwGY+vNJUWkRB16crnz6EoCKf94eeZ0UGI2lHa3bFmsNTc62lhgDgzazbosi o244rIwJG3SSrVEcLtSPeWYurvCqEpHdiN2p14Sur/5gi4wqZRqdvzXY7zn/VVcBzYaQ ijxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q67-v6si14733786pga.63.2018.07.09.20.44.55; Mon, 09 Jul 2018 20:45:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933218AbeGJDoN (ORCPT + 99 others); Mon, 9 Jul 2018 23:44:13 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40270 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932939AbeGJDoH (ORCPT ); Mon, 9 Jul 2018 23:44:07 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E827A7A9; Mon, 9 Jul 2018 20:44:06 -0700 (PDT) Received: from [10.119.48.106] (unknown [10.119.48.106]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 494CB3F5A0; Mon, 9 Jul 2018 20:44:06 -0700 (PDT) Subject: Re: 4.18rc3 TX2 boot failure with "ACPICA: AML parser: attempt to continue loading table after error" To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , "Schmauss, Erik" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Lorenzo Pieralisi References: <6074707.jx9F3QFrWC@aspire.rjw.lan> From: Jeremy Linton Message-ID: <218e4339-477d-eb0d-6007-764c8e24229f@arm.com> Date: Mon, 9 Jul 2018 22:44:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 07/09/2018 04:28 PM, Rafael J. Wysocki wrote: > On Mon, Jul 9, 2018 at 10:45 PM, Jeremy Linton wrote: >> Hi, >> >> First thanks for the patch.. >> >> On 07/08/2018 04:14 AM, Rafael J. Wysocki wrote: >>> >>> On Monday, July 2, 2018 11:41:42 PM CEST Jeremy Linton wrote: >>>> >>>> Hi, >>>> >>>> I'm experiencing two problems with commit 5088814a6e931 which is >>>> "ACPICA: AML parser: attempt to continue loading table after error" >>>> >>>> The first is this boot failure on a thunderX2: >>>> >>>> [ 10.770098] ACPI Error: Ignore error and continue table load >> >> >> [trimming] >> >>>> ]--- >>>> >>>> Which does appear to be the result of some bad data in the table, but it >>>> was working with 4.17, and reverting this commit solves the problem. >>> >>> >>> Does the patch below make any difference? >>> >>> --- >>> drivers/acpi/acpica/psobject.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> Index: linux-pm/drivers/acpi/acpica/psobject.c >>> =================================================================== >>> --- linux-pm.orig/drivers/acpi/acpica/psobject.c >>> +++ linux-pm/drivers/acpi/acpica/psobject.c >>> @@ -39,6 +39,9 @@ static acpi_status acpi_ps_get_aml_opcod >>> ACPI_FUNCTION_TRACE_PTR(ps_get_aml_opcode, walk_state); >>> walk_state->aml = walk_state->parser_state.aml; >>> + if (!walk_state->aml) >>> + return AE_CTRL_PARSE_CONTINUE; >>> + >> >> >> Well this seems to avoid the crash, but now it hangs right after on the >> "Ignore error and continue table load" message. > > Well, maybe we should just abort in that case. > > I'm wondering what happens if you replace the return statement in the > patch above with > > return_ACPI_STATUS(AE_AML_BAD_OPCODE) Yes, that is where I went when I applied the patch but I used AE_CTRL_TERMINATE, which terminates the loop in acpi_ps_parse_loop() and that appears to successfully finish/terminate the initial parsing pass. But, it then crashes in acpi_ns_lookup called via the acpi_walk_resources sequences that goes through ut_evalute_object() due to the path/scope_info->scope.node being ACPI_ROOT_OBJECT (-1) and bypassing the null check. Adding a ACPI_ROOT_OBJECT check as well as the null checks in acpi_ns_lookup results in a successful boot. Tracking down how the terminate (or whatever) is leaving the info->prefix_node (in acpi_ns_evaluate) set to ROOT_OBJECT instead of null, is something I don't yet understand. Anyway, I tried Using BAD_OPCODE rather than TERMINATE and it seems to have the same basic result as PARSE_CONTINUE.