diff --git a/device-common.mk b/device-common.mk index 85d907ff8..523831189 100644 --- a/device-common.mk +++ b/device-common.mk @@ -382,7 +382,8 @@ PRODUCT_COPY_FILES += \ # Subsystem ramdump PRODUCT_PROPERTY_OVERRIDES += \ - persist.sys.ssr.enable_ramdumps=1 + persist.sys.ssr.enable_ramdumps=1 \ + persist.sys.crash_rcu=true else PRODUCT_COPY_FILES += \ device/google/marlin/init.common.diag.rc.user:$(INIT_COMMON_DIAG_RC) diff --git a/init.common.diag.rc.userdebug b/init.common.diag.rc.userdebug index 7a8a1e675..5e4d9d911 100644 --- a/init.common.diag.rc.userdebug +++ b/init.common.diag.rc.userdebug @@ -112,3 +112,8 @@ service cnss_diag_txt /system/bin/cnss_diag -s -f -m /data/cnss_diag/cnss_diag.c disabled oneshot +on property:persist.sys.crash_rcu=true + write /proc/sys/kernel/panic_on_rcu_stall 1 + +on property:persist.sys.crash_rcu=false + write /proc/sys/kernel/panic_on_rcu_stall 0 diff --git a/sepolicy/platform_app.te b/sepolicy/platform_app.te index 72448c4ee..adbf78457 100644 --- a/sepolicy/platform_app.te +++ b/sepolicy/platform_app.te @@ -10,4 +10,5 @@ userdebug_or_eng(` dontaudit platform_app proc_sysrq:file getattr; dontaudit platform_app proc_iomem:file getattr; set_prop(platform_app, cnss_diag_prop); + set_prop(platform_app, ramdump_prop); ') diff --git a/sepolicy/property.te b/sepolicy/property.te index b1996354c..9c8a064dd 100644 --- a/sepolicy/property.te +++ b/sepolicy/property.te @@ -6,3 +6,4 @@ type mid_prop, property_type; type ssr_prop, property_type; type cnss_diag_prop, property_type; type thermal_prop, property_type; +type ramdump_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts index 435b5167e..85276c4c6 100644 --- a/sepolicy/property_contexts +++ b/sepolicy/property_contexts @@ -9,5 +9,6 @@ ro.boot.hardware.sku u:object_r:hw_sku_prop:s0 ro.boot.mid u:object_r:mid_prop:s0 debug.ssrdump u:object_r:ssr_prop:s0 persist.sys.cnss. u:object_r:cnss_diag_prop:s0 +persist.sys.crash_rcu u:object_r:ramdump_prop:s0 sys.qcom.thermalcfg u:object_r:thermal_prop:s0 ctl.thermal-engine u:object_r:thermal_prop:s0