summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-15 01:52:32 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-15 01:52:32 +0200
commit9522933454f4c4bd5bedf3d71c538708b7c5de5b (patch)
tree9d0ceaba8056e52806866d131373a3fa08c384e0 /include
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
parent83848fbe7e6af978c080a88c130a67178b1ac0e4 (diff)
downloadlinux-9522933454f4c4bd5bedf3d71c538708b7c5de5b.tar.gz
linux-9522933454f4c4bd5bedf3d71c538708b7c5de5b.tar.bz2
linux-9522933454f4c4bd5bedf3d71c538708b7c5de5b.zip
Merge branch 'acpica-fixes'
* acpica-fixes: ACPICA: Tables: Mechanism to handle late stage acpi_get_table() imbalance Revert "ACPICA: Disassembler: Enhance resource descriptor detection"
Diffstat (limited to 'include')
-rw-r--r--include/acpi/actbl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index d92543f3bbfd..bdc55c0da19c 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -374,6 +374,20 @@ struct acpi_table_desc {
u16 validation_count;
};
+/*
+ * Maximum value of the validation_count field in struct acpi_table_desc.
+ * When reached, validation_count cannot be changed any more and the table will
+ * be permanently regarded as validated.
+ *
+ * This is to prevent situations in which unbalanced table get/put operations
+ * may cause premature table unmapping in the OS to happen.
+ *
+ * The maximum validation count can be defined to any value, but should be
+ * greater than the maximum number of OS early stage mapping slots to avoid
+ * leaking early stage table mappings to the late stage.
+ */
+#define ACPI_MAX_TABLE_VALIDATIONS ACPI_UINT16_MAX
+
/* Masks for Flags field above */
#define ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL (0) /* Virtual address, external maintained */