Tracing memcpy() would crash the kernel, because we'd also trace the
memcpy()s called from kinst. To fix this, introduce kinst_memcpy() whose
arguments are 'volatile', so that we avoid having the compiler replace
it with a regular memcpy().
Details
Details
- Reviewers
markj gnn - Commits
- rG5c134fba225f: kinst: fix memcpy() tracing crash
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/cddl/dev/kinst/amd64/kinst_isa.c | ||
---|---|---|
485 | These calls can simply be memcpy(). | |
sys/cddl/dev/kinst/kinst.c | ||
68 | I think there's no need to have a volatile qualifier on the return type. | |
69 | This function should have a comment explaining its existence. | |
sys/cddl/dev/kinst/trampoline.c | ||
57 ↗ | (On Diff #122473) | This can be regular memcpy(). |