Home
last modified time | relevance | path

Searched refs:ioctl (Results 1 – 25 of 524) sorted by relevance

12345678910>>...21

/ohos5.0/docs/zh-cn/device-dev/porting/
H A Dporting-yangfan-on_standard-demo.md624 #include <sys/ioctl.h>
652 #include <sys/ioctl.h>
711 #include <sys/ioctl.h>
946 ioctl(fd, VIDIOC_REQBUFS, &reqbuffer)。由此分析出Open Harmony OS上的ioctl VIDIOC_REQBUFS都会报错。再看两次失败的差异点:
962 此处插入ioctl的定义:int ioctl(int fd, int cmd, …); VIDIOC_QUERYBUF作为cmd的入参,是int类型。也就是一个数字命令码,该命令码通过ioctl发送…
1320 #include <sys/ioctl.h>
1335 #include <sys/ioctl.h>
1349 #include <sys/ioctl.h>
1362 #include <sys/ioctl.h>
1376 #include <sys/ioctl.h>
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/whitelist/
H A Dsh.baseline16 (allow sh aa_exec (file (ioctl read getattr map execute open)))
18 (allow sh bm_exec (file (ioctl read getattr map execute open)))
20 (allow sh bytrace_exec (file (ioctl read getattr map execute open)))
38 (allow sh devpts (chr_file (ioctl read write getattr)))
43 (allow sh edm_exec (file (getattr read ioctl open map execute)))
46 (allow sh hdcd (fifo_file (ioctl read write)))
59 (allow sh hiperf_exec (file (ioctl read getattr map execute open)))
100 (allow sh tty_device (chr_file (ioctl read write getattr open)))
114 (allow sh atm_exec (file (ioctl read getattr map execute open)))
146 (allow sh sh (udp_socket (connect create ioctl bind read write)))
[all …]
/ohos5.0/docs/en/device-dev/porting/
H A Dporting-yangfan-on_standard-demo.md624 #include <sys/ioctl.h>
652 #include <sys/ioctl.h>
672 int ret = ioctl(fd, VIDIOC_ENUM_FMT, &v4fmt);
711 #include <sys/ioctl.h>
939 ERROR:error: ioctl VIDIOC_QUERYBUF failed.
1318 #include <sys/ioctl.h>
1333 #include <sys/ioctl.h>
1347 #include <sys/ioctl.h>
1360 #include <sys/ioctl.h>
1374 #include <sys/ioctl.h>
[all …]
/ohos5.0/docs/zh-cn/device-dev/subsystems/
H A Dsubsys-security-selinux-checklist.md46 ## 涉及新增ioctl的SELinux策略自检
48 涉及配置ioctl相关的SELinux策略时,除了配置allow规则以外,还需要根据avc日志对ioctl的ioctlcmd进行限制,否则会导致所有的ioctlcmd权限都被开放,不满足权限最小化原…
50 #avc: denied { ioctl } for pid=1 comm="init" path="/data/app/el1/bundle/public" dev="mmcblk0p11"…
52 根据该avc日志配置了允许ioctl的SELinux策略:
54 allow init data_app_el1_file:dir { ioctl };
56 同时,还需要根据avc日志中的`ioctlcmd=0x6613`字段,进一步限制ioctl的开放范围:
58 allowxperm init data_app_el1_file:dir ioctl { 0x6613 };
H A Dsubsys-security-selinux-check.md288 ## ioctl的权限策略检查
292 涉及配置ioctl相关的SELinux策略时,除了配置allow规则以外,还需要根据avc日志对ioctl的ioctlcmd进行限制,否则会导致所有的ioctlcmd权限都被开放,不满足权限最小化原…
296 配置的 allow 规则访问权限包含了 ioctl,但未限定 ioctl 权限参数时,会触发编译报错,关键报错信息`check ioctl rule in user mode failed.`,报错…
298 check ioctl rule in user mode failed.
299 violation list (allow scontext tcontext:tclass ioctl)
300 allow wifi_host data_service_el1_file:file ioctl;
301 allow wifi_host dev_hdfwifi:chr_file ioctl;
308 仅添加`allow scontext tcontext:tclass ioctl`规则会导致主体有对tcontext:tclass所有ioctl的权限,权限过大被编译拦截,需添加具体的allowxp…
313 - 方式一:根据avc日志对ioctl的ioctlcmd进行限制。例如,有下面的avc日志:
317 根据该avc日志配置了允许ioctl的SELinux策略:
[all …]
/ohos5.0/commonlibrary/memory_utils/libpurgeablemem/cpp/src/
H A Dpurgeable_ashmem.cpp107 int ret = ioctl(ashmemFd_, PURGEABLE_ASHMEM_IS_PURGED); in IsPurged()
136 TEMP_FAILURE_RETRY(ioctl(ashmemFd_, ASHMEM_SET_PURGEABLE)); in CreatePurgeableData()
137 if (TEMP_FAILURE_RETRY(ioctl(ashmemFd_, ASHMEM_GET_PURGEABLE)) == 1) { in CreatePurgeableData()
150 TEMP_FAILURE_RETRY(ioctl(ashmemFd_, ASHMEM_PIN, &pin_)); in Pin()
152 __func__, ashmemFd_, ioctl(ashmemFd_, ASHMEM_GET_PIN_STATUS, &pin_)); in Pin()
166 TEMP_FAILURE_RETRY(ioctl(ashmemFd_, ASHMEM_UNPIN, &pin_)); in Unpin()
168 __func__, ashmemFd_, ioctl(ashmemFd_, ASHMEM_GET_PIN_STATUS, &pin_)); in Unpin()
182 ret = ioctl(ashmemFd_, ASHMEM_GET_PIN_STATUS, &pin_); in GetPinStatus()
189 TEMP_FAILURE_RETRY(ioctl(ashmemFd_, PURGEABLE_ASHMEM_REBUILD_SUCCESS)); in AfterRebuildSucc()
236 TEMP_FAILURE_RETRY(ioctl(ashmemFd_, ASHMEM_SET_PURGEABLE)); in ChangeAshmemData()
[all …]
/ohos5.0/foundation/resourceschedule/frame_aware_sched/interfaces/innerkits/frameintf/
H A Drtg_interface.cpp97 if (ioctl(g_fd, CMD_ID_SET_ENABLE, &enableData)) { in EnableRtg()
118 ret = ioctl(g_fd, CMD_ID_SET_RTG, &grp_data);
148 ret = ioctl(g_fd, CMD_ID_SET_RTG, &grp_data);
166 ret = ioctl(g_fd, CMD_ID_SET_RTG, &grp_data);
195 ret = ioctl(g_fd, CMD_ID_SET_RTG, &grp_data);
214 ret = ioctl(g_fd, CMD_ID_SET_RTG, &grp_data); in DestroyRtgGrp()
235 ret = ioctl(g_fd, CMD_ID_SET_RTG_ATTR, &strData); in SetFrameRateAndPrioType()
280 ret = ioctl(g_fd, CMD_ID_END_SCENE, &state_data); in EndScene()
319 ret = ioctl(g_fd, CMD_ID_SET_MARGIN, &state_data); in SetMargin()
336 ret = ioctl(g_fd, CMD_ID_SEARCH_RTG, &search_data); in SearchRtgForTid()
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/distributeddatamgr/distributeddatamgr/system/
H A Ddistributeddata.te68 allow distributeddata hmdfs:dir { search read open ioctl };
69 allowxperm distributeddata hmdfs:dir ioctl { 0xf203 };
104 allow normal_hap_attr normal_hap_data_file_attr:file { ioctl };
105 allow system_basic_hap_attr system_basic_hap_data_file_attr:file { ioctl };
106 allow system_core_hap_attr system_core_hap_data_file_attr:file { ioctl };
107 allowxperm normal_hap_attr normal_hap_data_file_attr:file ioctl { 0xf546 0xf547 };
115 allowxperm distributeddata normal_hap_data_file_attr:file ioctl { 0x5413 0xf546 0xf547 };
158 allow distributeddata normal_hap_data_file_attr:file { ioctl map open read write setattr };
189 allowxperm distributeddata normal_hap_data_file_attr:file ioctl { 0xf50c };
205 allowxperm distributeddata data_service_el1_utd_file:file ioctl { 0x5413 };
[all …]
/ohos5.0/foundation/resourceschedule/qos_manager/services/src/
H A Dqos_interface.cpp76 ret = ioctl(fd, CMD_ID_SET_ENABLE, &enableData); in EnableRtg()
103 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in AuthEnable()
130 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in AuthSwitch()
154 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in AuthDelete()
181 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in AuthPause()
205 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in AuthGet()
226 ret = ioctl(fd, ENHANCE_AUTH_CTRL_OPERATION, &data); in AuthEnhance()
257 ret = ioctl(fd, QOS_CTRL_BASIC_OPERATION, &data); in QosApplyForOther()
279 ret = ioctl(fd, QOS_CTRL_BASIC_OPERATION, &data); in QosLeave()
301 ret = ioctl(fd, QOS_CTRL_BASIC_OPERATION, &data); in QosLeaveForOther()
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/security/access_token/system/
H A Daccess_token.te17 allowxperm accesstoken_service accesstoken_data_file:dir ioctl { 0xf546 };
99 allow domain dev_at_file:chr_file { ioctl open read write };
102 allowxperm accountmgr dev_at_file:chr_file ioctl { 0x4104 };
103 allowxperm hiview dev_at_file:chr_file ioctl { 0x4104 };
104 allowxperm privacy_service dev_at_file:chr_file ioctl { 0x4104 };
105 allowxperm token_sync_service dev_at_file:chr_file ioctl { 0x4104 };
106 allowxperm msdp_sa dev_at_file:chr_file ioctl { 0x4104 };
107 allowxperm init dev_at_file:chr_file ioctl { 0x4104 };
108 allowxperm distributedsche dev_at_file:chr_file ioctl { 0x4104 };
109 allowxperm av_session dev_at_file:chr_file ioctl { 0x4104 };
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/drivers/peripheral/audio/vendor/
H A Daudio_host.te51 allowxperm audio_host dev_hdf_kevent:chr_file ioctl { 0x6203 };
65 allow audio_host dev_dma_heap_file:chr_file { read open ioctl };
86 allow audio_host dev_hdf_kevent:chr_file { ioctl };
93 allow audio_host data_file:file { ioctl };
96 allow audio_host dev_snd_file:chr_file { ioctl };
100 allowxperm audio_host dev_snd_file:chr_file ioctl { 0x4143 };
101 allowxperm audio_host dev_hdf_audio_render:chr_file ioctl { 0x6201 };
103 allowxperm audio_host data_file:file ioctl { 0x5413 };
122 allowxperm audio_host dev_soundtrigger:chr_file ioctl { 0x5302 };
135 allow audio_host dev_hifi_misc:chr_file { ioctl };
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/security/encaps/public/
H A Ddev_encaps.te16 allow { domain -hap_domain -rgm_violator_ohos_dev_encaps_chr_file } dev_encaps:chr_file { ioctl rea…
17 neverallow { hap_domain } dev_encaps:chr_file { ioctl read open };
19 allowxperm { appspawn init } dev_encaps:chr_file ioctl { 0x4518 };
20 allowxperm appspawn dev_encaps:chr_file ioctl { 0x451a };
21 neverallowxperm { domain -appspawn -init } dev_encaps:chr_file ioctl { 0x4518 0x451a };
22 allowxperm { domain -hap_domain -rgm_violator_ohos_dev_encaps_chr_file } dev_encaps:chr_file ioctl
23 neverallowxperm { domain } dev_encaps:chr_file ioctl ~{ 0x4518 0x4519 0x451a };
/ohos5.0/foundation/resourceschedule/ffrt/src/eu/
H A Dqos_interface.cpp84 ret = ioctl(fd, CMD_ID_SET_ENABLE, &enableData); in FFRTEnableRtg()
111 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in FFRTAuthEnable()
136 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in FFRTAuthSwitch()
158 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in FFRTAuthDelete()
183 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in FFRTAuthPause()
205 ret = ioctl(fd, BASIC_AUTH_CTRL_OPERATION, &data); in FFRTAuthGet()
242 ret = ioctl(fd, QOS_CTRL_BASIC_OPERATION, &data); in FFRTQosApplyForOther()
264 ret = ioctl(fd, QOS_CTRL_BASIC_OPERATION, &data); in FFRTQosLeave()
287 ret = ioctl(fd, QOS_CTRL_BASIC_OPERATION, &data); in FFRTQosLeaveForOther()
323 ret = ioctl(fd, QOS_THREAD_CTRL_OPERATION, &ctrlDatas); in FFRTThreadCtrl()
[all …]
/ohos5.0/commonlibrary/memory_utils/libpurgeablemem/test/
H A Dpurgeableashmem_test.cpp189 EXPECT_EQ(ioctl(fd, ASHMEM_SET_PURGEABLE), 0);
190 EXPECT_EQ(ioctl(fd, ASHMEM_GET_PURGEABLE), 1);
192 ioctl(fd, ASHMEM_PIN, &pin_);
194 ioctl(fd, ASHMEM_PIN, &pin_);
196 ioctl(fd, ASHMEM_UNPIN, &pin_);
198 ioctl(fd, ASHMEM_UNPIN, &pin_);
202 ioctl(fd, ASHMEM_UNPIN, &pin_);
205 ioctl(fd, ASHMEM_PURGE_ALL_CACHES);
207 ioctl(fd, ASHMEM_PIN, &pin_);
210 ioctl(fd, ASHMEM_UNPIN, &pin_);
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/security/asset/system/
H A Dasset_service.te16 …ervice_file:dir { add_name create open read remove_name search write rmdir getattr setattr ioctl };
17 allowxperm asset_service data_service_el1_public_asset_service_file:dir ioctl { 0xf546 0xf547 };
19 …ce_el1_public_asset_service_file:file { create getattr open read setattr unlink write lock ioctl };
20 allowxperm asset_service data_service_el1_public_asset_service_file:file ioctl { 0xf501 0xf502 0xf5…
22 …a_service_el2_user_id_asset_service_file:dir { search write add_name open read remove_name ioctl };
23 allowxperm asset_service data_service_el2_user_id_asset_service_file:dir ioctl { 0xf546 0xf547 };
25 …e_el2_user_id_asset_service_file:file { create write open read setattr getattr lock unlink ioctl };
26 allowxperm asset_service data_service_el2_user_id_asset_service_file:file ioctl { 0xf546 0xf547 0xf…
/ohos5.0/base/hiviewdfx/hiview/framework/native/unified_collection/collector/device_client/
H A Dcollect_device_client.cpp77 int ret = ioctl(fd_, IOCTRL_COLLECT_PROC_COUNT, &processCount); in GetProcessCount()
91 int ret = ioctl(fd_, IOCTRL_COLLECT_ALL_PROC_CPU, data->entry_); in FetchProcessCpuData()
104 int ret = ioctl(fd_, IOCTRL_COLLECT_THE_PROC_CPU, data->entry_); in FetchProcessCpuData()
116 int ret = ioctl(fd_, IOCTRL_COLLECT_THREAD_COUNT, &threadCount); in GetThreadCount()
128 int ret = ioctl(fd_, IOCTRL_COLLECT_APP_THREAD_COUNT, &threadCount); in GetSelfThreadCount()
145 int ret = ioctl(fd_, IOCTRL_COLLECT_THE_THREAD, data->entry_); in FetchThreadCpuData()
162 int ret = ioctl(fd_, IOCTRL_COLLECT_APP_THREAD, data->entry_); in FetchSelfThreadCpuData()
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/drivers/peripheral/camera/vendor/
H A Dcamera_host.te38 allow camera_host dev_dma_heap_file:chr_file { ioctl open read };
40 allow camera_host dev_dri_file:chr_file { getattr ioctl open read write };
42 allow camera_host dev_hdf_kevent:chr_file { getattr ioctl open read write };
43 allow camera_host dev_mpp:chr_file { ioctl open read write };
44 allow camera_host dev_rga:chr_file { ioctl open read write };
56 allow camera_host hidumper_file:file { append open create getattr ioctl };
110 allowxperm camera_host data_local_tmp:file ioctl { 0x5413 };
111 allowxperm camera_host dev_video_file:chr_file ioctl { 0x516c };
116 allowxperm camera_host dev_mpp:chr_file ioctl { 0x7601 };
117 allowxperm camera_host dev_rga:chr_file ioctl { 0x5017 0x5019 0x601b };
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/ability/ability_runtime/system/
H A Daa.te29 allow aa devpts:chr_file { ioctl read write };
36 allow aa hdcd:fifo_file { ioctl read write };
65 allow aa sh:fifo_file { ioctl write };
95 allowxperm aa devpts:chr_file ioctl { 0x5413 };
96 allowxperm aa hap_file_attr:file ioctl { 0x5413 };
97 allowxperm aa hdcd:fifo_file ioctl { 0x5413 };
98 allowxperm aa sh:fifo_file ioctl { 0x5413 };
110 allow aa devpts:chr_file { ioctl read write };
115 allow aa hdcd:fifo_file { ioctl read write };
149 allowxperm aa devpts:chr_file ioctl { 0x5413 };
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/print/print_service/system/
H A Dscan_service.te29 allow scan_service data_service_el1_public_print_service_file:file { read unlink create ioctl write…
33 allow scan_service scan_service:udp_socket { ioctl read write create setopt bind getattr };
37 allow scan_service dev_bus_usb_file:chr_file { ioctl open read write };
50 allowxperm scan_service scan_service:udp_socket ioctl { 0x8912 0x8915 };
51 allowxperm scan_service data_service_el1_public_print_service_file:file ioctl { 0x5413 };
52 allowxperm scan_service dev_bus_usb_file:chr_file ioctl { 0x5504 0x550a 0x550d 0x550f 0x5510 0x551a…
53 allow scan_service scan_service:unix_dgram_socket { setopt getopt ioctl };
54 allowxperm scan_service scan_service:unix_dgram_socket ioctl { 0x8910 };
60 allow scan_service data_service_el2_file:file { create getattr ioctl open read write unlink };
61 allowxperm scan_service data_service_el2_file:file ioctl { 0x5413 };
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/hiviewdfx/hisysevent/system/
H A Dhisysevent.te35 allow hisysevent devpts:chr_file { read write ioctl };
36 allowxperm hisysevent devpts:chr_file ioctl { 0x5413 };
39 allow hisysevent hiprofiler_plugins:fifo_file { ioctl write };
41 allow hisysevent data_local_tmp:file { write ioctl };
42 allowxperm hisysevent data_local_tmp:file ioctl { 0x5413 };
46 allow hisysevent sh:fifo_file { write ioctl };
47 allowxperm hisysevent sh:fifo_file ioctl { 0x5413 };
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/bundlemanager/bundle_framework/system/
H A Dinstalls.te59 allowxperm installs data_local_arkprofile:file ioctl { 0x5413 };
79 allowxperm installs data_app_el1_file:file ioctl { 0x5413 };
80 allowxperm installs data_service_el1_file:file ioctl 0x5413;
88 allow installs data_app_el1_file:file { ioctl };
96 allow installs dev_code_sign:chr_file { ioctl write write open };
98 allowxperm installs dev_code_sign:chr_file ioctl { 0x6b01 };
124 allow installs normal_hap_data_file_attr:dir { ioctl };
126 allow installs system_core_hap_data_file_attr:dir { ioctl };
128 allow installs system_basic_hap_data_file_attr:dir { ioctl };
130 allow installs data_app_el5_file:dir { ioctl };
[all …]
H A Dbm.te33 allow bm hdcd:fifo_file { read write ioctl };
34 allowxperm bm hdcd:fifo_file ioctl { 0x5413 };
47 allow bm sh:fifo_file { write ioctl };
51 allow bm devpts:chr_file { read write ioctl };
65 allowxperm bm devpts:chr_file ioctl { 0x5413 };
66 allowxperm bm sh:fifo_file ioctl { 0x5413 };
89 allow bm hdcd:fifo_file { read write ioctl };
90 allowxperm bm hdcd:fifo_file ioctl { 0x5413 };
104 allow bm sh:fifo_file { write ioctl };
108 allow bm devpts:chr_file { read write ioctl };
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/drivers/peripheral/usb/vendor/
H A Dusb_host.te18 allow usb_host data_service_el1_file:file { ioctl open read write getattr create map};
76 allow usb_host configfs:file { create ioctl open read write getattr };
85 allow usb_host data_init_agent:file { ioctl open read append };
90 allow usb_host dev_bus_usb_file:chr_file { ioctl map open read write getattr};
94 allow usb_host dev_hdf_kevent:chr_file { getattr ioctl open read write };
95 allow usb_host dev_hdf_usb_pnp:chr_file { getattr ioctl open read write };
96 allow usb_host dev_usbfn_file:chr_file { getattr ioctl read write open map };
131 allowxperm usb_host configfs:file ioctl { 0x5413 };
132 allowxperm usb_host data_init_agent:file ioctl { 0x5413 };
135 allowxperm usb_host dev_hdf_kevent:chr_file ioctl { 0x6202 0x6201 0x6203 };
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/multimedia/player/system/
H A Dcodec_host.te14 #avc: denied { ioctl } for pid=413 comm="omx_enc_input" path="/dev/dri/card0" dev="tmpfs" ino=77…
15 allow codec_host dev_dri_file:chr_file { ioctl };
16 allowxperm codec_host dev_dri_file:chr_file ioctl { 0x642e 0x64b4 };
18 #avc: denied { ioctl } for pid=428 comm="omx_dec_input" path="/dev/dri/card0" dev="tmpfs" ino=77…
19 allow codec_host dev_dri_file:chr_file { ioctl };
20 allowxperm codec_host dev_dri_file:chr_file ioctl { 0x64b2 0x642d };
32 allow codec_host dev_mpp:chr_file { ioctl };
33 allowxperm codec_host dev_mpp:chr_file ioctl { 0x7601 };
38 #avc: denied { ioctl } for pid=413 comm="omx_dec_output" path="/dev/rga" dev="tmpfs" ino=169 ioc…
39 allow codec_host dev_rga:chr_file { ioctl };
[all …]
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/update/module_update/system/
H A Dinit.te18 allowxperm init dev_block_file:blk_file ioctl { 0x1261 0x4c00 0x4c01 0x4c04 0x4c09 0x4c0a };
19 allow init dev_file:chr_file { ioctl open read write };
20 allowxperm init dev_file:chr_file ioctl { 0xfd03 0xfd06 0xfd07 0xfd09 };
21 allow init dev_mapper_control_file:chr_file { ioctl open read write relabelto getattr setattr };
22 allowxperm init dev_mapper_control_file:chr_file ioctl { 0xfd03 0xfd06 0xfd07 0xfd09 0xfd04 };
23 allow init dev_loop_control_file:chr_file { getattr ioctl open read write };
24 allowxperm init dev_loop_control_file:chr_file ioctl { 0x4c80 0x4c82 };

12345678910>>...21