Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142452565
D30126.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
843 B
Referenced Files
None
Subscribers
None
D30126.diff
View Options
diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h
--- a/sys/sys/linker_set.h
+++ b/sys/sys/linker_set.h
@@ -59,12 +59,23 @@
* Private macros, not to be used outside this header file.
*/
#ifdef __GNUCLIKE___SECTION
+
+/*
+ * The userspace address sanitizer inserts redzones around global variables,
+ * violating the assumption that linker set elements are packed.
+ */
+#ifdef _KERNEL
+#define __NOASAN
+#else
+#define __NOASAN __nosanitizeaddress
+#endif
+
#define __MAKE_SET_QV(set, sym, qv) \
__WEAK(__CONCAT(__start_set_,set)); \
__WEAK(__CONCAT(__stop_set_,set)); \
static void const * qv \
+ __NOASAN \
__set_##set##_sym_##sym __section("set_" #set) \
- __nosanitizeaddress \
__used = &(sym)
#define __MAKE_SET(set, sym) __MAKE_SET_QV(set, sym, __MAKE_SET_CONST)
#else /* !__GNUCLIKE___SECTION */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 3:00 AM (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27787458
Default Alt Text
D30126.diff (843 B)
Attached To
Mode
D30126: KASAN: Disable the sanitizer in stack_capture()
Attached
Detach File
Event Timeline
Log In to Comment