~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/include/asm/string.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __ASM_ARM_STRING_H
  3 #define __ASM_ARM_STRING_H
  4 
  5 /*
  6  * We don't do inline string functions, since the
  7  * optimised inline asm versions are not small.
  8  *
  9  * The __underscore versions of some functions are for KASan to be able
 10  * to replace them with instrumented versions.
 11  */
 12 
 13 #define __HAVE_ARCH_STRRCHR
 14 extern char * strrchr(const char * s, int c);
 15 
 16 #define __HAVE_ARCH_STRCHR
 17 extern char * strchr(const char * s, int c);
 18 
 19 #define __HAVE_ARCH_MEMCPY
 20 extern void * memcpy(void *, const void *, __kernel_size_t);
 21 extern void *__memcpy(void *dest, const void *src, __kernel_size_t n);
 22 
 23 #define __HAVE_ARCH_MEMMOVE
 24 extern void * memmove(void *, const void *, __kernel_size_t);
 25 extern void *__memmove(void *dest, const void *src, __kernel_size_t n);
 26 
 27 #define __HAVE_ARCH_MEMCHR
 28 extern void * memchr(const void *, int, __kernel_size_t);
 29 
 30 #define __HAVE_ARCH_MEMSET
 31 extern void * memset(void *, int, __kernel_size_t);
 32 extern void *__memset(void *s, int c, __kernel_size_t n);
 33 
 34 #define __HAVE_ARCH_MEMSET32
 35 extern void *__memset32(uint32_t *, uint32_t v, __kernel_size_t);
 36 static inline void *memset32(uint32_t *p, uint32_t v, __kernel_size_t n)
 37 {
 38         return __memset32(p, v, n * 4);
 39 }
 40 
 41 #define __HAVE_ARCH_MEMSET64
 42 extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi);
 43 static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
 44 {
 45         return __memset64(p, v, n * 8, v >> 32);
 46 }
 47 
 48 /*
 49  * For files that are not instrumented (e.g. mm/slub.c) we
 50  * must use non-instrumented versions of the mem*
 51  * functions named __memcpy() etc. All such kernel code has
 52  * been tagged with KASAN_SANITIZE_file.o = n, which means
 53  * that the address sanitization argument isn't passed to the
 54  * compiler, and __SANITIZE_ADDRESS__ is not set. As a result
 55  * these defines kick in.
 56  */
 57 #if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
 58 #define memcpy(dst, src, len) __memcpy(dst, src, len)
 59 #define memmove(dst, src, len) __memmove(dst, src, len)
 60 #define memset(s, c, n) __memset(s, c, n)
 61 
 62 #ifndef __NO_FORTIFY
 63 #define __NO_FORTIFY /* FORTIFY_SOURCE uses __builtin_memcpy, etc. */
 64 #endif
 65 
 66 #endif
 67 
 68 #endif
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php