Created attachment 297341 [details] Build log from building kernel-4.18.0-305.3.1.el8_4.src.rpm When build with kernel configuration option CONFIG_SLAB_FREELIST_HARDENED turned on, we hit an error with implicit declaration of function 'swab' in mm/slub.c. Here is the error message: mm/slub.c: In function 'freelist_ptr': mm/slub.c:264:4: error: implicit declaration of function 'swab'; did you mean 'swap'? [-Werror=implicit-function-declaration] swab((unsigned long)kasan_reset_tag((void *)ptr_addr))); ^~~~ swap cc1: all warnings being treated as errors make[1]: *** [scripts/Makefile.build:315: mm/slub.o] Error 1 make: *** [Makefile:1086: mm] Error 2 make: *** Waiting for unfinished jobs.... error: Bad exit status from /var/tmp/rpm-tmp.Ka7QF9 (%build) Bad exit status from /var/tmp/rpm-tmp.Ka7QF9 (%build) Look like this is commit introduced the call to swab() https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/mm/slub.c?h=v5.7-rc1&id=1ad53d9fa3f6168ebcf48a50e08b170432da2257
Thanks, I queued a fix (include linux/swab.h)
Hi Andrew, I included linux/swab.h and still seeing the same error. Did this include work in your environment ? Thanks Van On 6/11/21, 6:27 PM, "bugzilla-daemon@bugzilla.kernel.org" <bugzilla-daemon@bugzilla.kernel.org> wrote: https://bugzilla.kernel.org/show_bug.cgi?id=213417 --- Comment #1 from Andrew Morton (akpm@linux-foundation.org) --- Thanks, I queued a fix (include linux/swab.h) -- You may reply to this email to add a comment. You are receiving this mail because: You reported the bug.
hm I didn't realize that this was a 4.18 RHEL kernel. That's very different from mainline. This problem probably isn't present in current mainline, but slub.c should have swab.h anyway. Can you please attach the .config? I'll give it a try with mainline kernel.
Created attachment 297411 [details] kernel-x86_64.config Hi Andrew, Here is the config. Thanks Van On 6/14/21, 6:08 PM, "bugzilla-daemon@bugzilla.kernel.org" <bugzilla-daemon@bugzilla.kernel.org> wrote: https://bugzilla.kernel.org/show_bug.cgi?id=213417 --- Comment #3 from Andrew Morton (akpm@linux-foundation.org) --- hm I didn't realize that this was a 4.18 RHEL kernel. That's very different from mainline. This problem probably isn't present in current mainline, but slub.c should have swab.h anyway. Can you please attach the .config? I'll give it a try with mainline kernel. -- You may reply to this email to add a comment. You are receiving this mail because: You reported the bug.
Can't reproduce with that config and current kernels. A lot has changed...
Have you tried with 4.18 kernel ? On 6/16/21, 6:53 PM, "bugzilla-daemon@bugzilla.kernel.org" <bugzilla-daemon@bugzilla.kernel.org> wrote: https://bugzilla.kernel.org/show_bug.cgi?id=213417 --- Comment #5 from Andrew Morton (akpm@linux-foundation.org) --- Can't reproduce with that config and current kernels. A lot has changed... -- You may reply to this email to add a comment. You are receiving this mail because: You reported the bug.