#include "symbol/kallsyms.h" #include #include u8 kallsyms2elf_type(char type) { type = tolower(type); return (type == 't' || type == 'w') ? STT_FUNC : STT_OBJECT; } int kallsyms__parse(const char *filename, void *arg, int (*process_symbol)(void *arg, const char *name, char type, u64 start)) { char *line = NULL; size_t n; int err = -1; FILE *file = fopen(filename, "r"); if (file == NULL) goto out_failure; err = 0; while (!feof(file)) { u64 start; int line_len, len; char symbol_type; char *symbol_name; line_len = getline(&line, &n, file); if (line_len < 0 || !line) break; line[--line_len] = '\0'; /* \n */ len = hex2u64(line, &start); len++; if (len + 2 >= line_len) continue; symbol_type = line[len]; len += 2; symbol_name = line + len; len = line_len - len; if (len >= KSYM_NAME_LEN) { err = -1; break; } err = process_symbol(arg, symbol_name, symbol_type, start); if (err) break; } free(line); fclose(file); return err; out_failure: return -1; } hange='this.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 14:16:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 14:16:23 -0800
commit396bf4cd835e62d70fad4a03a8963e61f19021f2 (patch)
tree79ac8f33554260fea1a8d43e6f8c4c5460115f45 /tools/accounting/Makefile
parentd5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c (diff)
parent7c2cf1c4615cc2f576d0604406cdf0065f00b83b (diff)
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - use-after-free in algif_aead - modular aesni regression when pcbc is modular but absent - bug causing IO page faults in ccp - double list add in ccp - NULL pointer dereference in qat (two patches) - panic in chcr - NULL pointer dereference in chcr - out-of-bound access in chcr * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: chcr - Fix key length for RFC4106 crypto: algif_aead - Fix kernel panic on list_del crypto: aesni - Fix failure when pcbc module is absent crypto: ccp - Fix double add when creating new DMA command crypto: ccp - Fix DMA operations when IOMMU is enabled crypto: chcr - Check device is allocated before use crypto: chcr - Fix panic on dma_unmap_sg crypto: qat - zero esram only for DH85x devices crypto: qat - fix bar discovery for c62x
Diffstat (limited to 'tools/accounting/Makefile')