Date: Wed, 20 Sep 2006 11:44:18 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 106392 for review Message-ID: <200609201144.k8KBiIIB009139@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106392 Change 106392 by rdivacky@rdivacky_witten on 2006/09/20 11:43:19 IFC Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/amd64/local_apic.c#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/mp_machdep.c#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/nexus.c#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/linuxolator/src/sys/cam/cam_xpt.c#2 integrate .. //depot/projects/linuxolator/src/sys/cam/scsi/scsi_da.c#2 integrate .. //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_proto.h#2 integrate .. //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_syscall.h#2 integrate .. //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_syscalls.c#2 integrate .. //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_sysent.c#2 integrate .. //depot/projects/linuxolator/src/sys/compat/freebsd32/syscalls.master#2 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#2 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#2 integrate .. //depot/projects/linuxolator/src/sys/conf/files#2 integrate .. //depot/projects/linuxolator/src/sys/conf/kern.pre.mk#2 integrate .. //depot/projects/linuxolator/src/sys/contrib/dev/ath/freebsd/ah_if.m#2 delete .. //depot/projects/linuxolator/src/sys/contrib/dev/ath/freebsd/ah_osdep.c#2 delete .. //depot/projects/linuxolator/src/sys/contrib/dev/ath/freebsd/ah_osdep.h#2 delete .. //depot/projects/linuxolator/src/sys/contrib/pf/net/pf.c#2 integrate .. //depot/projects/linuxolator/src/sys/crypto/via/padlock_cipher.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/ata-all.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/ata-chipset.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/ata-disk.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/ata-pci.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/ata-raid.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/ata-usb.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ath/ah_osdep.c#1 branch .. //depot/projects/linuxolator/src/sys/dev/ath/ah_osdep.h#1 branch .. //depot/projects/linuxolator/src/sys/dev/ath/if_ath.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ath/if_athvar.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/bce/if_bce.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/bge/if_bge.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/bktr/bktr_i2c.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/bktr/bktr_i2c.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/cs/if_cs.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/cs/if_csvar.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/dc/if_dc.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/dc/if_dcreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/de/if_de.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/de/if_devar.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/em/if_em.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/en/if_en_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/en/midway.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/hwpmc/hwpmc_mod.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ichsmb/ichsmb.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/iicbus/iicsmb.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ixgb/if_ixgb.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/kbdmux/kbdmux.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/lge/if_lge.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/lge/if_lgereg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mfi/mfi.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mfi/mfivar.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mxge/eth_z8e.dat.gz.uu#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mxge/ethp_z8e.dat.gz.uu#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mxge/if_mxge.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mxge/if_mxge_var.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mxge/mxge_mcp.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/my/if_my.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/my/if_myreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/nfe/if_nfe.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/nfe/if_nfereg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/nge/if_nge.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/nge/if_ngereg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/re/if_re.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/sio/sio_pccard.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/smbus/smb.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/smbus/smb.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/smbus/smbconf.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/smbus/smbconf.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/smbus/smbus.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/smbus/smbus.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/smbus/smbus_if.m#2 integrate .. //depot/projects/linuxolator/src/sys/dev/stge/if_stge.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/syscons/scmouse.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/syscons/syscons.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/syscons/syscons.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ti/if_ti.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/txp/if_txp.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/uart/uart_kbd_sun.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/usb_subr.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/vge/if_vge.c#2 integrate .. //depot/projects/linuxolator/src/sys/fs/devfs/devfs.h#2 integrate .. //depot/projects/linuxolator/src/sys/fs/devfs/devfs_devs.c#2 integrate .. //depot/projects/linuxolator/src/sys/fs/devfs/devfs_vfsops.c#2 integrate .. //depot/projects/linuxolator/src/sys/fs/devfs/devfs_vnops.c#2 integrate .. //depot/projects/linuxolator/src/sys/fs/udf/osta.h#2 integrate .. //depot/projects/linuxolator/src/sys/geom/eli/g_eli.h#2 integrate .. //depot/projects/linuxolator/src/sys/geom/eli/g_eli_ctl.c#2 integrate .. //depot/projects/linuxolator/src/sys/geom/geom.h#2 integrate .. //depot/projects/linuxolator/src/sys/geom/geom_event.c#2 integrate .. //depot/projects/linuxolator/src/sys/geom/geom_subr.c#2 integrate .. //depot/projects/linuxolator/src/sys/geom/label/g_label_ufs.c#2 integrate .. //depot/projects/linuxolator/src/sys/geom/mirror/g_mirror.c#2 integrate .. //depot/projects/linuxolator/src/sys/geom/raid3/g_raid3.c#2 integrate .. //depot/projects/linuxolator/src/sys/geom/raid3/g_raid3_ctl.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/conf/NOTES#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/busdma_machdep.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/local_apic.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/mp_machdep.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/nexus.c#2 integrate .. //depot/projects/linuxolator/src/sys/ia64/ia32/ia32_trap.c#2 integrate .. //depot/projects/linuxolator/src/sys/ia64/ia64/trap.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/bus_if.m#2 integrate .. //depot/projects/linuxolator/src/sys/kern/init_sysent.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_acct.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_exit.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_jail.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_mbuf.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_proc.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_prot.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_bus.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_prf.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_rman.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_witness.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/syscalls.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/syscalls.master#2 integrate .. //depot/projects/linuxolator/src/sys/kern/systrace_args.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/tty.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_socket.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_default.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_lookup.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_mount.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_syscalls.c#2 integrate .. //depot/projects/linuxolator/src/sys/modules/ath/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/modules/ath_hal/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/modules/ath_rate_amrr/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/modules/ath_rate_onoe/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/modules/ath_rate_sample/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/modules/ipfw/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/modules/pf/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/net/if_bridge.c#2 integrate .. //depot/projects/linuxolator/src/sys/net/if_vlan.c#2 integrate .. //depot/projects/linuxolator/src/sys/net/if_vlan_var.h#2 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_input.c#2 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_output.c#2 integrate .. //depot/projects/linuxolator/src/sys/netgraph/ng_eiface.c#2 integrate .. //depot/projects/linuxolator/src/sys/netgraph/ng_fec.c#2 integrate .. //depot/projects/linuxolator/src/sys/netgraph/ng_vlan.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/ip_fw2.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/ip_output.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_input.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_output.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_syncache.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_usrreq.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/tcp_var.h#2 integrate .. //depot/projects/linuxolator/src/sys/netinet6/nd6.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfs4client/nfs4_vfsops.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfs4client/nfs4_vnops.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_node.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_subs.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_vfsops.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_vnops.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfsnode.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/alpm.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/amdpm.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/amdsmb.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_rl.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_sf.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_sfreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_sis.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_sisreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_ste.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_tl.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_tlreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_vr.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_vrreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_wb.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_wbreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_xl.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/if_xlreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/intpm.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/intpmreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/pci/nfsmb.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/viapm.c#2 integrate .. //depot/projects/linuxolator/src/sys/powerpc/powerpc/trap.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/audit/audit.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/audit/audit_bsm.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/audit/audit_private.h#2 integrate .. //depot/projects/linuxolator/src/sys/security/audit/audit_syscalls.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/audit/audit_worker.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/mac/mac_inet.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/mac/mac_internal.h#2 integrate .. //depot/projects/linuxolator/src/sys/security/mac_biba/mac_biba.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/mac_lomac/mac_lomac.c#2 integrate .. //depot/projects/linuxolator/src/sys/security/mac_mls/mac_mls.c#2 integrate .. //depot/projects/linuxolator/src/sys/sys/bus.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/mac.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/mac_policy.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/mbuf.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/mount.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/syscall.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/syscall.mk#2 integrate .. //depot/projects/linuxolator/src/sys/sys/sysctl.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/sysproto.h#2 integrate .. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_softdep.c#2 integrate .. //depot/projects/linuxolator/src/sys/ufs/ufs/ufs_quota.c#2 integrate Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/amd64/local_apic.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.28 2006/09/06 22:05:34 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.29 2006/09/11 20:12:42 jhb Exp $"); #include "opt_hwpmc_hooks.h" @@ -794,6 +794,76 @@ } } } + +static void +dump_mask(const char *prefix, uint32_t v, int base) +{ + int i, first; + + first = 1; + for (i = 0; i < 32; i++) + if (v & (1 << i)) { + if (first) { + db_printf("%s:", prefix); + first = 0; + } + db_printf(" %02x", base + i); + } + if (!first) + db_printf("\n"); +} + +/* Show info from the lapic regs for this CPU. */ +DB_SHOW_COMMAND(lapic, db_show_lapic) +{ + uint32_t v; + + db_printf("lapic ID = %d\n", lapic_id()); + v = lapic->version; + db_printf("version = %d.%d\n", (v & APIC_VER_VERSION) >> 4, + v & 0xf); + db_printf("max LVT = %d\n", (v & APIC_VER_MAXLVT) >> MAXLVTSHIFT); + v = lapic->svr; + db_printf("SVR = %02x (%s)\n", v & APIC_SVR_VECTOR, + v & APIC_SVR_ENABLE ? "enabled" : "disabled"); + db_printf("TPR = %02x\n", lapic->tpr); + +#define dump_field(prefix, index) \ + dump_mask(__XSTRING(prefix ## index), lapic->prefix ## index, \ + index * 32) + + db_printf("In-service Interrupts:\n"); + dump_field(isr, 0); + dump_field(isr, 1); + dump_field(isr, 2); + dump_field(isr, 3); + dump_field(isr, 4); + dump_field(isr, 5); + dump_field(isr, 6); + dump_field(isr, 7); + + db_printf("TMR Interrupts:\n"); + dump_field(tmr, 0); + dump_field(tmr, 1); + dump_field(tmr, 2); + dump_field(tmr, 3); + dump_field(tmr, 4); + dump_field(tmr, 5); + dump_field(tmr, 6); + dump_field(tmr, 7); + + db_printf("IRR Interrupts:\n"); + dump_field(irr, 0); + dump_field(irr, 1); + dump_field(irr, 2); + dump_field(irr, 3); + dump_field(irr, 4); + dump_field(irr, 5); + dump_field(irr, 6); + dump_field(irr, 7); + +#undef dump_field +} #endif /* ==== //depot/projects/linuxolator/src/sys/amd64/amd64/mp_machdep.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.276 2006/05/16 14:32:16 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.277 2006/09/11 20:10:42 jhb Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -342,7 +342,10 @@ setidt(IPI_INVLTLB, IDTVEC(invltlb), SDT_SYSIGT, SEL_KPL, 0); setidt(IPI_INVLPG, IDTVEC(invlpg), SDT_SYSIGT, SEL_KPL, 0); setidt(IPI_INVLRNG, IDTVEC(invlrng), SDT_SYSIGT, SEL_KPL, 0); - + + /* Install an inter-CPU IPI for cache invalidation. */ + setidt(IPI_INVLCACHE, IDTVEC(invlcache), SDT_SYSIGT, SEL_KPL, 0); + /* Install an inter-CPU IPI for all-CPU rendezvous */ setidt(IPI_RENDEZVOUS, IDTVEC(rendezvous), SDT_SYSIGT, SEL_KPL, 0); ==== //depot/projects/linuxolator/src/sys/amd64/amd64/nexus.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.68 2006/04/20 04:16:34 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.69 2006/09/11 19:31:51 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -140,7 +140,7 @@ static int nexus_probe(device_t dev) { - int irq, last; + int irq; device_quiet(dev); /* suppress attach message for neatness */ @@ -173,18 +173,10 @@ * We search for regions of existing IRQs and add those to the IRQ * resource manager. */ - last = -1; for (irq = 0; irq < NUM_IO_INTS; irq++) - if (intr_lookup_source(irq) != NULL) { - if (last == -1) - last = irq; - } else if (last != -1) { - if (rman_manage_region(&irq_rman, last, irq - 1) != 0) + if (intr_lookup_source(irq) != NULL) + if (rman_manage_region(&irq_rman, irq, irq) != 0) panic("nexus_probe irq_rman add"); - last = -1; - } - if (last != -1 && rman_manage_region(&irq_rman, last, irq - 1) != 0) - panic("nexus_probe irq_rman add"); /* * ISA DMA on PCI systems is implemented in the ISA part of each ==== //depot/projects/linuxolator/src/sys/amd64/amd64/vm_machdep.c#2 (text+ko) ==== @@ -41,10 +41,11 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.251 2006/07/24 12:24:56 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.252 2006/09/17 14:54:14 davidxu Exp $"); #include "opt_isa.h" #include "opt_cpu.h" +#include "opt_compat.h" #include <sys/param.h> #include <sys/systm.h> @@ -69,6 +70,7 @@ #include <machine/cpu.h> #include <machine/md_var.h> #include <machine/pcb.h> +#include <machine/specialreg.h> #include <vm/vm.h> #include <vm/vm_extern.h> @@ -79,6 +81,12 @@ #include <amd64/isa/isa.h> +#ifdef COMPAT_IA32 + +extern struct sysentvec ia32_freebsd_sysvec; + +#endif + static void cpu_reset_real(void); #ifdef SMP static void cpu_reset_proxy(void); @@ -320,6 +328,28 @@ */ cpu_thread_clean(td); +#ifdef COMPAT_IA32 + if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) { + /* + * Set the trap frame to point at the beginning of the uts + * function. + */ + td->td_frame->tf_rbp = 0; + td->td_frame->tf_rsp = + (((uintptr_t)stack->ss_sp + stack->ss_size - 4) & ~0x0f) - 4; + td->td_frame->tf_rip = (uintptr_t)entry; + + /* + * Pass the address of the mailbox for this kse to the uts + * function as a parameter on the stack. + */ + suword32((void *)(td->td_frame->tf_rsp + sizeof(int32_t)), + (uint32_t)(uintptr_t)arg); + + return; + } +#endif + /* * Set the trap frame to point at the beginning of the uts * function. @@ -344,6 +374,19 @@ if ((u_int64_t)tls_base >= VM_MAXUSER_ADDRESS) return (EINVAL); +#ifdef COMPAT_IA32 + if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) { + if (td == curthread) { + critical_enter(); + td->td_pcb->pcb_gsbase = (register_t)tls_base; + wrmsr(MSR_KGSBASE, td->td_pcb->pcb_gsbase); + critical_exit(); + } else { + td->td_pcb->pcb_gsbase = (register_t)tls_base; + } + return (0); + } +#endif if (td == curthread) { critical_enter(); td->td_pcb->pcb_fsbase = (register_t)tls_base; ==== //depot/projects/linuxolator/src/sys/cam/cam_xpt.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.162 2006/06/26 05:41:11 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.165 2006/09/16 17:35:47 mjacob Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -387,9 +387,9 @@ /*quirks*/0, /*mintags*/0, /*maxtags*/0 }, { - /* Does not support other than LUN 0 */ + /* This does not support other than LUN 0 */ { T_DIRECT, SIP_MEDIA_FIXED, "VMware*", "*", "*" }, - CAM_QUIRK_NOLUNS, /*mintags*/0, /*maxtags*/0 + CAM_QUIRK_NOLUNS, /*mintags*/2, /*maxtags*/255 }, { /* @@ -592,6 +592,10 @@ CAM_QUIRK_NOHILUNS, /*mintags*/2, /*maxtags*/255 }, { + { T_ENCLOSURE, SIP_MEDIA_FIXED, "DP", "BACKPLANE", "*" }, + CAM_QUIRK_NOLUNS, /*mintags*/0, /*maxtags*/0 + }, + { /* Default tagged queuing parameters for all devices */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, ==== //depot/projects/linuxolator/src/sys/cam/scsi/scsi_da.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.191 2006/07/14 13:58:32 delphij Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.192 2006/09/16 21:21:07 mjacob Exp $"); #include <sys/param.h> @@ -1519,15 +1519,30 @@ block_size = scsi_4btoul(rcaplong->length); maxsector = scsi_8btou64(rcaplong->addr); } - dasetgeom(periph, block_size, maxsector); - dp = &softc->params; - snprintf(announce_buf, sizeof(announce_buf), - "%juMB (%ju %u byte sectors: %dH %dS/T %dC)", - (uintmax_t) (((uintmax_t)dp->secsize * - dp->sectors) / (1024*1024)), - (uintmax_t)dp->sectors, - dp->secsize, dp->heads, dp->secs_per_track, - dp->cylinders); + + /* + * Because GEOM code just will panic us if we + * give them an 'illegal' value we'll avoid that + * here. + */ + if (block_size >= MAXPHYS || block_size == 0) { + xpt_print_path(periph->path); + printf("unsupportable block size %ju\n", + (uintmax_t) block_size); + announce_buf[0] = '\0'; + cam_periph_invalidate(periph); + } else { + dasetgeom(periph, block_size, maxsector); + dp = &softc->params; + snprintf(announce_buf, sizeof(announce_buf), + "%juMB (%ju %u byte sectors: %dH %dS/T " + "%dC)", (uintmax_t) + (((uintmax_t)dp->secsize * + dp->sectors) / (1024*1024)), + (uintmax_t)dp->sectors, + dp->secsize, dp->heads, + dp->secs_per_track, dp->cylinders); + } } else { int error; ==== //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_proto.h#2 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.61 2006/09/09 01:22:13 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.62 2006/09/17 13:29:35 rwatson Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -419,7 +419,7 @@ #define FREEBSD32_SYS_AUE_freebsd32_recvmsg AUE_RECVMSG #define FREEBSD32_SYS_AUE_freebsd32_sendmsg AUE_SENDMSG #define FREEBSD32_SYS_AUE_freebsd32_recvfrom AUE_RECVFROM -#define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGPENDING +#define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGALTSTACK #define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE #define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER #define FREEBSD32_SYS_AUE_freebsd32_getitimer AUE_GETITIMER ==== //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_syscall.h#2 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.59 2006/09/09 01:22:13 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.60 2006/09/17 13:29:35 rwatson Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp */ #define FREEBSD32_SYS_syscall 0 ==== //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_syscalls.c#2 (text+ko) ==== @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.50 2006/09/09 01:22:13 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.51 2006/09/17 13:29:35 rwatson Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp */ const char *freebsd32_syscallnames[] = { ==== //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_sysent.c#2 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.60 2006/09/09 01:22:13 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.73 2006/09/03 16:17:49 rwatson Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.61 2006/09/17 13:29:35 rwatson Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp */ #include "opt_compat.h" @@ -85,7 +85,7 @@ { AS(setlogin_args), (sy_call_t *)setlogin, AUE_SETLOGIN, NULL, 0, 0 }, /* 50 = setlogin */ { AS(acct_args), (sy_call_t *)acct, AUE_ACCT, NULL, 0, 0 }, /* 51 = acct */ { compat(0,freebsd32_sigpending), AUE_SIGPENDING, NULL, 0, 0 }, /* 52 = old freebsd32_sigpending */ - { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGPENDING, NULL, 0, 0 }, /* 53 = freebsd32_sigaltstack */ + { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGALTSTACK, NULL, 0, 0 }, /* 53 = freebsd32_sigaltstack */ { AS(ioctl_args), (sy_call_t *)ioctl, AUE_IOCTL, NULL, 0, 0 }, /* 54 = ioctl */ { AS(reboot_args), (sy_call_t *)reboot, AUE_REBOOT, NULL, 0, 0 }, /* 55 = reboot */ { AS(revoke_args), (sy_call_t *)revoke, AUE_REVOKE, NULL, 0, 0 }, /* 56 = revoke */ ==== //depot/projects/linuxolator/src/sys/compat/freebsd32/syscalls.master#2 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.74 2006/09/09 01:22:13 davidxu Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.75 2006/09/17 13:28:11 rwatson Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -124,7 +124,7 @@ 50 AUE_SETLOGIN NOPROTO { int setlogin(char *namebuf); } 51 AUE_ACCT NOPROTO { int acct(char *path); } 52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); } -53 AUE_SIGPENDING STD { int freebsd32_sigaltstack( \ +53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ struct sigaltstack32 *ss, \ struct sigaltstack32 *oss); } 54 AUE_IOCTL NOPROTO { int ioctl(int fd, u_long com, \ ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.96 2006/07/11 20:52:07 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.97 2006/09/10 13:47:56 netchild Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -45,6 +45,7 @@ #include <sys/mount.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/stat.h> #include <sys/syscallsubr.h> #include <sys/sysproto.h> #include <sys/tty.h> @@ -495,6 +496,7 @@ { char *path; int error; + struct stat st; LCONVPATHEXIST(td, args->path, &path); @@ -504,6 +506,11 @@ #endif error = kern_unlink(td, path, UIO_SYSSPACE); + if (error == EPERM) + /* Introduce POSIX noncompliant behaviour of Linux */ + if (kern_stat(td, path, UIO_SYSSPACE, &st) == 0) + if (S_ISDIR(st.st_mode)) + error = EISDIR; LFREEPATH(path); return (error); } ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.186 2006/08/25 11:02:42 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.187 2006/09/16 14:12:04 netchild Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -1299,6 +1299,13 @@ #define REBOOT_CAD_ON 0x89abcdef #define REBOOT_CAD_OFF 0 #define REBOOT_HALT 0xcdef0123 +#define REBOOT_RESTART 0x01234567 +#define REBOOT_RESTART2 0xA1B2C3D4 +#define REBOOT_POWEROFF 0x4321FEDC +#define REBOOT_MAGIC1 0xfee1dead +#define REBOOT_MAGIC2 0x28121969 +#define REBOOT_MAGIC2A 0x05121996 +#define REBOOT_MAGIC2B 0x16041998 int linux_reboot(struct thread *td, struct linux_reboot_args *args) @@ -1309,10 +1316,37 @@ if (ldebug(reboot)) printf(ARGS(reboot, "0x%x"), args->cmd); #endif - if (args->cmd == REBOOT_CAD_ON || args->cmd == REBOOT_CAD_OFF) - return (0); - bsd_args.opt = (args->cmd == REBOOT_HALT) ? RB_HALT : 0; - return (reboot(td, &bsd_args)); + + if (args->magic1 != REBOOT_MAGIC1) + return EINVAL; + + switch (args->magic2) { + case REBOOT_MAGIC2: + case REBOOT_MAGIC2A: + case REBOOT_MAGIC2B: + break; + default: + return EINVAL; + } + + switch (args->cmd) { + case REBOOT_CAD_ON: + case REBOOT_CAD_OFF: + return suser(td); + case REBOOT_HALT: + bsd_args.opt = RB_HALT; + break; + case REBOOT_RESTART: + case REBOOT_RESTART2: + bsd_args.opt = 0; + break; + case REBOOT_POWEROFF: + bsd_args.opt = RB_POWEROFF; + break; + default: + return EINVAL; + } + return reboot(td, &bsd_args); } ==== //depot/projects/linuxolator/src/sys/conf/files#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1140 2006/08/14 21:09:37 imp Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1142 2006/09/18 17:23:35 sam Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -255,8 +255,6 @@ contrib/dev/acpica/utobject.c optional acpi contrib/dev/acpica/utstate.c optional acpi contrib/dev/acpica/utxface.c optional acpi -contrib/dev/ath/freebsd/ah_osdep.c optional ath_hal \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ @@ -478,15 +476,17 @@ dev/ata/atapi-cd.c optional atapicd dev/ata/atapi-fd.c optional atapifd dev/ata/atapi-tape.c optional atapist +dev/ath/ah_osdep.c optional ath_hal \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath.c optional ath \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_pci.c optional ath pci \ - compile-with "${NORMAL_C} -I$S/contrib/dev/ath/freebsd" + compile-with "${NORMAL_C} -I$S/dev/ath" dev/awi/am79c930.c optional awi dev/awi/awi.c optional awi dev/awi/if_awi_pccard.c optional awi pccard ==== //depot/projects/linuxolator/src/sys/conf/kern.pre.mk#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.76 2006/07/17 18:43:16 obrien Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.78 2006/09/18 16:49:14 sam Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -58,12 +58,6 @@ # include path into contrib'ed source files. INCLUDES+= -I$S/contrib/altq -# ... and the same for Atheros HAL when the author builds it from -# non-distributable sources. -.if defined(ATH_BUILDING_FROM_SOURCE) -INCLUDES+= -I$S/contrib/dev/ath -.endif - .if make(depend) || make(kernel-depend) # ... and the same for ipfilter @@ -73,7 +67,7 @@ INCLUDES+= -I$S/contrib/pf # ... and the same for Atheros HAL -INCLUDES+= -I$S/contrib/dev/ath/freebsd +INCLUDES+= -I$S/dev/ath # ... and the same for the NgATM stuff INCLUDES+= -I$S/contrib/ngatm ==== //depot/projects/linuxolator/src/sys/contrib/pf/net/pf.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.40 2005/12/25 23:52:00 mlaier Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.41 2006/09/12 04:25:11 csjp Exp $ */ /* $OpenBSD: pf.c,v 1.483 2005/03/15 17:38:43 dhartmei Exp $ */ /* @@ -42,6 +42,7 @@ #endif #ifdef __FreeBSD__ +#include "opt_mac.h" #include "opt_bpf.h" #include "opt_pf.h" @@ -78,6 +79,7 @@ #include <sys/kernel.h> #include <sys/time.h> #ifdef __FreeBSD__ +#include <sys/mac.h> #include <sys/sysctl.h> #include <sys/endian.h> #else @@ -192,7 +194,12 @@ struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t *, u_int16_t *, u_int16_t *, u_int16_t *, u_int8_t, sa_family_t); +#ifdef __FreeBSD__ +void pf_send_tcp(struct mbuf *, + const struct pf_rule *, sa_family_t, +#else void pf_send_tcp(const struct pf_rule *, sa_family_t, +#endif const struct pf_addr *, const struct pf_addr *, u_int16_t, u_int16_t, u_int32_t, u_int32_t, u_int8_t, u_int16_t, u_int16_t, u_int8_t, int, @@ -1114,7 +1121,11 @@ cur->local_flags |= PFSTATE_EXPIRING; #endif if (cur->src.state == PF_TCPS_PROXY_DST) +#ifdef __FreeBSD__ + pf_send_tcp(NULL, cur->rule.ptr, cur->af, +#else pf_send_tcp(cur->rule.ptr, cur->af, +#endif &cur->ext.addr, &cur->lan.addr, cur->ext.port, cur->lan.port, cur->src.seqhi, cur->src.seqlo + 1, @@ -1574,7 +1585,11 @@ } void +#ifdef __FreeBSD__ +pf_send_tcp(struct mbuf *replyto, const struct pf_rule *r, sa_family_t af, +#else pf_send_tcp(const struct pf_rule *r, sa_family_t af, +#endif const struct pf_addr *saddr, const struct pf_addr *daddr, u_int16_t sport, u_int16_t dport, u_int32_t seq, u_int32_t ack, u_int8_t flags, u_int16_t win, u_int16_t mss, u_int8_t ttl, int tag, @@ -1613,6 +1628,16 @@ m = m_gethdr(M_DONTWAIT, MT_HEADER); if (m == NULL) return; +#ifdef __FreeBSD__ +#ifdef MAC + if (replyto) + mac_create_mbuf_netlayer(replyto, m); + else + mac_create_mbuf_from_firewall(m); +#else + (void)replyto; +#endif +#endif if (tag) { #ifdef __FreeBSD__ m->m_flags |= M_SKIP_FIREWALL; @@ -3146,7 +3171,11 @@ ack++; if (th->th_flags & TH_FIN) ack++; +#ifdef __FreeBSD__ + pf_send_tcp(m, r, af, pd->dst, +#else pf_send_tcp(r, af, pd->dst, +#endif pd->src, th->th_dport, th->th_sport, ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, r->return_ttl, 1, pd->eh, kif->pfik_ifp); @@ -3347,7 +3376,11 @@ mss = pf_calc_mss(saddr, af, mss); mss = pf_calc_mss(daddr, af, mss); s->src.mss = mss; +#ifdef __FreeBSD__ + pf_send_tcp(NULL, r, af, daddr, saddr, th->th_dport, +#else pf_send_tcp(r, af, daddr, saddr, th->th_dport, +#endif th->th_sport, s->src.seqhi, ntohl(th->th_seq) + 1, TH_SYN|TH_ACK, 0, s->src.mss, 0, 1, NULL, NULL); REASON_SET(&reason, PFRES_SYNPROXY); @@ -4348,7 +4381,11 @@ REASON_SET(reason, PFRES_SYNPROXY); return (PF_DROP); } +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, +#else pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, +#endif pd->src, th->th_dport, th->th_sport, (*state)->src.seqhi, ntohl(th->th_seq) + 1, TH_SYN|TH_ACK, 0, (*state)->src.mss, 0, 1, @@ -4387,7 +4424,12 @@ (*state)->src.max_win = MAX(ntohs(th->th_win), 1); if ((*state)->dst.seqhi == 1) (*state)->dst.seqhi = htonl(arc4random()); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, + &src->addr, +#else pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, +#endif &dst->addr, src->port, dst->port, (*state)->dst.seqhi, 0, TH_SYN, 0, (*state)->src.mss, 0, 0, NULL, NULL); @@ -4401,12 +4443,21 @@ } else { (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); (*state)->dst.seqlo = ntohl(th->th_seq); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, +#else pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, +#endif pd->src, th->th_dport, th->th_sport, ntohl(th->th_ack), ntohl(th->th_seq) + 1, TH_ACK, (*state)->src.max_win, 0, 0, 0, NULL, NULL); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, + &src->addr, +#else pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, +#endif &dst->addr, src->port, dst->port, (*state)->src.seqhi + 1, (*state)->src.seqlo + 1, TH_ACK, (*state)->dst.max_win, 0, 0, 1, @@ -4685,7 +4736,11 @@ (*state)->src.state == TCPS_SYN_SENT) { /* Send RST for state mismatches during handshake */ if (!(th->th_flags & TH_RST)) +#ifdef __FreeBSD__ + pf_send_tcp(m, (*state)->rule.ptr, pd->af, +#else pf_send_tcp((*state)->rule.ptr, pd->af, +#endif pd->dst, pd->src, th->th_dport, th->th_sport, ntohl(th->th_ack), 0, TH_RST, 0, 0, ==== //depot/projects/linuxolator/src/sys/crypto/via/padlock_cipher.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/crypto/via/padlock_cipher.c,v 1.4 2006/07/25 20:00:55 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/via/padlock_cipher.c,v 1.5 2006/09/15 10:44:55 pjd Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -225,7 +225,7 @@ cw->cw_direction = PADLOCK_DIRECTION_ENCRYPT; key = ses->ses_ekey; if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) - bcopy(enccrd->crd_iv, ses->ses_iv, 16); + bcopy(enccrd->crd_iv, ses->ses_iv, AES_BLOCK_LEN); if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) { crypto_copyback(crp->crp_flags, crp->crp_buf, @@ -247,7 +247,8 @@ enccrd->crd_len, abuf); } - padlock_cbc(abuf, abuf, enccrd->crd_len / 16, key, cw, ses->ses_iv); + padlock_cbc(abuf, abuf, enccrd->crd_len / AES_BLOCK_LEN, key, cw, + ses->ses_iv); if (allocated) { crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi.c#2 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609201144.k8KBiIIB009139>