Module Name: src Committed By: riastradh Date: Sat Aug 27 20:40:03 UTC 2022
Modified Files: src/sys/arch/x86/x86: db_memrw.c Log Message: x86/db_memrw.c: Mark db_read_bytes, db_write_bytes __noubsan. These intentionally do loads and stores that may be misaligned, which are fine on this x86-specific code. Should avoid double-panic in disassembler on panic with UBSan enabled. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/x86/db_memrw.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/db_memrw.c diff -u src/sys/arch/x86/x86/db_memrw.c:1.15 src/sys/arch/x86/x86/db_memrw.c:1.16 --- src/sys/arch/x86/x86/db_memrw.c:1.15 Sat Aug 27 20:39:54 2022 +++ src/sys/arch/x86/x86/db_memrw.c Sat Aug 27 20:40:03 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: db_memrw.c,v 1.15 2022/08/27 20:39:54 riastradh Exp $ */ +/* $NetBSD: db_memrw.c,v 1.16 2022/08/27 20:40:03 riastradh Exp $ */ /*- * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.15 2022/08/27 20:39:54 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.16 2022/08/27 20:40:03 riastradh Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -85,7 +85,7 @@ db_validate_address(vaddr_t addr) /* * Read bytes from kernel address space for debugger. */ -void +void __noubsan db_read_bytes(vaddr_t addr, size_t size, char *data) { char *src; @@ -205,7 +205,7 @@ db_write_text(vaddr_t addr, size_t size, /* * Write bytes to kernel address space for debugger. */ -void +void __noubsan db_write_bytes(vaddr_t addr, size_t size, const char *data) { extern struct bootspace bootspace;