Date: Tue, 1 Dec 2009 22:04:41 GMT From: Andrew Thompson <thompsa@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 171237 for review Message-ID: <200912012204.nB1M4fL2020196@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=171237 Change 171237 by thompsa@thompsa_pea on 2009/12/01 22:04:19 IFC @171233 Affected files ... .. //depot/projects/usb/src/lib/libusb/libusb10.c#19 integrate .. //depot/projects/usb/src/lib/libusb/libusb10.h#11 integrate .. //depot/projects/usb/src/lib/libusb/libusb20.3#6 integrate .. //depot/projects/usb/src/lib/libusb/libusb20.c#12 integrate .. //depot/projects/usb/src/lib/libusb/libusb20.h#9 integrate .. //depot/projects/usb/src/sys/amd64/amd64/bpf_jit_machdep.c#4 integrate .. //depot/projects/usb/src/sys/amd64/amd64/bpf_jit_machdep.h#4 integrate .. //depot/projects/usb/src/sys/amd64/amd64/identcpu.c#19 integrate .. //depot/projects/usb/src/sys/amd64/amd64/initcpu.c#10 integrate .. //depot/projects/usb/src/sys/amd64/amd64/machdep.c#28 integrate .. //depot/projects/usb/src/sys/amd64/amd64/trap.c#20 integrate .. //depot/projects/usb/src/sys/amd64/conf/NOTES#23 integrate .. //depot/projects/usb/src/sys/amd64/include/md_var.h#10 integrate .. //depot/projects/usb/src/sys/amd64/include/param.h#10 integrate .. //depot/projects/usb/src/sys/amd64/include/specialreg.h#16 integrate .. //depot/projects/usb/src/sys/arm/arm/trap.c#10 integrate .. //depot/projects/usb/src/sys/arm/at91/if_ate.c#16 integrate .. //depot/projects/usb/src/sys/boot/Makefile#11 integrate .. //depot/projects/usb/src/sys/boot/common/Makefile.inc#4 integrate .. //depot/projects/usb/src/sys/boot/common/boot.c#3 integrate .. //depot/projects/usb/src/sys/boot/forth/loader.conf.5#3 integrate .. //depot/projects/usb/src/sys/boot/i386/Makefile#6 integrate .. //depot/projects/usb/src/sys/boot/i386/libi386/Makefile#6 integrate .. //depot/projects/usb/src/sys/boot/i386/libi386/elf32_freebsd.c#3 integrate .. //depot/projects/usb/src/sys/boot/i386/libi386/elf64_freebsd.c#3 integrate .. //depot/projects/usb/src/sys/boot/i386/libi386/spinconsole.c#1 branch .. //depot/projects/usb/src/sys/boot/i386/libi386/vidconsole.c#2 integrate .. //depot/projects/usb/src/sys/boot/i386/loader/Makefile#8 integrate .. //depot/projects/usb/src/sys/boot/i386/loader/conf.c#4 integrate .. //depot/projects/usb/src/sys/boot/i386/zfsboot/zfsboot.c#6 integrate .. //depot/projects/usb/src/sys/boot/i386/zfsboot/zfsldr.S#2 integrate .. //depot/projects/usb/src/sys/boot/i386/zfsloader/Makefile#1 branch .. //depot/projects/usb/src/sys/boot/pc98/loader/conf.c#2 integrate .. //depot/projects/usb/src/sys/boot/uboot/common/metadata.c#2 integrate .. //depot/projects/usb/src/sys/cam/ata/ata_all.c#5 integrate .. //depot/projects/usb/src/sys/cam/ata/ata_all.h#4 integrate .. //depot/projects/usb/src/sys/cam/ata/ata_pmp.c#2 integrate .. //depot/projects/usb/src/sys/cam/ata/ata_xpt.c#7 integrate .. //depot/projects/usb/src/sys/cam/cam_ccb.h#10 integrate .. //depot/projects/usb/src/sys/cam/cam_periph.c#15 integrate .. //depot/projects/usb/src/sys/cam/cam_queue.c#3 integrate .. //depot/projects/usb/src/sys/cam/cam_queue.h#3 integrate .. //depot/projects/usb/src/sys/cam/cam_xpt.c#26 integrate .. //depot/projects/usb/src/sys/cam/scsi/scsi_cd.c#13 integrate .. //depot/projects/usb/src/sys/cam/scsi/scsi_ch.c#8 integrate .. //depot/projects/usb/src/sys/cddl/boot/zfs/zfssubr.c#5 integrate .. //depot/projects/usb/src/sys/compat/svr4/svr4_termios.c#2 integrate .. //depot/projects/usb/src/sys/conf/NOTES#50 integrate .. //depot/projects/usb/src/sys/conf/files#87 integrate .. //depot/projects/usb/src/sys/conf/files.amd64#27 integrate .. //depot/projects/usb/src/sys/conf/files.i386#32 integrate .. //depot/projects/usb/src/sys/conf/options#43 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/changes.txt#4 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/compiler/aslcompile.c#5 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/compiler/aslerror.c#4 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/compiler/asllookup.c#5 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/compiler/asloperands.c#4 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/compiler/asltransform.c#4 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/compiler/asltypes.h#5 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/debugger/dbcmds.c#4 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/debugger/dbexec.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/debugger/dbstats.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/dispatcher/dsinit.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/dispatcher/dsmthdat.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/dispatcher/dsobject.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/events/evgpeblk.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/events/evregion.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/executer/exconfig.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/executer/exconvrt.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/executer/exfield.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/executer/exoparg1.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/executer/exoparg6.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/executer/exregion.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/include/acconfig.h#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/include/acmacros.h#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/include/acnamesp.h#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/include/acpixf.h#4 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/include/acutils.h#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nsdump.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nsdumpdv.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nseval.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nsinit.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nspredef.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nsrepair.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nsrepair2.c#1 branch .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nswalk.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/namespace/nsxfeval.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/parser/psloop.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/parser/psparse.c#2 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/parser/psxface.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/utilities/utmisc.c#3 integrate .. //depot/projects/usb/src/sys/contrib/dev/acpica/utilities/utobject.c#2 integrate .. //depot/projects/usb/src/sys/contrib/rdma/krping/krping.c#2 integrate .. //depot/projects/usb/src/sys/ddb/db_command.c#7 integrate .. //depot/projects/usb/src/sys/dev/acpica/acpi.c#25 integrate .. //depot/projects/usb/src/sys/dev/acpica/acpi_dock.c#8 integrate .. //depot/projects/usb/src/sys/dev/acpica/acpi_pci.c#5 integrate .. //depot/projects/usb/src/sys/dev/acpica/acpi_video.c#5 integrate .. //depot/projects/usb/src/sys/dev/adb/adb.h#3 integrate .. //depot/projects/usb/src/sys/dev/adb/adb_bus.c#6 integrate .. //depot/projects/usb/src/sys/dev/adb/adb_mouse.c#4 integrate .. //depot/projects/usb/src/sys/dev/ahci/ahci.c#7 integrate .. //depot/projects/usb/src/sys/dev/ahci/ahci.h#5 integrate .. //depot/projects/usb/src/sys/dev/aic7xxx/ahd_pci.c#4 integrate .. //depot/projects/usb/src/sys/dev/aic7xxx/aic79xx.c#3 integrate .. //depot/projects/usb/src/sys/dev/aic7xxx/aic79xx.h#4 integrate .. //depot/projects/usb/src/sys/dev/aic7xxx/aic79xx_osm.c#7 integrate .. //depot/projects/usb/src/sys/dev/aic7xxx/aic79xx_osm.h#5 integrate .. //depot/projects/usb/src/sys/dev/amdsbwd/amdsbwd.c#1 branch .. //depot/projects/usb/src/sys/dev/an/if_an.c#9 integrate .. //depot/projects/usb/src/sys/dev/an/if_an_isa.c#4 integrate .. //depot/projects/usb/src/sys/dev/an/if_an_pccard.c#4 integrate .. //depot/projects/usb/src/sys/dev/an/if_an_pci.c#5 integrate .. //depot/projects/usb/src/sys/dev/an/if_anreg.h#6 integrate .. //depot/projects/usb/src/sys/dev/ata/ata-all.c#21 integrate .. //depot/projects/usb/src/sys/dev/ata/ata-disk.c#18 integrate .. //depot/projects/usb/src/sys/dev/ata/ata-pci.c#16 integrate .. //depot/projects/usb/src/sys/dev/ata/ata-pci.h#24 integrate .. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#47 delete .. //depot/projects/usb/src/sys/dev/ata/chipsets/ata-ahci.c#11 integrate .. //depot/projects/usb/src/sys/dev/ata/chipsets/ata-intel.c#9 integrate .. //depot/projects/usb/src/sys/dev/ata/chipsets/ata-jmicron.c#5 integrate .. //depot/projects/usb/src/sys/dev/ata/chipsets/ata-marvell.c#10 integrate .. //depot/projects/usb/src/sys/dev/ath/ath_hal/ah_regdomain.c#6 integrate .. //depot/projects/usb/src/sys/dev/bge/if_bge.c#24 integrate .. //depot/projects/usb/src/sys/dev/bge/if_bgereg.h#13 integrate .. //depot/projects/usb/src/sys/dev/bwi/if_bwi.c#5 integrate .. //depot/projects/usb/src/sys/dev/bwi/if_bwivar.h#3 integrate .. //depot/projects/usb/src/sys/dev/ce/if_ce.c#9 integrate .. //depot/projects/usb/src/sys/dev/cm/smc90cx6.c#6 integrate .. //depot/projects/usb/src/sys/dev/cm/smc90cx6var.h#3 integrate .. //depot/projects/usb/src/sys/dev/cp/if_cp.c#9 integrate .. //depot/projects/usb/src/sys/dev/ctau/if_ct.c#9 integrate .. //depot/projects/usb/src/sys/dev/cx/if_cx.c#8 integrate .. //depot/projects/usb/src/sys/dev/cxgb/common/cxgb_ael1002.c#12 integrate .. //depot/projects/usb/src/sys/dev/cxgb/common/cxgb_aq100x.c#2 integrate .. //depot/projects/usb/src/sys/dev/cxgb/common/cxgb_xgmac.c#11 integrate .. //depot/projects/usb/src/sys/dev/cxgb/cxgb_main.c#25 integrate .. //depot/projects/usb/src/sys/dev/cxgb/ulp/tom/cxgb_vm.c#4 integrate .. //depot/projects/usb/src/sys/dev/de/if_de.c#9 integrate .. //depot/projects/usb/src/sys/dev/de/if_devar.h#5 integrate .. //depot/projects/usb/src/sys/dev/dpms/dpms.c#4 integrate .. //depot/projects/usb/src/sys/dev/ed/if_ed.c#10 integrate .. //depot/projects/usb/src/sys/dev/ed/if_ed_pccard.c#11 integrate .. //depot/projects/usb/src/sys/dev/ed/if_edvar.h#5 integrate .. //depot/projects/usb/src/sys/dev/ep/if_ep.c#6 integrate .. //depot/projects/usb/src/sys/dev/ep/if_epvar.h#3 integrate .. //depot/projects/usb/src/sys/dev/et/if_et.c#4 integrate .. //depot/projects/usb/src/sys/dev/et/if_etreg.h#2 integrate .. //depot/projects/usb/src/sys/dev/et/if_etvar.h#2 integrate .. //depot/projects/usb/src/sys/dev/fatm/if_fatm.c#5 integrate .. //depot/projects/usb/src/sys/dev/fatm/if_fatmvar.h#2 integrate .. //depot/projects/usb/src/sys/dev/fb/vesa.c#6 integrate .. //depot/projects/usb/src/sys/dev/fb/vgareg.h#4 integrate .. //depot/projects/usb/src/sys/dev/fe/if_fe_pccard.c#6 integrate .. //depot/projects/usb/src/sys/dev/hatm/if_hatm.c#4 integrate .. //depot/projects/usb/src/sys/dev/hwpmc/hwpmc_logging.c#9 integrate .. //depot/projects/usb/src/sys/dev/hwpmc/hwpmc_mod.c#15 integrate .. //depot/projects/usb/src/sys/dev/ixgb/if_ixgb.c#9 integrate .. //depot/projects/usb/src/sys/dev/ixgb/if_ixgb.h#3 integrate .. //depot/projects/usb/src/sys/dev/lge/if_lge.c#8 integrate .. //depot/projects/usb/src/sys/dev/lge/if_lgereg.h#3 integrate .. //depot/projects/usb/src/sys/dev/lmc/if_lmc.c#13 integrate .. //depot/projects/usb/src/sys/dev/lmc/if_lmc.h#8 integrate .. //depot/projects/usb/src/sys/dev/malo/if_malo.c#6 integrate .. //depot/projects/usb/src/sys/dev/malo/if_malo.h#4 integrate .. //depot/projects/usb/src/sys/dev/msk/if_msk.c#18 integrate .. //depot/projects/usb/src/sys/dev/mwl/if_mwl.c#8 integrate .. //depot/projects/usb/src/sys/dev/mwl/if_mwlvar.h#3 integrate .. //depot/projects/usb/src/sys/dev/my/if_my.c#9 integrate .. //depot/projects/usb/src/sys/dev/my/if_myreg.h#3 integrate .. //depot/projects/usb/src/sys/dev/nve/if_nve.c#10 integrate .. //depot/projects/usb/src/sys/dev/nve/if_nvereg.h#4 integrate .. //depot/projects/usb/src/sys/dev/nxge/if_nxge.c#4 integrate .. //depot/projects/usb/src/sys/dev/pci/pci.c#30 integrate .. //depot/projects/usb/src/sys/dev/pci/vga_pci.c#6 integrate .. //depot/projects/usb/src/sys/dev/pcn/if_pcn.c#5 integrate .. //depot/projects/usb/src/sys/dev/pcn/if_pcnreg.h#2 integrate .. //depot/projects/usb/src/sys/dev/pdq/if_fea.c#3 integrate .. //depot/projects/usb/src/sys/dev/pdq/if_fpa.c#4 integrate .. //depot/projects/usb/src/sys/dev/pdq/pdq_freebsd.h#2 integrate .. //depot/projects/usb/src/sys/dev/pdq/pdq_ifsubr.c#4 integrate .. //depot/projects/usb/src/sys/dev/re/if_re.c#24 integrate .. //depot/projects/usb/src/sys/dev/siis/siis.c#7 integrate .. //depot/projects/usb/src/sys/dev/siis/siis.h#3 integrate .. //depot/projects/usb/src/sys/dev/sn/if_sn.c#4 integrate .. //depot/projects/usb/src/sys/dev/sn/if_sn_pccard.c#2 integrate .. //depot/projects/usb/src/sys/dev/sn/if_snvar.h#2 integrate .. //depot/projects/usb/src/sys/dev/sound/pci/hda/hdac.c#38 integrate .. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#63 integrate .. //depot/projects/usb/src/sys/dev/ste/if_ste.c#4 integrate .. //depot/projects/usb/src/sys/dev/ste/if_stereg.h#2 integrate .. //depot/projects/usb/src/sys/dev/syscons/scterm-teken.c#11 integrate .. //depot/projects/usb/src/sys/dev/syscons/scvidctl.c#6 integrate .. //depot/projects/usb/src/sys/dev/syscons/sysmouse.c#7 integrate .. //depot/projects/usb/src/sys/dev/ti/if_ti.c#9 integrate .. //depot/projects/usb/src/sys/dev/ti/if_tireg.h#2 integrate .. //depot/projects/usb/src/sys/dev/tl/if_tl.c#4 integrate .. //depot/projects/usb/src/sys/dev/tl/if_tlreg.h#2 integrate .. //depot/projects/usb/src/sys/dev/tsec/if_tsec.c#7 integrate .. //depot/projects/usb/src/sys/dev/uart/uart_core.c#7 integrate .. //depot/projects/usb/src/sys/dev/uart/uart_tty.c#8 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/at91dci.c#30 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/atmegadci.c#42 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/avr32dci.c#15 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#46 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/musb_otg.c#30 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/musb_otg.h#9 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#32 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/uhci.c#29 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/uhci_pci.c#14 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/uhcireg.h#3 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/usb_controller.c#36 integrate .. //depot/projects/usb/src/sys/dev/usb/controller/uss820dci.c#30 integrate .. //depot/projects/usb/src/sys/dev/usb/input/atp.c#4 integrate .. //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#38 integrate .. //depot/projects/usb/src/sys/dev/usb/net/if_aue.c#18 integrate .. //depot/projects/usb/src/sys/dev/usb/net/if_axe.c#20 integrate .. //depot/projects/usb/src/sys/dev/usb/net/if_cdce.c#24 integrate .. //depot/projects/usb/src/sys/dev/usb/net/if_cue.c#15 integrate .. //depot/projects/usb/src/sys/dev/usb/net/if_kue.c#15 integrate .. //depot/projects/usb/src/sys/dev/usb/net/if_rue.c#15 integrate .. //depot/projects/usb/src/sys/dev/usb/net/if_udav.c#15 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/u3g.c#23 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/uark.c#13 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/ubser.c#17 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/ucycom.c#16 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/ufoma.c#15 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/uftdi.c#19 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/ugensa.c#16 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/umct.c#19 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/umodem.c#19 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/uplcom.c#16 integrate .. //depot/projects/usb/src/sys/dev/usb/serial/usb_serial.h#9 integrate .. //depot/projects/usb/src/sys/dev/usb/storage/umass.c#39 integrate .. //depot/projects/usb/src/sys/dev/usb/template/usb_template.c#11 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_busdma.c#18 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_core.h#32 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_debug.c#12 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_debug.h#10 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_dev.c#39 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_device.c#59 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_generic.c#24 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#41 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_hub.c#38 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_hub.h#16 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_msctest.c#12 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_process.c#15 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_request.c#28 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#174 integrate .. //depot/projects/usb/src/sys/dev/usb/usbdevs#85 integrate .. //depot/projects/usb/src/sys/dev/usb/usbdi.h#16 integrate .. //depot/projects/usb/src/sys/dev/usb/wlan/if_upgt.c#18 integrate .. //depot/projects/usb/src/sys/dev/vge/if_vge.c#12 integrate .. //depot/projects/usb/src/sys/dev/vge/if_vgevar.h#3 integrate .. //depot/projects/usb/src/sys/dev/vx/if_vx.c#3 integrate .. //depot/projects/usb/src/sys/dev/vx/if_vxvar.h#2 integrate .. //depot/projects/usb/src/sys/dev/wb/if_wb.c#4 integrate .. //depot/projects/usb/src/sys/dev/wb/if_wbreg.h#2 integrate .. //depot/projects/usb/src/sys/dev/wl/if_wl.c#6 integrate .. //depot/projects/usb/src/sys/dev/xen/blkfront/blkfront.c#8 integrate .. //depot/projects/usb/src/sys/dev/xen/blkfront/block.h#3 integrate .. //depot/projects/usb/src/sys/dev/xen/console/console.c#10 integrate .. //depot/projects/usb/src/sys/dev/xen/netfront/netfront.c#13 integrate .. //depot/projects/usb/src/sys/fs/nfs/nfs_var.h#5 integrate .. //depot/projects/usb/src/sys/fs/nfsserver/nfs_nfsdport.c#8 integrate .. //depot/projects/usb/src/sys/fs/nfsserver/nfs_nfsdserv.c#4 integrate .. //depot/projects/usb/src/sys/geom/label/g_label.c#7 integrate .. //depot/projects/usb/src/sys/geom/label/g_label.h#4 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_ext2fs.c#2 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_gpt.c#2 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_iso9660.c#2 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_msdosfs.c#5 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_ntfs.c#2 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_reiserfs.c#3 integrate .. //depot/projects/usb/src/sys/geom/label/g_label_ufs.c#4 integrate .. //depot/projects/usb/src/sys/geom/part/g_part_gpt.c#16 integrate .. //depot/projects/usb/src/sys/i386/conf/NOTES#28 integrate .. //depot/projects/usb/src/sys/i386/cpufreq/est.c#8 integrate .. //depot/projects/usb/src/sys/i386/i386/bpf_jit_machdep.c#4 integrate .. //depot/projects/usb/src/sys/i386/i386/bpf_jit_machdep.h#4 integrate .. //depot/projects/usb/src/sys/i386/i386/identcpu.c#17 integrate .. //depot/projects/usb/src/sys/i386/i386/initcpu.c#11 integrate .. //depot/projects/usb/src/sys/i386/i386/trap.c#17 integrate .. //depot/projects/usb/src/sys/i386/include/specialreg.h#16 integrate .. //depot/projects/usb/src/sys/i386/xen/exception.s#3 integrate .. //depot/projects/usb/src/sys/i386/xen/pmap.c#17 integrate .. //depot/projects/usb/src/sys/ia64/ia64/db_machdep.c#6 integrate .. //depot/projects/usb/src/sys/ia64/ia64/exception.S#5 integrate .. //depot/projects/usb/src/sys/ia64/ia64/interrupt.c#11 integrate .. //depot/projects/usb/src/sys/ia64/ia64/machdep.c#15 integrate .. //depot/projects/usb/src/sys/ia64/ia64/trap.c#9 integrate .. //depot/projects/usb/src/sys/ia64/include/param.h#7 integrate .. //depot/projects/usb/src/sys/ia64/include/pcpu.h#6 integrate .. //depot/projects/usb/src/sys/isa/vga_isa.c#4 integrate .. //depot/projects/usb/src/sys/kern/kern_descrip.c#27 integrate .. //depot/projects/usb/src/sys/kern/kern_jail.c#33 integrate .. //depot/projects/usb/src/sys/kern/kern_linker.c#22 integrate .. //depot/projects/usb/src/sys/kern/kern_sig.c#21 integrate .. //depot/projects/usb/src/sys/kern/sched_ule.c#21 integrate .. //depot/projects/usb/src/sys/kern/subr_bus.c#34 integrate .. //depot/projects/usb/src/sys/kern/sys_process.c#16 integrate .. //depot/projects/usb/src/sys/kern/tty.c#33 integrate .. //depot/projects/usb/src/sys/kern/vfs_mount.c#32 integrate .. //depot/projects/usb/src/sys/kern/vfs_subr.c#27 integrate .. //depot/projects/usb/src/sys/libkern/inet_aton.c#1 branch .. //depot/projects/usb/src/sys/mips/adm5120/if_admsw.c#6 integrate .. //depot/projects/usb/src/sys/mips/adm5120/if_admswvar.h#3 integrate .. //depot/projects/usb/src/sys/mips/mips/trap.c#5 integrate .. //depot/projects/usb/src/sys/modules/Makefile#46 integrate .. //depot/projects/usb/src/sys/modules/acpi/acpi/Makefile#11 integrate .. //depot/projects/usb/src/sys/modules/amdsbwd/Makefile#1 branch .. //depot/projects/usb/src/sys/modules/ata/atausb/Makefile#5 delete .. //depot/projects/usb/src/sys/net/bpf_jitter.c#3 integrate .. //depot/projects/usb/src/sys/net/bpf_jitter.h#3 integrate .. //depot/projects/usb/src/sys/net/if.c#42 integrate .. //depot/projects/usb/src/sys/net/if.h#13 integrate .. //depot/projects/usb/src/sys/net/if_dead.c#2 integrate .. //depot/projects/usb/src/sys/net/if_var.h#30 integrate .. //depot/projects/usb/src/sys/net/route.c#26 integrate .. //depot/projects/usb/src/sys/netinet/in.h#14 integrate .. //depot/projects/usb/src/sys/netinet/in_mcast.c#20 integrate .. //depot/projects/usb/src/sys/netinet/libalias/alias_proxy.c#6 integrate .. //depot/projects/usb/src/sys/netinet/raw_ip.c#31 integrate .. //depot/projects/usb/src/sys/netinet/sctp_asconf.c#13 integrate .. //depot/projects/usb/src/sys/netinet/sctp_auth.c#11 integrate .. //depot/projects/usb/src/sys/netinet/sctp_constants.h#16 integrate .. //depot/projects/usb/src/sys/netinet/sctp_input.c#21 integrate .. //depot/projects/usb/src/sys/netinet/sctp_os_bsd.h#22 integrate .. //depot/projects/usb/src/sys/netinet/sctp_output.c#26 integrate .. //depot/projects/usb/src/sys/netinet/sctp_pcb.c#21 integrate .. //depot/projects/usb/src/sys/netinet/sctp_structs.h#14 integrate .. //depot/projects/usb/src/sys/netinet/sctp_usrreq.c#18 integrate .. //depot/projects/usb/src/sys/netinet/sctputil.c#26 integrate .. //depot/projects/usb/src/sys/netinet6/in6_mcast.c#8 integrate .. //depot/projects/usb/src/sys/netinet6/nd6.c#28 integrate .. //depot/projects/usb/src/sys/netinet6/raw_ip6.c#26 integrate .. //depot/projects/usb/src/sys/netipsec/ipcomp_var.h#4 integrate .. //depot/projects/usb/src/sys/netipsec/ipsec_mbuf.c#8 integrate .. //depot/projects/usb/src/sys/netipsec/key.c#27 integrate .. //depot/projects/usb/src/sys/netipsec/xform_ipcomp.c#11 integrate .. //depot/projects/usb/src/sys/nfsserver/nfs_fha.c#5 integrate .. //depot/projects/usb/src/sys/opencrypto/crypto.c#5 integrate .. //depot/projects/usb/src/sys/opencrypto/cryptosoft.c#8 integrate .. //depot/projects/usb/src/sys/opencrypto/deflate.c#3 integrate .. //depot/projects/usb/src/sys/opencrypto/deflate.h#2 integrate .. //depot/projects/usb/src/sys/pc98/cbus/cbus_dma.c#2 integrate .. //depot/projects/usb/src/sys/pc98/conf/NOTES#19 integrate .. //depot/projects/usb/src/sys/powerpc/aim/machdep.c#14 integrate .. //depot/projects/usb/src/sys/powerpc/aim/mmu_oea64.c#8 integrate .. //depot/projects/usb/src/sys/powerpc/aim/ofw_machdep.c#6 integrate .. //depot/projects/usb/src/sys/powerpc/aim/trap.c#6 integrate .. //depot/projects/usb/src/sys/powerpc/booke/machdep.c#14 integrate .. //depot/projects/usb/src/sys/powerpc/booke/trap.c#5 integrate .. //depot/projects/usb/src/sys/powerpc/conf/GENERIC#24 integrate .. //depot/projects/usb/src/sys/powerpc/include/cpu.h#4 integrate .. //depot/projects/usb/src/sys/powerpc/include/md_var.h#9 integrate .. //depot/projects/usb/src/sys/powerpc/mpc85xx/pci_ocp.c#4 integrate .. //depot/projects/usb/src/sys/powerpc/powerpc/cpu.c#13 integrate .. //depot/projects/usb/src/sys/sparc64/sparc64/machdep.c#18 integrate .. //depot/projects/usb/src/sys/sparc64/sparc64/trap.c#11 integrate .. //depot/projects/usb/src/sys/sun4v/sun4v/trap.c#8 integrate .. //depot/projects/usb/src/sys/sys/_termios.h#1 branch .. //depot/projects/usb/src/sys/sys/ata.h#9 integrate .. //depot/projects/usb/src/sys/sys/elf_common.h#14 integrate .. //depot/projects/usb/src/sys/sys/param.h#47 integrate .. //depot/projects/usb/src/sys/sys/priv.h#22 integrate .. //depot/projects/usb/src/sys/sys/sdt.h#3 integrate .. //depot/projects/usb/src/sys/sys/signal.h#4 integrate .. //depot/projects/usb/src/sys/sys/signalvar.h#8 integrate .. //depot/projects/usb/src/sys/sys/sockio.h#7 integrate .. //depot/projects/usb/src/sys/sys/termios.h#8 integrate .. //depot/projects/usb/src/sys/sys/tty.h#13 integrate .. //depot/projects/usb/src/sys/vm/vm.h#9 integrate .. //depot/projects/usb/src/sys/vm/vm_extern.h#12 integrate .. //depot/projects/usb/src/sys/vm/vm_fault.c#20 integrate .. //depot/projects/usb/src/sys/vm/vm_map.c#23 integrate .. //depot/projects/usb/src/sys/vm/vm_map.h#11 integrate Differences ... ==== //depot/projects/usb/src/lib/libusb/libusb10.c#19 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/lib/libusb/libusb10.c,v 1.4 2009/11/08 20:03:52 thompsa Exp $ */ +/* $FreeBSD: src/lib/libusb/libusb10.c,v 1.5 2009/11/20 08:57:25 thompsa Exp $ */ /*- * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. * Copyright (c) 2009 Hans Petter Selasky. All rights reserved. ==== //depot/projects/usb/src/lib/libusb/libusb10.h#11 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/lib/libusb/libusb10.h,v 1.3 2009/07/30 00:11:41 alfred Exp $ */ +/* $FreeBSD: src/lib/libusb/libusb10.h,v 1.4 2009/11/20 08:57:25 thompsa Exp $ */ /*- * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. * ==== //depot/projects/usb/src/lib/libusb/libusb20.3#6 (text+ko) ==== @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libusb/libusb20.3,v 1.4 2009/07/30 00:11:41 alfred Exp $ +.\" $FreeBSD: src/lib/libusb/libusb20.3,v 1.5 2009/11/20 08:57:25 thompsa Exp $ .\" .Dd November 18, 2009 .Dt LIBUSB20 3 ==== //depot/projects/usb/src/lib/libusb/libusb20.c#12 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/lib/libusb/libusb20.c,v 1.5 2009/11/08 20:03:52 thompsa Exp $ */ +/* $FreeBSD: src/lib/libusb/libusb20.c,v 1.6 2009/11/20 08:57:25 thompsa Exp $ */ /*- * Copyright (c) 2008-2009 Hans Petter Selasky. All rights reserved. * ==== //depot/projects/usb/src/lib/libusb/libusb20.h#9 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/lib/libusb/libusb20.h,v 1.5 2009/06/12 16:07:06 thompsa Exp $ */ +/* $FreeBSD: src/lib/libusb/libusb20.h,v 1.6 2009/11/20 08:57:25 thompsa Exp $ */ /*- * Copyright (c) 2008-2009 Hans Petter Selasky. All rights reserved. * Copyright (c) 2007-2008 Daniel Drake. All rights reserved. ==== //depot/projects/usb/src/sys/amd64/amd64/bpf_jit_machdep.c#4 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim <jkim@FreeBSD.org> + * Copyright (C) 2005-2009 Jung-uk Kim <jkim@FreeBSD.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/bpf_jit_machdep.c,v 1.14 2008/08/26 21:06:31 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/bpf_jit_machdep.c,v 1.21 2009/11/23 22:23:19 jkim Exp $"); #ifdef _KERNEL #include "opt_bpf.h" @@ -42,6 +42,9 @@ #include <net/if.h> #else #include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/param.h> #endif #include <sys/types.h> @@ -51,21 +54,22 @@ #include <amd64/amd64/bpf_jit_machdep.h> -bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); +bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, size_t *); /* - * emit routine to update the jump table + * Emit routine to update the jump table. */ static void emit_length(bpf_bin_stream *stream, __unused u_int value, u_int len) { - (stream->refs)[stream->bpf_pc] += len; + if (stream->refs != NULL) + (stream->refs)[stream->bpf_pc] += len; stream->cur_ip += len; } /* - * emit routine to output the actual binary code + * Emit routine to output the actual binary code. */ static void emit_code(bpf_bin_stream *stream, u_int value, u_int len) @@ -92,53 +96,120 @@ } /* - * Function that does the real stuff + * Scan the filter program and find possible optimization. + */ +static int +bpf_jit_optimize(struct bpf_insn *prog, u_int nins) +{ + int flags; + u_int i; + + /* Do we return immediately? */ + if (BPF_CLASS(prog[0].code) == BPF_RET) + return (BPF_JIT_FRET); + + for (flags = 0, i = 0; i < nins; i++) { + switch (prog[i].code) { + case BPF_LD|BPF_W|BPF_ABS: + case BPF_LD|BPF_H|BPF_ABS: + case BPF_LD|BPF_B|BPF_ABS: + case BPF_LD|BPF_W|BPF_IND: + case BPF_LD|BPF_H|BPF_IND: + case BPF_LD|BPF_B|BPF_IND: + case BPF_LDX|BPF_MSH|BPF_B: + flags |= BPF_JIT_FPKT; + break; + case BPF_LD|BPF_MEM: + case BPF_LDX|BPF_MEM: + case BPF_ST: + case BPF_STX: + flags |= BPF_JIT_FMEM; + break; + case BPF_LD|BPF_W|BPF_LEN: + case BPF_LDX|BPF_W|BPF_LEN: + flags |= BPF_JIT_FLEN; + break; + case BPF_JMP|BPF_JA: + case BPF_JMP|BPF_JGT|BPF_K: + case BPF_JMP|BPF_JGE|BPF_K: + case BPF_JMP|BPF_JEQ|BPF_K: + case BPF_JMP|BPF_JSET|BPF_K: + case BPF_JMP|BPF_JGT|BPF_X: + case BPF_JMP|BPF_JGE|BPF_X: + case BPF_JMP|BPF_JEQ|BPF_X: + case BPF_JMP|BPF_JSET|BPF_X: + flags |= BPF_JIT_FJMP; + break; + } + if (flags == BPF_JIT_FLAG_ALL) + break; + } + + return (flags); +} + +/* + * Function that does the real stuff. */ bpf_filter_func -bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) +bpf_jit_compile(struct bpf_insn *prog, u_int nins, size_t *size) { + bpf_bin_stream stream; struct bpf_insn *ins; + int flags, fret, fpkt, fmem, fjmp, flen; u_int i, pass; - bpf_bin_stream stream; /* - * NOTE: do not modify the name of this variable, as it's used by + * NOTE: Do not modify the name of this variable, as it's used by * the macros to emit code. */ emit_func emitm; - /* Allocate the reference table for the jumps */ + flags = bpf_jit_optimize(prog, nins); + fret = (flags & BPF_JIT_FRET) != 0; + fpkt = (flags & BPF_JIT_FPKT) != 0; + fmem = (flags & BPF_JIT_FMEM) != 0; + fjmp = (flags & BPF_JIT_FJMP) != 0; + flen = (flags & BPF_JIT_FLEN) != 0; + + if (fret) + nins = 1; + + memset(&stream, 0, sizeof(stream)); + + /* Allocate the reference table for the jumps. */ + if (fjmp) { #ifdef _KERNEL - stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int), - M_BPFJIT, M_NOWAIT); + stream.refs = malloc((nins + 1) * sizeof(u_int), M_BPFJIT, + M_NOWAIT | M_ZERO); #else - stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int)); + stream.refs = calloc(nins + 1, sizeof(u_int)); #endif - if (stream.refs == NULL) - return (NULL); + if (stream.refs == NULL) + return (NULL); + } - /* Reset the reference table */ - for (i = 0; i < nins + 1; i++) - stream.refs[i] = 0; - - stream.cur_ip = 0; - stream.bpf_pc = 0; - /* - * the first pass will emit the lengths of the instructions - * to create the reference table + * The first pass will emit the lengths of the instructions + * to create the reference table. */ emitm = emit_length; - pass = 0; - for (;;) { + for (pass = 0; pass < 2; pass++) { ins = prog; - /* create the procedure header */ - MOVrq2(RBX, R8); - MOVrq(RDI, RBX); - MOVrd2(ESI, R9D); - MOVrd(EDX, EDI); + /* Create the procedure header. */ + if (fmem) { + PUSH(RBP); + MOVrq(RSP, RBP); + SUBib(BPF_MEMWORDS * sizeof(uint32_t), RSP); + } + if (flen) + MOVrd2(ESI, R9D); + if (fpkt) { + MOVrq2(RDI, R8); + MOVrd(EDX, EDI); + } for (i = 0; i < nins; i++) { stream.bpf_pc++; @@ -153,12 +224,14 @@ case BPF_RET|BPF_K: MOVid(ins->k, EAX); - MOVrq3(R8, RBX); + if (fmem) + LEAVE(); RET(); break; case BPF_RET|BPF_A: - MOVrq3(R8, RBX); + if (fmem) + LEAVE(); RET(); break; @@ -169,11 +242,17 @@ MOVrd(EDI, ECX); SUBrd(ESI, ECX); CMPid(sizeof(int32_t), ECX); - JAEb(6); - ZEROrd(EAX); - MOVrq3(R8, RBX); + if (fmem) { + JAEb(4); + ZEROrd(EAX); + LEAVE(); + } else { + JAEb(3); + ZEROrd(EAX); + } RET(); - MOVobd(RBX, RSI, EAX); + MOVrq3(R8, RCX); + MOVobd(RCX, RSI, EAX); BSWAP(EAX); break; @@ -185,10 +264,14 @@ MOVrd(EDI, ECX); SUBrd(ESI, ECX); CMPid(sizeof(int16_t), ECX); - JAEb(4); - MOVrq3(R8, RBX); + if (fmem) { + JAEb(2); + LEAVE(); + } else + JAEb(1); RET(); - MOVobw(RBX, RSI, AX); + MOVrq3(R8, RCX); + MOVobw(RCX, RSI, AX); SWAP_AX(); break; @@ -196,10 +279,14 @@ ZEROrd(EAX); MOVid(ins->k, ESI); CMPrd(EDI, ESI); - JBb(4); - MOVrq3(R8, RBX); + if (fmem) { + JBb(2); + LEAVE(); + } else + JBb(1); RET(); - MOVobb(RBX, RSI, AL); + MOVrq3(R8, RCX); + MOVobb(RCX, RSI, AL); break; case BPF_LD|BPF_W|BPF_LEN: @@ -222,11 +309,17 @@ MOVrd(EDI, ECX); SUBrd(ESI, ECX); CMPid(sizeof(int32_t), ECX); - JAEb(6); - ZEROrd(EAX); - MOVrq3(R8, RBX); + if (fmem) { + JAEb(4); + ZEROrd(EAX); + LEAVE(); + } else { + JAEb(3); + ZEROrd(EAX); + } RET(); - MOVobd(RBX, RSI, EAX); + MOVrq3(R8, RCX); + MOVobd(RCX, RSI, EAX); BSWAP(EAX); break; @@ -243,10 +336,14 @@ MOVrd(EDI, ECX); SUBrd(ESI, ECX); CMPid(sizeof(int16_t), ECX); - JAEb(4); - MOVrq3(R8, RBX); + if (fmem) { + JAEb(2); + LEAVE(); + } else + JAEb(1); RET(); - MOVobw(RBX, RSI, AX); + MOVrq3(R8, RCX); + MOVobw(RCX, RSI, AX); SWAP_AX(); break; @@ -258,22 +355,32 @@ MOVrd(EDI, ECX); SUBrd(EDX, ECX); CMPrd(ESI, ECX); - JAb(4); - MOVrq3(R8, RBX); + if (fmem) { + JAb(2); + LEAVE(); + } else + JAb(1); RET(); + MOVrq3(R8, RCX); ADDrd(EDX, ESI); - MOVobb(RBX, RSI, AL); + MOVobb(RCX, RSI, AL); break; case BPF_LDX|BPF_MSH|BPF_B: MOVid(ins->k, ESI); CMPrd(EDI, ESI); - JBb(6); - ZEROrd(EAX); - MOVrq3(R8, RBX); + if (fmem) { + JBb(4); + ZEROrd(EAX); + LEAVE(); + } else { + JBb(3); + ZEROrd(EAX); + } RET(); ZEROrd(EDX); - MOVobb(RBX, RSI, DL); + MOVrq3(R8, RCX); + MOVobb(RCX, RSI, DL); ANDib(0x0f, DL); SHLib(2, EDX); break; @@ -287,15 +394,13 @@ break; case BPF_LD|BPF_MEM: - MOViq((uintptr_t)mem, RCX); - MOVid(ins->k * 4, ESI); - MOVobd(RCX, RSI, EAX); + MOVid(ins->k * sizeof(uint32_t), ESI); + MOVobd(RSP, RSI, EAX); break; case BPF_LDX|BPF_MEM: - MOViq((uintptr_t)mem, RCX); - MOVid(ins->k * 4, ESI); - MOVobd(RCX, RSI, EDX); + MOVid(ins->k * sizeof(uint32_t), ESI); + MOVobd(RSP, RSI, EDX); break; case BPF_ST: @@ -304,15 +409,13 @@ * be optimized if the previous instruction * was already of this type */ - MOViq((uintptr_t)mem, RCX); - MOVid(ins->k * 4, ESI); - MOVomd(EAX, RCX, RSI); + MOVid(ins->k * sizeof(uint32_t), ESI); + MOVomd(EAX, RSP, RSI); break; case BPF_STX: - MOViq((uintptr_t)mem, RCX); - MOVid(ins->k * 4, ESI); - MOVomd(EDX, RCX, RSI); + MOVid(ins->k * sizeof(uint32_t), ESI); + MOVomd(EDX, RSP, RSI); break; case BPF_JMP|BPF_JA: @@ -392,9 +495,14 @@ case BPF_ALU|BPF_DIV|BPF_X: TESTrd(EDX, EDX); - JNEb(6); - ZEROrd(EAX); - MOVrq3(R8, RBX); + if (fmem) { + JNEb(4); + ZEROrd(EAX); + LEAVE(); + } else { + JNEb(3); + ZEROrd(EAX); + } RET(); MOVrd(EDX, ECX); ZEROrd(EDX); @@ -474,47 +582,56 @@ ins++; } - pass++; - if (pass == 2) - break; + if (pass > 0) + continue; + *size = stream.cur_ip; #ifdef _KERNEL - stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); - if (stream.ibuf == NULL) { - free(stream.refs, M_BPFJIT); - return (NULL); - } + stream.ibuf = malloc(*size, M_BPFJIT, M_NOWAIT); + if (stream.ibuf == NULL) + break; #else - stream.ibuf = (char *)malloc(stream.cur_ip); - if (stream.ibuf == NULL) { - free(stream.refs); - return (NULL); + stream.ibuf = mmap(NULL, *size, PROT_READ | PROT_WRITE, + MAP_ANON, -1, 0); + if (stream.ibuf == MAP_FAILED) { + stream.ibuf = NULL; + break; } #endif /* - * modify the reference table to contain the offsets and - * not the lengths of the instructions + * Modify the reference table to contain the offsets and + * not the lengths of the instructions. */ - for (i = 1; i < nins + 1; i++) - stream.refs[i] += stream.refs[i - 1]; + if (fjmp) + for (i = 1; i < nins + 1; i++) + stream.refs[i] += stream.refs[i - 1]; - /* Reset the counters */ + /* Reset the counters. */ stream.cur_ip = 0; stream.bpf_pc = 0; - /* the second pass creates the actual code */ + /* The second pass creates the actual code. */ emitm = emit_code; } /* - * the reference table is needed only during compilation, - * now we can free it + * The reference table is needed only during compilation, + * now we can free it. */ + if (fjmp) #ifdef _KERNEL - free(stream.refs, M_BPFJIT); + free(stream.refs, M_BPFJIT); #else - free(stream.refs); + free(stream.refs); +#endif + +#ifndef _KERNEL + if (stream.ibuf != NULL && + mprotect(stream.ibuf, *size, PROT_READ | PROT_EXEC) != 0) { + munmap(stream.ibuf, *size); + stream.ibuf = NULL; + } #endif return ((bpf_filter_func)stream.ibuf); ==== //depot/projects/usb/src/sys/amd64/amd64/bpf_jit_machdep.h#4 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (C) 2005-2008 Jung-uk Kim <jkim@FreeBSD.org> + * Copyright (C) 2005-2009 Jung-uk Kim <jkim@FreeBSD.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/bpf_jit_machdep.h,v 1.10 2008/08/25 20:43:13 jkim Exp $ + * $FreeBSD: src/sys/amd64/amd64/bpf_jit_machdep.h,v 1.14 2009/11/23 22:23:19 jkim Exp $ */ #ifndef _BPF_JIT_MACHDEP_H_ @@ -85,7 +85,17 @@ #define DL 2 #define BL 3 -/* A stream of native binary code.*/ +/* Optimization flags */ +#define BPF_JIT_FRET 0x01 +#define BPF_JIT_FPKT 0x02 +#define BPF_JIT_FMEM 0x04 +#define BPF_JIT_FJMP 0x08 +#define BPF_JIT_FLEN 0x10 + +#define BPF_JIT_FLAG_ALL \ + (BPF_JIT_FPKT | BPF_JIT_FMEM | BPF_JIT_FJMP | BPF_JIT_FLEN) + +/* A stream of native binary code */ typedef struct bpf_bin_stream { /* Current native instruction pointer. */ int cur_ip; @@ -117,7 +127,7 @@ typedef void (*emit_func)(bpf_bin_stream *stream, u_int value, u_int n); /* - * native Instruction Macros + * Native instruction macros */ /* movl i32,r32 */ @@ -215,8 +225,18 @@ emitm(&stream, 0xc486, 2); \ } while (0) -/* ret */ -#define RET() do { \ +/* pushq r64 */ +#define PUSH(r64) do { \ + emitm(&stream, (5 << 4) | (0 << 3) | (r64 & 0x7), 1); \ +} while (0) + +/* leaveq */ +#define LEAVE() do { \ + emitm(&stream, 0xc9, 1); \ +} while (0) + +/* retq */ +#define RET() do { \ emitm(&stream, 0xc3, 1); \ } while (0) @@ -253,6 +273,13 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912012204.nB1M4fL2020196>