WSL2-Linux-Kernel/drivers/gpu/drm/nouveau/nvkm
Nick Lopez 1b777d4d9e drm/nouveau: fix off by one in BIOS boundary checking
Bounds checking when parsing init scripts embedded in the BIOS reject
access to the last byte. This causes driver initialization to fail on
Apple eMac's with GeForce 2 MX GPUs, leaving the system with no working
console.

This is probably only seen on OpenFirmware machines like PowerPC Macs
because the BIOS image provided by OF is only the used parts of the ROM,
not a power-of-two blocks read from PCI directly so PCs always have
empty bytes at the end that are never accessed.

Signed-off-by: Nick Lopez <github@glowingmonkey.org>
Fixes: 4d4e9907ff ("drm/nouveau/bios: guard against out-of-bounds accesses to image")
Cc: <stable@vger.kernel.org> # v4.10+
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220122081906.2633061-1-github@glowingmonkey.org
2022-01-31 22:47:53 +01:00
..
core drm/nouveau/core/client: Mark nvkm_uclient_sclass with static keyword 2021-11-12 23:46:04 +01:00
engine Linux 5.16-rc5 2021-12-14 10:24:28 +01:00
falcon drm/nouveau/pmu/gm200-: use alternate falcon reset sequence 2021-11-12 23:46:04 +01:00
nvfw drm/nouveau/nvfw/acr: make lsb_header_tail_dump static 2020-07-24 18:50:46 +10:00
subdev drm/nouveau: fix off by one in BIOS boundary checking 2022-01-31 22:47:53 +01:00
Kbuild drm/nouveau/acr: add loaders for currently available LS firmware images 2020-01-15 10:50:26 +10:00