| /tools/testing/selftests/bpf/ |
| A D | ip_check_defrag_frags.h | 9 static uint8_t frag_0[] = { 16 static uint8_t frag_1[] = { 23 static uint8_t frag_2[] = { 28 static uint8_t frag6_0[] = { 38 static uint8_t frag6_1[] = { 48 static uint8_t frag6_2[] = {
|
| A D | test_tag.c | 78 static int hex2bin(uint8_t *dst, const char *src, size_t count) in hex2bin() 91 static void tag_from_fdinfo(int fd_prog, uint8_t *tag, uint32_t len) in tag_from_fdinfo() 114 static void tag_from_alg(int insns, uint8_t *tag, uint32_t len) in tag_from_alg() 144 static void tag_dump(const char *prefix, uint8_t *tag, uint32_t len) in tag_dump() 154 static void tag_exit_report(int insns, int fd_map, uint8_t *ftag, in tag_exit_report() 155 uint8_t *atag, uint32_t len) in tag_exit_report() 171 uint8_t ftag[8], atag[sizeof(ftag)]; in do_test()
|
| /tools/usb/usbip/libsrc/ |
| A D | vhci_driver.h | 24 uint8_t port; 29 uint8_t busnum; 30 uint8_t devnum; 56 int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid, 60 int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum, 61 uint8_t devnum, uint32_t speed); 63 int usbip_vhci_detach_device(uint8_t port);
|
| A D | usbip_common.h | 105 uint8_t bInterfaceClass; 106 uint8_t bInterfaceSubClass; 107 uint8_t bInterfaceProtocol; 108 uint8_t padding; /* alignment */ 123 uint8_t bDeviceClass; 124 uint8_t bDeviceSubClass; 125 uint8_t bDeviceProtocol; 126 uint8_t bConfigurationValue; 127 uint8_t bNumConfigurations; 128 uint8_t bNumInterfaces; [all …]
|
| A D | usbip_common.c | 211 READ_ATTR(udev, uint8_t, sdev, bDeviceClass, "%02x\n"); in read_usb_device() 212 READ_ATTR(udev, uint8_t, sdev, bDeviceSubClass, "%02x\n"); in read_usb_device() 213 READ_ATTR(udev, uint8_t, sdev, bDeviceProtocol, "%02x\n"); in read_usb_device() 219 READ_ATTR(udev, uint8_t, sdev, bConfigurationValue, "%02x\n"); in read_usb_device() 220 READ_ATTR(udev, uint8_t, sdev, bNumConfigurations, "%02x\n"); in read_usb_device() 221 READ_ATTR(udev, uint8_t, sdev, bNumInterfaces, "%02x\n"); in read_usb_device() 223 READ_ATTR(udev, uint8_t, sdev, devnum, "%d\n"); in read_usb_device() 261 READ_ATTR(uinf, uint8_t, sif, bInterfaceClass, "%02x\n"); in read_usb_interface() 262 READ_ATTR(uinf, uint8_t, sif, bInterfaceSubClass, "%02x\n"); in read_usb_interface() 263 READ_ATTR(uinf, uint8_t, sif, bInterfaceProtocol, "%02x\n"); in read_usb_interface() [all …]
|
| /tools/include/tools/ |
| A D | be_byteshift.h | 7 static inline uint16_t __get_unaligned_be16(const uint8_t *p) in __get_unaligned_be16() 12 static inline uint32_t __get_unaligned_be32(const uint8_t *p) in __get_unaligned_be32() 17 static inline uint64_t __get_unaligned_be64(const uint8_t *p) in __get_unaligned_be64() 23 static inline void __put_unaligned_be16(uint16_t val, uint8_t *p) in __put_unaligned_be16() 29 static inline void __put_unaligned_be32(uint32_t val, uint8_t *p) in __put_unaligned_be32() 35 static inline void __put_unaligned_be64(uint64_t val, uint8_t *p) in __put_unaligned_be64() 43 return __get_unaligned_be16((const uint8_t *)p); in get_unaligned_be16() 48 return __get_unaligned_be32((const uint8_t *)p); in get_unaligned_be32() 53 return __get_unaligned_be64((const uint8_t *)p); in get_unaligned_be64()
|
| A D | le_byteshift.h | 7 static inline uint16_t __get_unaligned_le16(const uint8_t *p) in __get_unaligned_le16() 12 static inline uint32_t __get_unaligned_le32(const uint8_t *p) in __get_unaligned_le32() 17 static inline uint64_t __get_unaligned_le64(const uint8_t *p) in __get_unaligned_le64() 23 static inline void __put_unaligned_le16(uint16_t val, uint8_t *p) in __put_unaligned_le16() 29 static inline void __put_unaligned_le32(uint32_t val, uint8_t *p) in __put_unaligned_le32() 35 static inline void __put_unaligned_le64(uint64_t val, uint8_t *p) in __put_unaligned_le64() 43 return __get_unaligned_le16((const uint8_t *)p); in get_unaligned_le16() 48 return __get_unaligned_le32((const uint8_t *)p); in get_unaligned_le32() 53 return __get_unaligned_le64((const uint8_t *)p); in get_unaligned_le64()
|
| /tools/testing/selftests/bpf/progs/ |
| A D | test_cls_redirect.h | 31 uint8_t hlen : 5, control : 1, variant : 2; 33 uint8_t variant : 2, control : 1, hlen : 5; 35 uint8_t proto_ctype; 41 uint8_t _r : 2, last_hop_gre : 1, forward_syn : 1, version : 4; 43 uint8_t version : 4, forward_syn : 1, last_hop_gre : 1, _r : 2; 45 uint8_t reserved; 46 uint8_t next_hop; 47 uint8_t hop_count;
|
| A D | verifier_bitfield_write.c | 13 uint8_t ub1: 1; 14 uint8_t ub2: 2; 46 uint8_t ub2; in multiple_field_roundtrip() 56 return (((uint8_t)sb4) << 2) | ub2; in multiple_field_roundtrip() 67 uint8_t ub1, ub2; in adjacent_field_roundtrip() 88 uint8_t ub1; in multibyte_field_roundtrip()
|
| /tools/testing/selftests/kvm/x86/ |
| A D | pmu_counters_test.c | 35 static uint8_t kvm_pmu_version; 87 uint8_t pmu_version, in pmu_vm_create_with_one_vcpu() 305 uint8_t i; in guest_test_arch_events() 314 uint8_t length, uint8_t unavailable_mask) in test_arch_events() 358 uint8_t vector; in guest_test_rdpmc() 379 uint8_t i; in guest_rd_wr_counters() 404 uint8_t vector; in guest_rd_wr_counters() 444 uint8_t nr_gp_counters = 0; in guest_test_gp_counters() 498 uint8_t i; in guest_test_fixed_counters() 515 uint8_t vector; in guest_test_fixed_counters() [all …]
|
| A D | fix_hypercall_test.c | 29 static const uint8_t vmx_vmcall[HYPERCALL_INSN_SIZE] = { 0x0f, 0x01, 0xc1 }; 30 static const uint8_t svm_vmmcall[HYPERCALL_INSN_SIZE] = { 0x0f, 0x01, 0xd9 }; 32 extern uint8_t hypercall_insn[HYPERCALL_INSN_SIZE]; 33 static uint64_t do_sched_yield(uint8_t apic_id) in do_sched_yield() 48 const uint8_t *native_hypercall_insn; in guest_main() 49 const uint8_t *other_hypercall_insn; in guest_main()
|
| A D | private_mem_conversions_test.c | 32 uint8_t *mem = (uint8_t *)gpa; \ 41 static void memcmp_h(uint8_t *mem, uint64_t gpa, uint8_t pattern, size_t size) in memcmp_h() 74 uint8_t current_pattern, uint8_t new_pattern) in guest_sync_shared() 124 const uint8_t def_p = 0xaa; in guest_test_explicit_conversion() 125 const uint8_t init_p = 0xcc; in guest_test_explicit_conversion() 139 uint8_t p1 = 0x11; in guest_test_explicit_conversion() 140 uint8_t p2 = 0x22; in guest_test_explicit_conversion() 141 uint8_t p3 = 0x33; in guest_test_explicit_conversion() 142 uint8_t p4 = 0x44; in guest_test_explicit_conversion() 232 const uint8_t init_p = 0xcc; in guest_test_punch_hole() [all …]
|
| /tools/testing/selftests/net/tcp_ao/lib/ |
| A D | aolib.h | 373 uint8_t prefix, uint8_t vrf, 374 uint8_t sndid, uint8_t rcvid, uint8_t maclen, 375 uint8_t keyflags, uint8_t keylen, const char *key); 380 uint8_t prefix, uint8_t vrf, in test_prepare_key() 381 uint8_t sndid, uint8_t rcvid, uint8_t maclen, in test_prepare_key() 382 uint8_t keyflags, uint8_t keylen, const char *key) in test_prepare_key() 395 uint8_t sndid, uint8_t rcvid) in test_prepare_def_key() 407 uint8_t prefix, uint8_t sndid, uint8_t rcvid); 431 uint8_t vrf, uint8_t sndid, uint8_t rcvid) in test_add_key_vrf() 450 uint8_t sndid, uint8_t rcvid) in test_add_key() [all …]
|
| /tools/testing/selftests/net/tcp_ao/ |
| A D | unsigned-md5.c | 15 static const uint8_t test_vrf_tabid = 42; 39 union tcp_addr *ao_addr, uint8_t ao_prefix, in try_accept() 41 uint8_t sndid, uint8_t rcvid, uint8_t vrf, in try_accept() 267 uint8_t sndid, uint8_t rcvid, uint8_t vrf, in try_connect() 325 int vrf, uint8_t sndid, uint8_t rcvid, in try_add_key_vrf() 328 uint8_t keyflags = 0; in try_add_key_vrf() 341 (uint8_t)vrf, sndid, rcvid); in try_add_key_vrf() 372 uint8_t sndid, uint8_t rcvid, in open_add() 415 union tcp_addr ao_addr, uint8_t ao_prefix, in try_to_preadd() 417 uint8_t sndid, uint8_t rcvid, in try_to_preadd() [all …]
|
| A D | key-management.c | 38 static int prepare_sk(union tcp_addr *addr, uint8_t sndid, uint8_t rcvid) in prepare_sk() 56 static int prepare_lsk(union tcp_addr *addr, uint8_t sndid, uint8_t rcvid) in prepare_lsk() 66 static int test_del_key(int sk, uint8_t sndid, uint8_t rcvid, bool async, in test_del_key() 114 static void try_delete_key(char *tst_name, int sk, uint8_t sndid, uint8_t rcvid, in try_delete_key() 171 uint8_t sndid, uint8_t rcvid) in test_add_current_rnext_key() 194 uint8_t sndid, uint8_t rcvid) in __try_add_current_rnext_key() 217 uint8_t sndid, uint8_t rcvid, fault_t inj) in try_add_current_rnext_key() 412 uint8_t client_keyid; 413 uint8_t server_keyid; 414 uint8_t maclen; [all …]
|
| A D | connect-deny.c | 9 static inline int test_add_key_maclen(int sk, const char *key, uint8_t maclen, in test_add_key_maclen() 10 union tcp_addr in_addr, uint8_t prefix, in test_add_key_maclen() 11 uint8_t sndid, uint8_t rcvid) in test_add_key_maclen() 33 union tcp_addr addr, uint8_t prefix, in try_accept() 34 uint8_t sndid, uint8_t rcvid, uint8_t maclen, in try_accept() 167 const char *pwd, union tcp_addr addr, uint8_t prefix, in try_connect() 168 uint8_t sndid, uint8_t rcvid, in try_connect()
|
| /tools/firmware/ |
| A D | ihex2fw.c | 32 uint8_t data[]; 38 static uint8_t nybble(const uint8_t n) in nybble() 46 static uint8_t hex(const uint8_t *data, uint8_t *crc) in hex() 48 uint8_t val = (nybble(data[0]) << 4) | nybble(data[1]); in hex() 53 static int process_ihex(uint8_t *data, ssize_t size); 76 uint8_t *data; in main() 132 static int process_ihex(uint8_t *data, ssize_t size) in process_ihex() 138 uint8_t type, crc = 0, crcbyte = 0; in process_ihex()
|
| /tools/testing/selftests/net/ |
| A D | tap.c | 51 uint8_t *end = (uint8_t *)nh + nh->nlmsg_len; in rtattr_end() 53 attr->rta_len = end - (uint8_t *)attr; in rtattr_end() 221 size_t build_eth(uint8_t *buf, uint16_t proto) in build_eth() 232 static uint32_t add_csum(const uint8_t *buf, int len) in add_csum() 243 sum += *(uint8_t *)sbuf; in add_csum() 308 uint8_t *cur = buf; in build_test_packet_valid_udp_gso() 328 uint8_t *cur = buf; in build_test_packet_valid_udp_csum() 345 uint8_t *cur = buf; in build_test_packet_crash_tap_invalid_eth_proto() 399 uint8_t pkt[TEST_PACKET_SZ]; in TEST_F() 411 uint8_t pkt[TEST_PACKET_SZ]; in TEST_F() [all …]
|
| A D | ip_defrag.c | 46 static uint8_t udp_payload[MSG_LEN_MAX]; 47 static uint8_t ip_frame[IP_MAXPACKET]; 57 static uint8_t recv_buff[MSG_LEN_MAX]; in recv_validate_udp() 82 static uint32_t raw_checksum(uint8_t *buf, int len, uint32_t sum) in raw_checksum() 106 sum = raw_checksum((uint8_t *)&iphdr->ip_src, 2 * sizeof(iphdr->ip_src), in udp_checksum() 108 sum = raw_checksum((uint8_t *)udphdr, UDP_HLEN, sum); in udp_checksum() 109 sum = raw_checksum((uint8_t *)udp_payload, payload_len, sum); in udp_checksum() 124 sum = raw_checksum((uint8_t *)&udphdr->len, sizeof(udphdr->len), sum); in udp6_checksum() 125 sum = raw_checksum((uint8_t *)udphdr, UDP_HLEN, sum); in udp6_checksum() 126 sum = raw_checksum((uint8_t *)udp_payload, payload_len, sum); in udp6_checksum() [all …]
|
| /tools/testing/selftests/sgx/ |
| A D | sigstruct.c | 45 static bool alloc_q1q2_ctx(const uint8_t *s, const uint8_t *m, in alloc_q1q2_ctx() 68 uint8_t temp; in reverse_bytes() 69 uint8_t *ptr = data; in reverse_bytes() 80 static bool calc_q1q2(const uint8_t *s, const uint8_t *m, uint8_t *q1, in calc_q1q2() 81 uint8_t *q2) in calc_q1q2() 196 static bool mrenclave_commit(EVP_MD_CTX *ctx, uint8_t *mrenclave) in mrenclave_commit() 217 uint8_t reserved[44]; 244 uint8_t reserved[40]; 262 uint8_t reserved[48]; 266 const uint8_t *data) in mrenclave_eextend() [all …]
|
| /tools/spi/ |
| A D | spidev_test.c | 40 static uint8_t bits = 8; 51 static uint8_t default_tx[] = { 60 static uint8_t default_rx[ARRAY_SIZE(default_tx)] = {0, }; 119 static void transfer(int fd, uint8_t const *tx, uint8_t const *rx, size_t len) in transfer() 343 uint8_t *tx; in transfer_escaped_string() 344 uint8_t *rx; in transfer_escaped_string() 365 uint8_t *tx; in transfer_file() 366 uint8_t *rx; in transfer_file() 412 uint8_t *tx; in transfer_buf() 413 uint8_t *rx; in transfer_buf()
|
| /tools/testing/selftests/kvm/arm64/ |
| A D | debug-exceptions.c | 105 uint8_t brps, wrps, i; in GEN_DEBUG_WRITE_REG() 152 static void install_wp(uint8_t wpn, uint64_t addr) in install_wp() 165 static void install_hw_bp(uint8_t bpn, uint64_t addr) in install_hw_bp() 177 static void install_wp_ctx(uint8_t addr_wp, uint8_t ctx_bp, uint64_t addr, in install_wp_ctx() 199 void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr, in install_hw_bp_ctx() 237 static void guest_code(uint8_t bpn, uint8_t wpn, uint8_t ctx_bpn) in guest_code() 424 static void test_guest_debug_exceptions(uint8_t bpn, uint8_t wpn, uint8_t ctx_bpn) in test_guest_debug_exceptions() 538 uint8_t brp_num, wrp_num, ctx_brp_num, normal_brp_num, ctx_brp_base; in test_guest_debug_exceptions_all()
|
| /tools/power/acpi/tools/ec/ |
| A D | ec_access.c | 33 static uint8_t write_value = -1; 143 printf(" %.2x ", (uint8_t)buf[byte_off]); in dump_ec() 168 printf(" %.2x ", (uint8_t)buf2[byte_off]); in dump_ec() 170 printf("*%.2x ", (uint8_t)buf2[byte_off]); in dump_ec() 177 uint8_t buf; in read_ec_val() 192 void write_ec_val(int fd, int byte_offset, uint8_t value) in write_ec_val()
|
| /tools/testing/selftests/kvm/s390/ |
| A D | tprot.c | 17 static __aligned(PAGE_SIZE) uint8_t pages[2][PAGE_SIZE]; 18 static uint8_t *const page_store_prot = pages[0]; 19 static uint8_t *const page_fetch_prot = pages[1]; 22 static int set_storage_key(void *addr, uint8_t key) in set_storage_key() 47 static enum permission test_protection(void *addr, uint8_t key) in test_protection() 75 uint8_t key;
|
| /tools/testing/selftests/arm64/abi/ |
| A D | syscall-abi.c | 141 static uint8_t z_zero[__SVE_ZREG_SIZE(ARCH_SVE_VQ_MAX)]; 142 uint8_t z_in[SVE_NUM_ZREGS * __SVE_ZREG_SIZE(ARCH_SVE_VQ_MAX)]; 143 uint8_t z_out[SVE_NUM_ZREGS * __SVE_ZREG_SIZE(ARCH_SVE_VQ_MAX)]; 163 uint8_t *in = &z_in[reg_size * i]; in check_z() 164 uint8_t *out = &z_out[reg_size * i]; in check_z() 201 uint8_t p_in[SVE_NUM_PREGS * __SVE_PREG_SIZE(ARCH_SVE_VQ_MAX)]; 233 uint8_t ffr_in[__SVE_PREG_SIZE(ARCH_SVE_VQ_MAX)]; 234 uint8_t ffr_out[__SVE_PREG_SIZE(ARCH_SVE_VQ_MAX)]; 311 uint8_t za_in[ZA_SIG_REGS_SIZE(ARCH_SVE_VQ_MAX)]; 312 uint8_t za_out[ZA_SIG_REGS_SIZE(ARCH_SVE_VQ_MAX)]; [all …]
|