Skip to content

Commit

Permalink
Revert "kernel: disable module verification"
Browse files Browse the repository at this point in the history
This reverts commit d492913.
  • Loading branch information
engstk committed Dec 8, 2021
1 parent 45cd258 commit 7e16f3d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ static int check_version(const struct load_info *info,
bad_version:
pr_warn("%s: disagrees about version of symbol %s\n",
info->name, symname);
return 1;
return 0;
}

static inline int check_modstruct_version(const struct load_info *info,
Expand Down Expand Up @@ -2917,10 +2917,6 @@ static int module_sig_check(struct load_info *info, int flags)
const char *reason;
const void *mod = info->hdr;

#if 1
return 0;
#endif

/*
* Require flags == 0, as a module with version information
* removed is no longer the module that was signed
Expand Down Expand Up @@ -4017,11 +4013,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
goto free_copy;
}

#if 1
flags |= MODULE_INIT_IGNORE_MODVERSIONS;
flags |= MODULE_INIT_IGNORE_VERMAGIC;
#endif

err = rewrite_section_headers(info, flags);
if (err)
goto free_copy;
Expand Down

0 comments on commit 7e16f3d

Please sign in to comment.