It should be possible to pull all cc-param calls out of the else section of the CFLAGS_KASAN_SHADOW check. Then, the code structure would make sense: first, try applying KASAN_SHADOW_OFFSET; if failed, use CFLAGS_KASAN_MINIMAL; and then try applying all these options one by one.
https://lkml.kernel.org/r/YV0NPnUbElw7cTRH@archlinux-ax161
Resolved with [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78788c3ede90727ffb7b17287468a08b4e78ee3d