Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ACPICA: ACPI 5.1: Add support for runtime validation of _DSD package.

Adds ACPICA kernel runtime support to validate contents/format
of the _DSD package, similar to the iASL support. Ported by
Mika Westerberg.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Mika Westerberg and committed by
Rafael J. Wysocki
b1272e1f 69e273c0

+39
+39
drivers/acpi/acpica/nsprepkg.c
··· 316 316 acpi_ns_check_package_list(info, package, elements, count); 317 317 break; 318 318 319 + case ACPI_PTYPE2_UUID_PAIR: 320 + 321 + /* The package must contain pairs of (UUID + type) */ 322 + 323 + if (count & 1) { 324 + expected_count = count + 1; 325 + goto package_too_small; 326 + } 327 + 328 + while (count > 0) { 329 + status = acpi_ns_check_object_type(info, elements, 330 + package->ret_info. 331 + object_type1, 0); 332 + if (ACPI_FAILURE(status)) { 333 + return (status); 334 + } 335 + 336 + /* Validate length of the UUID buffer */ 337 + 338 + if ((*elements)->buffer.length != 16) { 339 + ACPI_WARN_PREDEFINED((AE_INFO, 340 + info->full_pathname, 341 + info->node_flags, 342 + "Invalid length for UUID Buffer")); 343 + return (AE_AML_OPERAND_VALUE); 344 + } 345 + 346 + status = acpi_ns_check_object_type(info, elements + 1, 347 + package->ret_info. 348 + object_type2, 0); 349 + if (ACPI_FAILURE(status)) { 350 + return (status); 351 + } 352 + 353 + elements += 2; 354 + count -= 2; 355 + } 356 + break; 357 + 319 358 default: 320 359 321 360 /* Should not get here if predefined info table is correct */