diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-07-31 17:10:32 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-07-31 17:10:32 +0000 |
commit | ac0d149cc18716d7785169c71c97a2e0cb151e97 (patch) | |
tree | 810094f9a1d0d5912c0c6eff6e8577a039680b85 /sys/arch | |
parent | c6294da4cdf69805048f7cb4cdffbff3aff2fca0 (diff) |
Mark code parameter of codepatch_replace() constant also on i386.
OK guenther@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/codepatch.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/codepatch.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/codepatch.c b/sys/arch/i386/i386/codepatch.c index 0865c8262f8..224fbe82370 100644 --- a/sys/arch/i386/i386/codepatch.c +++ b/sys/arch/i386/i386/codepatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: codepatch.c,v 1.5 2020/09/11 09:27:10 mpi Exp $ */ +/* $OpenBSD: codepatch.c,v 1.6 2023/07/31 17:10:31 bluhm Exp $ */ /* * Copyright (c) 2014-2015 Stefan Fritsch <sf@sfritsch.de> * @@ -147,7 +147,7 @@ codepatch_nop(uint16_t tag) /* Patch with alternative code */ void -codepatch_replace(uint16_t tag, void *code, size_t len) +codepatch_replace(uint16_t tag, const void *code, size_t len) { struct codepatch *patch; unsigned char *rwaddr; diff --git a/sys/arch/i386/include/codepatch.h b/sys/arch/i386/include/codepatch.h index 89791f46d8b..a8cccf5bd0d 100644 --- a/sys/arch/i386/include/codepatch.h +++ b/sys/arch/i386/include/codepatch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: codepatch.h,v 1.2 2017/07/01 19:42:59 sf Exp $ */ +/* $OpenBSD: codepatch.h,v 1.3 2023/07/31 17:10:31 bluhm Exp $ */ /* * Copyright (c) 2014-2015 Stefan Fritsch <sf@sfritsch.de> * @@ -26,7 +26,7 @@ void *codepatch_maprw(vaddr_t *nva, vaddr_t dest); void codepatch_unmaprw(vaddr_t nva); void codepatch_fill_nop(void *caddr, uint16_t len); void codepatch_nop(uint16_t tag); -void codepatch_replace(uint16_t tag, void *code, size_t len); +void codepatch_replace(uint16_t tag, const void *code, size_t len); void codepatch_call(uint16_t tag, void *func); #endif /* !_LOCORE */ |