Index: kernel/meson.build
===================================================================
--- kernel/meson.build	(revision ec8ef12310886f8dae440b616a2f7eb60602d141)
+++ kernel/meson.build	(revision 10e56b7e7a75038c0efcd754bff4ef3cc4bc6bf9)
@@ -101,4 +101,12 @@
 kernel_c_args = arch_kernel_c_args + kernel_defs + [
 	'-ffreestanding',
+	# When accessing specific memory addresses that are below normal page size,
+	# the compiler may assume that we actually dereferenced NULL pointer and
+	# warns us about that. But in kernel we often need to access these
+	# addresses directly hence we need to ignore these warnings.
+	#
+	# TODO: might make more sense to disable this selectively in specific
+	# files (or better yet, for specific lines).
+	'--param=min-pagesize=0',
 	# TODO: remove this flag
 	cc.get_supported_arguments([ '-Wno-cast-function-type' ]),
