Closed sempervictus closed 3 years ago
You shouldn't use SLAB_MERGE_DEFAULT
for a hardened kernel, but its obviously a bug when compilation breaks.
This is supposed to worked from the macro defined functions which should simply be optimized out all together. Which exact compiler and version of it are you using?
GCC 10.2 (Arch Linux). Thanks for digging into this
@sempervictus can you post your kconfig file, also did you do anything special or define specific flags? the defines must be in place when the real functions are not declared. I also couldn't make my POC fail whatever i did in a similar way.
@sempervictus let me make a guess: you do not have CONFIG_SLUB_DEBUG
enabled, right?
@anthraxx: it is enabled:
$ grep CONFIG_SLUB_DEBUG config.sv
CONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_DEBUG_ON is not set
There's a bunch of other patches atop it, including UKSM which is why its being enabled in the config. The majority of the patch stack can be found here
please post your Kconfig
When enabling SLAB_MERGE_DEFAULT, CONFIG_SLAB_CANARY cannot be defined, and
check_canary
depends on it. Since nonifdef
d code references thecheck_canary
function, this breaks the build: