Date: Mon, 10 Jul 2006 16:42:42 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 101213 for review Message-ID: <200607101642.k6AGgg5O097771@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101213 Change 101213 by piso@piso_newluxor on 2006/07/10 16:42:13 IFC Affected files ... .. //depot/projects/soc2006/intr_filter/Makefile#2 integrate .. //depot/projects/soc2006/intr_filter/amd64/amd64/pmap.c#5 integrate .. //depot/projects/soc2006/intr_filter/amd64/conf/GENERIC#4 integrate .. //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_proto.h#5 integrate .. //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_syscall.h#5 integrate .. //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_sysent.c#5 integrate .. //depot/projects/soc2006/intr_filter/amd64/linux32/syscalls.master#5 integrate .. //depot/projects/soc2006/intr_filter/bsm/audit_kevents.h#2 integrate .. //depot/projects/soc2006/intr_filter/bsm/audit_record.h#2 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_ioctl.c#2 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_ipc.c#3 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_socket.c#2 integrate .. //depot/projects/soc2006/intr_filter/compat/svr4/svr4_ipc.c#3 integrate .. //depot/projects/soc2006/intr_filter/conf/NOTES#5 integrate .. //depot/projects/soc2006/intr_filter/conf/files#4 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src.diff#2 delete .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/Makefile#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_bstream.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_bstream.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_context.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_context.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_env.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_env.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_scoreboard.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_scoreboard.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_self-new.c#2 delete .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_self.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_self.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_self_context.s#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_self_info.h#1 branch .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_step.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_step.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_str.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_str.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_swap.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_swap.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_symbols.c#1 branch .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_symbols.h#1 branch .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_trace.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_trace.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_ttrace.c#2 delete .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_ttrace.h#2 delete .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_uinfo.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_uinfo.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_utable.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx_utable.h#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/pf/net/if_pflog.c#2 integrate .. //depot/projects/soc2006/intr_filter/contrib/pf/net/if_pfsync.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/asr/MAINTAINER#2 delete .. //depot/projects/soc2006/intr_filter/dev/ata/ata-chipset.c#5 integrate .. //depot/projects/soc2006/intr_filter/dev/ata/ata-lowlevel.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/ata/ata-pci.h#3 integrate .. //depot/projects/soc2006/intr_filter/dev/atkbdc/atkbdc_isa.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/fdc/fdc.c#4 integrate .. //depot/projects/soc2006/intr_filter/dev/ic/nec765.h#2 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp_freebsd.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp_freebsd.h#2 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp_pci.c#4 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp_sbus.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/ispfw/asm_1040.h#2 integrate .. //depot/projects/soc2006/intr_filter/dev/ispfw/asm_1080.h#2 integrate .. //depot/projects/soc2006/intr_filter/dev/ispfw/asm_12160.h#2 integrate .. //depot/projects/soc2006/intr_filter/dev/ispfw/ispfw.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/mii/mii_physubr.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/sk/if_sk.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/sound/pci/solo.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/usb/if_aue.c#2 integrate .. //depot/projects/soc2006/intr_filter/doc/Doxyfile#2 delete .. //depot/projects/soc2006/intr_filter/doc/Makefile#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Dependencies#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-cam#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-crypto#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-dev_pci#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-dev_sound#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-dev_usb#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-geom#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-i4b#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-kern#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-libkern#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-linux#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-net80211#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-netgraph#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-netinet#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-netinet6#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-netipsec#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-opencrypto#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Doxyfile-vm#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/Makefile#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/README#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/common-Doxyfile#2 delete .. //depot/projects/soc2006/intr_filter/doc/subsys/notreviewed.dox#2 delete .. //depot/projects/soc2006/intr_filter/fs/devfs/devfs_vfsops.c#2 integrate .. //depot/projects/soc2006/intr_filter/fs/devfs/devfs_vnops.c#2 integrate .. //depot/projects/soc2006/intr_filter/fs/portalfs/portal_vnops.c#2 integrate .. //depot/projects/soc2006/intr_filter/fs/unionfs/union_vnops.c#2 integrate .. //depot/projects/soc2006/intr_filter/geom/mirror/g_mirror.c#2 integrate .. //depot/projects/soc2006/intr_filter/geom/raid3/g_raid3.c#2 integrate .. //depot/projects/soc2006/intr_filter/geom/raid3/g_raid3_ctl.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/conf/GENERIC#5 integrate .. //depot/projects/soc2006/intr_filter/i386/conf/PAE#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_ipc.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_ipc.h#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_misc.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_msg.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_other.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_poll.h#2 delete .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_proto.h#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_syscall.h#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_sysent.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_xenix.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_xenix.h#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_xenix_syscall.h#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_xenix_sysent.c#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/syscalls.master#2 integrate .. //depot/projects/soc2006/intr_filter/i386/ibcs2/syscalls.xenix#2 integrate .. //depot/projects/soc2006/intr_filter/i386/include/i4b_ioctl.h#2 integrate .. //depot/projects/soc2006/intr_filter/i386/linux/linux_proto.h#5 integrate .. //depot/projects/soc2006/intr_filter/i386/linux/linux_syscall.h#5 integrate .. //depot/projects/soc2006/intr_filter/i386/linux/linux_sysent.c#5 integrate .. //depot/projects/soc2006/intr_filter/i386/linux/syscalls.master#5 integrate .. //depot/projects/soc2006/intr_filter/i4b/layer4/i4b_l4mgmt.c#2 integrate .. //depot/projects/soc2006/intr_filter/ia64/conf/GENERIC#4 integrate .. //depot/projects/soc2006/intr_filter/ia64/include/ieeefp.h#2 integrate .. //depot/projects/soc2006/intr_filter/isa/isahint.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/bus_if.m#3 integrate .. //depot/projects/soc2006/intr_filter/kern/init_sysent.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_acl.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_descrip.c#3 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_environment.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_linker.c#5 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_prot.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/subr_acl_posix1e.c#1 branch .. //depot/projects/soc2006/intr_filter/kern/subr_bus.c#4 integrate .. //depot/projects/soc2006/intr_filter/kern/subr_hints.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/sys_generic.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/syscalls.c#2 integrate .. //depot/projects/soc2006/intr_filter/kern/syscalls.master#3 integrate .. //depot/projects/soc2006/intr_filter/kern/sysv_sem.c#4 integrate .. //depot/projects/soc2006/intr_filter/kern/uipc_socket2.c#4 integrate .. //depot/projects/soc2006/intr_filter/kern/vfs_subr.c#3 integrate .. //depot/projects/soc2006/intr_filter/kern/vfs_syscalls.c#2 integrate .. //depot/projects/soc2006/intr_filter/modules/ispfw/Makefile#2 integrate .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_1000/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_1040/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_1040_it/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_1080/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_1080_it/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_12160/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_12160_it/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_2100/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_2200/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_2300/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/isp_2322/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/modules/ispfw/ispfw/Makefile#1 branch .. //depot/projects/soc2006/intr_filter/net/bpf.c#3 integrate .. //depot/projects/soc2006/intr_filter/net/if.c#5 integrate .. //depot/projects/soc2006/intr_filter/net/if_bridge.c#4 integrate .. //depot/projects/soc2006/intr_filter/net/if_clone.c#3 integrate .. //depot/projects/soc2006/intr_filter/net/if_clone.h#2 integrate .. //depot/projects/soc2006/intr_filter/net/if_disc.c#2 integrate .. //depot/projects/soc2006/intr_filter/net/if_enc.c#2 integrate .. //depot/projects/soc2006/intr_filter/net/if_faith.c#2 integrate .. //depot/projects/soc2006/intr_filter/net/if_gif.c#3 integrate .. //depot/projects/soc2006/intr_filter/net/if_gre.c#2 integrate .. //depot/projects/soc2006/intr_filter/net/if_loop.c#2 integrate .. //depot/projects/soc2006/intr_filter/net/if_ppp.c#2 integrate .. //depot/projects/soc2006/intr_filter/net/if_stf.c#3 integrate .. //depot/projects/soc2006/intr_filter/net/if_vlan.c#4 integrate .. //depot/projects/soc2006/intr_filter/net/rtsock.c#2 integrate .. //depot/projects/soc2006/intr_filter/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#3 integrate .. //depot/projects/soc2006/intr_filter/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h#2 integrate .. //depot/projects/soc2006/intr_filter/netinet/in_rmx.c#2 integrate .. //depot/projects/soc2006/intr_filter/netinet/ip_carp.c#2 integrate .. //depot/projects/soc2006/intr_filter/netinet/ip_ipsec.c#2 integrate .. //depot/projects/soc2006/intr_filter/netinet/libalias/libalias.3#2 integrate .. //depot/projects/soc2006/intr_filter/netinet6/in6_rmx.c#2 integrate .. //depot/projects/soc2006/intr_filter/nfsclient/nfs_socket.c#2 integrate .. //depot/projects/soc2006/intr_filter/nfsclient/nfs_vnops.c#2 integrate .. //depot/projects/soc2006/intr_filter/pc98/conf/GENERIC#4 integrate .. //depot/projects/soc2006/intr_filter/powerpc/powerpc/mmu_oea.c#5 integrate .. //depot/projects/soc2006/intr_filter/security/audit/audit.h#2 integrate .. //depot/projects/soc2006/intr_filter/security/audit/audit_arg.c#2 integrate .. //depot/projects/soc2006/intr_filter/security/audit/audit_bsm.c#2 integrate .. //depot/projects/soc2006/intr_filter/sparc64/conf/GENERIC#4 integrate .. //depot/projects/soc2006/intr_filter/sys/bus.h#4 integrate .. //depot/projects/soc2006/intr_filter/sys/sockio.h#3 integrate .. //depot/projects/soc2006/intr_filter/sys/syscall.h#2 integrate .. //depot/projects/soc2006/intr_filter/sys/syscall.mk#2 integrate .. //depot/projects/soc2006/intr_filter/sys/syscallsubr.h#4 integrate .. //depot/projects/soc2006/intr_filter/sys/sysproto.h#2 integrate .. //depot/projects/soc2006/intr_filter/sys/systm.h#2 integrate .. //depot/projects/soc2006/intr_filter/ufs/ffs/ffs_vfsops.c#2 integrate .. //depot/projects/soc2006/intr_filter/vm/vm_meter.c#3 integrate Differences ... ==== //depot/projects/soc2006/intr_filter/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.36 2006/05/29 19:29:41 maxim Exp $ +# $FreeBSD: src/sys/Makefile,v 1.37 2006/07/04 14:14:16 maxim Exp $ .include <bsd.own.mk> @@ -10,7 +10,7 @@ .endif # Directories to include in cscope name file and TAGS. -CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs gnu i4b isa \ +CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ isofs kern libkern modules net net80211 netatalk netatm \ netgraph netinet netinet6 netipx netkey netnatm netncp \ netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \ ==== //depot/projects/soc2006/intr_filter/amd64/amd64/pmap.c#5 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.563 2006/07/02 18:22:46 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.565 2006/07/06 06:17:08 alc Exp $"); /* * Manages physical address maps. @@ -207,7 +207,7 @@ static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); -static void pmap_clear_ptes(vm_page_t m, long bit); +static void pmap_clear_write(vm_page_t m); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); @@ -2969,47 +2969,36 @@ } /* - * Clear the given bit in each of the given page's ptes. + * Clear the write and modified bits in each of the given page's mappings. */ static __inline void -pmap_clear_ptes(vm_page_t m, long bit) +pmap_clear_write(vm_page_t m) { pv_entry_t pv; pmap_t pmap; - pt_entry_t pbits, *pte; + pt_entry_t oldpte, *pte; - if ((m->flags & PG_FICTITIOUS) || - (bit == PG_RW && (m->flags & PG_WRITEABLE) == 0)) + if ((m->flags & PG_FICTITIOUS) != 0 || + (m->flags & PG_WRITEABLE) == 0) return; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - /* - * Loop over all current mappings setting/clearing as appropos If - * setting RO do we need to clear the VAC? - */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); retry: - pbits = *pte; - if (pbits & bit) { - if (bit == PG_RW) { - if (!atomic_cmpset_long(pte, pbits, - pbits & ~(PG_RW | PG_M))) - goto retry; - if (pbits & PG_M) { - vm_page_dirty(m); - } - } else { - atomic_clear_long(pte, bit); - } + oldpte = *pte; + if (oldpte & PG_RW) { + if (!atomic_cmpset_long(pte, oldpte, oldpte & + ~(PG_RW | PG_M))) + goto retry; + if ((oldpte & PG_M) != 0) + vm_page_dirty(m); pmap_invalidate_page(pmap, pv->pv_va); } PMAP_UNLOCK(pmap); } - if (bit == PG_RW) - vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_flag_clear(m, PG_WRITEABLE); } /* @@ -3022,7 +3011,7 @@ { if ((prot & VM_PROT_WRITE) == 0) { if (prot & (VM_PROT_READ | VM_PROT_EXECUTE)) { - pmap_clear_ptes(m, PG_RW); + pmap_clear_write(m); } else { pmap_remove_all(m); } @@ -3061,14 +3050,12 @@ pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); - if (pte != NULL && (*pte & PG_A) != 0) { + if ((*pte & PG_A) != 0) { atomic_clear_long(pte, PG_A); pmap_invalidate_page(pmap, pv->pv_va); rtval++; - if (rtval > 4) { - PMAP_UNLOCK(pmap); - break; - } + if (rtval > 4) + pvn = NULL; } PMAP_UNLOCK(pmap); } while ((pv = pvn) != NULL && pv != pvf); @@ -3082,7 +3069,23 @@ void pmap_clear_modify(vm_page_t m) { - pmap_clear_ptes(m, PG_M); + pv_entry_t pv; + pmap_t pmap; + pt_entry_t *pte; + + if ((m->flags & PG_FICTITIOUS) != 0) + return; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte(pmap, pv->pv_va); + if (*pte & PG_M) { + atomic_clear_long(pte, PG_M); + pmap_invalidate_page(pmap, pv->pv_va); + } + PMAP_UNLOCK(pmap); + } } /* @@ -3093,7 +3096,23 @@ void pmap_clear_reference(vm_page_t m) { - pmap_clear_ptes(m, PG_A); + pv_entry_t pv; + pmap_t pmap; + pt_entry_t *pte; + + if ((m->flags & PG_FICTITIOUS) != 0) + return; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte(pmap, pv->pv_va); + if (*pte & PG_A) { + atomic_clear_long(pte, PG_A); + pmap_invalidate_page(pmap, pv->pv_va); + } + PMAP_UNLOCK(pmap); + } } /* ==== //depot/projects/soc2006/intr_filter/amd64/conf/GENERIC#4 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.462 2006/06/26 22:03:20 babkin Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.464 2006/07/09 16:39:21 mjacob Exp $ cpu HAMMER ident GENERIC @@ -28,7 +28,6 @@ #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler -#options SCHED_CORE # CORE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols @@ -252,6 +251,7 @@ device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! ==== //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_proto.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.16 2006/06/27 18:32:16 jhb Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.17 2006/07/06 21:43:14 jhb Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.15 2006/07/06 21:42:35 jhb Exp */ #ifndef _LINUX_SYSPROTO_H_ ==== //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_syscall.h#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.16 2006/06/27 18:32:16 jhb Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.17 2006/07/06 21:43:14 jhb Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.15 2006/07/06 21:42:35 jhb Exp */ #define LINUX_SYS_exit 1 ==== //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_sysent.c#5 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.16 2006/06/27 18:32:16 jhb Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.17 2006/07/06 21:43:14 jhb Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.15 2006/07/06 21:42:35 jhb Exp */ #include <bsm/audit_kevents.h> @@ -74,7 +74,7 @@ { SYF_MPSAFE | AS(acct_args), (sy_call_t *)acct, AUE_ACCT }, /* 51 = acct */ { SYF_MPSAFE | AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT }, /* 52 = linux_umount */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 53 = lock */ - { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL }, /* 54 = linux_ioctl */ + { SYF_MPSAFE | AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL }, /* 54 = linux_ioctl */ { SYF_MPSAFE | AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL }, /* 55 = linux_fcntl */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 56 = mpx */ { SYF_MPSAFE | AS(setpgid_args), (sy_call_t *)setpgid, AUE_SETPGRP }, /* 57 = setpgid */ ==== //depot/projects/soc2006/intr_filter/amd64/linux32/syscalls.master#5 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp $ + $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.15 2006/07/06 21:42:35 jhb Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -113,7 +113,7 @@ 51 AUE_ACCT MNOPROTO { int acct(char *path); } 52 AUE_UMOUNT MSTD { int linux_umount(char *path, l_int flags); } 53 AUE_NULL UNIMPL lock -54 AUE_IOCTL STD { int linux_ioctl(l_uint fd, l_uint cmd, \ +54 AUE_IOCTL MSTD { int linux_ioctl(l_uint fd, l_uint cmd, \ uintptr_t arg); } 55 AUE_FCNTL MSTD { int linux_fcntl(l_uint fd, l_uint cmd, \ uintptr_t arg); } ==== //depot/projects/soc2006/intr_filter/bsm/audit_kevents.h#2 (text) ==== @@ -30,8 +30,8 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#20 $ - * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.5 2006/02/06 01:12:46 rwatson Exp $ + * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#23 $ + * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.6 2006/07/03 14:45:43 rwatson Exp $ */ #ifndef _BSM_AUDIT_KEVENTS_H_ @@ -384,7 +384,24 @@ #define AUE_ACL_DELETE_FD 403 /* FreeBSD. */ #define AUE_ACL_CHECK_FILE 404 /* FreeBSD. */ #define AUE_ACL_CHECK_FD 405 /* FreeBSD. */ -#define AUE_SYSARCH 406 /* FreeBSD. */ +#define AUE_ACL_GET_LINK 406 /* FreeBSD. */ +#define AUE_ACL_SET_LINK 407 /* FreeBSD. */ +#define AUE_ACL_DELETE_LINK 408 /* FreeBSD. */ +#define AUE_ACL_CHECK_LINK 409 /* FreeBSD. */ +#define AUE_SYSARCH 410 /* FreeBSD. */ +#define AUE_EXTATTRCTL 411 /* FreeBSD. */ +#define AUE_EXTATTR_GET_FILE 412 /* FreeBSD. */ +#define AUE_EXTATTR_SET_FILE 413 /* FreeBSD. */ +#define AUE_EXTATTR_LIST_FILE 414 /* FreeBSD. */ +#define AUE_EXTATTR_DELETE_FILE 415 /* FreeBSD. */ +#define AUE_EXTATTR_GET_FD 416 /* FreeBSD. */ +#define AUE_EXTATTR_SET_FD 417 /* FreeBSD. */ +#define AUE_EXTATTR_LIST_FD 418 /* FreeBSD. */ +#define AUE_EXTATTR_DELETE_FD 419 /* FreeBSD. */ +#define AUE_EXTATTR_GET_LINK 420 /* FreeBSD. */ +#define AUE_EXTATTR_SET_LINK 421 /* FreeBSD. */ +#define AUE_EXTATTR_LIST_LINK 422 /* FreeBSD. */ +#define AUE_EXTATTR_DELETE_LINK 423 /* FreeBSD. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the ==== //depot/projects/soc2006/intr_filter/bsm/audit_record.h#2 (text) ==== @@ -31,12 +31,14 @@ * @APPLE_BSD_LICENSE_HEADER_END@ * * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#13 $ - * $FreeBSD: src/sys/bsm/audit_record.h,v 1.2 2006/06/05 13:00:52 rwatson Exp $ + * $FreeBSD: src/sys/bsm/audit_record.h,v 1.3 2006/07/03 14:44:13 rwatson Exp $ */ #ifndef _BSM_AUDIT_RECORD_H_ #define _BSM_AUDIT_RECORD_H_ +#include <sys/time.h> /* struct timeval */ + /* * Token type identifiers. */ ==== //depot/projects/soc2006/intr_filter/compat/linux/linux_ioctl.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.136 2006/05/10 20:38:15 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.137 2006/07/06 21:42:36 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -43,7 +43,9 @@ #include <sys/filedesc.h> #include <sys/filio.h> #include <sys/kbio.h> +#include <sys/kernel.h> #include <sys/linker_set.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/proc.h> #include <sys/sbuf.h> @@ -51,6 +53,7 @@ #include <sys/sockio.h> #include <sys/soundcard.h> #include <sys/stdint.h> +#include <sys/sx.h> #include <sys/tty.h> #include <sys/uio.h> #include <net/if.h> @@ -126,6 +129,8 @@ static TAILQ_HEAD(, handler_element) handlers = TAILQ_HEAD_INITIALIZER(handlers); +static struct sx linux_ioctl_sx; +SX_SYSINIT(linux_ioctl, &linux_ioctl_sx, "linux ioctl handlers"); /* * hdio related ioctls for VMWare support @@ -2571,15 +2576,21 @@ /* Iterate over the ioctl handlers */ cmd = args->cmd & 0xffff; + sx_slock(&linux_ioctl_sx); + mtx_lock(&Giant); TAILQ_FOREACH(he, &handlers, list) { if (cmd >= he->low && cmd <= he->high) { error = (*he->func)(td, args); if (error != ENOIOCTL) { + mtx_unlock(&Giant); + sx_sunlock(&linux_ioctl_sx); fdrop(fp, td); return (error); } } } + mtx_unlock(&Giant); + sx_sunlock(&linux_ioctl_sx); fdrop(fp, td); linux_msg(td, "ioctl fd=%d, cmd=0x%x ('%c',%d) is not implemented", @@ -2601,6 +2612,7 @@ * Reuse the element if the handler is already on the list, otherwise * create a new element. */ + sx_xlock(&linux_ioctl_sx); TAILQ_FOREACH(he, &handlers, list) { if (he->func == h->func) break; @@ -2621,10 +2633,12 @@ TAILQ_FOREACH(cur, &handlers, list) { if (cur->span > he->span) { TAILQ_INSERT_BEFORE(cur, he, list); + sx_xunlock(&linux_ioctl_sx); return (0); } } TAILQ_INSERT_TAIL(&handlers, he, list); + sx_xunlock(&linux_ioctl_sx); return (0); } @@ -2637,13 +2651,16 @@ if (h == NULL || h->func == NULL) return (EINVAL); + sx_xlock(&linux_ioctl_sx); TAILQ_FOREACH(he, &handlers, list) { if (he->func == h->func) { TAILQ_REMOVE(&handlers, he, list); + sx_xunlock(&linux_ioctl_sx); FREE(he, M_LINUX); return (0); } } + sx_xunlock(&linux_ioctl_sx); return (EINVAL); } ==== //depot/projects/soc2006/intr_filter/compat/linux/linux_ipc.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ipc.c,v 1.47 2006/06/27 18:28:49 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ipc.c,v 1.48 2006/07/08 19:51:37 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -494,6 +494,7 @@ struct l_seminfo linux_seminfo; struct semid_ds semid; union semun semun; + register_t rval; int cmd, error; switch (args->cmd & ~LINUX_IPC_64) { @@ -524,25 +525,25 @@ return (error); linux_to_bsd_semid_ds(&linux_semid, &semid); semun.buf = &semid; - return kern_semctl(td, args->semid, args->semnum, cmd, &semun, - UIO_SYSSPACE); + return (kern_semctl(td, args->semid, args->semnum, cmd, &semun, + td->td_retval)); case LINUX_IPC_STAT: case LINUX_SEM_STAT: - if((args->cmd & ~LINUX_IPC_64) == LINUX_IPC_STAT) + if ((args->cmd & ~LINUX_IPC_64) == LINUX_IPC_STAT) cmd = IPC_STAT; else cmd = SEM_STAT; semun.buf = &semid; error = kern_semctl(td, args->semid, args->semnum, cmd, &semun, - UIO_SYSSPACE); + &rval); if (error) return (error); - td->td_retval[0] = (cmd == SEM_STAT) ? - IXSEQ_TO_IPCID(args->semid, semid.sem_perm) : - 0; bsd_to_linux_semid_ds(&semid, &linux_semid); - return (linux_semid_pushdown(args->cmd & LINUX_IPC_64, - &linux_semid, (caddr_t)PTRIN(args->arg.buf))); + error = linux_semid_pushdown(args->cmd & LINUX_IPC_64, + &linux_semid, (caddr_t)PTRIN(args->arg.buf)); + if (error == 0) + td->td_retval[0] = (cmd == SEM_STAT) ? rval : 0; + return (error); case LINUX_IPC_INFO: case LINUX_SEM_INFO: bcopy(&seminfo, &linux_seminfo, sizeof(linux_seminfo) ); @@ -567,8 +568,8 @@ args->cmd & ~LINUX_IPC_64); return EINVAL; } - return kern_semctl(td, args->semid, args->semnum, cmd, &semun, - UIO_USERSPACE); + return (kern_semctl(td, args->semid, args->semnum, cmd, &semun, + td->td_retval)); } int ==== //depot/projects/soc2006/intr_filter/compat/linux/linux_socket.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.68 2006/05/10 20:38:16 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.69 2006/07/08 20:03:38 jhb Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -705,9 +705,6 @@ struct sockaddr * __restrict name; socklen_t * __restrict anamelen; } */ bsd_args; - struct close_args /* { - int fd; - } */ c_args; int error, fd; if ((error = copyin(args, &linux_args, sizeof(linux_args)))) @@ -724,8 +721,7 @@ if (linux_args.addr) { error = linux_sa_put(PTRIN(linux_args.addr)); if (error) { - c_args.fd = td->td_retval[0]; - (void)close(td, &c_args); + (void)kern_close(td, td->td_retval[0]); return (error); } } ==== //depot/projects/soc2006/intr_filter/compat/svr4/svr4_ipc.c#3 (text+ko) ==== @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_ipc.c,v 1.21 2006/06/27 18:31:36 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_ipc.c,v 1.23 2006/07/08 19:51:37 jhb Exp $"); #include "opt_sysvipc.h" @@ -209,6 +209,7 @@ struct svr4_semid_ds ss; struct semid_ds bs; union semun semun; + register_t rval; int cmd, error; switch (uap->cmd) { @@ -244,21 +245,24 @@ cmd = IPC_STAT; semun.buf = &bs; error = kern_semctl(td, uap->semid, uap->semnum, cmd, &semun, - UIO_SYSSPACE); + &rval); if (error) - return error; + return (error); bsd_to_svr4_semid_ds(&bs, &ss); - return copyout(&ss, uap->arg.buf, sizeof(ss)); + error = copyout(&ss, uap->arg.buf, sizeof(ss)); + if (error == 0) + td->td_retval[0] = rval; + return (error); case SVR4_IPC_SET: cmd = IPC_SET; error = copyin(uap->arg.buf, (caddr_t) &ss, sizeof ss); if (error) - return error; + return (error); svr4_to_bsd_semid_ds(&ss, &bs); semun.buf = &bs; - return kern_semctl(td, uap->semid, uap->semnum, cmd, &semun, - UIO_SYSSPACE); + return (kern_semctl(td, uap->semid, uap->semnum, cmd, &semun, + td->td_retval)); case SVR4_IPC_RMID: cmd = IPC_RMID; @@ -268,8 +272,8 @@ return EINVAL; } - return kern_semctl(td, uap->semid, uap->semnum, cmd, &uap->arg, - UIO_USERSPACE); + return (kern_semctl(td, uap->semid, uap->semnum, cmd, &uap->arg, + td->td_retval)); } struct svr4_sys_semget_args { @@ -500,11 +504,7 @@ return (kern_msgctl(td, uap->msqid, IPC_SET, &bs)); case SVR4_IPC_RMID: - error = copyin(uap->buf, &ss, sizeof ss); - if (error) - return error; - svr4_to_bsd_msqid_ds(&ss, &bs); - return (kern_msgctl(td, uap->msqid, IPC_RMID, &bs)); + return (kern_msgctl(td, uap->msqid, IPC_RMID, NULL)); default: return EINVAL; @@ -658,7 +658,6 @@ if (uap->buf != NULL) { switch (uap->cmd) { case SVR4_IPC_SET: - case SVR4_IPC_RMID: case SVR4_SHM_LOCK: case SVR4_SHM_UNLOCK: error = copyin(uap->buf, &ss, sizeof(ss)); ==== //depot/projects/soc2006/intr_filter/conf/NOTES#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1370 2006/06/27 12:45:27 glebius Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1371 2006/07/10 05:25:18 thompsa Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -668,6 +668,7 @@ device pflog #logging support interface for PF device pfsync #synchronization interface for PF device carp #Common Address Redundancy Protocol +device enc #IPSec interface (needs FAST_IPSEC) device ppp #Point-to-point protocol options PPP_BSDCOMP #PPP BSD-compress support options PPP_DEFLATE #PPP zlib/deflate/gzip support ==== //depot/projects/soc2006/intr_filter/conf/files#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1127 2006/06/27 12:45:27 glebius Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1128 2006/07/06 23:37:39 rwatson Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1329,6 +1329,7 @@ kern/sched_core.c optional sched_core kern/sched_ule.c optional sched_ule kern/serdev_if.m optional puc | scc +kern/subr_acl_posix1e.c standard kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_bus.c standard ==== //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/Makefile#2 (text+ko) ==== @@ -15,11 +15,12 @@ CFLAGS = -O $(OTHERCFLAGS) OBJS = uwx_bstream.o uwx_context.o uwx_env.o uwx_scoreboard.o \ - uwx_step.o uwx_str.o uwx_swap.o uwx_trace.o uwx_uinfo.o \ - uwx_utable.o + uwx_step.o uwx_str.o uwx_swap.o uwx_symbols.o \ + uwx_trace.o uwx_uinfo.o uwx_utable.o # SELFOBJS = # For cross-unwind library -SELFOBJS = uwx_self.o uwx_self_context.o uwx_ttrace.o +# SELFOBJS = uwx_self.o uwx_self_context.o uwx_ttrace.o +SELFOBJS = uwx_self.o uwx_self_context.o # SELFLIBS = # For cross-unwind library SELFLIBS = -luca @@ -34,6 +35,9 @@ libuwx.sl: $(OBJS) $(SELFOBJS) ld -b -o libuwx.sl $(OBJS) $(SELFOBJS) $(SELFLIBS) +clean: + rm -f $(OBJS) $(SELFOBJS) libuwx.a libuwx.so libuwx.sl + uwx_bstream.o: uwx.h uwx_env.h uwx_bstream.h uwx_context.o: uwx.h uwx_env.h uwx_scoreboard.h uwx_step.h uwx_trace.h @@ -49,6 +53,8 @@ uwx_swap.o: uwx.h uwx_env.h uwx_swap.h +uwx_symbols.o: uwx.h uwx_env.h uwx_symbols.h + uwx_trace.o: uwx.h uwx_env.h uwx_uinfo.h uwx_scoreboard.h uwx_trace.h uwx_uinfo.o: uwx.h uwx_env.h uwx_uinfo.h uwx_utable.h \ @@ -56,7 +62,8 @@ uwx_utable.o: uwx.h uwx_env.h uwx_utable.h uwx_swap.h uwx_trace.h -uwx_self.o: uwx.h uwx_env.h uwx_context.h uwx_trace.h uwx_self.h +uwx_self.o: uwx.h uwx_env.h uwx_context.h uwx_trace.h uwx_self.h \ + uwx_symbols.h uwx_self_context.o: uwx_self_context.s $(CC) -c $(CFLAGS) -o uwx_self_context.o uwx_self_context.s ==== //depot/projects/soc2006/intr_filter/contrib/ia64/libuwx/src/uwx.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* -Copyright (c) 2003 Hewlett-Packard Development Company, L.P. +Copyright (c) 2003-2006 Hewlett-Packard Development Company, L.P. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without @@ -39,11 +39,14 @@ #define __EXTERN_C extern #endif -#define UWX_VERSION 1 /* Version id for callback interfaces */ +#define UWX_VERSION 3 /* Version id for callback interfaces */ /* Unwind environment structure (opaque) */ struct uwx_env; +/* Symbol Cache for uwx_find_symbol (opaque) */ +struct uwx_symbol_cache; + /* Allocate and free callbacks */ typedef void *(*alloc_cb)(size_t size); typedef void (*free_cb)(void *ptr); @@ -58,6 +61,9 @@ /* Put unwind express into cross-process mode */ __EXTERN_C int uwx_set_remote(struct uwx_env *env, int is_big_endian_target); +/* Put unwind express into reduced-context mode (no floating-point regs) */ +__EXTERN_C int uwx_set_nofr(struct uwx_env *env); + /* Copy-in callback */ typedef int (*copyin_cb)( int request, /* request code (see below) */ @@ -107,6 +113,17 @@ /* Step one frame */ __EXTERN_C int uwx_step(struct uwx_env *env); +/* Get module name and text base, if available, for current frame */ +__EXTERN_C int uwx_get_module_info( + struct uwx_env *env, /* unwind environment */ + char **modp, /* load module name (out) */ + uint64_t *text_base); /* base address of text segment (out) */ + +/* Get function start address for current frame */ +__EXTERN_C int uwx_get_funcstart( + struct uwx_env *env, /* unwind environment */ + uint64_t *funcstart); /* function start address (out) */ + /* Get symbol information, if available, for current frame */ __EXTERN_C int uwx_get_sym_info( struct uwx_env *env, /* unwind environment */ @@ -114,6 +131,22 @@ char **symp, /* function name (out) */ uint64_t *offsetp); /* offset from start of function (out) */ +/* Get symbol information, given module name and IP */ +__EXTERN_C int uwx_find_symbol( + struct uwx_env *env, /* unwind environment */ + struct uwx_symbol_cache **cachep, + /* ptr to symbol cache ptr (in/out) */ + char *mod, /* load module name */ + uint64_t relip, /* IP, relative to text segment */ + char **symp, /* function name (out) */ + uint64_t *offsetp); /* offset from start of function (out) */ + +/* Release memory used by symbol cache */ +__EXTERN_C void uwx_release_symbol_cache( + struct uwx_env *env, /* unwind environment */ + struct uwx_symbol_cache *symbol_cache); + /* symbol cache ptr */ + /* Get the value of a register from the current context */ __EXTERN_C int uwx_get_reg( struct uwx_env *env, /* unwind environment */ @@ -135,6 +168,10 @@ /* Get the ABI context code (if uwx_step returned UWX_ABI_FRAME) */ __EXTERN_C int uwx_get_abi_context_code(struct uwx_env *env); +/* Increment/Decrement the bsp by a number of slots */ +/* (accounts for NaT collections) */ +__EXTERN_C uint64_t uwx_add_to_bsp(uint64_t bsp, int nslots); + /* Return status codes for uwx_ APIs */ #define UWX_OK 0 #define UWX_BOTTOM 1 /* Hit bottom of stack */ @@ -158,6 +195,8 @@ #define UWX_ERR_CANTUNWIND (-17) /* Can't unwind */ #define UWX_ERR_NOCALLBACKS (-18) /* No callbacks registered */ #define UWX_ERR_NOCONTEXT (-19) /* Context not initialized */ +#define UWX_ERR_UCACCESS (-20) /* Failure in libuca */ +#define UWX_ERR_NOSYM (-21) /* Symbol not found */ /* Request codes for copyin callback */ #define UWX_COPYIN_UINFO 1 /* Reading unwind info */ @@ -169,6 +208,7 @@ #define UWX_LKUP_LOOKUP 1 /* Lookup IP */ #define UWX_LKUP_FREE 2 /* Free result vector */ #define UWX_LKUP_SYMBOLS 3 /* Lookup symbolic information */ +#define UWX_LKUP_MODULE 4 /* Get module name */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607101642.k6AGgg5O097771>