| /linux-6.15/tools/testing/selftests/powerpc/ptrace/ |
| H A D | core-pkey.c | 159 static Elf64_Nhdr *next_note(Elf64_Nhdr *nhdr) in next_note() argument 161 return (void *) nhdr + sizeof(*nhdr) + in next_note() 162 __ALIGN_KERNEL(nhdr->n_namesz, 4) + in next_note() 163 __ALIGN_KERNEL(nhdr->n_descsz, 4); in next_note() 171 Elf64_Nhdr *nhdr; in check_core_file() local 203 for (nhdr = p + phdr->p_offset; in check_core_file() 205 nhdr = next_note(nhdr)) in check_core_file() 206 if (nhdr->n_type == NT_PPC_PKEY) in check_core_file() 210 FAIL_IF(nhdr->n_descsz == 0); in check_core_file() 212 p = nhdr; in check_core_file() [all …]
|
| /linux-6.15/tools/perf/util/ |
| H A D | symbol-minimal.c | 42 } *nhdr; in read_build_id() local 50 nhdr = ptr; in read_build_id() 52 nhdr->n_namesz = bswap_32(nhdr->n_namesz); in read_build_id() 53 nhdr->n_descsz = bswap_32(nhdr->n_descsz); in read_build_id() 54 nhdr->n_type = bswap_32(nhdr->n_type); in read_build_id() 57 namesz = NOTE_ALIGN(nhdr->n_namesz); in read_build_id() 58 descsz = NOTE_ALIGN(nhdr->n_descsz); in read_build_id() 60 ptr += sizeof(*nhdr); in read_build_id() 63 if (nhdr->n_type == NT_GNU_BUILD_ID && in read_build_id() 64 nhdr->n_namesz == sizeof("GNU")) { in read_build_id()
|
| H A D | symbol-elf.c | 914 GElf_Nhdr *nhdr = ptr; in elf_read_build_id() local 919 ptr += sizeof(*nhdr); in elf_read_build_id() 1046 GElf_Nhdr nhdr; in sysfs__read_build_id() local 1049 if (read(fd, &nhdr, sizeof(nhdr)) != sizeof(nhdr)) in sysfs__read_build_id() 1052 namesz = NOTE_ALIGN(nhdr.n_namesz); in sysfs__read_build_id() 1053 descsz = NOTE_ALIGN(nhdr.n_descsz); in sysfs__read_build_id() 1054 if (nhdr.n_type == NT_GNU_BUILD_ID && in sysfs__read_build_id() 1074 __func__, filename, nhdr.n_namesz, nhdr.n_descsz); in sysfs__read_build_id() 2942 GElf_Nhdr nhdr; in construct_sdt_notes_list() local 2976 if (nhdr.n_type != SDT_NOTE_TYPE) in construct_sdt_notes_list() [all …]
|
| /linux-6.15/tools/testing/selftests/bpf/ |
| H A D | trace_helpers.c | 410 Elf32_Nhdr *nhdr = (Elf32_Nhdr *)(note_start + note_offs); in parse_build_id_buf() local 412 if (nhdr->n_type == 3 && nhdr->n_namesz == sizeof("GNU") && in parse_build_id_buf() 413 !strcmp((char *)(nhdr + 1), "GNU") && nhdr->n_descsz > 0 && in parse_build_id_buf() 414 nhdr->n_descsz <= BPF_BUILD_ID_SIZE) { in parse_build_id_buf() 416 ALIGN(sizeof("GNU"), 4) + sizeof(Elf32_Nhdr), nhdr->n_descsz); in parse_build_id_buf() 417 memset(build_id + nhdr->n_descsz, 0, BPF_BUILD_ID_SIZE - nhdr->n_descsz); in parse_build_id_buf() 418 return (int) nhdr->n_descsz; in parse_build_id_buf() 422 ALIGN(nhdr->n_namesz, 4) + ALIGN(nhdr->n_descsz, 4); in parse_build_id_buf()
|
| /linux-6.15/lib/ |
| H A D | buildid.c | 169 const Elf32_Nhdr *nhdr; in parse_build_id() local 176 nhdr = freader_fetch(r, note_off, sizeof(Elf32_Nhdr) + note_name_sz); in parse_build_id() 177 if (!nhdr) in parse_build_id() 180 name_sz = READ_ONCE(nhdr->n_namesz); in parse_build_id() 181 desc_sz = READ_ONCE(nhdr->n_descsz); in parse_build_id() 189 if (nhdr->n_type == BUILD_ID && in parse_build_id() 191 memcmp(nhdr + 1, note_name, note_name_sz) == 0 && in parse_build_id()
|
| /linux-6.15/scripts/ |
| H A D | recordmcount.h | 237 unsigned const nhdr, Elf32_Word **symtab, in find_symtab() argument 246 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in find_symtab() 585 unsigned nhdr, in tot_relsize() argument 593 for (; nhdr; --nhdr, ++shdrp) { in tot_relsize() 611 unsigned const nhdr = get_shnum(ehdr, shdr0); in do_func() local 636 totrelsz = tot_relsize(shdr0, nhdr, shstrtab, fname); in do_func() 652 find_symtab(ehdr, shdr0, nhdr, &symtab, &symtab_shndx); in do_func() 654 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in do_func()
|
| /linux-6.15/tools/lib/bpf/ |
| H A D | usdt.c | 573 static int parse_usdt_note(Elf *elf, const char *path, GElf_Nhdr *nhdr, 590 GElf_Nhdr nhdr; in collect_usdt_targets() local 623 while ((off = gelf_getnote(data, off, &nhdr, &name_off, &desc_off)) > 0) { in collect_usdt_targets() 629 err = parse_usdt_note(elf, path, &nhdr, data->d_buf, name_off, desc_off, ¬e); in collect_usdt_targets() 1135 static int parse_usdt_note(Elf *elf, const char *path, GElf_Nhdr *nhdr, in parse_usdt_note() argument 1144 if (strncmp(data + name_off, USDT_NOTE_NAME, nhdr->n_namesz) != 0) in parse_usdt_note() 1146 if (nhdr->n_type != USDT_NOTE_TYPE) in parse_usdt_note() 1150 len = nhdr->n_descsz; in parse_usdt_note()
|
| /linux-6.15/fs/ |
| H A D | binfmt_elf.c | 771 struct elf_note nhdr; in parse_elf_properties() member 795 BUILD_BUG_ON(sizeof(note) < sizeof(note.nhdr) + NOTE_NAME_SZ); in parse_elf_properties() 796 if (n < 0 || n < sizeof(note.nhdr) + NOTE_NAME_SZ) in parse_elf_properties() 799 if (note.nhdr.n_type != NT_GNU_PROPERTY_TYPE_0 || in parse_elf_properties() 800 note.nhdr.n_namesz != NOTE_NAME_SZ || in parse_elf_properties() 801 strncmp(note.data + sizeof(note.nhdr), in parse_elf_properties() 802 NN_GNU_PROPERTY_TYPE_0, n - sizeof(note.nhdr))) in parse_elf_properties() 805 off = round_up(sizeof(note.nhdr) + NOTE_NAME_SZ, in parse_elf_properties() 810 if (note.nhdr.n_descsz > n - off) in parse_elf_properties() 812 datasz = off + note.nhdr.n_descsz; in parse_elf_properties()
|
| /linux-6.15/include/net/ |
| H A D | ipv6.h | 475 const struct ipv6hdr *nhdr; in ipv6_has_hopopt_jumbo() local 488 nhdr = ipv6_hdr(skb); in ipv6_has_hopopt_jumbo() 490 if (nhdr->nexthdr != NEXTHDR_HOP) in ipv6_has_hopopt_jumbo() 493 jhdr = (const struct hop_jumbo_hdr *) (nhdr + 1); in ipv6_has_hopopt_jumbo()
|
| /linux-6.15/include/pcmcia/ |
| H A D | cistpl.h | 504 u_char nhdr; member
|
| /linux-6.15/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_discovery.c | 388 struct nps_info_header *nhdr = in amdgpu_discovery_verify_npsinfo() local 391 if (le32_to_cpu(nhdr->table_id) != NPS_INFO_TABLE_ID) { in amdgpu_discovery_verify_npsinfo() 397 le32_to_cpu(nhdr->size_bytes), in amdgpu_discovery_verify_npsinfo() 1790 struct nps_info_header *nhdr; in amdgpu_discovery_refresh_nps_info() local 1804 nhdr = (struct nps_info_header *)(nps_data); in amdgpu_discovery_refresh_nps_info() 1806 le32_to_cpu(nhdr->size_bytes), in amdgpu_discovery_refresh_nps_info()
|
| /linux-6.15/drivers/pcmcia/ |
| H A D | cistpl.c | 1241 v2->nhdr = p[8]; in parse_vers_2()
|