Index: kernel/meson.build
===================================================================
--- kernel/meson.build	(revision 2b5628cc28fe8c72e6fbb3ac05ed0ac55f504d2c)
+++ kernel/meson.build	(revision 851b842dc20694831c19601ed4e12cc15dbd8d4a)
@@ -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' ]),
