Commits
Jessie Hao committed d93227ff3c4
MA-12737 Fix imx7d system random crash issue. Meet system random crash when enable selinux. RenderThread: type=1400 audit(0.0:7416): avc: denied { execmem } for scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=process permissive=0 F DEBUG : pid: 366, tid: 1227, name: RenderThread >>> system_server <<< F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xa3e08040 F DEBUG : backtrace: F DEBUG : #00 pc 00000040 <anonymous:a3e08000> F DEBUG : #01 pc 00078003 /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::processPrimitiveVertices(int, unsigned int, unsigned int, unsigned int, int)+1854) F DEBUG : #02 pc 000774c3 /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::executeTask(int)+130) F DEBUG : #03 pc 00077237 /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::taskLoop(int)+44) F DEBUG : #04 pc 000771b5 /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::threadLoop(int)+52) F DEBUG : #05 pc 0006f161 /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Thread::startFunction(void*)+36) F DEBUG : #06 pc 000639d5 /system/lib/libc.so (__pthread_start(void*)+22) F DEBUG : #07 pc 0001df3d /system/lib/libc.so (__start_thread+22) There's below neverallow rule in system_server.te. neverallow system_server self:process execmem; But the current implementation of swiftshader needs to create executable memory. This is a known issue (b/65201432)Switch into enforcing mode once execmem issue due to OpenGL is resolved. Here follow device/google/cuttlefish/shared/sepolicy/system_server.te change. Change-Id: If3a50387588c812bf52031c971846207e07a1c4f Signed-off-by: Jessie Hao <juan.hao@nxp.com> Reviewed-on: http://androidsource.ap.freescale.net/project/6016 Reviewed-by: Xuegang Liu <xuegang.liu@nxp.com>