Commit 046ece7
ACPI: property: Allow _DSD buffer data only for byte accessors
In accordance with ACPI specificication and _DSD data buffer
representation the data there is an array of bytes. Hence,
accessing it with something longer will create a sparse data
which is against of how device property APIs work in general
and also not defined in the ACPI specification (see [1]).
Fix the code to emit an error if non-byte accessor is used to
retrieve _DSD buffer data.
Fixes: 369af6b ("ACPI: property: Read buffer properties as integers")
Link: https://uefi.org/specs/ACPI/6.5/19_ASL_Reference.html#buffer-declare-buffer-object # [1]
Signed-off-by: Andy Shevchenko <[email protected]>
[ rjw: Add missing braces ]
Signed-off-by: Rafael J. Wysocki <[email protected]>1 parent 8a749fd commit 046ece7
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | | - | |
| 1105 | + | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
1109 | | - | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
1110 | 1112 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | 1113 | | |
1116 | 1114 | | |
1117 | 1115 | | |
1118 | 1116 | | |
1119 | 1117 | | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1123 | 1121 | | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
1124 | 1125 | | |
1125 | 1126 | | |
1126 | 1127 | | |
| |||
0 commit comments