acpi - Catch infinite parser recursions
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 12 Nov 2019 02:14:07 +0000 (18:14 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 12 Nov 2019 02:14:07 +0000 (18:14 -0800)
commitd9bb5dfdc3905237fb704584b71c9e0a9627656c
treea21bb7f82a81b12f66d0b9805f1bb1900693f60b
parent6d3084e98a1b2b26c01b98883e8ede31b985e389
acpi - Catch infinite parser recursions

* Instrument AcpiPsParseLoop() and limited recursion depth to 5.
  Generally speaking this loop can call a very deep stack of
  routines and eat up the kernel stack.  A depth limit of 5 might
  be a bit too low, but it doesn't take much more to blow up
  our current 16KB kernel stack.

  This prevents the kernel from double-faulting on excessively bad
  AML.

* Works around reported boot-time double-faults on some laptops.
sys/contrib/dev/acpica/source/components/parser/psloop.c