Module Name: src Committed By: martin Date: Sun Apr 12 08:48:57 UTC 2020
Modified Files: src/sys/dev/acpi [netbsd-9]: acpi_ec.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #829): sys/dev/acpi/acpi_ec.c: revision 1.78 sys/dev/acpi/acpi_ec.c: revision 1.79 sys/dev/acpi/acpi_ec.c: revision 1.80 sys/dev/acpi/acpi_ec.c: revision 1.81 Revert acpi_ec.c 1.77. We will do this another way. ok msaitoh Revert acpi_ec.c 1.76. We will do this another way, and separate KNF fixes from the critical functional change. ok msaitoh KNF Reject overly large widths, from mlelstv. We are returning an ACPI_INTEGER (= uint64_t), so it doesn't make sense to handle more than 64 bits. Apparently there are some ACPIs out there that ask for unreasonably large widths here. Just reject those requests, rather than writing past the caller's stack buffer. Previously we attempted to fix this by copying byte by byte as large as the caller asked, in order to avoid the undefined behaviour of shifting past the size of ACPI_INTEGER, but that just turned a shift (which might have been harmless on real machines) into a stack buffer overflow (!). ok msaitoh To generate a diff of this commit: cvs rdiff -u -r1.75.20.1 -r1.75.20.2 src/sys/dev/acpi/acpi_ec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.