aboutsummaryrefslogtreecommitdiffstats
path: root/lib/timerqueue.c
diff options
context:
space:
mode:
authorNumfor Mbiziwo-Tiapo <[email protected]>2021-09-23 16:18:43 +0000
committerBorislav Petkov <[email protected]>2021-09-24 10:37:38 +0000
commit5ba1071f7554c4027bdbd712a146111de57918de (patch)
treea8b9d04fc9a87bdae3e91db1d9a42e3547f4b0c0 /lib/timerqueue.c
parentx86/asm: Fix SETZ size enqcmds() build failure (diff)
downloadkernel-5ba1071f7554c4027bdbd712a146111de57918de.tar.gz
kernel-5ba1071f7554c4027bdbd712a146111de57918de.zip
x86/insn, tools/x86: Fix undefined behavior due to potential unaligned accesses
Don't perform unaligned loads in __get_next() and __peek_nbyte_next() as these are forms of undefined behavior: "A pointer to an object or incomplete type may be converted to a pointer to a different object or incomplete type. If the resulting pointer is not correctly aligned for the pointed-to type, the behavior is undefined." (from http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf) These problems were identified using the undefined behavior sanitizer (ubsan) with the tools version of the code and perf test. [ bp: Massage commit message. ] Signed-off-by: Numfor Mbiziwo-Tiapo <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions