aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/dev_video4linux.txt
Commit message (Collapse)AuthorAgeFilesLines
* sys/linux: add the descriptions for the CEC deviceChenyuan Yang2024-01-051-1/+0
|
* sys/linux: use nested flag definitions where sensiblePaul Chaignon2023-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All flags that are subset of other flags were identified with the following Bash script [1]. Only a small set of flags identified by the script were rewritten to use nested flag definitions, after manually checking if it makes sense (based on syzkaller context and man pages). For example, msgget_flags was rewritten as follows: -msgget_flags = IPC_CREAT, IPC_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH +msgget_flags = IPC_CREAT, IPC_EXCL, open_mode According to the msgget(2) man page: Upon creation, the least significant bits of the argument msgflg define the permissions of the message queue. These permission bits have the same format and semantics as the permissions specified for the mode argument of open(2). So it is correct to use open_mode directly in the definition of the flags for msgget(2). 1 - #!/bin/bash regexp_flags="^(\w+)\s*=\s+([a-zA-Z\"][^=]*)$" is_subset() { local -n subset=$1 local -n superset=$2 for element in "${subset[@]}"; do if [[ ! " ${superset[@]} " =~ " $element " ]]; then return 1 fi done return 0 } declare -A parsed_lines while IFS= read -r line; do if [[ ! "$line" =~ $regexp_flags ]]; then continue fi list_name="${BASH_REMATCH[1]}" values="${BASH_REMATCH[2]}" IFS=',' read -r -a values_array <<< "$(echo "$values" | sed 's/ //g' | tr ',' '\n' | sort | tr '\n' ',')" # Skip flags with too few value. if [ "${#values_array[@]}" -lt 3 ]; then continue fi # Skip the syz0, syz1, etc. lists. if [ "${values_array[0]}" = "\"syz0\"" ]; then continue fi parsed_lines["${list_name}"]="${values_array[@]}" done for list_name in "${!parsed_lines[@]}"; do values_array=(${parsed_lines["$list_name"]}) for other_list_name in "${!parsed_lines[@]}"; do other_values_array=(${parsed_lines["$other_list_name"]}) if [ "$list_name" = "$other_list_name" ]; then continue fi if is_subset values_array other_values_array; then if [ "${#values_array[@]}" -eq "${#other_values_array[@]}" ]; then echo "$list_name EQUALS $other_list_name" else echo "$list_name is a SUBET of $other_list_name" fi fi done done Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
* sys/linux: extract dev_video4linux.txt constsAleksandr Nogikh2023-10-041-18/+13
| | | | | Remove/replace obsolete consts and run `make extract` on the latest Linux mainline.
* pkg/ast, pkg/compiler: support per-file metadataDmitry Vyukov2022-04-291-0/+2
| | | | | | | | | | | | | | | | | | | | | We have a bunch of hacks in syz-extract, syz-sysgen and syz-check with respect to description files unsupported on some arches, or that must not be part of make extract. Add 2 meta attribtues to files: meta noextract Tells `make extract` to not extract constants for this file. Though, `syz-extract` can still be invoked manually on this file. meta arches["arch1", "arch2"] Restricts this file only to the given set of architectures. `make extract` and ``make generate` will not use it on other architectures. Later we can potentially use meta attributes to specify git tree/commit that must be used for extraction. Maybe something else. Fixes #2754
* sys/linux: fix bugs pointed out by syz-checkDmitry Vyukov2022-01-131-18/+19
| | | | Update #590
* sys/linux: add /dev/media descriptionsDmitry Vyukov2022-01-111-29/+26
| | | | | | | | | Move existing bits of /dev/media descriptions from sys.txt and dev_video4linux.txt and complete the descriptions. Also provide more concrete specialization of VIDIOC_QUERYBUF ioctl. Add ioctl specialization that serves as fd_v4l2_buffer resource constructor (returns it outside of a union).
* sys/linux: use per-field directions in descriptionsNecip Fazil Yildiran2020-08-131-1/+5
|
* sys/linux: v4l2 and vim2m2 refactoringRicardo Cañuelo2020-06-091-7/+6
| | | | | | | | | | | Remove a single template parameter to v4l2_buffer, as it should always use a fd_request descriptor. Update all syscalls that use it. Refactor the VIDIOC_STREAMON and VIDIOC_STREAMOFF vim2m ioctls to use v4l2_buf_type_vim2m as a parameter instead of an union. Remove ioctl$VIDIOC_RESERVED from dev_video4linux.txt (not defined in upstream kernel).
* sys/linux: specific descriptions for vim2m (v4l2)Ricardo Cañuelo2020-06-091-25/+30
| | | | | | | | | | | | | Add a set of descriptions to focus the fuzzing process on the V4L2 vim2m test driver. This should be useful to test the M2M framework. The syscalls are based on a specific file descriptor for the vim2m device and a selection of v4l2 ioctls that operate on it. Some of the existing v4l2 data structure definitions have been extended to allow restricting and selecting some options in order to narrow down the fuzzing process. Initial support for Request API added.
* tools: add script that checks copyright headersDmitry Vyukov2020-02-181-1/+1
| | | | Fixes #1604
* sys/linux: add NFNL_SUBSYS_ULOG descriptionsDmitry Vyukov2020-01-091-0/+3
|
* sys/linux: fix warning in dev_video4linux.txtDmitry Vyukov2019-12-221-16/+25
| | | | Update #590
* sys/linux: update constsDmitry Vyukov2019-12-011-1/+2
| | | | Regenerate const files for all arches.
* sys/linux: fix /dev/watch_queue nameDmitry Vyukov2019-11-301-4/+7
| | | | | | | | | It's /dev/watch_queue not /dev/fd_watch_queue. Don't know if it was renamed, or alwys wrong, but does not matter much, now it's /dev/watch_queue. Also attach v4l ioctls to /dev/swradio,radio,vbi,cec. It seems that _some_ of them are applicable to these devices as well.
* sys/linux: rename dev descriptions filesAndrey Konovalov2019-02-011-0/+965
Prefix file names of descriptions of /dev/* files with dev_. And give some of them more appropriate names.