linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kasan: add __asan_report_loadN/storeN_noabort callbacks
@ 2018-01-19 17:44 Andrey Konovalov
  2018-01-23 10:44 ` Andrey Ryabinin
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Konovalov @ 2018-01-19 17:44 UTC (permalink / raw)
  To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov, kasan-dev,
	linux-mm, linux-kernel
  Cc: Kostya Serebryany, Evgeniy Stepanov, Andrey Konovalov

Instead of __asan_report_load_n_noabort and __asan_report_store_n_noabort
callbacks Clang emits differently named __asan_report_loadN_noabort and
__asan_report_storeN_noabort (similar to __asan_loadN/storeN_noabort, whose
names both GCC and Clang agree on).

Add callback implementation for __asan_report_loadN/storeN_noabort.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 mm/kasan/report.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index eff12e040498..caf4c9e948c6 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -450,3 +450,15 @@ void __asan_report_store_n_noabort(unsigned long addr, size_t size)
 	kasan_report(addr, size, true, _RET_IP_);
 }
 EXPORT_SYMBOL(__asan_report_store_n_noabort);
+
+void __asan_report_loadN_noabort(unsigned long addr, size_t size)
+{
+	kasan_report(addr, size, false, _RET_IP_);
+}
+EXPORT_SYMBOL(__asan_report_loadN_noabort);
+
+void __asan_report_storeN_noabort(unsigned long addr, size_t size)
+{
+	kasan_report(addr, size, true, _RET_IP_);
+}
+EXPORT_SYMBOL(__asan_report_storeN_noabort);
-- 
2.16.0.rc1.238.g530d649a79-goog

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-23 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19 17:44 [PATCH] kasan: add __asan_report_loadN/storeN_noabort callbacks Andrey Konovalov
2018-01-23 10:44 ` Andrey Ryabinin
2018-01-23 15:34   ` Andrey Konovalov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox