Skip to content

Commit

Permalink
STOPSHIP: sys.vdso reflector for experiments
Browse files Browse the repository at this point in the history
On userdebug or eng, permit vdso to be enabled or disabled at will to
manage performance experiments on the dogfood population.

ro.debuggable=1 -> permit sys.vdso to maintain an influence over vdso
sys.vdso=false  -> 32 and 64 bit vdso disabled
sys.vdso=32     -> 64 bit vdso disabled
sys.vdso=64     -> 32 bit vdso disabled
sys.vdso=       -> 32 and 64 bit vdso enabled

NB: sys.vdso set to any other value will default to vdso enabled.

Test: manual, bionic-benchmarks --bionic_xml=vdso.xml to confirm.
Bug: 70518189
Change-Id: I839feff206a1404f228a5bdf35fb0c392fd8974a
  • Loading branch information
Mark Salyzyn committed Jan 10, 2018
1 parent 3d74288 commit 96c77a7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions init.common.diag.rc.userdebug
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,18 @@ on property:sys.logger.bluetooth=true
on property:sys.logger.bluetooth=false
setprop persist.service.bdroid.snooplog false
setprop persist.service.bdroid.fwsnoop false

# b/70518189 vDSO experiments
on property:sys.vdso=*
write /sys/module/vdso/parameters/enable_32 1
write /sys/module/vdso/parameters/enable_64 1

on property:sys.vdso=false
write /sys/module/vdso/parameters/enable_32 0
write /sys/module/vdso/parameters/enable_64 0

on property:sys.vdso=64
write /sys/module/vdso/parameters/enable_32 0

on property:sys.vdso=32
write /sys/module/vdso/parameters/enable_64 0
2 changes: 2 additions & 0 deletions sepolicy/file.te
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ type sysfs_video, sysfs_type, fs_type;
type sysfs_wifi, sysfs_type, fs_type, mlstrustedobject;
type sysfs_diag, fs_type, sysfs_type;
type sysfs_scsi_devices_0000, sysfs_type, fs_type;
# b/70518189 vDSO experiments
type sysfs_vdso, fs_type, sysfs_type;

# debugfs
type debugfs_msm_core, debugfs_type, fs_type;
Expand Down
3 changes: 3 additions & 0 deletions sepolicy/file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,6 @@

# hidraw dynamic sensor
/dev/hidraw[0-9]+ u:object_r:sensors_device:s0

# b/70518189 vDSO experiments
/sys/module/vdso/parameters u:object_r:sysfs_vdso:s0
5 changes: 5 additions & 0 deletions sepolicy/init.te
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ allow init sysfs_type:lnk_file read;
allow init firmware_file:dir mounton;
allow init persist_file:dir mounton;
allow init userdata_block_device:blk_file { write };

# b/70518189 vDSO experiments
userdebug_or_eng(`
allow init sysfs_vdso:file w_file_perms;
')

0 comments on commit 96c77a7

Please sign in to comment.