Module Name: src
Committed By: kamil
Date: Wed Sep 18 15:07:08 UTC 2019
Modified Files:
src/sys/arch/x86/x86: patch.c
Log Message:
Switch to __noubsan in x86_hotpatch()
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x86/x86/patch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/patch.c
diff -u src/sys/arch/x86/x86/patch.c:1.36 src/sys/arch/x86/x86/patch.c:1.37
--- src/sys/arch/x86/x86/patch.c:1.36 Tue May 28 13:20:23 2019
+++ src/sys/arch/x86/x86/patch.c Wed Sep 18 15:07:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: patch.c,v 1.36 2019/05/28 13:20:23 kamil Exp $ */
+/* $NetBSD: patch.c,v 1.37 2019/09/18 15:07:08 kamil Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.36 2019/05/28 13:20:23 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: patch.c,v 1.37 2019/09/18 15:07:08 kamil Exp $");
#include "opt_lockdebug.h"
#ifdef i386
@@ -133,11 +133,7 @@ patchbytes(void *addr, const uint8_t *by
}
/* The local variables have unknown alignment to UBSan */
-#if defined(__clang__)
-__attribute__((no_sanitize("undefined")))
-#else
-__attribute__((no_sanitize_undefined))
-#endif
+__noubsan
void
x86_hotpatch(uint32_t name, const uint8_t *bytes, size_t size)
{