zram: allow zram writeback

This allows fs_mgr in init to build loopback device and its control.

Bug: 74582279
Change-Id: I039cd57d4638870a59dd38c952d3ab9b671be545
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This commit is contained in:
Jaegeuk Kim 2018-11-20 16:13:07 -08:00
parent 2d86b6502d
commit 579271906a

View File

@ -362,6 +362,17 @@ allow init {
sysfs_zram
}:file rw_file_perms;
# allow init to create loop devices with /dev/loop-control
allow init loop_control_device:chr_file rw_file_perms;
allow init loop_device:blk_file rw_file_perms;
allowxperm init loop_device:blk_file ioctl {
LOOP_SET_FD
LOOP_CLR_FD
LOOP_CTL_GET_FREE
LOOP_SET_BLOCK_SIZE
LOOP_SET_DIRECT_IO
};
# Allow init to write to vibrator/trigger
allow init sysfs_vibrator:file w_file_perms;