[PATCH 5/9] pbl: Alias memcpy and memset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With KASan the memcpy/memset functions are instrumented as well, but
some code will still have to call the non instrumented versions __memcpy
and __memset. Add aliases for them to PBL to make them available.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 pbl/string.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pbl/string.c b/pbl/string.c
index 46bf0b32b3..e6c0997ebc 100644
--- a/pbl/string.c
+++ b/pbl/string.c
@@ -6,6 +6,7 @@
 
 #include <linux/types.h>
 #include <linux/string.h>
+#include <linux/compiler.h>
 
 void *memcpy(void *__dest, __const void *__src, size_t __n)
 {
@@ -41,6 +42,9 @@ void *memcpy(void *__dest, __const void *__src, size_t __n)
 	return __dest;
 }
 
+void *__memcpy(void *__dest, __const void *__src, size_t __n)
+	__alias(memcpy);
+
 void *memmove(void *__dest, __const void *__src, size_t count)
 {
 	unsigned char *d = __dest;
@@ -120,6 +124,9 @@ void *memset(void *s, int c, size_t count)
 	return s;
 }
 
+void *__memset(void *s, int c, size_t count)
+	__alias(memset);
+
 /**
  * strnlen - Find the length of a length-limited string
  * @s: The string to be sized
-- 
2.28.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux