Lines Matching refs:size

35 extern void *__underlying_memchr(const void *p, int c, __kernel_size_t size) __RENAME(memchr);
36 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
37 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
38 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
39 extern void *__underlying_memset(void *p, int c, __kernel_size_t size) __RENAME(memset);
44 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
136 char *strncpy(char * const POS p, const char *q, __kernel_size_t size) in strncpy() argument
140 if (__compiletime_lessthan(p_size, size)) in strncpy()
142 if (p_size < size) in strncpy()
144 return __underlying_strncpy(p, q, size); in strncpy()
205 __FORTIFY_INLINE size_t strlcpy(char * const POS p, const char * const POS q, size_t size) in strlcpy() argument
213 return __real_strlcpy(p, q, size); in strlcpy()
215 len = (q_len >= size) ? size - 1 : q_len; in strlcpy()
216 if (__builtin_constant_p(size) && __builtin_constant_p(q_len) && size) { in strlcpy()
221 if (size) { in strlcpy()
232 __FORTIFY_INLINE ssize_t strscpy(char * const POS p, const char * const POS q, size_t size) in strscpy() argument
241 return __real_strscpy(p, q, size); in strscpy()
247 if (__compiletime_lessthan(p_size, size)) in strscpy()
254 len = strnlen(q, size); in strscpy()
260 len = len == size ? size : len + 1; in strscpy()
296 __FORTIFY_INLINE void fortify_memset_chk(__kernel_size_t size, in fortify_memset_chk() argument
300 if (__builtin_constant_p(size)) { in fortify_memset_chk()
309 __compiletime_lessthan(p_size, size)) in fortify_memset_chk()
313 if (__compiletime_lessthan(p_size_field, size)) in fortify_memset_chk()
314 __write_overflow_field(p_size_field, size); in fortify_memset_chk()
330 if (p_size != SIZE_MAX && p_size < size) in fortify_memset_chk()
334 #define __fortify_memset_chk(p, c, size, p_size, p_size_field) ({ \ argument
335 size_t __fortify_size = (size_t)(size); \
380 __FORTIFY_INLINE bool fortify_memcpy_chk(__kernel_size_t size, in fortify_memcpy_chk() argument
387 if (__builtin_constant_p(size)) { in fortify_memcpy_chk()
396 __compiletime_lessthan(p_size, size)) in fortify_memcpy_chk()
399 __compiletime_lessthan(q_size, size)) in fortify_memcpy_chk()
403 if (__compiletime_lessthan(p_size_field, size)) in fortify_memcpy_chk()
404 __write_overflow_field(p_size_field, size); in fortify_memcpy_chk()
411 __compiletime_lessthan(p_size_field, size)) && in fortify_memcpy_chk()
412 __compiletime_lessthan(q_size_field, size)) in fortify_memcpy_chk()
413 __read_overflow2_field(q_size_field, size); in fortify_memcpy_chk()
429 if ((p_size != SIZE_MAX && p_size < size) || in fortify_memcpy_chk()
430 (q_size != SIZE_MAX && q_size < size)) in fortify_memcpy_chk()
449 p_size != p_size_field && p_size_field < size) in fortify_memcpy_chk()
455 #define __fortify_memcpy_chk(p, q, size, p_size, q_size, \ argument
457 const size_t __fortify_size = (size_t)(size); \
524 __FORTIFY_INLINE void *memscan(void * const POS0 p, int c, __kernel_size_t size) in memscan() argument
528 if (__compiletime_lessthan(p_size, size)) in memscan()
530 if (p_size < size) in memscan()
532 return __real_memscan(p, c, size); in memscan()
536 int memcmp(const void * const POS0 p, const void * const POS0 q, __kernel_size_t size) in memcmp() argument
541 if (__builtin_constant_p(size)) { in memcmp()
542 if (__compiletime_lessthan(p_size, size)) in memcmp()
544 if (__compiletime_lessthan(q_size, size)) in memcmp()
547 if (p_size < size || q_size < size) in memcmp()
549 return __underlying_memcmp(p, q, size); in memcmp()
553 void *memchr(const void * const POS0 p, int c, __kernel_size_t size) in memchr() argument
557 if (__compiletime_lessthan(p_size, size)) in memchr()
559 if (p_size < size) in memchr()
561 return __underlying_memchr(p, c, size); in memchr()
565 __FORTIFY_INLINE void *memchr_inv(const void * const POS0 p, int c, size_t size) in memchr_inv() argument
569 if (__compiletime_lessthan(p_size, size)) in memchr_inv()
571 if (p_size < size) in memchr_inv()
573 return __real_memchr_inv(p, c, size); in memchr_inv()
577 __FORTIFY_INLINE void *kmemdup(const void * const POS0 p, size_t size, gfp_t gfp) in kmemdup() argument
581 if (__compiletime_lessthan(p_size, size)) in kmemdup()
583 if (p_size < size) in kmemdup()
585 return __real_kmemdup(p, size, gfp); in kmemdup()
594 size_t size; in strcpy() local
601 size = strlen(q) + 1; in strcpy()
603 if (__compiletime_lessthan(p_size, size)) in strcpy()
606 if (p_size < size) in strcpy()
608 __underlying_memcpy(p, q, size); in strcpy()