/openbmc/linux/tools/testing/selftests/net/ |
H A D | ip_local_port_range.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 24 static void unpack_port_range(__u32 range, __u16 *lo, __u16 *hi) in unpack_port_range() argument 26 *lo = range & 0xffff; in unpack_port_range() 27 *hi = range >> 16; in unpack_port_range() 38 return -1; in get_so_domain() 67 return -1; in bind_to_loopback_any_port() 87 return -1; in get_sock_port() 96 return -1; in get_sock_port() 100 static int get_ip_local_port_range(int fd, __u32 *range) in get_ip_local_port_range() argument 109 return -1; in get_ip_local_port_range() [all …]
|
/openbmc/qemu/util/ |
H A D | userfaultfd.c | 2 * Linux UFFD-WP support 10 * later. See the COPYING file in the top-level directory. 15 #include "qemu/error-report.h" 58 return -EINVAL; in uffd_open() 73 int ret = -1; in uffd_query_features() 78 return -1; in uffd_query_features() 92 close(uffd_fd); in uffd_query_features() 99 * Returns non-negative file descriptor or negative value in case of an error 102 * @non_blocking: create UFFD file descriptor for non-blocking operation 115 return -1; in uffd_create_fd() [all …]
|
/openbmc/openbmc-test-automation/security/ |
H A D | test_bmc_connections.robot | 59 FOR ${iter} IN RANGE ${1} ${iterations} + 1 77 Verify User Cannot Login After 5 Non-Logged In Sessions 79 ... are 5 non-logged in sessions. 80 [Tags] Verify_User_Cannot_Login_After_5_Non-Logged_In_Sessions 81 [Setup] Confirm Ability to Connect Then Close All Connections 83 ... SSHLibrary.Close All Connections AND FFDC On Test Case Fail 85 FOR ${iter} IN RANGE ${0} ${MAX_UNAUTH_PER_IP} 115 FOR ${iter} IN RANGE ${1} ${iterations} + 1 141 FOR ${iter} IN RANGE ${1} ${loop_iteration} + 1 151 SSHLibrary.Close Connection [all …]
|
/openbmc/linux/tools/testing/selftests/drivers/sdsi/ |
H A D | sdsi_test.py | 2 # SPDX-License-Identifier: GPL-2.0 43 result = subprocess.check_output(('grep', '-q', MODULE_NAME), stdin=lsmod_p.stdout) 45 @pytest.mark.parametrize('socket', range(0, NUM_SOCKETS)) 126 f.close() 133 f.close() 139 # file is none-zero and the same as the value read 147 f.close() 149 @pytest.mark.parametrize('socket', range(0, NUM_SOCKETS)) 163 f.close() 165 @pytest.mark.parametrize('socket', range(0, NUM_SOCKETS)) [all …]
|
/openbmc/linux/tools/testing/selftests/mm/ |
H A D | uffd-common.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2015-2023 Red Hat, Inc. 8 #include "uffd-common.h" 15 int uffd = -1, uffd_flags, finished, *pipefd, test_type; 29 mem_fd = memfd_create("uffd-test", memfd_flags); in uffd_mem_fd_create() 51 MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in anon_allocate_area() 54 return -errno; in anon_allocate_area() 88 return -errno; in hugetlb_allocate_area() 95 return -errno; in hugetlb_allocate_area() 106 close(mem_fd); in hugetlb_allocate_area() [all …]
|
H A D | madv_populate.c | 1 // SPDX-License-Identifier: GPL-2.0-only 66 ksft_test_result(ret == -1 && errno == EINVAL, in test_prot_read() 84 ksft_test_result(ret == -1 && errno == EINVAL, in test_prot_write() 110 ksft_test_result(ret == -1 && errno == ENOMEM, in test_holes() 113 ksft_test_result(ret == -1 && errno == ENOMEM, in test_holes() 118 ksft_test_result(ret == -1 && errno == ENOMEM, in test_holes() 121 ksft_test_result(ret == -1 && errno == ENOMEM, in test_holes() 126 ksft_test_result(ret == -1 && errno == ENOMEM, in test_holes() 129 ksft_test_result(ret == -1 && errno == ENOMEM, in test_holes() 142 for (; size > 0 && ret; size -= pagesize, start += pagesize) in range_is_populated() [all …]
|
H A D | vm_util.c | 1 // SPDX-License-Identifier: GPL-2.0 50 /* If present (63th bit), PFN is at bit 0 -- 54. */ in pagemap_get_pfn() 53 return -1ul; in pagemap_get_pfn() 65 close(fd); in clear_softdirty() 86 if (fd == -1) in read_pmd_pagesize() 91 close(fd); in read_pmd_pagesize() 95 close(fd); in read_pmd_pagesize() 103 uint64_t thp = -1; in __check_huge() 109 ret = snprintf(addr_pattern, MAX_LINE_LENGTH, "%08lx-", in __check_huge() 160 MAP_NORESERVE | MAP_PRIVATE, -1, 0) != ptr) in allocate_transhuge() [all …]
|
/openbmc/phosphor-pid-control/sysfs/ |
H A D | sysfswrite.cpp | 8 * http://www.apache.org/licenses/LICENSE-2.0 30 double range = maximum - minimum; in write() local 31 double offset = range * value; in write() 37 ofs.close(); in write() 47 ofs.close(); in write()
|
/openbmc/u-boot/test/py/ |
H A D | u_boot_spawn.py | 1 # SPDX-License-Identifier: GPL-2.0 2 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. 4 # Logic to spawn a sub-process and interact with its stdio. 14 """An exception sub-class that indicates that a timeout occurred.""" 18 """Represents the stdio of a freshly created sub-process. Commands may be 26 """Spawn (fork/exec) the sub-process. 44 # http://stackoverflow.com/questions/7857352/python-regex-to-match-vt100-escape-sequences 46 # version of Python in Ubuntu 14.04), hence the inclusion of a-z inside 48 self.re_vt100 = re.compile('(\x1b\[|\x9b)[^@-_a-z]*[@-_a-z]|\x1b[@-_a-z]') 55 # background (non-interactive) system? [all …]
|
/openbmc/linux/drivers/media/platform/st/sti/delta/ |
H A D | delta-ipc.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 * delta_ipc_open - open a decoding instance on firmware side 43 * delta_ipc_set_stream - set information about stream to decoder 48 * within IPC shared buffer range 53 * delta_ipc_decode - frame decoding synchronous request, returns only 59 * within IPC shared buffer range 63 * within IPC shared buffer range. 71 * delta_ipc_close - close decoding instance 72 * @hdl: (in) handle of decoding instance to close.
|
/openbmc/linux/Documentation/userspace-api/media/v4l/ |
H A D | libv4l-introduction.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 4 .. _libv4l-introduction: 17 :ref:`v4l2grab <v4l2grab-example>`. 28 :ref:`V4L2_PIX_FMT_BGR24 <V4L2-PIX-FMT-BGR24>`, 29 :ref:`V4L2_PIX_FMT_NV12_16L16 <V4L2-PIX-FMT-NV12-16L16>`, 30 :ref:`V4L2_PIX_FMT_JPEG <V4L2-PIX-FMT-JPEG>`, 31 :ref:`V4L2_PIX_FMT_MJPEG <V4L2-PIX-FMT-MJPEG>`, 32 :ref:`V4L2_PIX_FMT_MR97310A <V4L2-PIX-FMT-MR97310A>`, 33 :ref:`V4L2_PIX_FMT_OV511 <V4L2-PIX-FMT-OV511>`, 34 :ref:`V4L2_PIX_FMT_OV518 <V4L2-PIX-FMT-OV518>`, [all …]
|
H A D | vidioc-expbuf.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 13 VIDIOC_EXPBUF - Export a buffer as a DMABUF file descriptor. 45 range from zero to the number of buffers allocated with 48 one. For the multi-planar API, applications set the ``plane`` field to 49 the index of the plane to be exported. Valid planes range from zero to 51 the single-planar API, applications must set ``plane`` to zero. 55 case of multi-planar API, every plane is exported separately using 60 other DMABUF-aware devices. Refer to :ref:`DMABUF importing <dmabuf>` 62 recommended to close a DMABUF file when it is no longer used to allow 68 .. code-block:: c [all …]
|
H A D | ext-ctrls-rf-tuner.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 3 .. _rf-tuner-controls: 16 called Zero-IF tuners. Older tuners were typically simple PLL tuners 28 .. _rf-tuner-control-id: 47 range and step are driver-specific. 64 range and step are driver-specific. 68 signal path. It is located very close to tuner antenna input. Used 71 differs from the each others. The range and step are 72 driver-specific. 76 located inside mixer block, where RF signal is down-converted by the [all …]
|
/openbmc/linux/tools/testing/selftests/kvm/lib/ |
H A D | userfaultfd_util.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Copyright (C) 2019-2022 Google LLC 31 int uffd = uffd_desc->uffd; in uffd_handler_thread_fn() 32 int pipefd = uffd_desc->pipefds[0]; in uffd_handler_thread_fn() 33 useconds_t delay = uffd_desc->delay; in uffd_handler_thread_fn() 50 r = poll(pollfd, 2, -1); in uffd_handler_thread_fn() 52 case -1: in uffd_handler_thread_fn() 80 if (r == -1) { in uffd_handler_thread_fn() 97 r = uffd_desc->handler(uffd_desc->uffd_mode, uffd, &msg); in uffd_handler_thread_fn() 139 TEST_ASSERT(ioctl(uffd, UFFDIO_API, &uffdio_api) != -1, in uffd_setup_demand_paging() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | bpf_mod_race.c | 1 // SPDX-License-Identifier: GPL-2.0 17 * checks whether btf_try_get_module handles the invocation for a well-formed 71 return -errno; in test_setup_uffd() 76 close(uffd); in test_setup_uffd() 77 return -1; in test_setup_uffd() 80 uffd_register.range.start = (unsigned long)fault_addr; in test_setup_uffd() 81 uffd_register.range.len = 4096; in test_setup_uffd() 84 close(uffd); in test_setup_uffd() 85 return -1; in test_setup_uffd() 99 fault_addr = mmap(0, 4096, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in test_bpf_mod_race_config() [all …]
|
/openbmc/openbmc-test-automation/bin/ |
H A D | generate_inventory | 4 fields from the YAML phosphor-dbus-interfaces repository. 25 # Clone the phosphor-dbus-interfaces repository 26 cmd_buf = "git clone https://github.com/openbmc/phosphor-dbus-interfaces" 29 repo_subdir_path = "/phosphor-dbus-interfaces/xyz/openbmc_project/" 55 # yaml file paths for fan_wc (fans in water-cooled system). 80 for inv_index in range(len(yaml_inventory_list)): 90 f.close() 91 for item in range(0, len(yaml_data["properties"])): 118 out.close()
|
/openbmc/qemu/hw/vfio/ |
H A D | container.c | 10 * the COPYING file in the top-level directory. 12 * Based on qemu-kvm device-assignment: 18 * Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com) 25 #include "hw/vfio/vfio-common.h" 26 #include "exec/address-spaces.h" 29 #include "qemu/error-report.h" 30 #include "qemu/range.h" 41 switch (container->iommu_type) { in vfio_ram_block_discard_disable() 55 * required by RamDiscardManager. We would have to special-case sections in vfio_ram_block_discard_disable() 66 const VFIOContainerBase *bcontainer = &container->bcontainer; in vfio_dma_unmap_bitmap() [all …]
|
/openbmc/openbmc/poky/meta/recipes-core/meta/ |
H A D | cve-update-nvd2-native.bb | 19 # If you have a NVD API key (https://nvd.nist.gov/developers/request-an-api-key) 29 # older than this threshold, do a full re-download, else, do an incremental 42 if not bb.data.inherits_class("cve-check", d): 43 raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.") 65 # Allow the user to force-update 74 if time.time() - os.path.getmtime(db_file) < update_interval: 83 …fetch, this recipe uses CVE_DB_UPDATE_INTERVAL to control download, set to '-1' to disable fetch o… 100 do_fetch[file-checksums] = "" 115 # Remove it only if a journal file exists - it means a complete re-download 116 if os.path.exists("{0}-journal".format(db_file)): [all …]
|
/openbmc/openbmc/poky/meta/lib/oe/ |
H A D | prservice.py | 4 # SPDX-License-Identifier: GPL-2.0-only 37 conn.close() 72 conn.close() 88 f.write("#----------\t --------\t --------\t --------\t ----\n") 89 for i in range(len(metainfo['col_info'])): 103 for i in range(len(datainfo)): 127 conn.close()
|
/openbmc/openbmc/poky/meta/classes/ |
H A D | cve-check.bbclass | 4 # SPDX-License-Identifier: MIT 19 # bitbake -c cve_check openssl 20 # bitbake core-image-sato 21 # bitbake -k -c cve_check universe 34 CVE_CHECK_DB_FILENAME ?= "nvdcve_2-2.db" 40 CVE_CHECK_SUMMARY_FILE_NAME ?= "cve-summary" 41 CVE_CHECK_SUMMARY_FILE_NAME_JSON = "cve-summary.json" 42 CVE_CHECK_SUMMARY_INDEX_PATH = "${CVE_CHECK_SUMMARY_DIR}/cve-summary-index.txt" 70 # CVE_STATUS[CVE-1234-0001] = "not-applicable-platform: Issue only applies on Windows" 71 # CVE_STATUS[CVE-1234-0002] = "fixed-version: Fixed externally" [all …]
|
/openbmc/linux/drivers/rtc/ |
H A D | class.c | 1 // SPDX-License-Identifier: GPL-2.0 21 #include "rtc-core.h" 29 struct timerqueue_head *head = &rtc->timerqueue; in rtc_device_release() 32 mutex_lock(&rtc->ops_lock); in rtc_device_release() 35 mutex_unlock(&rtc->ops_lock); in rtc_device_release() 37 cancel_work_sync(&rtc->irqwork); in rtc_device_release() 39 ida_free(&rtc_ida, rtc->id); in rtc_device_release() 40 mutex_destroy(&rtc->ops_lock); in rtc_device_release() 46 int rtc_hctosys_ret = -ENODEV; 49 * whether it stores the most close value or the value with partial [all …]
|
/openbmc/ipmitool/lib/ |
H A D | ipmi_main.c | 22 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. 90 /* ipmi_password_file_read - Open file and read password from it 152 for (cmd=cmdlist; cmd->func != NULL; cmd++) { in ipmi_cmd_print() 153 if (cmd->desc == NULL) in ipmi_cmd_print() 159 lprintf(LOG_NOTICE, "\t%-12s %s", cmd->name, cmd->desc); in ipmi_cmd_print() 164 /* ipmi_cmd_run - run a command from list based on parameters 176 * returns -1 if command is not found 181 struct ipmi_cmd * cmd = intf->cmdlist; in ipmi_cmd_run() 185 if (cmd->func == NULL || cmd->name == NULL) in ipmi_cmd_run() 186 return -1; in ipmi_cmd_run() [all …]
|
/openbmc/linux/tools/perf/util/ |
H A D | evlist.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Parts came from builtin-{top,stat,record}.c, see those files for further 26 #include "bpf-event.h" 33 #include "util/bpf-filter.h" 41 #include "parse-events.h" 42 #include <subcmd/parse-options.h> 69 #define FD(e, x, y) (*(int *)xyarray__entry(e->core.fd, x, y)) 70 #define SID(e, x, y) xyarray__entry(e->core.sample_id, x, y) 75 perf_evlist__init(&evlist->core); in evlist__init() 76 perf_evlist__set_maps(&evlist->core, cpus, threads); in evlist__init() [all …]
|
/openbmc/linux/tools/testing/selftests/tc-testing/ |
H A D | tdc_batch.py | 4 tdc_batch.py - a script to generate TC batch file 14 parser.add_argument("-n", "--number", type=int, 17 "-a", 18 "--handle_start", 21 help="start handle range from (default: 1)") 22 parser.add_argument("-o", "--skip_sw", 25 parser.add_argument("-s", "--share_action", 28 parser.add_argument("-p", "--prio", 32 "-e", 33 "--operation", [all …]
|
/openbmc/qemu/tests/qemu-iotests/ |
H A D | 044 | 57 for i in range(0, h.refcount_table_clusters): 60 for j in range(0, 64)) 65 sector = b''.join(struct.pack('>H', 1) for j in range(0, 64 * 256)) 66 for block in range(0, h.refcount_table_clusters): 73 for j in range(0, h.l1_size)) 79 remaining = img_file_size - off_data 84 for j in range(0, 1024)) 87 remaining = remaining - 1024 * 512 91 for j in range(0, remaining // 512)) 100 fd.close() [all …]
|