On Mon, Apr 14, 2025 at 5:04 PM Fan Wu <wu...@kernel.org> wrote: > On Wed, Apr 9, 2025 at 11:53 AM Paul Moore <p...@paul-moore.com> wrote: > > > > As the LSM framework only supports one LSM initcall callback for each > > initcall type, the init_smk_fs() and smack_nf_ip_init() functions were > > wrapped with a new function, smack_initcall() that is registered with > > the LSM framework. > > > > Signed-off-by: Paul Moore <p...@paul-moore.com> > > --- > > security/smack/smack.h | 6 ++++++ > > security/smack/smack_lsm.c | 16 ++++++++++++++++ > > security/smack/smack_netfilter.c | 4 +--- > > security/smack/smackfs.c | 4 +--- > > 4 files changed, 24 insertions(+), 6 deletions(-)
... > I'm getting the following WARNING: > > WARNING: modpost: vmlinux: section mismatch in reference: > smack_initcall+0xb (section: .text) -> init_smk_fs (section: > .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: > smack_initcall+0x16 (section: .text) -> smack_nf_ip_init (section: > .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: > smack_initcall+0x27 (section: .text) -> smack_nf_ip_init (section: > .init.text) > > I guess "__init" is missed for smack_initcall? Yep, fixed, thanks. -- paul-moore.com