* [PATCH] ACPI: APEI: EINJ: Limit error type to 32-bit width
@ 2023-01-18 6:35 Shuai Xue
2023-01-18 16:37 ` Luck, Tony
0 siblings, 1 reply; 5+ messages in thread
From: Shuai Xue @ 2023-01-18 6:35 UTC (permalink / raw)
To: rafael, tony.luck, bp
Cc: lenb, james.morse, jaylu102, benjamin.cheatham, dan.j.williams,
linux-acpi, linux-kernel, baolin.wang, xueshuai, zhuo.song
The bit map of error types to inject is 32-bit width[1]. Add parameter
check to reflect the fact.
[1] ACPI Specification 6.4, Section 18.6.4. Error Types
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
---
drivers/acpi/apei/einj.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index ab86b2f4e719..b4373e575660 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -616,6 +616,10 @@ static int error_type_set(void *data, u64 val)
u32 available_error_type = 0;
u32 tval, vendor;
+ /* Only low 32 bits for error type are valid */
+ if (val & GENMASK_ULL(63, 32))
+ return -EINVAL;
+
/*
* Vendor defined types have 0x80000000 bit set, and
* are not enumerated by ACPI_EINJ_GET_ERROR_TYPE
--
2.20.1.12.g72788fdb
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] ACPI: APEI: EINJ: Limit error type to 32-bit width
2023-01-18 6:35 [PATCH] ACPI: APEI: EINJ: Limit error type to 32-bit width Shuai Xue
@ 2023-01-18 16:37 ` Luck, Tony
2023-01-19 2:10 ` Shuai Xue
0 siblings, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2023-01-18 16:37 UTC (permalink / raw)
To: Shuai Xue, rafael, bp
Cc: lenb, james.morse, jaylu102, benjamin.cheatham, Williams, Dan J,
linux-acpi, linux-kernel, baolin.wang, zhuo.song
> The bit map of error types to inject is 32-bit width[1]. Add parameter
> check to reflect the fact.
>
> [1] ACPI Specification 6.4, Section 18.6.4. Error Types
>
> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
-Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: APEI: EINJ: Limit error type to 32-bit width
2023-01-18 16:37 ` Luck, Tony
@ 2023-01-19 2:10 ` Shuai Xue
2023-01-30 15:41 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Shuai Xue @ 2023-01-19 2:10 UTC (permalink / raw)
To: Luck, Tony, rafael, bp
Cc: lenb, james.morse, jaylu102, benjamin.cheatham, Williams, Dan J,
linux-acpi, linux-kernel, baolin.wang, zhuo.song
On 2023/1/19 AM12:37, Luck, Tony wrote:
>> The bit map of error types to inject is 32-bit width[1]. Add parameter
>> check to reflect the fact.
>>
>> [1] ACPI Specification 6.4, Section 18.6.4. Error Types
>>
>> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
>
> -Tony
Thank you.
Cheers.
Shuai
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: APEI: EINJ: Limit error type to 32-bit width
2023-01-19 2:10 ` Shuai Xue
@ 2023-01-30 15:41 ` Rafael J. Wysocki
2023-01-31 1:57 ` Shuai Xue
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2023-01-30 15:41 UTC (permalink / raw)
To: Shuai Xue
Cc: Luck, Tony, rafael, bp, lenb, james.morse, jaylu102,
benjamin.cheatham, Williams, Dan J, linux-acpi, linux-kernel,
baolin.wang, zhuo.song
On Thu, Jan 19, 2023 at 3:10 AM Shuai Xue <xueshuai@linux.alibaba.com> wrote:
>
>
>
> On 2023/1/19 AM12:37, Luck, Tony wrote:
> >> The bit map of error types to inject is 32-bit width[1]. Add parameter
> >> check to reflect the fact.
> >>
> >> [1] ACPI Specification 6.4, Section 18.6.4. Error Types
> >>
> >> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
> >
> > Reviewed-by: Tony Luck <tony.luck@intel.com>
Applied as 6.3 material, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: APEI: EINJ: Limit error type to 32-bit width
2023-01-30 15:41 ` Rafael J. Wysocki
@ 2023-01-31 1:57 ` Shuai Xue
0 siblings, 0 replies; 5+ messages in thread
From: Shuai Xue @ 2023-01-31 1:57 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Luck, Tony, bp, lenb, james.morse, jaylu102, benjamin.cheatham,
Williams, Dan J, linux-acpi, linux-kernel, baolin.wang,
zhuo.song
On 2023/1/30 PM11:41, Rafael J. Wysocki wrote:
> On Thu, Jan 19, 2023 at 3:10 AM Shuai Xue <xueshuai@linux.alibaba.com> wrote:
>>
>>
>>
>> On 2023/1/19 AM12:37, Luck, Tony wrote:
>>>> The bit map of error types to inject is 32-bit width[1]. Add parameter
>>>> check to reflect the fact.
>>>>
>>>> [1] ACPI Specification 6.4, Section 18.6.4. Error Types
>>>>
>>>> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
>>>
>>> Reviewed-by: Tony Luck <tony.luck@intel.com>
>
> Applied as 6.3 material, thanks!
Thank you.
Cheers
Shuai
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-31 1:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 6:35 [PATCH] ACPI: APEI: EINJ: Limit error type to 32-bit width Shuai Xue
2023-01-18 16:37 ` Luck, Tony
2023-01-19 2:10 ` Shuai Xue
2023-01-30 15:41 ` Rafael J. Wysocki
2023-01-31 1:57 ` Shuai Xue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome