Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 52) sorted by relevance

123

/scripts/coccinelle/api/
Dkvmalloc.cocci24 expression E, E1, size;
33 * if (size cmp E1 || ...)@p {
37 * (..., size, \(flags\|GFP_KERNEL\|\(GFP_KERNEL\|flags\)|__GFP_NOWARN\), ...)
41 * E = \(vmalloc\|vzalloc\|vmalloc_node\|vzalloc_node\)(..., size, ...)
47 * (..., size, \(flags\|GFP_KERNEL\|\(GFP_KERNEL\|flags\)|__GFP_NOWARN\), ...)
49 when != size = E1
53 * E = \(vmalloc\|vzalloc\|vmalloc_node\|vzalloc_node\)(..., size, ...)
59 * (..., size, \(flags\|GFP_KERNEL\|\(GFP_KERNEL\|flags\)|__GFP_NOWARN\), ...);
61 when != size = E1
65 * x = \(vmalloc\|vzalloc\|vmalloc_node\|vzalloc_node\)(..., size, ...)
[all …]
Dmemdup_user.cocci26 expression from,to,size;
32 - (size,\(GFP_KERNEL\|GFP_USER\|
34 + to = memdup_user(from,size);
44 - if (copy_from_user(to, from, size) != 0) {
51 expression from,to,size;
56 - to = \(kvmalloc@p\|kvzalloc@p\)(size,\(GFP_KERNEL\|GFP_USER\));
57 + to = vmemdup_user(from,size);
67 - if (copy_from_user(to, from, size) != 0) {
74 expression from,to,size;
80 (size,\(GFP_KERNEL\|GFP_USER\|
[all …]
Dmemdup.cocci36 expression from,to,size,flag;
41 - to = \(kmalloc@p\|kzalloc@p\)(size,flag);
42 + to = kmemdup(from,size,flag);
44 - memcpy(to, from, size);
47 expression from,to,size,flag;
52 * to = \(kmalloc@p\|kzalloc@p\)(size,flag);
54 * memcpy(to, from, size);
Dkfree_sensitive.cocci51 expression E, size;
57 - memzero_explicit@m((T)E, size);
65 + kvfree_sensitive(E, size);
69 expression E, size;
75 - memset@m((T)E, 0, size);
83 + kvfree_sensitive(E, size);
/scripts/
Dcheckstack.pl124 my $size = 0;
128 $size = $line_arg =~ tr/,//;
129 $size = ($size + 1) * 4;
132 return $size;
168 my $size = $1;
169 $size = hex($size) if ($size =~ /^0x/);
171 if ($size > 0xf0000000) {
172 $size = - $size;
173 $size += 0x80000000;
174 $size += 0x80000000;
[all …]
Dstackdelta25 my ($file, $func, $size, $type) = split;
41 $su{"${file}\t${func}"} = {size => $size, type => $type};
54 my $x = $old->{$_}{size};
55 my $y = $new->{$_}{size};
Dextract-sys-certs.pl100 my $size;
127 $size = unpack 'L!', $packed;
128 $end = $start + $size;
130 printf "Have %u bytes of certs at VMA 0x%x\n", $size, $start;
149 my $len = sysread(FD, $buf, $size);
151 die "Short read on $vmlinux\n" if ($len != $size);
156 $len = syswrite(FD, $buf, $size);
158 die "Short write on $keyring\n" if ($len != $size);
Dinsert-sys-cert.c65 int size; member
99 s->size = 0; in get_symbol_from_map()
166 s->size = 0; in get_symbol_from_table()
176 s->size = elf_sym->st_size; in get_symbol_from_table()
201 static void *map_file(char *file_name, int *size) in map_file() argument
217 *size = st.st_size; in map_file()
218 map = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in map_file()
228 static char *read_file(char *file_name, int *size) in read_file() argument
244 *size = st.st_size; in read_file()
245 buf = malloc(*size); in read_file()
[all …]
Dasn1_compiler.c303 unsigned char size; member
325 clen = (dlen < token->size) ? dlen : token->size; in directive_compare()
335 if (dlen == token->size) { in directive_compare()
340 return dlen - token->size; /* shorter -> negative */ in directive_compare()
420 tokens[tix].size = q - p; in tokenise()
423 tokens[tix].content = malloc(tokens[tix].size + 1); in tokenise()
428 memcpy(tokens[tix].content, start, tokens[tix].size); in tokenise()
429 tokens[tix].content[tokens[tix].size] = 0; in tokenise()
461 tokens[tix].size = q - p; in tokenise()
463 tokens[tix].content = malloc(tokens[tix].size + 1); in tokenise()
[all …]
Dsorttable.c71 static void *mmap_file(char const *fname, size_t *size) in mmap_file() argument
97 *size = sb.st_size; in mmap_file()
395 size_t size = 0; in main() local
405 addr = mmap_file(argv[i], &size); in main()
414 munmap(addr, size); in main()
Dkallsyms.c551 unsigned int i, len, size; in compress_symbols() local
566 size = len; in compress_symbols()
571 size -= (p2 - p1); in compress_symbols()
572 memmove(p2, p2 + 1, size); in compress_symbols()
576 if (size < 2) break; in compress_symbols()
579 p2 = find_token(p1, size, str); in compress_symbols()
Dbloat-o-meter31 size, type, name = line.split()
41 sym[name] = sym.get(name, 0) + int(size, 16)
/scripts/dtc/
Dfdtget.c32 int size; /* data size (1/2/4) */ member
55 int i, size; in show_data() local
80 size = disp->size; in show_data()
81 if (size == -1) { in show_data()
82 size = (len % 4) == 0 ? 4 : 1; in show_data()
83 } else if (len % size) { in show_data()
91 for (i = 0; i < len; i += size, p += size) { in show_data()
94 value = size == 4 ? fdt32_to_cpu(*(const uint32_t *)p) : in show_data()
95 size == 2 ? (*p << 8) | p[1] : *p; in show_data()
299 disp.size = -1; in main()
[all …]
Dfdtput.c26 int size; /* data size (1/2/4) */ member
80 len = disp->size == -1 ? 4 : disp->size; in encode_value()
107 disp->size == 1 ? "byte" : in encode_value()
108 disp->size == 2 ? "short" : "int", in encode_value()
292 disp.size = -1; in main()
320 &disp.size)) in main()
Dfdtdump.c62 uint64_t addr, size; in dump_blob() local
90 size = fdt64_to_cpu(p_rsvmap[i].size); in dump_blob()
91 if (addr == 0 && size == 0) in dump_blob()
95 (unsigned long long)addr, (unsigned long long)size); in dump_blob()
Dutil.c38 int n, size = 0; /* start with 128 bytes */ in xavsprintf_append() local
44 size = strlen(p); in xavsprintf_append()
50 p = xrealloc(p, size + n); in xavsprintf_append()
52 n = vsnprintf(p + size, n, fmt, ap); in xavsprintf_append()
334 int utilfdt_decode_type(const char *fmt, int *type, int *size) in utilfdt_decode_type() argument
342 *size = -1; in utilfdt_decode_type()
361 *size = qualifier == 'b' ? 1 : in utilfdt_decode_type()
/scripts/kconfig/
Dlexer.l56 static void append_string(const char *str, int size) in append_string() argument
58 int new_size = text_size + size + 1; in append_string()
65 memcpy(text + text_size, str, size); in append_string()
66 text_size += size; in append_string()
70 static void alloc_string(const char *str, int size) in alloc_string() argument
72 text = xmalloc(size + 1); in alloc_string()
73 memcpy(text, str, size); in alloc_string()
74 text[size] = 0; in alloc_string()
Dutil.c82 void *xmalloc(size_t size) in xmalloc() argument
84 void *p = malloc(size); in xmalloc()
91 void *xcalloc(size_t nmemb, size_t size) in xcalloc() argument
93 void *p = calloc(nmemb, size); in xcalloc()
100 void *xrealloc(void *p, size_t size) in xrealloc() argument
102 p = realloc(p, size); in xrealloc()
Dlkc.h71 void *xmalloc(size_t size);
72 void *xcalloc(size_t nmemb, size_t size);
73 void *xrealloc(void *p, size_t size);
/scripts/dtc/libfdt/
Dfdt_addresses.c58 const char *name, uint64_t addr, uint64_t size) in fdt_appendprop_addrrange() argument
76 if ((addr > UINT32_MAX) || ((UINT32_MAX + 1 - addr) < size)) in fdt_appendprop_addrrange()
89 if (size > UINT32_MAX) in fdt_appendprop_addrrange()
92 fdt32_st(prop, (uint32_t)size); in fdt_appendprop_addrrange()
94 fdt64_st(prop, size); in fdt_appendprop_addrrange()
Dfdt.h33 fdt64_t size; member
/scripts/coccinelle/misc/
Darray_size_dup.cocci5 /// 1. An opencoded expression is used before array_size() to compute the same size
6 /// 2. An opencoded expression is used after array_size() to compute the same size
43 msg = "WARNING: array_size is used later (line %s) to compute the same size" % (p2[0].line)
51 msg = "WARNING: array_size is used later (line %s) to compute the same size" % (p2[0].line)
72 msg = "WARNING: array_size is already used (line %s) to compute the same size" % (p1[0].line)
80 msg = "WARNING: array_size is already used (line %s) to compute the same size" % (p1[0].line)
108 msg = "WARNING: array3_size is used later (line %s) to compute the same size" % (p2[0].line)
116 msg = "WARNING: array3_size is used later (line %s) to compute the same size" % (p2[0].line)
138 msg = "WARNING: array3_size is already used (line %s) to compute the same size" % (p1[0].line)
146 msg = "WARNING: array3_size is already used (line %s) to compute the same size" % (p1[0].line)
[all …]
/scripts/genksyms/
Dgenksyms.h70 #define xmalloc(size) ({ void *__ptr = malloc(size); \ argument
71 if(!__ptr && size != 0) { \
/scripts/mod/
Dmodpost.h78 static inline void __endian(const void *src, void *dest, unsigned int size) in __endian() argument
81 for (i = 0; i < size; i++) in __endian()
82 ((unsigned char*)dest)[i] = ((unsigned char*)src)[size - i-1]; in __endian()
104 int size; member
137 size_t size; member
Dfile2alias.c126 unsigned long size, unsigned long id_size, in device_id_check() argument
131 if (size % id_size || size < id_size) { in device_id_check()
137 modname, device_id, id_size, device_id, size, device_id); in device_id_check()
141 if (*(uint8_t*)(symval+size-id_size+i)) { in device_id_check()
144 modname, device_id, id_size, size / id_size); in device_id_check()
147 *(uint8_t*)(symval+size-id_size+i) ); in device_id_check()
329 static void do_usb_table(void *symval, unsigned long size, in do_usb_table() argument
335 device_id_check(mod->name, "usb", size, id_size, symval); in do_usb_table()
338 size -= id_size; in do_usb_table()
340 for (i = 0; i < size; i += id_size) in do_usb_table()
[all …]

123