Date: Mon, 10 Jun 2013 20:49:04 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 229572 for review Message-ID: <201306102049.r5AKn4bQ044042@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@229572?ac=10 Change 229572 by rwatson@rwatson_cinnamon on 2013/06/10 20:48:16 We can't instrument vm_fault() with TESLA (currently) as it is used before calls to malloc(9) are safe. Instead instrument trap_pfault(), although, actually, comment that out as well as it's static and therefore can't be instrumented (at least that I can figure out). Affected files ... .. //depot/projects/ctsrd/tesla/src/sys/sys/tesla-kernel.h#2 edit .. //depot/projects/ctsrd/tesla/src/sys/ufs/ffs/ffs_vnops.c#9 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/sys/sys/tesla-kernel.h#2 (text+ko) ==== @@ -38,14 +38,25 @@ /* * Un-protyped functions that we care about. * - * XXXRW: Solution is actually to prototype them properly. + * XXXRW: Solution is actually to prototype them properly. Some don't have + * consistent prototypes across architectures. */ extern void syscall(void); +extern void trap_pfault(struct trapframe *, int, vm_offset_t); /* * Convenient assertion wrappers for various scopes. */ #define TESLA_SYSCALL(x) TESLA_WITHIN(syscall, x) -#define TESLA_VM_FAULT(x) TESLA_WITHIN(vm_fault, x) + +/* + * XXXRW: Not all architectures have a trap_pfault() function. Can't use + * vm_fault() as it is used in non-trap contexts -- e.g., PMAP initialisation. + */ +#if 0 +#define TESLA_PAGE_FAULT(x) TESLA_WITHIN(trap_pfault, x) +#else +#define TESLA_PAGE_FAULT(x) +#endif #endif /* _SYS_TESLA_KERNEL_H_ */ ==== //depot/projects/ctsrd/tesla/src/sys/ufs/ffs/ffs_vnops.c#9 (text+ko) ==== @@ -440,8 +440,8 @@ vp = ap->a_vp; TESLA_SYSCALL(previously(mac_vnode_check_read(ANY(ptr), ANY(ptr), vp) == 0)); - TESLA_VM_FAULT(previously(mac_vnode_check_read(ANY(ptr), ANY(ptr), vp) - == 0)); + TESLA_PAGE_FAULT(previously(mac_vnode_check_read(ANY(ptr), ANY(ptr), + vp) == 0)); uio = ap->a_uio; ioflag = ap->a_ioflag; @@ -666,7 +666,7 @@ vp = ap->a_vp; TESLA_SYSCALL(previously(mac_vnode_check_write(ANY(ptr), ANY(ptr), vp) == 0)); - TESLA_VM_FAULT(previously(mac_vnode_check_WRITE(ANY(ptr), ANY(ptr), + TESLA_PAGE_FAULT(previously(mac_vnode_check_WRITE(ANY(ptr), ANY(ptr), vp) == 0)); uio = ap->a_uio;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306102049.r5AKn4bQ044042>