aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
diff options
context:
space:
mode:
authorMateusz Jurczyk <[email protected]>2017-05-24 13:55:00 +0000
committerThomas Gleixner <[email protected]>2017-05-24 14:18:12 +0000
commitfc152d22d6e9fac95a9a990e6c29510bdf1b9425 (patch)
treec784fbbc87c38aa14979ec3ff7d4a70741761ffa /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
parentx86/PAT: Fix Xorg regression on CPUs that don't support PAT (diff)
downloadkernel-fc152d22d6e9fac95a9a990e6c29510bdf1b9425.tar.gz
kernel-fc152d22d6e9fac95a9a990e6c29510bdf1b9425.zip
x86/alternatives: Prevent uninitialized stack byte read in apply_alternatives()
In the current form of the code, if a->replacementlen is 0, the reference to *insnbuf for comparison touches potentially garbage memory. While it doesn't affect the execution flow due to the subsequent a->replacementlen comparison, it is (rightly) detected as use of uninitialized memory by a runtime instrumentation currently under my development, and could be detected as such by other tools in the future, too (e.g. KMSAN). Fix the "false-positive" by reordering the conditions to first check the replacement instruction length before referencing specific opcode bytes. Signed-off-by: Mateusz Jurczyk <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Cc: Andy Lutomirski <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions