Home
last modified time | relevance | path

Searched refs:str_len (Results 1 – 25 of 37) sorted by relevance

12

/linux-6.1.9/tools/power/cpupower/utils/helpers/
Dmisc.c137 int str_len = 0; in print_online_cpus() local
140 str_len = online_cpus->size * 5; in print_online_cpus()
141 online_cpus_str = (void *)malloc(sizeof(char) * str_len); in print_online_cpus()
144 bitmask_displaylist(online_cpus_str, str_len, online_cpus); in print_online_cpus()
155 int str_len = 0; in print_offline_cpus() local
158 str_len = offline_cpus->size * 5; in print_offline_cpus()
159 offline_cpus_str = (void *)malloc(sizeof(char) * str_len); in print_offline_cpus()
162 bitmask_displaylist(offline_cpus_str, str_len, offline_cpus); in print_offline_cpus()
/linux-6.1.9/security/selinux/
Dxfrm.c81 u32 str_len; in selinux_xfrm_alloc_user() local
88 str_len = uctx->ctx_len; in selinux_xfrm_alloc_user()
89 if (str_len >= PAGE_SIZE) in selinux_xfrm_alloc_user()
92 ctx = kmalloc(struct_size(ctx, ctx_str, str_len + 1), gfp); in selinux_xfrm_alloc_user()
98 ctx->ctx_len = str_len; in selinux_xfrm_alloc_user()
99 memcpy(ctx->ctx_str, &uctx[1], str_len); in selinux_xfrm_alloc_user()
100 ctx->ctx_str[str_len] = '\0'; in selinux_xfrm_alloc_user()
101 rc = security_context_to_sid(&selinux_state, ctx->ctx_str, str_len, in selinux_xfrm_alloc_user()
350 u32 str_len; in selinux_xfrm_state_alloc_acquire() local
359 &str_len); in selinux_xfrm_state_alloc_acquire()
[all …]
/linux-6.1.9/tools/power/acpi/os_specific/service_layers/
Dosunixdir.c95 int str_len; in acpi_os_get_next_filename() local
106 str_len = strlen(dir_entry->d_name) + in acpi_os_get_next_filename()
109 temp_str = calloc(str_len, 1); in acpi_os_get_next_filename()
/linux-6.1.9/lib/
Dparser.c60 size_t str_len = strlen(s); in match_one() local
62 if (str_len == 0) in match_one()
64 if (len == -1 || len > str_len) in match_one()
65 len = str_len; in match_one()
/linux-6.1.9/drivers/s390/net/
Dqeth_l3_sys.c370 int str_len = 0; in qeth_l3_dev_ipato_add_show() local
388 if (entry_len + 1 > PAGE_SIZE - str_len - 1) in qeth_l3_dev_ipato_add_show()
391 entry_len = scnprintf(buf, PAGE_SIZE - str_len, in qeth_l3_dev_ipato_add_show()
393 str_len += entry_len; in qeth_l3_dev_ipato_add_show()
398 return str_len ? str_len : scnprintf(buf, PAGE_SIZE, "\n"); in qeth_l3_dev_ipato_add_show()
590 int str_len = 0; in qeth_l3_dev_ip_add_show() local
607 if (entry_len + 1 > PAGE_SIZE - str_len - 1) in qeth_l3_dev_ip_add_show()
610 entry_len = scnprintf(buf, PAGE_SIZE - str_len, "%s\n", in qeth_l3_dev_ip_add_show()
612 str_len += entry_len; in qeth_l3_dev_ip_add_show()
617 return str_len ? str_len : scnprintf(buf, PAGE_SIZE, "\n"); in qeth_l3_dev_ip_add_show()
/linux-6.1.9/tools/lib/bpf/
Dlibbpf_probes.c136 const char *str_sec, size_t str_len) in libbpf__load_raw_btf() argument
144 .str_len = str_len, in libbpf__load_raw_btf()
149 btf_len = hdr.hdr_len + hdr.type_len + hdr.str_len; in libbpf__load_raw_btf()
156 memcpy(raw_btf + hdr.hdr_len + hdr.type_len, str_sec, hdr.str_len); in libbpf__load_raw_btf()
Dlibbpf_internal.h108 size_t str_len = strlen(str); in str_has_sfx() local
111 if (sfx_len > str_len) in str_has_sfx()
113 return strcmp(str + str_len - sfx_len, sfx) == 0; in str_has_sfx()
367 const char *str_sec, size_t str_len);
Dbtf.c217 h->str_len = bswap_32(h->str_len); in btf_bswap_hdr()
250 if (meta_left < (long long)hdr->str_off + hdr->str_len) { in btf_parse_hdr()
257 hdr->type_off, hdr->type_len, hdr->str_off, hdr->str_len); in btf_parse_hdr()
273 const char *end = start + btf->hdr->str_len; in btf_parse_str_sec()
275 if (btf->base_btf && hdr->str_len == 0) in btf_parse_str_sec()
277 if (!hdr->str_len || hdr->str_len - 1 > BTF_MAX_STR_OFFSET || end[-1]) { in btf_parse_str_sec()
821 btf->start_str_off = base_btf->hdr->str_len; in btf_new_empty()
839 btf->hdr->str_len = base_btf ? 0 : 1; /* empty string at offset 0 */ in btf_new_empty()
871 btf->start_str_off = base_btf->hdr->str_len; in btf_new()
1257 data_sz = hdr->hdr_len + hdr->type_len + hdr->str_len; in btf_get_raw_data()
[all …]
/linux-6.1.9/drivers/gpu/drm/amd/display/amdgpu_dm/
Damdgpu_dm_debugfs.c189 uint8_t str_len = 0; in dp_link_settings_read() local
201 str_len = strlen("Current: %d 0x%x %d "); in dp_link_settings_read()
202 snprintf(rd_buf_ptr, str_len, "Current: %d 0x%x %d ", in dp_link_settings_read()
206 rd_buf_ptr += str_len; in dp_link_settings_read()
208 str_len = strlen("Verified: %d 0x%x %d "); in dp_link_settings_read()
209 snprintf(rd_buf_ptr, str_len, "Verified: %d 0x%x %d ", in dp_link_settings_read()
213 rd_buf_ptr += str_len; in dp_link_settings_read()
215 str_len = strlen("Reported: %d 0x%x %d "); in dp_link_settings_read()
216 snprintf(rd_buf_ptr, str_len, "Reported: %d 0x%x %d ", in dp_link_settings_read()
220 rd_buf_ptr += str_len; in dp_link_settings_read()
[all …]
/linux-6.1.9/kernel/trace/
Dtrace_events_inject.c223 int str_len = strlen(addr) + 1; in parse_entry() local
227 entry_size += str_len; in parse_entry()
235 strlcpy(entry + (entry_size - str_len), addr, str_len); in parse_entry()
239 *str_item = (str_len << 16) | str_loc; in parse_entry()
Dtrace_events_filter.c809 int str_len = str_item >> 16; in filter_pred_strloc() local
813 cmp = pred->regex.match(addr, &pred->regex, str_len); in filter_pred_strloc()
832 int str_len = str_item >> 16; in filter_pred_strrelloc() local
836 cmp = pred->regex.match(addr, &pred->regex, str_len); in filter_pred_strrelloc()
/linux-6.1.9/tools/power/x86/intel-speed-select/
Disst-display.c9 static void printcpulist(int str_len, char *str, int mask_size, in printcpulist() argument
15 snprintf(str, str_len, "none"); in printcpulist()
26 str_len - curr_index, ","); in printcpulist()
28 if (curr_index >= str_len) in printcpulist()
31 index = snprintf(&str[curr_index], str_len - curr_index, "%d", in printcpulist()
34 if (curr_index >= str_len) in printcpulist()
40 static void printcpumask(int str_len, char *str, int mask_size, in printcpumask() argument
68 index = snprintf(&str[curr_index], str_len - curr_index, "%08x", in printcpumask()
71 if (curr_index >= str_len) in printcpumask()
74 strncat(&str[curr_index], ",", str_len - curr_index); in printcpumask()
[all …]
/linux-6.1.9/security/tomoyo/
Drealpath.c23 char *tomoyo_encode2(const char *str, int str_len) in tomoyo_encode2() argument
33 for (i = 0; i < str_len; i++) { in tomoyo_encode2()
50 for (i = 0; i < str_len; i++) { in tomoyo_encode2()
/linux-6.1.9/fs/udf/
Dunicode.c277 const uint8_t *str_i, int str_len) in udf_name_to_CS0() argument
300 for (i = 0; i < str_len; i += len) { in udf_name_to_CS0()
307 len = conv_f(&str_i[i], str_len - i, &wchar); in udf_name_to_CS0()
311 len = utf8_to_utf32(&str_i[i], str_len - i, in udf_name_to_CS0()
/linux-6.1.9/kernel/bpf/preload/iterators/
Diterators.bpf.c31 __u32 str_len; member
71 if (name_off >= btf->hdr.str_len) in get_name()
/linux-6.1.9/security/selinux/ss/
Dsidtab.h140 const char *str, u32 str_len);
146 const char *str, u32 str_len) in sidtab_sid2str_put() argument
Dsidtab.c554 const char *str, u32 str_len) in sidtab_sid2str_put() argument
573 cache = kmalloc(struct_size(cache, str, str_len), GFP_ATOMIC); in sidtab_sid2str_put()
587 cache->len = str_len; in sidtab_sid2str_put()
588 memcpy(cache->str, str, str_len); in sidtab_sid2str_put()
/linux-6.1.9/include/uapi/linux/
Dbtf.h21 __u32 str_len; /* length of string section */ member
/linux-6.1.9/tools/include/uapi/linux/
Dbtf.h21 __u32 str_len; /* length of string section */ member
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dsyscall.c43 .str_len = sizeof(__u32), in btf_load()
/linux-6.1.9/tools/hv/
Dhv_kvp_daemon.c1181 int str_len; in kvp_set_ip_info() local
1305 str_len = snprintf(cmd, sizeof(cmd), KVP_SCRIPTS_PATH "%s %s", in kvp_set_ip_info()
1311 if (str_len <= 0 || (unsigned int)str_len >= sizeof(cmd)) { in kvp_set_ip_info()
1313 cmd, str_len); in kvp_set_ip_info()
/linux-6.1.9/tools/perf/util/cs-etm-decoder/
Dcs-etm-decoder.c177 const int str_len) in cs_etm_decoder__print_str_cb() argument
181 if (p_context && str_len && !decoder->suppress_printing) in cs_etm_decoder__print_str_cb()
/linux-6.1.9/drivers/hid/
Dhid-uclogic-params.c570 const size_t str_len = 16; in uclogic_params_frame_init_v1() local
583 str_buf = kzalloc(str_len, GFP_KERNEL); in uclogic_params_frame_init_v1()
589 rc = usb_string(usb_dev, 123, str_buf, str_len); in uclogic_params_frame_init_v1()
/linux-6.1.9/drivers/gpu/drm/amd/amdgpu/
Datom.c1386 unsigned short str_len; in atom_find_str_in_rom() local
1389 str_len = strnlen(str, maxlen); in atom_find_str_in_rom()
1393 for (str_off = 0; str_off < str_len; ++str_off) { in atom_find_str_in_rom()
1398 if (str_off == str_len || str[str_off] == 0) in atom_find_str_in_rom()
/linux-6.1.9/net/tipc/
Dnetlink_compat.c166 int str_len = strlen(str) + 1; in tipc_get_err_tlv() local
169 buf = tipc_tlv_alloc(TLV_SPACE(str_len)); in tipc_get_err_tlv()
171 tipc_add_tlv(buf, TIPC_TLV_ERROR_STRING, str, str_len); in tipc_get_err_tlv()

12