Skip to content

Commit

Permalink
modpost: Disable EXPORT_SYMBOL_GPL check
Browse files Browse the repository at this point in the history
For unknown resons, fd117d03cefd15 ("mm/sparsemem: fix race in
accessing memory_section->usage") prevents us from compiling the
proprietary Nvidia Unix driver with versions 510.108.03 and 535.104.05
in the 5.15 series. No problems with the 6.5 series, although the patch
is included there as well.

    make -j $(nproc) CC=gcc SYSSRC=/scratch/local/linux clean && make -j $(nproc) CC=gcc SYSSRC=/scratch/local/linux V=2 modules
    [...]
    MODPOST /scratch/local/bee-buczek/nvidia/test_535-104-05/kernel/Module.symvers - due to target missing
    ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'rcu_read_unlock_strict'
    make[2]: *** [scripts/Makefile.modpost:133: /scratch/local/bee-buczek/nvidia/test_535-104-05/kernel/Module.symvers] Error 1
    make[2]: *** Deleting file '/scratch/local/bee-buczek/nvidia/test_535-104-05/kernel/Module.symvers'
    make[1]: *** [Makefile:1826: modules] Error 2
    make[1]: Leaving directory '/scratch/local/linux'
    make: *** [Makefile:82: modules] Error 2

Just disable the check which prevents non-GPL modules to access GPL-only
symbols.
  • Loading branch information
donald committed Jun 5, 2024
1 parent bdaba54 commit 44db410
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mod/modpost.c
Original file line number Diff line number Diff line change
@@ -2140,7 +2140,7 @@ static void check_exports(struct module *mod)
add_namespace(&mod->missing_namespaces, exp->namespace);
}

if (!mod->gpl_compatible)
if (0 && !mod->gpl_compatible)
check_for_gpl_usage(exp->export, basename, exp->name);
}
}

0 comments on commit 44db410

Please sign in to comment.