security_ModuleLocking: add module loading restriction test

This adds a test for the kernel's module loading restrictions, along
with verification of the sysctl when available.

BUG=chromium-os:34134
TEST=parrot build, security_ModuleLocking passes

Change-Id: I15886525579dbfd5e76ceeb58affbc3e0d96f2de
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35213
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
2 files changed