[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93bbc216-9ae5-c22f-b6a8-f6591aa92c2a@linux.alibaba.com>
Date: Tue, 21 Mar 2023 10:00:26 +0800
From: Shuai Xue <xueshuai@...ux.alibaba.com>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: "baolin.wang@...ux.alibaba.com" <baolin.wang@...ux.alibaba.com>,
"benjamin.cheatham@....com" <benjamin.cheatham@....com>,
"bp@...en8.de" <bp@...en8.de>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"james.morse@....com" <james.morse@....com>,
"jaylu102@....com" <jaylu102@....com>,
"lenb@...nel.org" <lenb@...nel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rafael@...nel.org" <rafael@...nel.org>,
"zhuo.song@...ux.alibaba.com" <zhuo.song@...ux.alibaba.com>
Subject: Re: [PATCH] ACPI: APEI: EINJ: warn on invalid argument when
explicitly indicated by platform
On 2023/3/21 AM12:32, Luck, Tony wrote:
>>> I don't see how reporting -EBUSY for the "Unknown Failure" case is
>>> actually better.
>>
>> Tony, did you misunderstand this patch?
>>
>> The original code report -EBUSY for both "Unknown Failure" and
>> "Invalid Access" cases.
>
> I mixed up what was already in the kernel with what the patch was changing.
>
>> This patch intends to report -EINVAL for "Invalid Access" case
>> and keeps reporting -EBUSY for "Unknown Failure" case unchanged.
>> Although -EBUSY for "Unknown Failure" case is not a good choice.
>> Will -EIO for "Unknown failure" case be better?
>
> Is this for some real use case?
>
> Do you have a BIOS EINJ implementation that is returning these different codes?
Yes, our BIOS tester complains that EINJ always reports EBUSY, and he has no idea
about it. It can not help him determine whether it is a BIOS bug or an injection
operation error.
> What will the user do differently if they see these different error strings?
>
> # echo 1 > error_inject
> ... different error messages here ...
For example, with original code:
# select a invalid core or device to inject
# echo 1 > error_inject
echo: write error: Device or resource busy
When tester sees that, he will submit a bug to BIOS developer.
Actually, firmware will do some platform dependent sanity checks and returns
different error codes. In this case, user injects to a invalid device, platform
returns "Invalid Access". And user is expected to see:
# select a invalid core or device to inject
# echo 1 > error_inject
echo: write error: Invalid argument
Then user is expected to check his injection argument first.
>
> -Tony
>
Best Regards,
Shuai
Powered by blists - more mailing lists