Skip to content

Commit

Permalink
modules: disinherit TAINT_PROPRIETARY_MODULE
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
  • Loading branch information
xanmod committed Oct 15, 2020
1 parent bbf5c97 commit da07b4c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,7 @@ static int verify_namespace_is_imported(const struct load_info *info,
return 0;
}

#if 0
static bool inherit_taint(struct module *mod, struct module *owner)
{
if (!owner || !test_bit(TAINT_PROPRIETARY_MODULE, &owner->taints))
Expand All @@ -1449,6 +1450,7 @@ static bool inherit_taint(struct module *mod, struct module *owner)
}
return true;
}
#endif

/* Resolve a symbol for this module. I.e. if we find one, record usage. */
static const struct kernel_symbol *resolve_symbol(struct module *mod,
Expand All @@ -1474,13 +1476,15 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod,
if (!sym)
goto unlock;

#if 0
if (license == GPL_ONLY)
mod->using_gplonly_symbols = true;

if (!inherit_taint(mod, owner)) {
sym = NULL;
goto getname;
}
#endif

if (!check_version(info, name, mod, crc)) {
sym = ERR_PTR(-EINVAL);
Expand Down

0 comments on commit da07b4c

Please sign in to comment.