Home
last modified time | relevance | path

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

12

/linux-6.15/security/selinux/
H A Dxfrm.c80 u32 str_len; in selinux_xfrm_alloc_user() local
87 str_len = uctx->ctx_len; in selinux_xfrm_alloc_user()
88 if (str_len >= PAGE_SIZE) in selinux_xfrm_alloc_user()
97 ctx->ctx_len = str_len; in selinux_xfrm_alloc_user()
98 memcpy(ctx->ctx_str, &uctx[1], str_len); in selinux_xfrm_alloc_user()
99 ctx->ctx_str[str_len] = '\0'; in selinux_xfrm_alloc_user()
100 rc = security_context_to_sid(ctx->ctx_str, str_len, in selinux_xfrm_alloc_user()
344 u32 str_len; in selinux_xfrm_state_alloc_acquire() local
353 &str_len); in selinux_xfrm_state_alloc_acquire()
366 ctx->ctx_len = str_len; in selinux_xfrm_state_alloc_acquire()
[all …]
/linux-6.15/tools/power/cpupower/utils/helpers/
H A Dmisc.c192 int str_len = 0; in print_online_cpus() local
195 str_len = online_cpus->size * 5; in print_online_cpus()
196 online_cpus_str = (void *)malloc(sizeof(char) * str_len); in print_online_cpus()
199 bitmask_displaylist(online_cpus_str, str_len, online_cpus); in print_online_cpus()
210 int str_len = 0; in print_offline_cpus() local
213 str_len = offline_cpus->size * 5; in print_offline_cpus()
214 offline_cpus_str = (void *)malloc(sizeof(char) * str_len); in print_offline_cpus()
217 bitmask_displaylist(offline_cpus_str, str_len, offline_cpus); in print_offline_cpus()
/linux-6.15/tools/power/acpi/os_specific/service_layers/
H A 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.15/lib/
H A Dparser.c69 size_t str_len = strlen(s); in match_one() local
71 if (str_len == 0) in match_one()
73 if (len == -1 || len > str_len) in match_one()
74 len = str_len; in match_one()
/linux-6.15/kernel/trace/
H A Dtrace_events_inject.c223 int str_len = strlen(addr) + 1; in parse_entry() local
227 entry_size += str_len; in parse_entry()
235 strscpy(entry + (entry_size - str_len), addr, str_len); in parse_entry()
239 *str_item = (str_len << 16) | str_loc; in parse_entry()
/linux-6.15/tools/lib/bpf/
H A Dlibbpf_probes.c222 const char *str_sec, size_t str_len, in libbpf__load_raw_btf() argument
231 .str_len = str_len, in libbpf__load_raw_btf()
240 btf_len = hdr.hdr_len + hdr.type_len + hdr.str_len; in libbpf__load_raw_btf()
247 memcpy(raw_btf + hdr.hdr_len + hdr.type_len, str_sec, hdr.str_len); in libbpf__load_raw_btf()
H A Dlibbpf_internal.h125 size_t str_len = strlen(str); in str_has_sfx() local
128 if (sfx_len > str_len) in str_has_sfx()
130 return strcmp(str + str_len - sfx_len, sfx) == 0; in str_has_sfx()
407 const char *str_sec, size_t str_len,
H A Dbtf.c221 h->str_len = bswap_32(h->str_len); in btf_bswap_hdr()
277 const char *end = start + btf->hdr->str_len; in btf_parse_str_sec()
279 if (btf->base_btf && hdr->str_len == 0) in btf_parse_str_sec()
281 if (!hdr->str_len || hdr->str_len - 1 > BTF_MAX_STR_OFFSET || end[-1]) { in btf_parse_str_sec()
999 btf->start_str_off = base_btf->hdr->str_len; in btf_new_empty()
1050 btf->start_str_off = base_btf->hdr->str_len; in btf_new()
1521 memcpy(p, btf_strs_data(btf), hdr->str_len); in btf_get_raw_data()
1522 p += hdr->str_len; in btf_get_raw_data()
1706 if (btf->hdr->str_len == 0) in btf_ensure_modifiable()
1901 old_strs_len = btf->hdr->str_len; in btf__add_btf()
[all …]
H A Dbtf_relocate.c464 r.str_map = calloc(btf_header(r.dist_base_btf)->str_len, sizeof(*r.str_map)); in btf_relocate()
467 r.dist_str_len = dist_base_hdr->str_len; in btf_relocate()
468 r.base_str_len = base_hdr->str_len; in btf_relocate()
/linux-6.15/tools/power/x86/intel-speed-select/
H A 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.15/security/tomoyo/
H A 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.15/fs/udf/
H A Dunicode.c273 const uint8_t *str_i, int str_len) in udf_name_to_CS0() argument
296 for (i = 0; i < str_len; i += len) { in udf_name_to_CS0()
303 len = conv_f(&str_i[i], str_len - i, &wchar); in udf_name_to_CS0()
307 len = utf8_to_utf32(&str_i[i], str_len - i, in udf_name_to_CS0()
/linux-6.15/kernel/bpf/preload/iterators/
H A Diterators.bpf.c31 __u32 str_len; member
71 if (name_off >= btf->hdr.str_len) in get_name()
/linux-6.15/drivers/gpu/drm/amd/display/amdgpu_dm/
H A Damdgpu_dm_debugfs.c196 uint8_t str_len = 0; in dp_link_settings_read() local
213 rd_buf_ptr += str_len; in dp_link_settings_read()
220 rd_buf_ptr += str_len; in dp_link_settings_read()
227 rd_buf_ptr += str_len; in dp_link_settings_read()
1562 int i, r, str_len = 10; in dp_dsc_clock_en_read() local
1748 int i, r, str_len = 30; in dp_dsc_slice_width_read() local
1932 int i, r, str_len = 30; in dp_dsc_slice_height_read() local
2112 int i, r, str_len = 30; in dp_dsc_bits_per_pixel_read() local
2287 int i, r, str_len = 30; in dp_dsc_pic_width_read() local
2341 int i, r, str_len = 30; in dp_dsc_pic_height_read() local
[all …]
/linux-6.15/security/selinux/ss/
H A Dsidtab.h143 const char *str, u32 str_len);
149 const char *str, u32 str_len) in sidtab_sid2str_put() argument
H A Dsidtab.c564 const char *str, u32 str_len) in sidtab_sid2str_put() argument
583 cache = kmalloc(struct_size(cache, str, str_len), GFP_ATOMIC); in sidtab_sid2str_put()
597 cache->len = str_len; in sidtab_sid2str_put()
598 memcpy(cache->str, str, str_len); in sidtab_sid2str_put()
/linux-6.15/drivers/net/ethernet/meta/fbnic/
H A Dfbnic_tlv.c179 int str_len = 1; in fbnic_tlv_attr_put_string() local
191 str_len += strnlen(string, attr_max_len); in fbnic_tlv_attr_put_string()
193 return fbnic_tlv_attr_put_value(msg, attr_id, string, str_len); in fbnic_tlv_attr_put_string()
/linux-6.15/tools/include/uapi/linux/
H A Dbtf.h21 __u32 str_len; /* length of string section */ member
/linux-6.15/include/uapi/linux/
H A Dbtf.h21 __u32 str_len; /* length of string section */ member
/linux-6.15/tools/testing/selftests/bpf/prog_tests/
H A Dcore_reloc_raw.c35 .str_len = sizeof(raw_btf.strings), in test_bad_local_id()
/linux-6.15/tools/hv/
H A Dhv_kvp_daemon.c1397 int str_len; in kvp_set_ip_info() local
1669 str_len = snprintf(cmd, sizeof(cmd), "exec %s %s %s", in kvp_set_ip_info()
1676 if (str_len <= 0 || (unsigned int)str_len >= sizeof(cmd)) { in kvp_set_ip_info()
1678 cmd, str_len); in kvp_set_ip_info()
/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dsyscall.c81 .str_len = sizeof(raw_btf.str), in btf_load()
/linux-6.15/tools/perf/util/cs-etm-decoder/
H A Dcs-etm-decoder.c200 const int str_len) in cs_etm_decoder__print_str_cb() argument
204 if (p_context && str_len && !decoder->suppress_printing) in cs_etm_decoder__print_str_cb()
/linux-6.15/drivers/platform/x86/hp/hp-bioscfg/
H A Dbioscfg.c658 int str_len; in hp_init_bios_package_attribute() local
688 &str_value, &str_len); in hp_init_bios_package_attribute()
/linux-6.15/drivers/gpu/drm/amd/amdgpu/
H A Datom.c1405 unsigned short str_len; in atom_find_str_in_rom() local
1408 str_len = strnlen(str, maxlen); in atom_find_str_in_rom()
1412 for (str_off = 0; str_off < str_len; ++str_off) { in atom_find_str_in_rom()
1417 if (str_off == str_len || str[str_off] == 0) in atom_find_str_in_rom()

12