Skip to content
Snippets Groups Projects
Commit 8b87947e authored by Jaesoo Lee's avatar Jaesoo Lee Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'modprobe_fix' into oc-dev

* changes:
  allow to load kernel modules from vendor partition
  SELinux changes for Treble Loadable Kernel Module
parents 4966f2b5 a6ac1147
Branches
Tags
No related merge requests found
...@@ -14,6 +14,7 @@ domain_trans(init, shell_exec, shell) ...@@ -14,6 +14,7 @@ domain_trans(init, shell_exec, shell)
domain_trans(init, init_exec, ueventd) domain_trans(init, init_exec, ueventd)
domain_trans(init, init_exec, watchdogd) domain_trans(init, init_exec, watchdogd)
domain_trans(init, rootfs, modprobe) domain_trans(init, rootfs, modprobe)
domain_trans(init, toolbox_exec, modprobe)
# case where logpersistd is actually logcat -f in logd context (nee: logcatd) # case where logpersistd is actually logcat -f in logd context (nee: logcatd)
userdebug_or_eng(` userdebug_or_eng(`
domain_auto_trans(init, logcat_exec, logpersist) domain_auto_trans(init, logcat_exec, logpersist)
......
...@@ -998,7 +998,7 @@ neverallow { ...@@ -998,7 +998,7 @@ neverallow {
# Enforce restrictions on kernel module origin. # Enforce restrictions on kernel module origin.
# Do not allow kernel module loading except from system, # Do not allow kernel module loading except from system,
# vendor, and boot partitions. # vendor, and boot partitions.
neverallow * ~{ system_file vendor_file_type rootfs }:system module_load; neverallow * ~{ system_file vendor_file rootfs }:system module_load;
# Only allow filesystem caps to be set at build time or # Only allow filesystem caps to be set at build time or
# during upgrade by recovery. # during upgrade by recovery.
......
...@@ -6,3 +6,5 @@ recovery_only(` ...@@ -6,3 +6,5 @@ recovery_only(`
allow modprobe rootfs:system module_load; allow modprobe rootfs:system module_load;
allow modprobe rootfs:file r_file_perms; allow modprobe rootfs:file r_file_perms;
') ')
allow modprobe { system_file vendor_file }:system module_load;
r_dir_file(modprobe, { system_file vendor_file })
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment