[PATCH 2/9] Add _RET_IP_ macro

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 18 04:45:25 EDT 2020


Use in KAsan code, so added for barebox

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 include/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 23c23a73f5..787571a5a0 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -229,6 +229,8 @@ extern long long simple_strtoll(const char *,char **,unsigned int);
 }							\
 )
 
+#define _RET_IP_             (unsigned long)__builtin_return_address(0)
+
 extern const char hex_asc[];
 #define hex_asc_lo(x)	hex_asc[((x) & 0x0f)]
 #define hex_asc_hi(x)	hex_asc[((x) & 0xf0) >> 4]
-- 
2.28.0




More information about the barebox mailing list