svn commit: r259820 - stable/10/sbin/swapon
Author: jilles Date: Tue Dec 24 13:46:54 2013 New Revision: 259820 URL: http://svnweb.freebsd.org/changeset/base/259820 Log: MFC r259677: swapon: Fix buffer overflow when configuring swap on GBDE. PR: bin/184950 Modified: stable/10/sbin/swapon/swapon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/swapon/swapon.c == --- stable/10/sbin/swapon/swapon.c Tue Dec 24 09:19:49 2013 (r259819) +++ stable/10/sbin/swapon/swapon.c Tue Dec 24 13:46:54 2013 (r259820) @@ -266,7 +266,8 @@ static const char * swap_on_off_gbde(const char *name, int doingall) { const char *ret; - char pass[64 * 2 + 1], bpass[64]; + char pass[64 * 2 + 1]; + unsigned char bpass[64]; char *dname; int i, error; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259822 - in stable: 10/lib/clang 10/lib/clang/include 10/lib/clang/include/llvm/Config 10/lib/clang/libllvmpowerpcasmparser 10/usr.bin/clang/clang 10/usr.bin/clang/llc 10/usr.bin/clang...
Author: dim Date: Tue Dec 24 14:26:31 2013 New Revision: 259822 URL: http://svnweb.freebsd.org/changeset/base/259822 Log: MFC r259473: Enable llvm's integrated assembler for PowerPC, since it should now be good enough for typical usage. Requested by: rdivacky Added: stable/9/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/9/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/9/lib/clang/Makefile stable/9/lib/clang/include/llvm/Config/AsmParsers.def stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile Directory Properties: stable/9/lib/clang/ (props changed) stable/9/lib/clang/include/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) Changes in other areas also in this revision: Added: stable/10/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/10/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/10/lib/clang/Makefile stable/10/lib/clang/include/llvm/Config/AsmParsers.def stable/10/usr.bin/clang/clang/Makefile stable/10/usr.bin/clang/llc/Makefile stable/10/usr.bin/clang/lldb/Makefile stable/10/usr.bin/clang/llvm-mc/Makefile stable/10/usr.bin/clang/llvm-objdump/Makefile stable/10/usr.bin/clang/llvm-rtdyld/Makefile stable/10/usr.bin/clang/opt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/clang/Makefile == --- stable/9/lib/clang/Makefile Tue Dec 24 14:14:05 2013(r259821) +++ stable/9/lib/clang/Makefile Tue Dec 24 14:26:31 2013(r259822) @@ -69,6 +69,7 @@ SUBDIR= libclanganalysis \ libllvmmipsdisassembler \ libllvmmipsinfo \ libllvmmipsinstprinter \ + libllvmpowerpcasmparser \ libllvmpowerpccodegen \ libllvmpowerpcdesc \ libllvmpowerpcinfo \ Copied: stable/9/lib/clang/include/PPCGenAsmMatcher.inc (from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/clang/include/PPCGenAsmMatcher.inc Tue Dec 24 14:26:31 2013(r259822, copy of r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include PPCGenAsmMatcher.inc.h Modified: stable/9/lib/clang/include/llvm/Config/AsmParsers.def == --- stable/9/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:14:05 2013(r259821) +++ stable/9/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:26:31 2013(r259822) @@ -2,6 +2,7 @@ LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(Mips) +LLVM_ASM_PARSER(PowerPC) LLVM_ASM_PARSER(X86) #undef LLVM_ASM_PARSER Modified: stable/9/usr.bin/clang/clang/Makefile == --- stable/9/usr.bin/clang/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -85,8 +85,9 @@ LIBDEPS=clangfrontendtool \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llc/Makefile == --- stable/9/usr.bin/clang/llc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmirreader \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llvm-mc/Makefile == --- stable/9/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmmcdisassembler \ llvmmipsinstprinter \
svn commit: r259822 - in stable: 10/lib/clang 10/lib/clang/include 10/lib/clang/include/llvm/Config 10/lib/clang/libllvmpowerpcasmparser 10/usr.bin/clang/clang 10/usr.bin/clang/llc 10/usr.bin/clang...
Author: dim Date: Tue Dec 24 14:26:31 2013 New Revision: 259822 URL: http://svnweb.freebsd.org/changeset/base/259822 Log: MFC r259473: Enable llvm's integrated assembler for PowerPC, since it should now be good enough for typical usage. Requested by: rdivacky Added: stable/10/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/10/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/10/lib/clang/Makefile stable/10/lib/clang/include/llvm/Config/AsmParsers.def stable/10/usr.bin/clang/clang/Makefile stable/10/usr.bin/clang/llc/Makefile stable/10/usr.bin/clang/lldb/Makefile stable/10/usr.bin/clang/llvm-mc/Makefile stable/10/usr.bin/clang/llvm-objdump/Makefile stable/10/usr.bin/clang/llvm-rtdyld/Makefile stable/10/usr.bin/clang/opt/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/9/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/9/lib/clang/Makefile stable/9/lib/clang/include/llvm/Config/AsmParsers.def stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile Directory Properties: stable/9/lib/clang/ (props changed) stable/9/lib/clang/include/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) Modified: stable/10/lib/clang/Makefile == --- stable/10/lib/clang/MakefileTue Dec 24 14:14:05 2013 (r259821) +++ stable/10/lib/clang/MakefileTue Dec 24 14:26:31 2013 (r259822) @@ -74,6 +74,7 @@ SUBDIR= libclanganalysis \ libllvmmipsdisassembler \ libllvmmipsinfo \ libllvmmipsinstprinter \ + libllvmpowerpcasmparser \ libllvmpowerpccodegen \ libllvmpowerpcdesc \ libllvmpowerpcinfo \ Copied: stable/10/lib/clang/include/PPCGenAsmMatcher.inc (from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/clang/include/PPCGenAsmMatcher.incTue Dec 24 14:26:31 2013(r259822, copy of r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include PPCGenAsmMatcher.inc.h Modified: stable/10/lib/clang/include/llvm/Config/AsmParsers.def == --- stable/10/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:14:05 2013(r259821) +++ stable/10/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:26:31 2013(r259822) @@ -2,6 +2,7 @@ LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(Mips) +LLVM_ASM_PARSER(PowerPC) LLVM_ASM_PARSER(X86) #undef LLVM_ASM_PARSER Modified: stable/10/usr.bin/clang/clang/Makefile == --- stable/10/usr.bin/clang/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -85,8 +85,9 @@ LIBDEPS=clangfrontendtool \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/10/usr.bin/clang/llc/Makefile == --- stable/10/usr.bin/clang/llc/MakefileTue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/llc/MakefileTue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmirreader \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/10/usr.bin/clang/lldb/Makefile == --- stable/10/usr.bin/clang/lldb/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/10/usr.bin/clang/lldb/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -106,6 +106,7 @@ LIBDEPS=\
svn commit: r259823 - head/sys/x86/acpica
Author: jhb Date: Tue Dec 24 14:48:52 2013 New Revision: 259823 URL: http://svnweb.freebsd.org/changeset/base/259823 Log: Fix i386 build. Pointy hat to:jhb Modified: head/sys/x86/acpica/acpi_wakeup.c Modified: head/sys/x86/acpica/acpi_wakeup.c == --- head/sys/x86/acpica/acpi_wakeup.c Tue Dec 24 14:26:31 2013 (r259822) +++ head/sys/x86/acpica/acpi_wakeup.c Tue Dec 24 14:48:52 2013 (r259823) @@ -37,6 +37,7 @@ __FBSDID($FreeBSD$); #include sys/malloc.h #include sys/memrange.h #include sys/smp.h +#include sys/systm.h #include vm/vm.h #include vm/pmap.h ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259825 - head/sys/dev/advansys
Author: dim Date: Tue Dec 24 15:56:16 2013 New Revision: 259825 URL: http://svnweb.freebsd.org/changeset/base/259825 Log: Remove unused static function adwccbstatus() from adw(4). Reviewed by: gibbs MFC after:3 days Modified: head/sys/dev/advansys/adwcam.c Modified: head/sys/dev/advansys/adwcam.c == --- head/sys/dev/advansys/adwcam.c Tue Dec 24 15:44:09 2013 (r259824) +++ head/sys/dev/advansys/adwcam.c Tue Dec 24 15:56:16 2013 (r259825) @@ -75,7 +75,6 @@ __FBSDID($FreeBSD$); #define ccb_acb_ptr spriv_ptr0 #define ccb_adw_ptr spriv_ptr1 -static __inline cam_status adwccbstatus(union ccb*); static __inline struct acb*adwgetacb(struct adw_softc *adw); static __inline void adwfreeacb(struct adw_softc *adw, struct acb *acb); @@ -100,12 +99,6 @@ static void adw_handle_device_reset(str static voidadw_handle_bus_reset(struct adw_softc *adw, int initiated); -static __inline cam_status -adwccbstatus(union ccb* ccb) -{ - return (ccb-ccb_h.status CAM_STATUS_MASK); -} - static __inline struct acb* adwgetacb(struct adw_softc *adw) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259826 - head/usr.sbin/bhyve
Author: jhb Date: Tue Dec 24 16:14:19 2013 New Revision: 259826 URL: http://svnweb.freebsd.org/changeset/base/259826 Log: Support soft power-off via the ACPI S5 state for bhyve guests. - Implement the PM1_EVT and PM1_CTL registers required by ACPI. The PM1_EVT register is mostly a dummy as bhyve doesn't support any of the hardware-initiated events. The only bit of PM1_CNT that is implemented are the sleep request bits (SPL_EN and SLP_TYP) which request a graceful power off for S5. In particular, for S5, bhyve exits with a non-zero value which terminates the loop in vmrun.sh. - Emulate the Reset Control register at I/O port 0xcf9 and advertise it as the reset register via ACPI. - Advertise an _S5 package. - Extend the in/out interface to allow an in/out handler to request that the hypervisor trigger a reset or power-off. - While here, note that all vCPUs in a guest support C1 (hlt). Reviewed by: neel (earlier version) Added: head/usr.sbin/bhyve/pm.c (contents, props changed) Modified: head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyve/acpi.c head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyve/inout.h Modified: head/usr.sbin/bhyve/Makefile == --- head/usr.sbin/bhyve/MakefileTue Dec 24 15:56:16 2013 (r259825) +++ head/usr.sbin/bhyve/MakefileTue Dec 24 16:14:19 2013 (r259826) @@ -10,7 +10,7 @@ MAN= bhyve.8 SRCS= acpi.c atpic.c bhyverun.c block_if.c consport.c dbgport.c elcr.c SRCS+= inout.c legacy_irq.c mem.c mevent.c mptbl.c pci_ahci.c SRCS+= pci_emul.c pci_hostbridge.c pci_lpc.c pci_passthru.c pci_virtio_block.c -SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pmtmr.c post.c rtc.c +SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pm.c pmtmr.c post.c rtc.c SRCS+= uart_emul.c virtio.c xmsr.c spinup_ap.c .PATH: ${.CURDIR}/../../sys/amd64/vmm Modified: head/usr.sbin/bhyve/acpi.c == --- head/usr.sbin/bhyve/acpi.c Tue Dec 24 15:56:16 2013(r259825) +++ head/usr.sbin/bhyve/acpi.c Tue Dec 24 16:14:19 2013(r259826) @@ -85,6 +85,8 @@ __FBSDID($FreeBSD$); #define BHYVE_ASL_SUFFIX .aml #define BHYVE_ASL_COMPILER /usr/sbin/iasl +#define BHYVE_PM1A_EVT_ADDR0x400 +#define BHYVE_PM1A_CNT_ADDR0x404 #define BHYVE_PM_TIMER_ADDR0x408 static int basl_keep_temps; @@ -342,9 +344,11 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, [0001]\t\tACPI Disable Value : 00\n); EFPRINTF(fp, [0001]\t\tS4BIOS Command : 00\n); EFPRINTF(fp, [0001]\t\tP-State Control : 00\n); - EFPRINTF(fp, [0004]\t\tPM1A Event Block Address : \n); + EFPRINTF(fp, [0004]\t\tPM1A Event Block Address : %08X\n, +BHYVE_PM1A_EVT_ADDR); EFPRINTF(fp, [0004]\t\tPM1B Event Block Address : \n); - EFPRINTF(fp, [0004]\t\tPM1A Control Block Address : \n); + EFPRINTF(fp, [0004]\t\tPM1A Control Block Address : %08X\n, +BHYVE_PM1A_CNT_ADDR); EFPRINTF(fp, [0004]\t\tPM1B Control Block Address : \n); EFPRINTF(fp, [0004]\t\tPM2 Control Block Address : \n); EFPRINTF(fp, [0004]\t\tPM Timer Block Address : %08X\n, @@ -379,7 +383,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, [0004]\t\tFlags (decoded below) : \n); EFPRINTF(fp, \t\t\tWBINVD instruction is operational (V1) : 1\n); EFPRINTF(fp, \t\t\tWBINVD flushes all caches (V1) : 0\n); - EFPRINTF(fp, \t\t\tAll CPUs support C1 (V1) : 0\n); + EFPRINTF(fp, \t\t\tAll CPUs support C1 (V1) : 1\n); EFPRINTF(fp, \t\t\tC2 works on MP system (V1) : 0\n); EFPRINTF(fp, \t\t\tControl Method Power Button (V1) : 1\n); EFPRINTF(fp, \t\t\tControl Method Sleep Button (V1) : 1\n); @@ -387,7 +391,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, \t\t\tRTC can wake system from S4 (V1) : 0\n); EFPRINTF(fp, \t\t\t32-bit PM Timer (V1) : 1\n); EFPRINTF(fp, \t\t\tDocking Supported (V1) : 0\n); - EFPRINTF(fp, \t\t\tReset Register Supported (V2) : 0\n); + EFPRINTF(fp, \t\t\tReset Register Supported (V2) : 1\n); EFPRINTF(fp, \t\t\tSealed Case (V3) : 0\n); EFPRINTF(fp, \t\t\tHeadless - No Video (V3) : 1\n); EFPRINTF(fp, \t\t\tUse native instr after SLP_TYPx (V3) : 0\n); @@ -407,10 +411,10 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, [0001]\t\tBit Width : 08\n); EFPRINTF(fp, [0001]\t\tBit Offset : 00\n); EFPRINTF(fp, [0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n); - EFPRINTF(fp, [0008]\t\tAddress : 0001\n); + EFPRINTF(fp, [0008]\t\tAddress : 0CF9\n); EFPRINTF(fp, \n); - EFPRINTF(fp, [0001]\t\tValue to cause reset : 00\n); + EFPRINTF(fp, [0001]\t\tValue to cause reset : 06\n); EFPRINTF(fp, [0003]\t\tReserved : 00\n);
svn commit: r259827 - head/sys/dev/aic7xxx
Author: dim Date: Tue Dec 24 16:46:06 2013 New Revision: 259827 URL: http://svnweb.freebsd.org/changeset/base/259827 Log: Remove unused static const variable num_chip_names from aic79xx.c. Reviewed by: gibbs MFC after:3 days Modified: head/sys/dev/aic7xxx/aic79xx.c Modified: head/sys/dev/aic7xxx/aic79xx.c == --- head/sys/dev/aic7xxx/aic79xx.c Tue Dec 24 16:14:19 2013 (r259826) +++ head/sys/dev/aic7xxx/aic79xx.c Tue Dec 24 16:46:06 2013 (r259827) @@ -64,7 +64,6 @@ char *ahd_chip_names[] = aic7902, aic7901A }; -static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names); /* * Hardware error codes. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259828 - head/sys/rpc
Author: mav Date: Tue Dec 24 17:28:27 2013 New Revision: 259828 URL: http://svnweb.freebsd.org/changeset/base/259828 Log: Fix a bug introduced at r259632, triggering infinite loop in some cases. Modified: head/sys/rpc/svc_vc.c Modified: head/sys/rpc/svc_vc.c == --- head/sys/rpc/svc_vc.c Tue Dec 24 16:46:06 2013(r259827) +++ head/sys/rpc/svc_vc.c Tue Dec 24 17:28:27 2013(r259828) @@ -555,7 +555,7 @@ svc_vc_backchannel_stat(SVCXPRT *xprt) * leaving the result in cd-mreq. If we don't have a complete record, leave * the partial result in cd-mreq and try to read more from the socket. */ -static void +static int svc_vc_process_pending(SVCXPRT *xprt) { struct cf_conn *cd = (struct cf_conn *) xprt-xp_p1; @@ -584,7 +584,7 @@ svc_vc_process_pending(SVCXPRT *xprt) } if (n sizeof(uint32_t)) { so-so_rcv.sb_lowat = sizeof(uint32_t) - n; - return; + return (FALSE); } m_copydata(cd-mpending, 0, sizeof(header), (char *)header); @@ -620,6 +620,7 @@ svc_vc_process_pending(SVCXPRT *xprt) } so-so_rcv.sb_lowat = imax(1, imin(cd-resid, so-so_rcv.sb_hiwat / 2)); + return (TRUE); } static bool_t @@ -642,8 +643,10 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms for (;;) { /* If we have no request ready, check pending queue. */ while (cd-mpending - (cd-mreq == NULL || cd-resid != 0 || !cd-eor)) - svc_vc_process_pending(xprt); + (cd-mreq == NULL || cd-resid != 0 || !cd-eor)) { + if (!svc_vc_process_pending(xprt)) + break; + } /* Process and return complete request in cd-mreq. */ if (cd-mreq != NULL cd-resid == 0 cd-eor) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259829 - in stable/9/usr.bin: kdump truss
Author: jhb Date: Tue Dec 24 18:41:17 2013 New Revision: 259829 URL: http://svnweb.freebsd.org/changeset/base/259829 Log: MFC 255493: - Decode the idtype argument passed to wait6() in kdump and truss. - Don't treat an options argument of 0 to wait4() as an error in kdump. - Decode the wait options passed to wait4() and wait6() in truss and decode the returned rusage and exit status. Modified: stable/9/usr.bin/kdump/kdump.c stable/9/usr.bin/kdump/mksubr stable/9/usr.bin/truss/syscall.h stable/9/usr.bin/truss/syscalls.c Directory Properties: stable/9/usr.bin/kdump/ (props changed) stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/kdump/kdump.c == --- stable/9/usr.bin/kdump/kdump.c Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/kdump/kdump.c Tue Dec 24 18:41:17 2013 (r259829) @@ -58,6 +58,7 @@ extern int errno; #include sys/sysent.h #include sys/un.h #include sys/queue.h +#include sys/wait.h #ifdef IPX #include sys/types.h #include netipx/ipx.h @@ -556,8 +557,30 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_wait4: print_number(ip, narg, c); print_number(ip, narg, c); + /* +* A flags value of zero is valid for +* wait4() but not for wait6(), so +* handle zero special here. +*/ + if (*ip == 0) { + print_number(ip, narg, c); + } else { + putchar(','); + wait6optname(*ip); + ip++; + narg--; + } + break; + case SYS_wait6: + putchar('('); + idtypename(*ip, decimal); + c = ','; + ip++; + narg--; + print_number(ip, narg, c); + print_number(ip, narg, c); putchar(','); - wait4optname(*ip); + wait6optname(*ip); ip++; narg--; break; Modified: stable/9/usr.bin/kdump/mksubr == --- stable/9/usr.bin/kdump/mksubr Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/kdump/mksubr Tue Dec 24 18:41:17 2013 (r259829) @@ -314,6 +314,68 @@ flagsandmodename(int flags, int mode, in } } +/* MANUAL */ +void +idtypename(idtype_t idtype, int decimal) +{ + switch(idtype) { + case P_PID: + printf(P_PID); + break; + case P_PPID: + printf(P_PPID); + break; + case P_PGID: + printf(P_PGID); + break; + case P_SID: + printf(P_SID); + break; + case P_CID: + printf(P_CID); + break; + case P_UID: + printf(P_UID); + break; + case P_GID: + printf(P_GID); + break; + case P_ALL: + printf(P_ALL); + break; + case P_LWPID: + printf(P_LWPID); + break; + case P_TASKID: + printf(P_TASKID); + break; + case P_PROJID: + printf(P_PROJID); + break; + case P_POOLID: + printf(P_POOLID); + break; + case P_JAILID: + printf(P_JAILID); + break; + case P_CTID: + printf(P_CTID); + break; + case P_CPUID: + printf(P_CPUID); + break; + case P_PSETID: + printf(P_PSETID); + break; + default: + if (decimal) { + printf(%d, idtype); + } else { + printf(%#x, idtype); + } + } +} + /* * MANUAL * @@ -393,7 +455,7 @@ auto_switch_type sockoptname auto_switch_type socktypenameSOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]* sys/socket.h auto_or_type thrcreateflagsname THR_[A-Z]+[[:space:]]+0x[0-9]+ sys/thr.h auto_switch_type vmresultnameKERN_[A-Z]+[[:space:]]+[0-9]+ vm/vm_param.h -auto_or_type wait4optname
svn commit: r259830 - head/sys/kern
Author: ed Date: Tue Dec 24 18:42:26 2013 New Revision: 259830 URL: http://svnweb.freebsd.org/changeset/base/259830 Log: Fix copy-pasting of CJK fullwidth characters. They are stored as two separate characters in the vtbuf, so copy-pasting will cause them to be passed to terminal_input_char() twice. Extend terminal_input_char() to explicitly discard characters with TF_CJK_RIGHT set. This causes only the left part to generate input. Modified: head/sys/kern/subr_terminal.c Modified: head/sys/kern/subr_terminal.c == --- head/sys/kern/subr_terminal.c Tue Dec 24 18:41:17 2013 (r259829) +++ head/sys/kern/subr_terminal.c Tue Dec 24 18:42:26 2013 (r259830) @@ -249,7 +249,13 @@ terminal_input_char(struct terminal *tm, if (tp == NULL) return; - /* Strip off any attributes. */ + /* +* Strip off any attributes. Also ignore input of second part of +* CJK fullwidth characters, as we don't want to return these +* characters twice. +*/ + if (TCHAR_FORMAT(c) TF_CJK_RIGHT) + return; c = TCHAR_CHARACTER(c); tty_lock(tp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259831 - stable/10/sys/arm/econa
Author: jhb Date: Tue Dec 24 18:48:29 2013 New Revision: 259831 URL: http://svnweb.freebsd.org/changeset/base/259831 Log: MFC 258177: Remove an incorrectly copied and pasted clause from these license statements. Modified: stable/10/sys/arm/econa/uart_bus_ec.c stable/10/sys/arm/econa/uart_cpu_ec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/econa/uart_bus_ec.c == --- stable/10/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:42:26 2013 (r259830) +++ stable/10/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:48:29 2013 (r259831) @@ -11,9 +11,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/arm/econa/uart_cpu_ec.c == --- stable/10/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:42:26 2013 (r259830) +++ stable/10/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:48:29 2013 (r259831) @@ -12,9 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259832 - stable/9/sys/arm/econa
Author: jhb Date: Tue Dec 24 18:49:24 2013 New Revision: 259832 URL: http://svnweb.freebsd.org/changeset/base/259832 Log: MFC 258177: Remove an incorrectly copied and pasted clause from these license statements. Modified: stable/9/sys/arm/econa/uart_bus_ec.c stable/9/sys/arm/econa/uart_cpu_ec.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/arm/econa/uart_bus_ec.c == --- stable/9/sys/arm/econa/uart_bus_ec.cTue Dec 24 18:48:29 2013 (r259831) +++ stable/9/sys/arm/econa/uart_bus_ec.cTue Dec 24 18:49:24 2013 (r259832) @@ -11,9 +11,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/arm/econa/uart_cpu_ec.c == --- stable/9/sys/arm/econa/uart_cpu_ec.cTue Dec 24 18:48:29 2013 (r259831) +++ stable/9/sys/arm/econa/uart_cpu_ec.cTue Dec 24 18:49:24 2013 (r259832) @@ -12,9 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. Neither the name of MARVELL nor the names of contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259833 - head/sys/dev/aic7xxx
Author: dim Date: Tue Dec 24 18:52:36 2013 New Revision: 259833 URL: http://svnweb.freebsd.org/changeset/base/259833 Log: Remove another unused static const variable num_chip_names, from aic7xxx.c this time. Noticed by: pluknet MFC after:3 days Modified: head/sys/dev/aic7xxx/aic7xxx.c Modified: head/sys/dev/aic7xxx/aic7xxx.c == --- head/sys/dev/aic7xxx/aic7xxx.c Tue Dec 24 18:49:24 2013 (r259832) +++ head/sys/dev/aic7xxx/aic7xxx.c Tue Dec 24 18:52:36 2013 (r259833) @@ -73,7 +73,6 @@ char *ahc_chip_names[] = aic7892, aic7899 }; -static const u_int num_chip_names = NUM_ELEMENTS(ahc_chip_names); /* * Hardware error codes. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259834 - stable/10/sys/kern
Author: jhb Date: Tue Dec 24 19:01:08 2013 New Revision: 259834 URL: http://svnweb.freebsd.org/changeset/base/259834 Log: MFC 258869: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Modified: stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sched_ule.c == --- stable/10/sys/kern/sched_ule.c Tue Dec 24 18:52:36 2013 (r259833) +++ stable/10/sys/kern/sched_ule.c Tue Dec 24 19:01:08 2013 (r259834) @@ -1533,7 +1533,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td-td_sched-ts_ticks) pri += min(SCHED_PRI_TICKS(td-td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td-td_proc-p_nice); KASSERT(pri = PRI_MIN_BATCH pri = PRI_MAX_BATCH, (sched_priority: invalid priority %d: nice %d, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259835 - stable/9/sys/kern
Author: jhb Date: Tue Dec 24 19:02:04 2013 New Revision: 259835 URL: http://svnweb.freebsd.org/changeset/base/259835 Log: MFC 258869: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_ule.c == --- stable/9/sys/kern/sched_ule.c Tue Dec 24 19:01:08 2013 (r259834) +++ stable/9/sys/kern/sched_ule.c Tue Dec 24 19:02:04 2013 (r259835) @@ -1499,7 +1499,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td-td_sched-ts_ticks) pri += min(SCHED_PRI_TICKS(td-td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td-td_proc-p_nice); KASSERT(pri = PRI_MIN_BATCH pri = PRI_MAX_BATCH, (sched_priority: invalid priority %d: nice %d, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259836 - stable/8/sys/kern
Author: jhb Date: Tue Dec 24 19:03:30 2013 New Revision: 259836 URL: http://svnweb.freebsd.org/changeset/base/259836 Log: MFC 258869: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_ule.c == --- stable/8/sys/kern/sched_ule.c Tue Dec 24 19:02:04 2013 (r259835) +++ stable/8/sys/kern/sched_ule.c Tue Dec 24 19:03:30 2013 (r259836) @@ -1488,7 +1488,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td-td_sched-ts_ticks) pri += min(SCHED_PRI_TICKS(td-td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td-td_proc-p_nice); KASSERT(pri = PRI_MIN_BATCH pri = PRI_MAX_BATCH, (sched_priority: invalid priority %d: nice %d, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259837 - in stable/10: sys/x86/include usr.sbin/bhyve
Author: jhb Date: Tue Dec 24 19:10:56 2013 New Revision: 259837 URL: http://svnweb.freebsd.org/changeset/base/259837 Log: MFC 259013: Fix the processor table entry structure to use a fixed-width type for 32-bit fields so it is the correct size on amd64. Remove a workaround for the broken structure from bhyve(8). Modified: stable/10/sys/x86/include/mptable.h stable/10/usr.sbin/bhyve/mptbl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/mptable.h == --- stable/10/sys/x86/include/mptable.h Tue Dec 24 19:03:30 2013 (r259836) +++ stable/10/sys/x86/include/mptable.h Tue Dec 24 19:10:56 2013 (r259837) @@ -85,10 +85,10 @@ typedef struct PROCENTRY { u_char apic_id; u_char apic_version; u_char cpu_flags; - u_long cpu_signature; - u_long feature_flags; - u_long reserved1; - u_long reserved2; + u_int32_t cpu_signature; + u_int32_t feature_flags; + u_int32_t reserved1; + u_int32_t reserved2; } *proc_entry_ptr; #define PROCENTRY_FLAG_EN 0x01 Modified: stable/10/usr.sbin/bhyve/mptbl.c == --- stable/10/usr.sbin/bhyve/mptbl.cTue Dec 24 19:03:30 2013 (r259836) +++ stable/10/usr.sbin/bhyve/mptbl.cTue Dec 24 19:10:56 2013 (r259837) @@ -74,19 +74,6 @@ __FBSDID($FreeBSD$); /* Number of i/o intr entries */ #defineMPEII_MAX_IRQ 16 -/* Define processor entry struct since x86/mptable.h gets it wrong */ -typedef struct BPROCENTRY { - u_char type; - u_char apic_id; - u_char apic_version; - u_char cpu_flags; - uint32_tcpu_signature; - uint32_tfeature_flags; - uint32_treserved1; - uint32_treserved2; -} *bproc_entry_ptr; -CTASSERT(sizeof(struct BPROCENTRY) == 20); - /* Bus entry defines */ #define MPE_NUM_BUSES 2 #define MPE_BUSNAME_LEN6 @@ -134,7 +121,7 @@ mpt_build_mpch(mpcth_t mpch) } static void -mpt_build_proc_entries(bproc_entry_ptr mpep, int ncpu) +mpt_build_proc_entries(proc_entry_ptr mpep, int ncpu) { int i; @@ -247,7 +234,7 @@ mptable_build(struct vmctx *ctx, int ncp mpcth_t mpch; bus_entry_ptr mpeb; io_apic_entry_ptr mpei; - bproc_entry_ptr mpep; + proc_entry_ptr mpep; mpfps_t mpfp; int_entry_ptr mpie; char*curraddr; @@ -268,7 +255,7 @@ mptable_build(struct vmctx *ctx, int ncp mpt_build_mpch(mpch); curraddr += sizeof(*mpch); - mpep = (bproc_entry_ptr)curraddr; + mpep = (proc_entry_ptr)curraddr; mpt_build_proc_entries(mpep, ncpu); curraddr += sizeof(*mpep) * ncpu; mpch-entry_count += ncpu; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259839 - head/sys/netinet
Author: dim Date: Tue Dec 24 20:25:18 2013 New Revision: 259839 URL: http://svnweb.freebsd.org/changeset/base/259839 Log: In sys/netinet/in_mcast.c, inm_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. MFC after: 3 days Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Tue Dec 24 19:58:27 2013(r259838) +++ head/sys/netinet/in_mcast.c Tue Dec 24 20:25:18 2013(r259839) @@ -140,7 +140,9 @@ static int in_getmulti(struct ifnet *, c struct in_multi **); static int inm_get_source(struct in_multi *inm, const in_addr_t haddr, const int noalloc, struct ip_msource **pims); +#ifdef KTR static int inm_is_ifp_detached(const struct in_multi *); +#endif static int inm_merge(struct in_multi *, /*const*/ struct in_mfilter *); static voidinm_purge(struct in_multi *); static voidinm_reap(struct in_multi *); @@ -187,6 +189,7 @@ static STAILQ_HEAD(, ip_moptions) imo_gc STAILQ_HEAD_INITIALIZER(imo_gc_list); static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -209,6 +212,7 @@ inm_is_ifp_detached(const struct in_mult return (ifp == NULL); } +#endif /* * Initialize an in_mfilter structure to a known state at t0, t1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259840 - head/sys/netinet6
Author: dim Date: Tue Dec 24 20:30:13 2013 New Revision: 259840 URL: http://svnweb.freebsd.org/changeset/base/259840 Log: In sys/netinet6/in6_mcast.c, in6m_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. MFC after:3 days Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c == --- head/sys/netinet6/in6_mcast.c Tue Dec 24 20:25:18 2013 (r259839) +++ head/sys/netinet6/in6_mcast.c Tue Dec 24 20:30:13 2013 (r259840) @@ -132,7 +132,9 @@ static int in6_mc_get(struct ifnet *, co static int in6m_get_source(struct in6_multi *inm, const struct in6_addr *addr, const int noalloc, struct ip6_msource **pims); +#ifdef KTR static int in6m_is_ifp_detached(const struct in6_multi *); +#endif static int in6m_merge(struct in6_multi *, /*const*/ struct in6_mfilter *); static voidin6m_purge(struct in6_multi *); static voidin6m_reap(struct in6_multi *); @@ -176,6 +178,7 @@ static SYSCTL_NODE(_net_inet6_ip6_mcast, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip6_mcast_filters, Per-interface stack-wide source filters); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -198,6 +201,7 @@ in6m_is_ifp_detached(const struct in6_mu return (ifp == NULL); } +#endif /* * Initialize an in6_mfilter structure to a known state at t0, t1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259841 - in head/contrib/gcc: . config
Author: pfg Date: Tue Dec 24 20:42:48 2013 New Revision: 259841 URL: http://svnweb.freebsd.org/changeset/base/259841 Log: gcc: Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is defined. Obtained from:gcc 4.3 (rev. 118826; GPLv2) MFC after:2 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/config/darwin.c head/contrib/gcc/config/darwin.h head/contrib/gcc/dwarf2out.c Modified: head/contrib/gcc/ChangeLog.gcc43 == --- head/contrib/gcc/ChangeLog.gcc43Tue Dec 24 20:30:13 2013 (r259840) +++ head/contrib/gcc/ChangeLog.gcc43Tue Dec 24 20:42:48 2013 (r259841) @@ -550,6 +550,37 @@ (override_options): Add entries for Core2. (ix86_issue_rate): Add case for Core2. +2006-11-14 Caroline Tice ct...@apple.com (r118826) + + * dwarf2out.c (debug_pubtypes_section): New static global variable. + (pubname_entry): Add DEF_VEC_O and DEF_VEC_ALLOC_O statements for + this type. + (pubname_table): Redefine as a vector. + (pubtype_table): New static global variable, defined as a vector. + (pubname_table_allocated): Remove static global variable. + (pubname_table_in_use): Remove static global variable. + (PUBNAME_TABLE_INCREMENT): Remove constant. + (size_of_pubnames): Add parameter to deal with either pubnames or + pubtypes, and change code to deal with table being a vector. + (add_pubname): Change to deal with table being a vector. + (add_pubtype): New function. + (output_pubnames): Add parameter to deal with either pubnames or + pubtypes, and change code to deal with table being a vector. + (gen_array_type_die): Add call to add_pubtype. + (gen_enumeration_type_die): Add call to add_pubtype. + (gen_struct_or_union_type_die): Add call to add_pubtype. + (gen_subroutine_type_die): Add call to add_pubtype. + (gen_typedef_die): Add call to add_pubtype. + (dwarf2out_init): Add code to initialize pubname_table and + pubtype_table vectors; also initialize debug_pubtypes_section. + (prune_unused_types): Change to deal with pubnames being a vector. + (dwarf2out_finish): Change to deal with pubnames being a vector; add + pubnames table to call to output_pubnames; Add code to output pubtypes + table if DEBUG_PUBTYPES_SECTION is defined. + * config/darwin.c (darwin_file_start): Add DEBUG_PUBTYPES_SECTION to + debugnames. + * config/darwin.h (DEBUG_PUBTYPES_SECTION): Define new global variable. + 2006-11-07 Eric Christopher echri...@apple.com (r118576) * libgcc2.c (__bswapdi2): Rename from bswapDI2. Modified: head/contrib/gcc/config/darwin.c == --- head/contrib/gcc/config/darwin.cTue Dec 24 20:30:13 2013 (r259840) +++ head/contrib/gcc/config/darwin.cTue Dec 24 20:42:48 2013 (r259841) @@ -1517,6 +1517,7 @@ darwin_file_start (void) DEBUG_LINE_SECTION, DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, + DEBUG_PUBTYPES_SECTION, DEBUG_STR_SECTION, DEBUG_RANGES_SECTION }; Modified: head/contrib/gcc/config/darwin.h == --- head/contrib/gcc/config/darwin.hTue Dec 24 20:30:13 2013 (r259840) +++ head/contrib/gcc/config/darwin.hTue Dec 24 20:42:48 2013 (r259841) @@ -401,6 +401,7 @@ extern GTY(()) int darwin_ms_struct; #define DEBUG_LINE_SECTION __DWARF,__debug_line,regular,debug #define DEBUG_LOC_SECTION __DWARF,__debug_loc,regular,debug #define DEBUG_PUBNAMES_SECTION __DWARF,__debug_pubnames,regular,debug +#define DEBUG_PUBTYPES_SECTION __DWARF,__debug_pubtypes,regular,debug #define DEBUG_STR_SECTION __DWARF,__debug_str,regular,debug #define DEBUG_RANGES_SECTION __DWARF,__debug_ranges,regular,debug Modified: head/contrib/gcc/dwarf2out.c == --- head/contrib/gcc/dwarf2out.cTue Dec 24 20:30:13 2013 (r259840) +++ head/contrib/gcc/dwarf2out.cTue Dec 24 20:42:48 2013 (r259841) @@ -156,6 +156,7 @@ static GTY(()) section *debug_macinfo_se static GTY(()) section *debug_line_section; static GTY(()) section *debug_loc_section; static GTY(()) section *debug_pubnames_section; +static GTY(()) section *debug_pubtypes_section; static GTY(()) section *debug_str_section; static GTY(()) section *debug_ranges_section; static GTY(()) section *debug_frame_section; @@ -3759,6 +3760,9 @@ typedef struct pubname_struct GTY(()) } pubname_entry; +DEF_VEC_O(pubname_entry); +DEF_VEC_ALLOC_O(pubname_entry, gc); + struct dw_ranges_struct GTY(()) { int block_num; @@ -3940,17
svn commit: r259842 - head/sys/rpc
Author: dim Date: Tue Dec 24 20:55:22 2013 New Revision: 259842 URL: http://svnweb.freebsd.org/changeset/base/259842 Log: Remove some unused static const strings under sys/rpc, which have never been used since the initial commit (r177633). MFC after:3 days Modified: head/sys/rpc/clnt_dg.c head/sys/rpc/clnt_vc.c Modified: head/sys/rpc/clnt_dg.c == --- head/sys/rpc/clnt_dg.c Tue Dec 24 20:42:48 2013(r259841) +++ head/sys/rpc/clnt_dg.c Tue Dec 24 20:55:22 2013(r259842) @@ -92,8 +92,6 @@ static struct clnt_ops clnt_dg_ops = { .cl_control = clnt_dg_control }; -static const char mem_err_clnt_dg[] = clnt_dg_create: out of memory; - /* * A pending RPC request which awaits a reply. Requests which have * received their reply will have cr_xid set to zero and cr_mrep to Modified: head/sys/rpc/clnt_vc.c == --- head/sys/rpc/clnt_vc.c Tue Dec 24 20:42:48 2013(r259841) +++ head/sys/rpc/clnt_vc.c Tue Dec 24 20:55:22 2013(r259842) @@ -107,11 +107,6 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); -static const char clnt_vc_errstr[] = %s : %s; -static const char clnt_vc_str[] = clnt_vc_create; -static const char clnt_read_vc_str[] = read_vc; -static const char __no_mem_str[] = out of memory; - /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259843 - head/sys/rpc
Author: dim Date: Tue Dec 24 20:57:26 2013 New Revision: 259843 URL: http://svnweb.freebsd.org/changeset/base/259843 Log: Move a static const variable to the #if 0 part where it is only used. (Note the #if 0 part has been inactive since the initial commit, r177633, so maybe it should be removed altogether). MFC after:3 days Modified: head/sys/rpc/rpcb_clnt.c Modified: head/sys/rpc/rpcb_clnt.c == --- head/sys/rpc/rpcb_clnt.cTue Dec 24 20:55:22 2013(r259842) +++ head/sys/rpc/rpcb_clnt.cTue Dec 24 20:57:26 2013(r259843) @@ -64,13 +64,13 @@ __FBSDID($FreeBSD$); #include rpc/rpc_com.h static struct timeval tottimeout = { 60, 0 }; -static const struct timeval rmttimeout = { 3, 0 }; static const char nullstring[] = \000; static CLIENT *local_rpcb(void); #if 0 +static const struct timeval rmttimeout = { 3, 0 }; static struct timeval rpcbrmttime = { 15, 0 }; #defineCACHESIZE 6 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259844 - head/bin/sh
Author: jilles Date: Tue Dec 24 22:04:44 2013 New Revision: 259844 URL: http://svnweb.freebsd.org/changeset/base/259844 Log: sh: Remove an unused variable. Modified: head/bin/sh/var.c Modified: head/bin/sh/var.c == --- head/bin/sh/var.c Tue Dec 24 20:57:26 2013(r259843) +++ head/bin/sh/var.c Tue Dec 24 22:04:44 2013(r259844) @@ -92,7 +92,6 @@ struct var vppid; struct var vps1; struct var vps2; struct var vps4; -struct var vvers; static struct var voptind; struct var vdisvfork; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259845 - head/sys/fs/nfsserver
Author: rmacklem Date: Tue Dec 24 22:24:17 2013 New Revision: 259845 URL: http://svnweb.freebsd.org/changeset/base/259845 Log: An intermittent problem with NFSv4 exporting of ZFS snapshots was reported to the freebsd-fs mailing list. I believe the problem was caused by the Readdir operation using VFS_VGET() for a snapshot file entry instead of VOP_LOOKUP(). This would not occur for NFSv3, since it will do a VFS_VGET() of . which fails with ENOTSUPP at the beginning of the directory, whereas NFSv4 does not check . or ... This patch adds a call to VFS_VGET() for the directory being read to check for ENOTSUPP. I also observed that the mount_on_fileid and fsid attributes were not correct at the snapshot's auto mountpoints when looking at packet traces for the Readdir. This patch fixes the attributes by doing a check for different v_mount structure, even if the vnode v_mountedhere is not set. Reported by: j...@cse.yorku.ca Tested by:j...@cse.yorku.ca Reviewed by: asomers MFC after:1 week Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c == --- head/sys/fs/nfsserver/nfs_nfsdport.cTue Dec 24 22:04:44 2013 (r259844) +++ head/sys/fs/nfsserver/nfs_nfsdport.cTue Dec 24 22:24:17 2013 (r259845) @@ -1984,6 +1984,27 @@ again: } /* +* Check to see if entries in this directory can be safely acquired +* via VFS_VGET() or if a switch to VOP_LOOKUP() is required. +* ZFS snapshot directories need VOP_LOOKUP(), so that any +* automount of the snapshot directory that is required will +* be done. +* This needs to be done here for NFSv4, since NFSv4 never does +* a VFS_VGET() for . or ... +*/ + if (not_zfs == 0) { + r = VFS_VGET(mp, at.na_fileid, LK_SHARED, nvp); + if (r == EOPNOTSUPP) { + usevget = 0; + cn.cn_nameiop = LOOKUP; + cn.cn_lkflags = LK_SHARED | LK_RETRY; + cn.cn_cred = nd-nd_cred; + cn.cn_thread = p; + } else if (r == 0) + vput(nvp); + } + + /* * Save this position, in case there is an error before one entry * is created. */ @@ -2120,6 +2141,22 @@ again: if (!r) r = nfsvno_getattr(nvp, nvap, nd-nd_cred, p, 1); + if (r == 0 not_zfs == 0 + nfsrv_enable_crossmntpt != 0 + (nd-nd_flag ND_NFSV4) != 0 + nvp-v_type == VDIR + vp-v_mount != nvp-v_mount) { + /* +* For a ZFS snapshot, there is a +* pseudo mount that does not set +* v_mountedhere, so it needs to +* be detected via a different +* mount structure. +*/ + at_root = 1; + if (new_mp == mp) + new_mp = nvp-v_mount; + } } } else { nvp = NULL; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259846 - in head/bin/sh: . tests/parameters
Author: jilles Date: Tue Dec 24 22:38:24 2013 New Revision: 259846 URL: http://svnweb.freebsd.org/changeset/base/259846 Log: sh: Initialize OPTIND=1 even if it came from the environment. Added: head/bin/sh/tests/parameters/optind2.0 (contents, props changed) Modified: head/bin/sh/tests/parameters/Makefile head/bin/sh/var.c Modified: head/bin/sh/tests/parameters/Makefile == --- head/bin/sh/tests/parameters/Makefile Tue Dec 24 22:24:17 2013 (r259845) +++ head/bin/sh/tests/parameters/Makefile Tue Dec 24 22:38:24 2013 (r259846) @@ -10,6 +10,7 @@ FILES+= exitstatus1.0 FILES+=mail1.0 FILES+=mail2.0 FILES+=optind1.0 +FILES+=optind2.0 FILES+=positional1.0 FILES+=positional2.0 FILES+=pwd1.0 Added: head/bin/sh/tests/parameters/optind2.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parameters/optind2.0 Tue Dec 24 22:38:24 2013 (r259846) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +[ $(OPTIND=42 ${SH} -c 'printf %s $OPTIND') = 1 ] Modified: head/bin/sh/var.c == --- head/bin/sh/var.c Tue Dec 24 22:24:17 2013(r259845) +++ head/bin/sh/var.c Tue Dec 24 22:38:24 2013(r259846) @@ -188,6 +188,7 @@ initvar(void) setvareq(*envp, VEXPORT|VTEXTFIXED); } } + setvareq(OPTIND=1, VTEXTFIXED); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259847 - stable/10/sys/kern
Author: ae Date: Tue Dec 24 23:23:44 2013 New Revision: 259847 URL: http://svnweb.freebsd.org/changeset/base/259847 Log: MFC r259520: Fix copy/paste typo. Modified: stable/10/sys/kern/kern_jail.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_jail.c == --- stable/10/sys/kern/kern_jail.c Tue Dec 24 22:38:24 2013 (r259846) +++ stable/10/sys/kern/kern_jail.c Tue Dec 24 23:23:44 2013 (r259847) @@ -3046,7 +3046,7 @@ prison_restrict_ip6(struct prison *pr, s ii++; continue; } - switch (ij = ppr-pr_ip4s ? -1 : + switch (ij = ppr-pr_ip6s ? -1 : qcmp_v6(pr-pr_ip6[ii], ppr-pr_ip6[ij])) { case -1: bcopy(pr-pr_ip6 + ii + 1, pr-pr_ip6 + ii, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259848 - stable/9/sys/kern
Author: ae Date: Tue Dec 24 23:26:59 2013 New Revision: 259848 URL: http://svnweb.freebsd.org/changeset/base/259848 Log: MFC r259520: Fix copy/paste typo. Modified: stable/9/sys/kern/kern_jail.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_jail.c == --- stable/9/sys/kern/kern_jail.c Tue Dec 24 23:23:44 2013 (r259847) +++ stable/9/sys/kern/kern_jail.c Tue Dec 24 23:26:59 2013 (r259848) @@ -3059,7 +3059,7 @@ prison_restrict_ip6(struct prison *pr, s ii++; continue; } - switch (ij = ppr-pr_ip4s ? -1 : + switch (ij = ppr-pr_ip6s ? -1 : qcmp_v6(pr-pr_ip6[ii], ppr-pr_ip6[ij])) { case -1: bcopy(pr-pr_ip6 + ii + 1, pr-pr_ip6 + ii, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259849 - stable/8/sys/kern
Author: ae Date: Tue Dec 24 23:50:35 2013 New Revision: 259849 URL: http://svnweb.freebsd.org/changeset/base/259849 Log: MFC r259520: Fix copy/paste typo. Modified: stable/8/sys/kern/kern_jail.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_jail.c == --- stable/8/sys/kern/kern_jail.c Tue Dec 24 23:26:59 2013 (r259848) +++ stable/8/sys/kern/kern_jail.c Tue Dec 24 23:50:35 2013 (r259849) @@ -2959,7 +2959,7 @@ prison_restrict_ip6(struct prison *pr, s ii++; continue; } - switch (ij = ppr-pr_ip4s ? -1 : + switch (ij = ppr-pr_ip6s ? -1 : qcmp_v6(pr-pr_ip6[ii], ppr-pr_ip6[ij])) { case -1: bcopy(pr-pr_ip6 + ii + 1, pr-pr_ip6 + ii, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259850 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
Author: delphij Date: Wed Dec 25 00:39:04 2013 New Revision: 259850 URL: http://svnweb.freebsd.org/changeset/base/259850 Log: MFV r258384: 2583 Add -p (parsable) option to zfs list illumos/illumos-gate@43d68d68c1ce08fb35026bebfb141af422e7082e MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Dec 24 23:50:35 2013 (r259849) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Dec 25 00:39:04 2013 (r259850) @@ -29,7 +29,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 23, 2013 +.Dd December 24, 2013 .Dt ZFS 8 .Os .Sh NAME @@ -102,7 +102,7 @@ .Nm .Cm list .Op Fl r Ns | Ns Fl d Ar depth -.Op Fl H +.Op Fl Hp .Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ... .Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ... .Oo Fl s Ar property Oc Ns ... @@ -1807,7 +1807,7 @@ only dataset that can be renamed recursi .Nm .Cm list .Op Fl r Ns | Ns Fl d Ar depth -.Op Fl H +.Op Fl Hp .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Oo Fl s Ar property Oc Ns ... @@ -1838,6 +1838,8 @@ will display only the dataset and its di .It Fl H Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space. +.It Fl p +Display numbers in parsable (exact) values. .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... A comma-separated list of properties to display. The property must be: .Bl -bullet -offset 2n @@ -1978,7 +1980,7 @@ Display output in a form more easily par omitted, and fields are explicitly separated by a single tab instead of an arbitrary amount of space. .It Fl p -Display numbers in parseable (exact) values. +Display numbers in parsable (exact) values. .It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ... A comma-separated list of columns to display. Supported values are .Sy name,property,value,received,source . @@ -2820,7 +2822,7 @@ option of .It \P Ta event port (not supported on Fx ) .El .It Fl H -Give more parseable tab-separated output, without header lines and without +Give more parsable tab-separated output, without header lines and without arrows. .It Fl t Display the path's inode change time as the first column of output. Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cTue Dec 24 23:50:35 2013(r259849) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cWed Dec 25 00:39:04 2013(r259850) @@ -18,10 +18,12 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek pa...@dawidek.net. * All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #include libintl.h @@ -109,7 +111,8 @@ zfs_callback(zfs_handle_t *zhp, void *da cb-cb_props_table); if (zfs_expand_proplist(zhp, cb-cb_proplist, - (cb-cb_flags ZFS_ITER_RECVD_PROPS)) + (cb-cb_flags ZFS_ITER_RECVD_PROPS), + (cb-cb_flags ZFS_ITER_LITERAL_PROPS)) != 0) { free(node); return (-1); Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.hTue Dec 24 23:50:35 2013(r259849) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.hWed Dec 25 00:39:04 2013(r259850) @@ -18,9 +18,11 @@ * * CDDL HEADER END */ + /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #ifndefZFS_ITER_H @@ -44,6 +46,7 @@ typedef struct zfs_sort_column { #defineZFS_ITER_DEPTH_LIMIT (1 3) #defineZFS_ITER_RECVD_PROPS (1 4) #defineZFS_ITER_SIMPLE(1 5) +#defineZFS_ITER_LITERAL_PROPS (1 6) int zfs_for_each(int, char **, int
svn commit: r259851 - in stable: 10/gnu/lib/csu 9/gnu/lib/csu
Author: dim Date: Wed Dec 25 00:40:42 2013 New Revision: 259851 URL: http://svnweb.freebsd.org/changeset/base/259851 Log: MFC r259720: For gnu/lib/csu, only use gcc-specific flags when compiling with gcc. Modified: stable/10/gnu/lib/csu/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/gnu/lib/csu/Makefile Directory Properties: stable/9/gnu/lib/csu/ (props changed) Modified: stable/10/gnu/lib/csu/Makefile == --- stable/10/gnu/lib/csu/Makefile Wed Dec 25 00:39:04 2013 (r259850) +++ stable/10/gnu/lib/csu/Makefile Wed Dec 25 00:40:42 2013 (r259851) @@ -15,10 +15,12 @@ OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbeginS.o crtendS.o CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -CFLAGS+= -finhibit-size-directive -fno-inline-functions \ - -fno-exceptions -fno-zero-initialized-in-bss \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder \ - -fno-asynchronous-unwind-tables -fno-omit-frame-pointer +.if ${COMPILER_TYPE} == gcc +CFLAGS+= -finhibit-size-directive -fno-toplevel-reorder +.endif +CFLAGS+= -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ + -fno-omit-frame-pointer CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259851 - in stable: 10/gnu/lib/csu 9/gnu/lib/csu
Author: dim Date: Wed Dec 25 00:40:42 2013 New Revision: 259851 URL: http://svnweb.freebsd.org/changeset/base/259851 Log: MFC r259720: For gnu/lib/csu, only use gcc-specific flags when compiling with gcc. Modified: stable/9/gnu/lib/csu/Makefile Directory Properties: stable/9/gnu/lib/csu/ (props changed) Changes in other areas also in this revision: Modified: stable/10/gnu/lib/csu/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/gnu/lib/csu/Makefile == --- stable/9/gnu/lib/csu/Makefile Wed Dec 25 00:39:04 2013 (r259850) +++ stable/9/gnu/lib/csu/Makefile Wed Dec 25 00:40:42 2013 (r259851) @@ -15,10 +15,12 @@ OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbegin.So crtend.So CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -CFLAGS+= -finhibit-size-directive -fno-inline-functions \ - -fno-exceptions -fno-zero-initialized-in-bss \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder \ - -fno-asynchronous-unwind-tables -fno-omit-frame-pointer +.if ${COMPILER_TYPE} == gcc +CFLAGS+= -finhibit-size-directive -fno-toplevel-reorder +.endif +CFLAGS+= -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ + -fno-omit-frame-pointer CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259852 - in stable: 10/contrib/file 8/contrib/file 9/contrib/file
Author: dim Date: Wed Dec 25 00:48:08 2013 New Revision: 259852 URL: http://svnweb.freebsd.org/changeset/base/259852 Log: MFC r259724: Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. Modified: stable/10/contrib/file/compress.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/contrib/file/compress.c stable/9/contrib/file/compress.c Directory Properties: stable/8/contrib/file/ (props changed) stable/9/contrib/file/ (props changed) Modified: stable/10/contrib/file/compress.c == --- stable/10/contrib/file/compress.c Wed Dec 25 00:40:42 2013 (r259851) +++ stable/10/contrib/file/compress.c Wed Dec 25 00:48:08 2013 (r259852) @@ -480,7 +480,7 @@ uncompressbuf(struct magic_set *ms, int #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259852 - in stable: 10/contrib/file 8/contrib/file 9/contrib/file
Author: dim Date: Wed Dec 25 00:48:08 2013 New Revision: 259852 URL: http://svnweb.freebsd.org/changeset/base/259852 Log: MFC r259724: Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. Modified: stable/8/contrib/file/compress.c Directory Properties: stable/8/contrib/file/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/file/compress.c stable/9/contrib/file/compress.c Directory Properties: stable/10/ (props changed) stable/9/contrib/file/ (props changed) Modified: stable/8/contrib/file/compress.c == --- stable/8/contrib/file/compress.cWed Dec 25 00:40:42 2013 (r259851) +++ stable/8/contrib/file/compress.cWed Dec 25 00:48:08 2013 (r259852) @@ -470,7 +470,7 @@ uncompressbuf(struct magic_set *ms, int #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259852 - in stable: 10/contrib/file 8/contrib/file 9/contrib/file
Author: dim Date: Wed Dec 25 00:48:08 2013 New Revision: 259852 URL: http://svnweb.freebsd.org/changeset/base/259852 Log: MFC r259724: Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. Modified: stable/9/contrib/file/compress.c Directory Properties: stable/9/contrib/file/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/file/compress.c stable/8/contrib/file/compress.c Directory Properties: stable/10/ (props changed) stable/8/contrib/file/ (props changed) Modified: stable/9/contrib/file/compress.c == --- stable/9/contrib/file/compress.cWed Dec 25 00:40:42 2013 (r259851) +++ stable/9/contrib/file/compress.cWed Dec 25 00:48:08 2013 (r259852) @@ -480,7 +480,7 @@ uncompressbuf(struct magic_set *ms, int #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259853 - stable/10/usr.bin/sort
Author: dim Date: Wed Dec 25 00:53:48 2013 New Revision: 259853 URL: http://svnweb.freebsd.org/changeset/base/259853 Log: MFC r259740: In usr.bin/sort/radixsort.c, pop_ls_mt() is only referenced if SORT_THREADS is defined, so make the whole function conditional, instead of just the pthread calls in it. Modified: stable/10/usr.bin/sort/radixsort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sort/radixsort.c == --- stable/10/usr.bin/sort/radixsort.c Wed Dec 25 00:48:08 2013 (r259852) +++ stable/10/usr.bin/sort/radixsort.c Wed Dec 25 00:53:48 2013 (r259853) @@ -171,6 +171,8 @@ pop_ls_st(void) return (sl); } +#if defined(SORT_THREADS) + /* * Pop sort level from the stack (multi-threaded style) */ @@ -180,9 +182,7 @@ pop_ls_mt(void) struct level_stack *saved_ls; struct sort_level *sl; -#if defined(SORT_THREADS) pthread_mutex_lock(g_ls_mutex); -#endif if (g_ls) { sl = g_ls-sl; @@ -193,15 +193,15 @@ pop_ls_mt(void) saved_ls = NULL; } -#if defined(SORT_THREADS) pthread_mutex_unlock(g_ls_mutex); -#endif sort_free(saved_ls); return (sl); } +#endif /* defined(SORT_THREADS) */ + static void add_to_sublevel(struct sort_level *sl, struct sort_list_item *item, size_t indx) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259854 - in head/sys/fs: nfs nfsserver
Author: rmacklem Date: Wed Dec 25 01:03:14 2013 New Revision: 259854 URL: http://svnweb.freebsd.org/changeset/base/259854 Log: The NFSv4 server would call VOP_SETATTR() with a shared locked vnode when a Getattr for a file is done by a client other than the one that holds the file's delegation. This would only happen when delegations are enabled and the problem is fixed by this patch. MFC after:1 week Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfs_var.h == --- head/sys/fs/nfs/nfs_var.h Wed Dec 25 00:53:48 2013(r259853) +++ head/sys/fs/nfs/nfs_var.h Wed Dec 25 01:03:14 2013(r259854) @@ -613,7 +613,7 @@ void nfsvno_open(struct nfsrv_descript * nfsv4stateid_t *, struct nfsstate *, int *, struct nfsvattr *, int32_t *, int, NFSACL_T *, nfsattrbit_t *, struct ucred *, NFSPROC_T *, struct nfsexstuff *, vnode_t *); -void nfsvno_updfilerev(vnode_t, struct nfsvattr *, struct ucred *, +int nfsvno_updfilerev(vnode_t, struct nfsvattr *, struct ucred *, NFSPROC_T *); int nfsvno_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, struct nfsvattr *, fhandle_t *, int, nfsattrbit_t *, Modified: head/sys/fs/nfsserver/nfs_nfsdport.c == --- head/sys/fs/nfsserver/nfs_nfsdport.cWed Dec 25 00:53:48 2013 (r259853) +++ head/sys/fs/nfsserver/nfs_nfsdport.cWed Dec 25 01:03:14 2013 (r259854) @@ -1469,8 +1469,9 @@ nfsvno_open(struct nfsrv_descript *nd, s * Updates the file rev and sets the mtime and ctime * to the current clock time, returning the va_filerev and va_Xtime * values. + * Return ESTALE to indicate the vnode is VI_DOOMED. */ -void +int nfsvno_updfilerev(struct vnode *vp, struct nfsvattr *nvap, struct ucred *cred, struct thread *p) { @@ -1478,8 +1479,14 @@ nfsvno_updfilerev(struct vnode *vp, stru VATTR_NULL(va); vfs_timestamp(va.va_mtime); + if (NFSVOPISLOCKED(vp) != LK_EXCLUSIVE) { + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); + if ((vp-v_iflag VI_DOOMED) != 0) + return (ESTALE); + } (void) VOP_SETATTR(vp, va, cred); (void) nfsvno_getattr(vp, nvap, cred, p, 1); + return (0); } /* Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c == --- head/sys/fs/nfsserver/nfs_nfsdstate.c Wed Dec 25 00:53:48 2013 (r259853) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Wed Dec 25 01:03:14 2013 (r259854) @@ -4853,15 +4853,15 @@ nfsrv_checkgetattr(struct nfsrv_descript nva.na_filerev delegfilerev) || (NFSVNO_ISSETSIZE(nva) nva.na_size != nvap-na_size)) { - nfsvno_updfilerev(vp, nvap, cred, p); + error = nfsvno_updfilerev(vp, nvap, cred, p); if (NFSVNO_ISSETSIZE(nva)) nvap-na_size = nva.na_size; } - } + } else + error = 0; /* Ignore callback errors for now. */ } else { NFSUNLOCKSTATE(); } - error = 0; out: NFSEXITCODE2(error, nd); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259855 - head/usr.sbin/ndiscvt
Author: glebius Date: Wed Dec 25 01:20:14 2013 New Revision: 259855 URL: http://svnweb.freebsd.org/changeset/base/259855 Log: We have in base iconv. PR: 185135 Submitted by: Lars Engels lars 0x20.net Modified: head/usr.sbin/ndiscvt/ndisgen.sh Modified: head/usr.sbin/ndiscvt/ndisgen.sh == --- head/usr.sbin/ndiscvt/ndisgen.shWed Dec 25 01:03:14 2013 (r259854) +++ head/usr.sbin/ndiscvt/ndisgen.shWed Dec 25 01:20:14 2013 (r259855) @@ -493,7 +493,7 @@ convert_driver () { return } -ICONVPATH=/usr/local/bin/iconv +ICONVPATH=/usr/bin/iconv NDISCVT=/usr/sbin/ndiscvt STUBPATH=/usr/share/misc STUBFILE=windrv_stub.c ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259860 - head/sys/dev/isp
Author: mjacob Date: Wed Dec 25 04:51:56 2013 New Revision: 259860 URL: http://svnweb.freebsd.org/changeset/base/259860 Log: Harvest one no longer used constant string. Remove another and place it into play in the normally ifdef protected zone it would be used int. Noticed by: dim Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Wed Dec 25 03:24:20 2013(r259859) +++ head/sys/dev/isp/isp.c Wed Dec 25 04:51:56 2013(r259860) @@ -75,7 +75,6 @@ __FBSDID($FreeBSD$); static const char fconf[] = Chan %d PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x); static const char notresp[] = Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d; static const char topology[] = Chan %d WWPN 0x%08x%08x PortID 0x%06x N-Port Handle %d, Connection '%s'; -static const char sc4[] = NVRAM; static const char bun[] = bad underrun (count %d, resid %d, status %s); static const char lipd[] = Chan %d LIP destroyed %d active commands; static const char sacq[] = unable to acquire scratch area; Modified: head/sys/dev/isp/isp_freebsd.c == --- head/sys/dev/isp/isp_freebsd.c Wed Dec 25 03:24:20 2013 (r259859) +++ head/sys/dev/isp/isp_freebsd.c Wed Dec 25 04:51:56 2013 (r259860) @@ -56,7 +56,6 @@ int isp_quickboot_time = 7; /* don't wai int isp_gone_device_time = 30; /* grace time before reporting device lost */ int isp_autoconfig = 1;/* automatically attach/detach devices */ static const char prom3[] = Chan %d PortID 0x%06x Departed from Target %u because of %s; -static const char rqo[] = %s: Request Queue Overflow\n; static void isp_freeze_loopdown(ispsoftc_t *, int, char *); static d_ioctl_t ispioctl; @@ -2152,7 +2151,8 @@ isp_target_putback_atio(union ccb *ccb) qe = isp_getrqentry(isp); if (qe == NULL) { - xpt_print(ccb-ccb_h.path, rqo, __func__); + xpt_print(ccb-ccb_h.path, + %s: Request Queue Overflow\n, __func__); (void) timeout(isp_refire_putback_atio, ccb, 10); return; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259859 - head/sys/netinet/libalias
Author: glebius Date: Wed Dec 25 03:24:20 2013 New Revision: 259859 URL: http://svnweb.freebsd.org/changeset/base/259859 Log: Cleanup alias module handler register/unregister. - Remove locking, since all module(9) events are running under Giant. - Use TAILQ for protocol handlers and fix a bug which led to infinite cycle. Bug found in VirtualBox [1] - Simplify code everywhere. - Fix documentation. [1] https://www.virtualbox.org/pipermail/vbox-dev/2013-November/011936.html PR: 183792 [1] Submitted by: Valery Ushakov uwe NetBSD.org [1] Sponsored by: Nginx, Inc. Modified: head/sys/netinet/libalias/alias_db.c head/sys/netinet/libalias/alias_mod.c head/sys/netinet/libalias/alias_mod.h head/sys/netinet/libalias/libalias.3 Modified: head/sys/netinet/libalias/alias_db.c == --- head/sys/netinet/libalias/alias_db.cWed Dec 25 02:06:57 2013 (r259858) +++ head/sys/netinet/libalias/alias_db.cWed Dec 25 03:24:20 2013 (r259859) @@ -349,24 +349,16 @@ MODULE_VERSION(libalias, 1); static int alias_mod_handler(module_t mod, int type, void *data) { - int error; switch (type) { - case MOD_LOAD: - error = 0; - handler_chain_init(); - break; case MOD_QUIESCE: case MOD_UNLOAD: - handler_chain_destroy(); finishoff(); - error = 0; - break; + case MOD_LOAD: + return (0); default: - error = EINVAL; + return (EINVAL); } - - return (error); } static moduledata_t alias_mod = { Modified: head/sys/netinet/libalias/alias_mod.c == --- head/sys/netinet/libalias/alias_mod.c Wed Dec 25 02:06:57 2013 (r259858) +++ head/sys/netinet/libalias/alias_mod.c Wed Dec 25 03:24:20 2013 (r259859) @@ -52,201 +52,82 @@ __FBSDID($FreeBSD$); #endif /* Protocol and userland module handlers chains. */ -LIST_HEAD(handler_chain, proto_handler) handler_chain = LIST_HEAD_INITIALIZER(handler_chain); -#ifdef _KERNEL -struct rwlock handler_rw; -#endif -SLIST_HEAD(dll_chain, dll) dll_chain = SLIST_HEAD_INITIALIZER(dll_chain); - -#ifdef _KERNEL - -#defineLIBALIAS_RWLOCK_INIT() \ - rw_init(handler_rw, Libalias_modules_rwlock) -#defineLIBALIAS_RWLOCK_DESTROY() rw_destroy(handler_rw) -#defineLIBALIAS_WLOCK_ASSERT() \ - rw_assert(handler_rw, RA_WLOCKED) - -static __inline void -LIBALIAS_RLOCK(void) -{ - rw_rlock(handler_rw); -} - -static __inline void -LIBALIAS_RUNLOCK(void) -{ - rw_runlock(handler_rw); -} - -static __inline void -LIBALIAS_WLOCK(void) -{ - rw_wlock(handler_rw); -} - -static __inline void -LIBALIAS_WUNLOCK(void) -{ - rw_wunlock(handler_rw); -} - -static void -_handler_chain_init(void) -{ - - if (!rw_initialized(handler_rw)) - LIBALIAS_RWLOCK_INIT(); -} - -static void -_handler_chain_destroy(void) -{ - - if (rw_initialized(handler_rw)) - LIBALIAS_RWLOCK_DESTROY(); -} - -#else -#defineLIBALIAS_RWLOCK_INIT() ; -#defineLIBALIAS_RWLOCK_DESTROY() ; -#defineLIBALIAS_WLOCK_ASSERT() ; -#defineLIBALIAS_RLOCK() ; -#defineLIBALIAS_RUNLOCK() ; -#defineLIBALIAS_WLOCK() ; -#defineLIBALIAS_WUNLOCK() ; -#define _handler_chain_init() ; -#define _handler_chain_destroy() ; -#endif - -void -handler_chain_init(void) -{ - _handler_chain_init(); -} - -void -handler_chain_destroy(void) -{ - _handler_chain_destroy(); -} +static TAILQ_HEAD(handler_chain, proto_handler) handler_chain = +TAILQ_HEAD_INITIALIZER(handler_chain); static int -_attach_handler(struct proto_handler *p) +attach_handler(struct proto_handler *p) { struct proto_handler *b; - LIBALIAS_WLOCK_ASSERT(); - b = NULL; - LIST_FOREACH(b, handler_chain, entries) { + TAILQ_FOREACH(b, handler_chain, link) { if ((b-pri == p-pri) (b-dir == p-dir) (b-proto == p-proto)) - return (EEXIST); /* Priority conflict. */ + return (EEXIST); if (b-pri p-pri) { - LIST_INSERT_BEFORE(b, p, entries); + TAILQ_INSERT_BEFORE(b, p, link); return (0); } } - /* End of list or found right position, inserts here. */ - if (b) - LIST_INSERT_AFTER(b, p, entries); - else - LIST_INSERT_HEAD(handler_chain, p, entries); - return (0); -} -static int -_detach_handler(struct proto_handler *p) -{ - struct proto_handler *b, *b_tmp; + TAILQ_INSERT_TAIL(handler_chain, p, link); -
svn commit: r259861 - stable/10/release
Author: gjb Date: Wed Dec 25 06:09:07 2013 New Revision: 259861 URL: http://svnweb.freebsd.org/changeset/base/259861 Log: MFC r259729: Bootstrap etcupdate(8) as part of the release build, similar to what is done for mergemaster(8). This allows etcupdate(8) to work out-of-box after the first upgrade of a system. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile == --- stable/10/release/Makefile Wed Dec 25 04:51:56 2013(r259860) +++ stable/10/release/Makefile Wed Dec 25 06:09:07 2013(r259861) @@ -104,6 +104,8 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} -D ${.OBJDIR}/${DISTDIR}/base + etcupdate extract -B -M TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} \ + -d ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate # Package all components cd ${WORLDDIR} ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259858 - head/sys/netinet/libalias
Author: glebius Date: Wed Dec 25 02:06:57 2013 New Revision: 259858 URL: http://svnweb.freebsd.org/changeset/base/259858 Log: Kill space at eols. Modified: head/sys/netinet/libalias/alias_cuseeme.c head/sys/netinet/libalias/alias_dummy.c head/sys/netinet/libalias/alias_irc.c head/sys/netinet/libalias/alias_nbt.c head/sys/netinet/libalias/alias_pptp.c head/sys/netinet/libalias/alias_skinny.c head/sys/netinet/libalias/alias_smedia.c Modified: head/sys/netinet/libalias/alias_cuseeme.c == --- head/sys/netinet/libalias/alias_cuseeme.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_cuseeme.c Wed Dec 25 02:06:57 2013 (r259858) @@ -56,14 +56,14 @@ __FBSDID($FreeBSD$); #define CUSEEME_PORT_NUMBER 7648 static void -AliasHandleCUSeeMeOut(struct libalias *la, struct ip *pip, +AliasHandleCUSeeMeOut(struct libalias *la, struct ip *pip, struct alias_link *lnk); static void -AliasHandleCUSeeMeIn(struct libalias *la, struct ip *pip, +AliasHandleCUSeeMeIn(struct libalias *la, struct ip *pip, struct in_addr original_addr); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { @@ -74,7 +74,7 @@ fingerprint(struct libalias *la, struct return (-1); } -static int +static int protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -82,7 +82,7 @@ protohandlerin(struct libalias *la, stru return (0); } -static int +static int protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -92,20 +92,20 @@ protohandlerout(struct libalias *la, str /* Kernel module definition. */ struct proto_handler handlers[] = { - { - .pri = 120, - .dir = OUT, - .proto = UDP, - .fingerprint = fingerprint, + { + .pri = 120, + .dir = OUT, + .proto = UDP, + .fingerprint = fingerprint, .protohandler = protohandlerout - }, + }, { - .pri = 120, - .dir = IN, - .proto = UDP, - .fingerprint = fingerprint, + .pri = 120, + .dir = IN, + .proto = UDP, + .fingerprint = fingerprint, .protohandler = protohandlerin - }, + }, { EOH } }; @@ -130,9 +130,9 @@ mod_handler(module_t mod, int type, void } #ifdef _KERNEL -static +static #endif -moduledata_t +moduledata_t alias_mod = { alias_cuseeme, mod_handler, NULL }; Modified: head/sys/netinet/libalias/alias_dummy.c == --- head/sys/netinet/libalias/alias_dummy.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_dummy.c Wed Dec 25 02:06:57 2013 (r259858) @@ -27,7 +27,7 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); -/* +/* * Alias_dummy is just an empty skeleton used to demostrate how to write * a module for libalias, that will run unalterated in userland or in * kernel land. @@ -59,19 +59,19 @@ __FBSDID($FreeBSD$); static void AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { - /* -* Check here all the data that will be used later, if any field + /* +* Check here all the data that will be used later, if any field * is empy/NULL, return a -1 value. */ - if (ah-dport == NULL || ah-sport == NULL || ah-lnk == NULL || + if (ah-dport == NULL || ah-sport == NULL || ah-lnk == NULL || ah-maxpktsize == 0) return (-1); - /* -* Fingerprint the incoming packet, if it matches any conditions + /* +* Fingerprint the incoming packet, if it matches any conditions * return an OK value. */ if (ntohs(*ah-dport) == 123 @@ -80,12 +80,12 @@ fingerprint(struct libalias *la, struct return (-1); /* I don't recognize this packet. */ } -/* - * Wrap in this general purpose function, the real function used to alias the +/* + * Wrap in this general purpose function, the real function used to alias the * packets. */ -static int +static int protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -93,22 +93,22 @@ protohandler(struct libalias *la, struct return (0); } -/* - * NOTA BENE: the next variable MUST NOT be renamed in any case if you want - * your module to work in userland, cause it's used to find and use all +/* + * NOTA BENE: the next variable MUST NOT be renamed in any case if you want + * your module to work in userland, cause it's used to find and use all * the protocol handlers present in every module. - * So WATCH OUT, your module needs this
svn commit: r259862 - stable/9/release
Author: gjb Date: Wed Dec 25 06:09:31 2013 New Revision: 259862 URL: http://svnweb.freebsd.org/changeset/base/259862 Log: MFC r259729: Bootstrap etcupdate(8) as part of the release build, similar to what is done for mergemaster(8). This allows etcupdate(8) to work out-of-box after the first upgrade of a system. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile == --- stable/9/release/Makefile Wed Dec 25 06:09:07 2013(r259861) +++ stable/9/release/Makefile Wed Dec 25 06:09:31 2013(r259862) @@ -103,6 +103,8 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} -D ${.OBJDIR}/${DISTDIR}/base + etcupdate extract -B -M TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} \ + -d ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate # Package all components cd ${WORLDDIR} ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259857 - head/sys/netinet/libalias
Author: glebius Date: Wed Dec 25 01:58:19 2013 New Revision: 259857 URL: http://svnweb.freebsd.org/changeset/base/259857 Log: Remove from kernel the dll code. Modified: head/sys/netinet/libalias/alias_mod.c head/sys/netinet/libalias/alias_mod.h Modified: head/sys/netinet/libalias/alias_mod.c == --- head/sys/netinet/libalias/alias_mod.c Wed Dec 25 01:52:55 2013 (r259856) +++ head/sys/netinet/libalias/alias_mod.c Wed Dec 25 01:58:19 2013 (r259857) @@ -245,8 +245,8 @@ first_handler(void) return (LIST_FIRST(handler_chain)); } +#ifndef _KERNEL /* Dll manipulation code - this code is not thread safe... */ - int attach_dll(struct dll *p) { @@ -288,3 +288,4 @@ walk_dll_chain(void) SLIST_REMOVE_HEAD(dll_chain, next); return (t); } +#endif /* !_KERNEL */ Modified: head/sys/netinet/libalias/alias_mod.h == --- head/sys/netinet/libalias/alias_mod.h Wed Dec 25 01:52:55 2013 (r259856) +++ head/sys/netinet/libalias/alias_mod.h Wed Dec 25 01:58:19 2013 (r259857) @@ -82,8 +82,22 @@ struct proto_handler { int (*protohandler)(struct libalias *, struct ip *, struct alias_data *); LIST_ENTRY(proto_handler) entries; -}; +} +; +/* End of handlers. */ +#define EOH -1 + +/* Functions used with protocol handlers. */ +void handler_chain_init(void); +void handler_chain_destroy(void); +int LibAliasAttachHandlers(struct proto_handler *); +int LibAliasDetachHandlers(struct proto_handler *); +int detach_handler(struct proto_handler *); +int find_handler(int8_t, int8_t, struct libalias *, struct ip *, +struct alias_data *); +struct proto_handler *first_handler(void); +#ifndef _KERNEL /* * Used only in userland when libalias needs to keep track of all * module loaded. In kernel land (kld mode) we don't need to care @@ -101,16 +115,6 @@ struct dll { SLIST_ENTRY(dll)next; }; -/* Functions used with protocol handlers. */ -void handler_chain_init(void); -void handler_chain_destroy(void); -int LibAliasAttachHandlers(struct proto_handler *); -int LibAliasDetachHandlers(struct proto_handler *); -int detach_handler(struct proto_handler *); -int find_handler(int8_t, int8_t, struct libalias *, struct ip *, -struct alias_data *); -struct proto_handler *first_handler(void); - /* Functions used with dll module. */ void dll_chain_init(void); void dll_chain_destroy(void); @@ -118,14 +122,10 @@ int attach_dll(struct dll *); void *detach_dll(char *); struct dll *walk_dll_chain(void); -/* End of handlers. */ -#define EOH -1 - /* * Some defines borrowed from sys/module.h used to compile a kld * in userland as a shared lib. */ -#ifndef _KERNEL typedef enum modeventtype { MOD_LOAD, MOD_UNLOAD, @@ -144,6 +144,6 @@ typedef struct moduledata { modeventhand_t evhand; /* event handler */ void*priv; /* extra data */ } moduledata_t; -#endif +#endif /* !_KERNEL */ #endif /* !_ALIAS_MOD_H_ */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259863 - in head/sys/amd64: include vmm vmm/amd vmm/intel vmm/io
Author: neel Date: Wed Dec 25 06:46:31 2013 New Revision: 259863 URL: http://svnweb.freebsd.org/changeset/base/259863 Log: vlapic code restructuring to make it easy to support hardware-assist for APIC emulation. The vlapic initialization and cleanup is done via processor specific vmm_ops. This will allow the VT-x/SVM modules to layer any hardware-assist for APIC emulation or virtual interrupt delivery on top of the vlapic device model. Add a parameter to 'vcpu_notify_event()' to distinguish between vlapic interrupts versus other events (e.g. NMI). This provides an opportunity to use hardware-assists like Posted Interrupts (VT-x) or doorbell MSR (SVM) to deliver an interrupt to a guest without causing a VM-exit. Get rid of lapic_pending_intr() and lapic_intr_accepted() and use the vlapic_xxx() counterparts directly. Associate an 'Apic Page' with each vcpu and reference it from the 'vlapic'. The 'Apic Page' is intended to be referenced from the Intel VMCS as the 'virtual APIC page' or from the AMD VMCB as the 'vAPIC backing page'. Added: head/sys/amd64/vmm/io/vlapic_priv.h (contents, props changed) Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/amd/amdv.c head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/intel/vmx.h head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_lapic.c head/sys/amd64/vmm/vmm_lapic.h Modified: head/sys/amd64/include/vmm.h == --- head/sys/amd64/include/vmm.hWed Dec 25 06:09:31 2013 (r259862) +++ head/sys/amd64/include/vmm.hWed Dec 25 06:46:31 2013 (r259863) @@ -69,6 +69,8 @@ typedef int (*vmi_get_cap_t)(void *vmi, typedef int(*vmi_set_cap_t)(void *vmi, int vcpu, int num, int val); typedef struct vmspace * (*vmi_vmspace_alloc)(vm_offset_t min, vm_offset_t max); typedef void (*vmi_vmspace_free)(struct vmspace *vmspace); +typedef struct vlapic * (*vmi_vlapic_init)(void *vmi, int vcpu); +typedef void (*vmi_vlapic_cleanup)(void *vmi, struct vlapic *vlapic); struct vmm_ops { vmm_init_func_t init; /* module wide initialization */ @@ -87,6 +89,8 @@ struct vmm_ops { vmi_set_cap_t vmsetcap; vmi_vmspace_alloc vmspace_alloc; vmi_vmspace_freevmspace_free; + vmi_vlapic_init vlapic_init; + vmi_vlapic_cleanup vlapic_cleanup; }; extern struct vmm_ops vmm_ops_intel; @@ -159,7 +163,7 @@ vcpu_is_running(struct vm *vm, int vcpu, } void *vcpu_stats(struct vm *vm, int vcpu); -void vcpu_notify_event(struct vm *vm, int vcpuid); +void vcpu_notify_event(struct vm *vm, int vcpuid, bool lapic_intr); struct vmspace *vm_get_vmspace(struct vm *vm); int vm_assign_pptdev(struct vm *vm, int bus, int slot, int func); int vm_unassign_pptdev(struct vm *vm, int bus, int slot, int func); Modified: head/sys/amd64/vmm/amd/amdv.c == --- head/sys/amd64/vmm/amd/amdv.c Wed Dec 25 06:09:31 2013 (r259862) +++ head/sys/amd64/vmm/amd/amdv.c Wed Dec 25 06:46:31 2013 (r259863) @@ -155,6 +155,20 @@ amdv_vmspace_free(struct vmspace *vmspac return; } +static struct vlapic * +amdv_vlapic_init(void *arg, int vcpuid) +{ + + panic(amdv_vlapic_init: not implmented); +} + +static void +amdv_vlapic_cleanup(void *arg, struct vlapic *vlapic) +{ + + panic(amdv_vlapic_cleanup: not implemented); +} + struct vmm_ops vmm_ops_amd = { amdv_init, amdv_cleanup, @@ -171,6 +185,8 @@ struct vmm_ops vmm_ops_amd = { amdv_setcap, amdv_vmspace_alloc, amdv_vmspace_free, + amdv_vlapic_init, + amdv_vlapic_cleanup, }; static int Modified: head/sys/amd64/vmm/intel/vmx.c == --- head/sys/amd64/vmm/intel/vmx.c Wed Dec 25 06:09:31 2013 (r259862) +++ head/sys/amd64/vmm/intel/vmx.c Wed Dec 25 06:46:31 2013 (r259863) @@ -50,10 +50,11 @@ __FBSDID($FreeBSD$); #include machine/vmm.h #include vmm_host.h -#include vmm_lapic.h #include vmm_msr.h #include vmm_ktr.h #include vmm_stat.h +#include vlapic.h +#include vlapic_priv.h #include vmx_msr.h #include ept.h @@ -112,7 +113,8 @@ __FBSDID($FreeBSD$); #defineHANDLED 1 #defineUNHANDLED 0 -MALLOC_DEFINE(M_VMX, vmx, vmx); +static MALLOC_DEFINE(M_VMX, vmx, vmx); +static MALLOC_DEFINE(M_VLAPIC, vlapic, vlapic); SYSCTL_DECL(_hw_vmm); SYSCTL_NODE(_hw_vmm, OID_AUTO, vmx, CTLFLAG_RW, NULL, NULL); @@ -1033,7 +1035,7 @@ nmiblocked: } static void -vmx_inject_interrupts(struct vmx *vmx, int vcpu) +vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic) { int vector; uint64_t info, rflags, interruptibility; @@ -1059,7
svn commit: r259856 - head/sys/netinet/libalias
Author: glebius Date: Wed Dec 25 01:52:55 2013 New Revision: 259856 URL: http://svnweb.freebsd.org/changeset/base/259856 Log: Whitespace cleanup. Modified: head/sys/netinet/libalias/alias_mod.c head/sys/netinet/libalias/alias_mod.h Modified: head/sys/netinet/libalias/alias_mod.c == --- head/sys/netinet/libalias/alias_mod.c Wed Dec 25 01:20:14 2013 (r259855) +++ head/sys/netinet/libalias/alias_mod.c Wed Dec 25 01:52:55 2013 (r259856) @@ -56,15 +56,15 @@ LIST_HEAD(handler_chain, proto_handler) #ifdef _KERNEL struct rwlock handler_rw; #endif -SLIST_HEAD(dll_chain, dll) dll_chain = SLIST_HEAD_INITIALIZER(dll_chain); +SLIST_HEAD(dll_chain, dll) dll_chain = SLIST_HEAD_INITIALIZER(dll_chain); #ifdef _KERNEL #defineLIBALIAS_RWLOCK_INIT() \ -rw_init(handler_rw, Libalias_modules_rwlock) + rw_init(handler_rw, Libalias_modules_rwlock) #defineLIBALIAS_RWLOCK_DESTROY() rw_destroy(handler_rw) #defineLIBALIAS_WLOCK_ASSERT() \ -rw_assert(handler_rw, RA_WLOCKED) + rw_assert(handler_rw, RA_WLOCKED) static __inline void LIBALIAS_RLOCK(void) @@ -116,7 +116,7 @@ _handler_chain_destroy(void) #defineLIBALIAS_WUNLOCK() ; #define _handler_chain_init() ; #define _handler_chain_destroy() ; -#endif +#endif void handler_chain_init(void) @@ -138,7 +138,7 @@ _attach_handler(struct proto_handler *p) LIBALIAS_WLOCK_ASSERT(); b = NULL; LIST_FOREACH(b, handler_chain, entries) { - if ((b-pri == p-pri) + if ((b-pri == p-pri) (b-dir == p-dir) (b-proto == p-proto)) return (EEXIST); /* Priority conflict. */ @@ -160,7 +160,7 @@ _detach_handler(struct proto_handler *p) { struct proto_handler *b, *b_tmp; - LIBALIAS_WLOCK_ASSERT(); + LIBALIAS_WLOCK_ASSERT(); LIST_FOREACH_SAFE(b, handler_chain, entries, b_tmp) { if (b == p) { LIST_REMOVE(b, entries); @@ -178,10 +178,10 @@ LibAliasAttachHandlers(struct proto_hand LIBALIAS_WLOCK(); error = -1; for (i = 0; 1; i++) { - if (*((int *)_p[i]) == EOH) + if (*((int *)_p[i]) == EOH) break; error = _attach_handler(_p[i]); - if (error != 0) + if (error != 0) break; } LIBALIAS_WUNLOCK(); @@ -196,10 +196,10 @@ LibAliasDetachHandlers(struct proto_hand LIBALIAS_WLOCK(); error = -1; for (i = 0; 1; i++) { - if (*((int *)_p[i]) == EOH) + if (*((int *)_p[i]) == EOH) break; error = _detach_handler(_p[i]); - if (error != 0) + if (error != 0) break; } LIBALIAS_WUNLOCK(); @@ -219,7 +219,7 @@ detach_handler(struct proto_handler *_p) } int -find_handler(int8_t dir, int8_t proto, struct libalias *la, __unused struct ip *pip, +find_handler(int8_t dir, int8_t proto, struct libalias *la, __unused struct ip *pip, struct alias_data *ad) { struct proto_handler *p; @@ -235,14 +235,14 @@ find_handler(int8_t dir, int8_t proto, s } } LIBALIAS_RUNLOCK(); - return (error); + return (error); } struct proto_handler * first_handler(void) { - - return (LIST_FIRST(handler_chain)); + + return (LIST_FIRST(handler_chain)); } /* Dll manipulation code - this code is not thread safe... */ @@ -270,7 +270,7 @@ detach_dll(char *p) error = NULL; SLIST_FOREACH_SAFE(b, dll_chain, next, b_tmp) if (!strncmp(b-name, p, DLL_LEN)) { - SLIST_REMOVE(dll_chain, b, dll, next); + SLIST_REMOVE(dll_chain, b, dll, next); error = b; break; } Modified: head/sys/netinet/libalias/alias_mod.h == --- head/sys/netinet/libalias/alias_mod.h Wed Dec 25 01:20:14 2013 (r259855) +++ head/sys/netinet/libalias/alias_mod.h Wed Dec 25 01:52:55 2013 (r259856) @@ -45,102 +45,94 @@ MALLOC_DECLARE(M_ALIAS); #endif #endif -/* Protocol handlers struct function. */ - /* Packet flow direction. */ -#define IN 1 -#define OUT 2 +#define IN 1 +#define OUT2 /* Working protocol. */ -#define IP 1 -#define TCP 2 -#define UDP 4 +#define IP 1 +#define TCP2 +#define UDP4 -/* +/* * Data passed to protocol handler module, it must be filled * right before calling