whatawurst / android_device_sony_yoshino-common

This is the Android device configuration for the yoshino platform
10 stars 47 forks source link

Unlabeled sdm.disable_hdr_lut_gen #90

Closed Flamefire closed 1 year ago

Flamefire commented 1 year ago

With an LOS 19.1 build I see

avc: denied { read } for comm="android.hardwar" name="u:object_r:default_prop:s0" dev="tmpfs" ino=2501 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0 ppid=1 pcomm="init" pgid=1 pgcomm="init"

Don't you have that too?

I traced that to the property sdm.disable_hdr_lut_gen from hardware/qcom/display/msm8998/sdm/libs/core/display_base.cpp see also https://github.com/LineageOS/android_device_fxtec_pro1/commit/e5e856db0113de8333dc037bfeef04867eb19a48

So I guess we have to label that too. Other properties potentially read by hardware/qcom/display/msm8998/sdm/* are:

debug.egl.swapinterval
debug.gralloc.enable_fb_ubwc
debug.gralloc.gfx_ubwc_disable
hw.hdmi.resolution
persist.hwc.blit.comp
persist.metadata_dynfps.disable
ro.vendor.extension_library
sdm.boot_anim_layer_count
sdm.composition_simulation
sdm.debug.disable_avr
sdm.debug.disable_partial_split
sdm.debug.disable_rotator_split
sdm.debug.disable_scalar
sdm.debug.disable_skip_validate
sdm.debug.downscale_external
sdm.debug.rotator_disable_ubwc
sdm.debug.rotator_downscale
sdm.disable_decimation
sdm.disable_hdr_lut_gen
sdm.external_action_safe_height
sdm.external_action_safe_width
sdm.external.mixer_stages
sdm.fb_size_height
sdm.fb_size_width
sdm.hdmi.s3d_mode
sdm.idle_time
sdm.idle_time.inactive
sdm.max_external_layers
sdm.max_upscale
sdm.mixer_resolution
sdm.perf_hint_window
sdm.primary.mixer_stages
sdm.video_mode_panel
sdm.virtual.mixer_stages
sys.disable_ext_ani

BTW: Is there an easy way to find the name of the property for which SELinux denied access when it isn't labeled? I label all unlabeled properties with numbered names to find the one.

Also can I find which of those above properties are not labeled yet?

derfelot commented 1 year ago

I think I also se this on 20.0, but I'll have a look again and label it if necessary.

I don't know of a quick and easy way to find out which prop's are causing denials unfortunately. The only way I know of is stracing the service.

Flamefire commented 1 year ago

Relevant commits: https://github.com/Flamefire/android_device_sony_yoshino-common/commit/2c78b2cd7d3f97a88ce3a789dce0355243fc68a9 https://github.com/Flamefire/android_device_sony_yoshino-common/commit/ec49fd75037809c5a9254db1145e40038a0c9902

derfelot commented 1 year ago

Picked with

https://github.com/derfelot/android_device_sony_yoshino-common/commit/7d70267eb57c43e0eb9e7b0eeedec7778d05006f

and

https://github.com/derfelot/android_device_sony_yoshino-common/commit/bc865152b28fff3c983e2f428a65b32da9be1f35

Thanks