diff options
author | jhb <jhb@FreeBSD.org> | 2005-01-19 18:24:07 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-01-19 18:24:07 +0000 |
commit | b69ebd9a78883d430a4bcb25eb502360396fd518 (patch) | |
tree | 12cbf1c4c6a9263306acc0d9acafc23973aee6dc /sys/sparc64/include | |
parent | 155c196d05b7b02898fd837e802732f1a28242ba (diff) | |
download | FreeBSD-src-b69ebd9a78883d430a4bcb25eb502360396fd518.zip FreeBSD-src-b69ebd9a78883d430a4bcb25eb502360396fd518.tar.gz |
Add a small API to manage the MD user trap structures. Specifically, we
now use a pool mutex to manage the reference counts. This fixes races
resulting in use-after-free.
Tested by: kris, David Cornejo dave at dogwood dot com
Reported by: bmilekic's MemGuard
MFC after: 1 week
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r-- | sys/sparc64/include/md_var.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h index 899d1bb..34a3437 100644 --- a/sys/sparc64/include/md_var.h +++ b/sys/sparc64/include/md_var.h @@ -45,10 +45,14 @@ extern vm_offset_t kstack0; extern vm_paddr_t kstack0_phys; struct pcpu; +struct md_utrap; void cpu_identify(u_long vers, u_int clock, u_int id); void cpu_setregs(struct pcpu *pc); int is_physical_memory(vm_paddr_t addr); +struct md_utrap *utrap_alloc(void); +void utrap_free(struct md_utrap *ut); +struct md_utrap *utrap_hold(struct md_utrap *ut); cpu_block_copy_t spitfire_block_copy; cpu_block_zero_t spitfire_block_zero; |