Lines Matching refs:size
30 #define FIPS_ALLOC(size) kmem_alloc(size, KM_SLEEP)
31 #define FIPS_FREE(buf, size) kmem_free(buf, size)
38 int kobj_read_file(struct _buf *file, char *buf, uint_t size, uint_t off);
41 #define FIPS_ALLOC(size) malloc(size)
42 #define FIPS_FREE(buf, size) free(buf)
78 size_t size, offs;
84 size = section->sh_size;
99 /* hash the size of .bss section */
102 (void) snprintf(szstr, sizeof (szstr), "%ld", size);
109 if ((buf = FIPS_ALLOC(size)) == NULL) {
114 if (FIPS_READ_FILE(file, buf, size, offs) < 0) {
115 FIPS_FREE(buf, size);
119 SHA1Update(shactx, buf, size);
121 FIPS_FREE(buf, size);
133 unsigned int size, numsec;
141 size = ehdr->e_shentsize * numsec;
142 if ((shdrs = (Elf64_Shdr *)FIPS_ALLOC(size)) == NULL) {
146 if (FIPS_READ_FILE(file, (char *)shdrs, size, ehdr->e_shoff) < 0) {
152 size = section->sh_size;
153 if ((shstrtab = (char *)FIPS_ALLOC(size)) == NULL) {
157 if (FIPS_READ_FILE(file, shstrtab, size, section->sh_offset) < 0) {
177 fips_read_file(int fd, char *buf, int size, int offs)
186 while ((i = read(fd, buf, size)) >= 0) {
187 if (size == i) {
190 size -= i;
275 unsigned int size, i;
302 size = sizeof (ehdr);
303 if (kobj_read_file(file, (char *)(&ehdr), size, 0) < 0) {