Hi guys,
I am porting selinux from kernel 4.14 to 5.15. Everything works fine in kernel 4.14. keep same /etc/selinux/conf and kernel parameters to enable SELinux.
But the selinux_init() is not executed when kernel 5.15 boots because no "*SELinux: Initializing" is seen in dmesg.*
*This selinux_init() is defined in * http://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c
https://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c#L7287 DEFINE_LSM https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=DEFINE_LSM(selinux) = {7288 https://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c#L7288 .name https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=name = *"selinux"*,7289 https://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c#L7289 .flags https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=flags = LSM_FLAG_LEGACY_MAJOR https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=LSM_FLAG_LEGACY_MAJOR | LSM_FLAG_EXCLUSIVE https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=LSM_FLAG_EXCLUSIVE,7290 https://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c#L7290 .enabled https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=enabled = &selinux_enabled_boot https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=selinux_enabled_boot,7291 https://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c#L7291 .blobs = &selinux_blob_sizes https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=selinux_blob_sizes,7292 https://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c#L7292 .init https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=init = selinux_init https://tomoyo.osdn.jp/cgi-bin/lxr/ident?i=selinux_init,7293 https://tomoyo.osdn.jp/cgi-bin/lxr/source/security/selinux/hooks.c#L7293 };
My question is why the selinux_init() is not called when kernel 5.15 boots up?
---henry