Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675070 - kernel 4.19.8: Undefined behaviour in ./arch/x86/include/asm/bitops.h:328:8
Summary: kernel 4.19.8: Undefined behaviour in ./arch/x86/include/asm/bitops.h:328:8
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-10 10:32 UTC by segmentation fault
Modified: 2019-06-11 11:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description segmentation fault 2019-01-10 10:32:02 UTC
UBSAN message from my kernel log:

================================================================================
kernel: UBSAN: Undefined behaviour in ./arch/x86/include/asm/bitops.h:328:8
kernel: load of misaligned address 00000000c503b3c8 for type 'volatile const long unsigned int'
kernel: which requires 8 byte alignment
kernel: CPU: 0 PID: 7415 Comm: swapon Tainted: P           O    T 4.19.8-gentoo #1
kernel: Hardware name: ASUSTeK COMPUTER INC. G752VY/G752VY, BIOS G752VY.304 06/29/2017
kernel: Call Trace:
kernel: dump_stack+0xa1/0x11b
kernel: ubsan_epilogue+0x9/0x40
kernel: ubsan_type_mismatch_common+0x17b/0x190
kernel: __ubsan_handle_type_mismatch+0x43/0x60
kernel: max_swapfile_size+0x7d/0x83
kernel: __do_sys_swapon+0x926/0x2fd0
kernel: ? task_work_run+0x7e/0x140
kernel: do_syscall_64+0x85/0x280
kernel: entry_SYSCALL_64_after_hwframe+0x49/0xbe
kernel: RIP: 0033:0x7f86841d3617
kernel: Code: 73 01 c3 48 8b 0d 79 68 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a7 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 49 68 2c 00 f7 d8 64 89 01 48
kernel: RSP: 002b:00007ffd93dc2288 EFLAGS: 00000246 ORIG_RAX: 00000000000000a7
kernel: RAX: ffffffffffffffda RBX: 000000000001bfff RCX: 00007f86841d3617
kernel: RDX: 000000000001bfff RSI: 000000000001bfff RDI: 0000557bbb60c5c0
kernel: RBP: 0000557bbb60c5c0 R08: 0000000600000000 R09: 0000000600000000
kernel: R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000003
kernel: R13: 00007ffd93dc2490 R14: 00007ffd93dc24cc R15: 0000557bbb60d5d0
kernel: ================================================================================

Info on the system:

Portage 2.3.51 (python 3.6.5-final-0, hardened/linux/amd64, gcc-7.3.0, glibc-2.27-r6, 4.19.8-gentoo x86_64)
=================================================================
System uname: Linux-4.19.8-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:    40976340 total,  16220132 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 13 Dec 2018 12:15:01 +0000
Head commit of repository gentoo: 057645ffcdb86bd24e7c965f6e1aa03db33abb4c
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.4.8::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.12.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.12.6::gentoo, 1.13.4-r2::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Comment 1 Mike Pagano gentoo-dev 2019-06-11 11:46:27 UTC
Detection of undefined behavior via the UndefinedBehaviorSanitizer can be reported upstream at https://bugzilla.kernel.org