svn commit: r258425 - head/sys/dev/nand
Author: gber Date: Thu Nov 21 09:19:14 2013 New Revision: 258425 URL: http://svnweb.freebsd.org/changeset/base/258425 Log: Unbreak compilation with GCC. Modified: head/sys/dev/nand/nand_cdev.c head/sys/dev/nand/nand_geom.c Modified: head/sys/dev/nand/nand_cdev.c == --- head/sys/dev/nand/nand_cdev.c Thu Nov 21 06:54:28 2013 (r258424) +++ head/sys/dev/nand/nand_cdev.c Thu Nov 21 09:19:14 2013 (r258425) @@ -298,7 +298,8 @@ nand_ioctl(struct cdev *dev, u_long cmd, struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; - size_t bufsize, len, raw_size; + size_t bufsize = 0, len = 0; + size_t raw_size; off_t off; uint8_t *buf = NULL; int ret = 0; Modified: head/sys/dev/nand/nand_geom.c == --- head/sys/dev/nand/nand_geom.c Thu Nov 21 06:54:28 2013 (r258424) +++ head/sys/dev/nand/nand_geom.c Thu Nov 21 09:19:14 2013 (r258425) @@ -197,7 +197,8 @@ nand_ioctl(struct disk *ndisk, u_long cm struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; - size_t bufsize, len, raw_size; + size_t bufsize = 0, len = 0; + size_t raw_size; off_t off; uint8_t *buf = NULL; int ret = 0; ___ 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
Re: svn commit: r258387 - head/sys/dev/nand
Hi, Thanks for information. Fix has been committed. regards, grzesiek 2013/11/20 John-Mark Gurney j...@funkthat.com Grzegorz Bernacki wrote this message on Wed, Nov 20, 2013 at 11:10 +: Author: gber Date: Wed Nov 20 11:10:23 2013 New Revision: 258387 URL: http://svnweb.freebsd.org/changeset/base/258387 Log: Split raw reading/programming into smaller chunks to avoid allocating too big chunk of kernel memory. Validate size of data. Add error handling to avoid calling copyout() when data has not been read correctly. Reviewed by:zbb Reported by:x90c geinbl...@gmail.com MFC after: 2 days Modified: head/sys/dev/nand/nand_cdev.c head/sys/dev/nand/nand_geom.c Looks like this change errors w/ gcc: http://tinderbox.freebsd.org/tinderbox-head-noclang-build-HEAD-armv6-arm.brief -- John-Mark Gurney Voice: +1 415 225 5579 All that I will do, has been done, All that I have, has not. ___ 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: r258434 - vendor/NetBSD/mtree/dist
Author: brooks Date: Thu Nov 21 19:16:52 2013 New Revision: 258434 URL: http://svnweb.freebsd.org/changeset/base/258434 Log: Vendor import of NetBSD's mtree at 2013-11-21 Modified: vendor/NetBSD/mtree/dist/compare.c vendor/NetBSD/mtree/dist/create.c vendor/NetBSD/mtree/dist/spec.c Modified: vendor/NetBSD/mtree/dist/compare.c == --- vendor/NetBSD/mtree/dist/compare.c Thu Nov 21 19:04:59 2013 (r258433) +++ vendor/NetBSD/mtree/dist/compare.c Thu Nov 21 19:16:52 2013 (r258434) @@ -1,4 +1,4 @@ -/* $NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $*/ +/* $NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $*/ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = @(#)compare.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $); +__RCSID($NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $); #endif #endif /* not lint */ @@ -48,6 +48,7 @@ __RCSID($NetBSD: compare.c,v 1.56 2013/ #include errno.h #include fcntl.h #include stdio.h +#include stdint.h #include stdlib.h #include string.h #include time.h @@ -71,13 +72,18 @@ __RCSID($NetBSD: compare.c,v 1.56 2013/ #defineINDENTNAMELEN 8 #define MARK \ do { \ - len = printf(%s: , RP(p));\ - if (len INDENTNAMELEN) { \ + if (flavor == F_FREEBSD9) { \ + len = printf(%s changed\n, RP(p));\ tab = \t; \ - printf(\n); \ } else {\ - tab = ; \ - printf(%*s, INDENTNAMELEN - (int)len, );\ + len = printf(%s: , RP(p));\ + if (len INDENTNAMELEN) { \ + tab = \t; \ + printf(\n); \ + } else {\ + tab = ; \ + printf(%*s, INDENTNAMELEN - (int)len, );\ + } \ } \ } while (0) #defineLABEL if (!label++) MARK @@ -170,7 +176,8 @@ compare(NODE *s, FTSENT *p) break; #endif typeerr: LABEL; - printf(\ttype (%s, %s)\n, + printf(flavor == F_FREEBSD9 ? + \ttype expected %s found %s\n : \ttype (%s, %s)\n, nodetype(s-type), inotype(p-fts_statp-st_mode)); return (label); } @@ -192,7 +199,9 @@ typeerr:LABEL; (s-type == F_BLOCK || s-type == F_CHAR) s-st_rdev != p-fts_statp-st_rdev) { LABEL; - printf(%sdevice (%#jx, %#jx, + printf(flavor == F_FREEBSD9 ? + %sdevice expected %#jx found %#jx : + %sdevice (%#jx, %#jx, tab, (uintmax_t)s-st_rdev, (uintmax_t)p-fts_statp-st_rdev); if (uflag) { @@ -202,10 +211,12 @@ typeerr: LABEL; s-st_rdev) == -1) || (lchown(p-fts_accpath, p-fts_statp-st_uid, p-fts_statp-st_gid) == -1) ) - printf(, not modified: %s)\n, - strerror(errno)); + printf(, not modified: %s%s\n, + strerror(errno), + flavor == F_FREEBSD9 ? : )); else - printf(, modified)\n); + printf(, modified%s\n, + flavor == F_FREEBSD9 ? : )); } else printf()\n); tab = \t; @@ -213,28 +224,34 @@ typeerr: LABEL; /* Set the uid/gid first, then set the mode. */ if (s-flags (F_UID | F_UNAME) s-st_uid != p-fts_statp-st_uid) { LABEL; - printf(%suser (%lu, %lu, + printf(flavor == F_FREEBSD9 ? + %suser expected %lu found %lu : %suser (%lu, %lu, tab, (u_long)s-st_uid, (u_long)p-fts_statp-st_uid); if (uflag) {
svn commit: r258435 - vendor/NetBSD/mtree/20131121
Author: brooks Date: Thu Nov 21 19:17:39 2013 New Revision: 258435 URL: http://svnweb.freebsd.org/changeset/base/258435 Log: Tag 2013-11-21 import of NetBSD's mtree Added: vendor/NetBSD/mtree/20131121/ - copied from r258434, vendor/NetBSD/mtree/dist/ ___ 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: r258436 - head/sys/amd64/amd64
Author: emaste Date: Thu Nov 21 19:20:08 2013 New Revision: 258436 URL: http://svnweb.freebsd.org/changeset/base/258436 Log: Refactor amd64 startup SMAP parsing Extracted from the projects/uefi branch, this change is a reasonable cleanup and will reduce the diffs to review when bringing in the UEFI work. Reviewed by: kib@ Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Thu Nov 21 19:17:39 2013 (r258435) +++ head/sys/amd64/amd64/machdep.c Thu Nov 21 19:20:08 2013 (r258436) @@ -1328,20 +1328,14 @@ isa_irq_pending(void) u_int basemem; static int -add_smap_entry(struct bios_smap *smap, vm_paddr_t *physmap, int *physmap_idxp) +add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap, +int *physmap_idxp) { int i, insert_idx, physmap_idx; physmap_idx = *physmap_idxp; - if (boothowto RB_VERBOSE) - printf(SMAP type=%02x base=%016lx len=%016lx\n, - smap-type, smap-base, smap-length); - - if (smap-type != SMAP_TYPE_MEMORY) - return (1); - - if (smap-length == 0) + if (length == 0) return (0); /* @@ -1350,8 +1344,8 @@ add_smap_entry(struct bios_smap *smap, v */ insert_idx = physmap_idx + 2; for (i = 0; i = physmap_idx; i += 2) { - if (smap-base physmap[i + 1]) { - if (smap-base + smap-length = physmap[i]) { + if (base physmap[i + 1]) { + if (base + length = physmap[i]) { insert_idx = i; break; } @@ -1363,15 +1357,14 @@ add_smap_entry(struct bios_smap *smap, v } /* See if we can prepend to the next entry. */ - if (insert_idx = physmap_idx - smap-base + smap-length == physmap[insert_idx]) { - physmap[insert_idx] = smap-base; + if (insert_idx = physmap_idx base + length == physmap[insert_idx]) { + physmap[insert_idx] = base; return (1); } /* See if we can append to the previous entry. */ - if (insert_idx 0 smap-base == physmap[insert_idx - 1]) { - physmap[insert_idx - 1] += smap-length; + if (insert_idx 0 base == physmap[insert_idx - 1]) { + physmap[insert_idx - 1] += length; return (1); } @@ -1393,11 +1386,42 @@ add_smap_entry(struct bios_smap *smap, v } /* Insert the new entry. */ - physmap[insert_idx] = smap-base; - physmap[insert_idx + 1] = smap-base + smap-length; + physmap[insert_idx] = base; + physmap[insert_idx + 1] = base + length; return (1); } +static void +add_smap_entries(struct bios_smap *smapbase, vm_paddr_t *physmap, +int *physmap_idx) +{ + struct bios_smap *smap, *smapend; + u_int32_t smapsize; + + /* +* Memory map from INT 15:E820. +* +* subr_module.c says: +* Consumer may safely assume that size value precedes data. +* ie: an int32_t immediately precedes smap. +*/ + smapsize = *((u_int32_t *)smapbase - 1); + smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize); + + for (smap = smapbase; smap smapend; smap++) { + if (boothowto RB_VERBOSE) + printf(SMAP type=%02x base=%016lx len=%016lx\n, + smap-type, smap-base, smap-length); + + if (smap-type != SMAP_TYPE_MEMORY) + continue; + + if (!add_physmap_entry(smap-base, smap-length, physmap, + physmap_idx)) + break; + } +} + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -1415,32 +1439,19 @@ getmemsize(caddr_t kmdp, u_int64_t first vm_paddr_t pa, physmap[PHYSMAP_SIZE]; u_long physmem_start, physmem_tunable, memtest; pt_entry_t *pte; - struct bios_smap *smapbase, *smap, *smapend; - u_int32_t smapsize; + struct bios_smap *smapbase; quad_t dcons_addr, dcons_size; bzero(physmap, sizeof(physmap)); basemem = 0; physmap_idx = 0; - /* -* get memory map from INT 15:E820, kindly supplied by the loader. -* -* subr_module.c says: -* Consumer may safely assume that size value precedes data. -* ie: an int32_t immediately precedes smap. -*/ smapbase = (struct bios_smap *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_SMAP); if (smapbase == NULL) panic(No BIOS smap info
svn commit: r258440 - head/share/man/man5
Author: joel (doc committer) Date: Thu Nov 21 19:44:48 2013 New Revision: 258440 URL: http://svnweb.freebsd.org/changeset/base/258440 Log: mdoc: remove EOL whitespace. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 == --- head/share/man/man5/rc.conf.5 Thu Nov 21 19:43:45 2013 (r258439) +++ head/share/man/man5/rc.conf.5 Thu Nov 21 19:44:48 2013 (r258440) @@ -919,13 +919,13 @@ This variable contains additional flags program. .It Va pflog_instances .Pq Vt str -If logging to more than one +If logging to more than one .Xr pflog 4 -interface is desired, +interface is desired, .Va pflog_instances is set to the list of .Xr pflogd 8 -instances that should be started at system boot time. If +instances that should be started at system boot time. If .Va pflog_instances is set, for each whitespace-seperated .Ar element @@ -966,7 +966,7 @@ program. .Pq Vt str Empty by default. If multiple instances of .Xr ftp-proxy 8 -are desired at boot time, +are desired at boot time, .Va ftpproxy_instances should contain a whitespace-seperated list of instance names. For each .Ar element ___ 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: r258441 - head/sys/dev/cxgbe
Author: np Date: Thu Nov 21 20:07:58 2013 New Revision: 258441 URL: http://svnweb.freebsd.org/changeset/base/258441 Log: cxgbe(4): update the internal list of device features. MFC after:3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Nov 21 19:44:48 2013 (r258440) +++ head/sys/dev/cxgbe/t4_main.cThu Nov 21 20:07:58 2013 (r258441) @@ -4167,13 +4167,15 @@ t4_sysctls(struct adapter *sc) struct sysctl_oid_list *children, *c0; static char *caps[] = { \20\1PPP\2QFC\3DCBX, /* caps[0] linkcaps */ - \20\1NIC\2VM\3IDS\4UM\5UM_ISGL, /* caps[1] niccaps */ + \20\1NIC\2VM\3IDS\4UM\5UM_ISGL/* caps[1] niccaps */ + \6HASHFILTER\7ETHOFLD, \20\1TOE, /* caps[2] toecaps */ \20\1RDDP\2RDMAC, /* caps[3] rdmacaps */ \20\1INITIATOR_PDU\2TARGET_PDU/* caps[4] iscsicaps */ \3INITIATOR_CNXOFLD\4TARGET_CNXOFLD \5INITIATOR_SSNOFLD\6TARGET_SSNOFLD, \20\1INITIATOR\2TARGET\3CTRL_OFLD /* caps[5] fcoecaps */ + \4PO_INITIAOR\5PO_TARGET }; static char *doorbells = {\20\1UDB\2WCWR\3UDBWC\4KDB}; ___ 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
Re: svn commit: r256423 - head/sys/dev/xen/blkfront
Actually, my oops. It seems that I put the wrong commit message in for that MFC. Is there anyway to change it on the server? — Justin On Nov 21, 2013, at 3:23 PM, Adam McDougall mcdou...@egr.msu.edu wrote: On 11/21/2013 17:00, Adam McDougall wrote: On 10/12/2013 22:34, Justin T. Gibbs wrote: Author: gibbs Date: Sun Oct 13 02:34:20 2013 New Revision: 256423 URL: http://svnweb.freebsd.org/changeset/base/256423 Log: Allow FreeBSD to be booted from CDROM media on XenServer 6.2 and prior releases. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems RD Reviewed by: gibbs Approved by: re (gjb) sys/dev/xen/blkfront/blkfront.c: On XenServer versions up to an including 6.2, paravirtualized CDROM support is broken. When running in an HVM domain, ignore paravirtualized instances of CDROM media, and instead rely on native drivers attaching to emulated hardware. This functions correctly on all currently known Xen based platforms. Can this pretty please be MFC'ed for 10.0? I haven't heard of any problems with it, only successes on freebsd-...@freebsd.org (thread: FreeBSD Alpha5 amd64 - Citrix Xen 6.2 problem). Thanks! Oops nevermind! Mark clued me in to r256757 which is in BETA 3. Thanks again. ___ 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: r258451 - in head: lib/libc/i386 lib/libc/i386/gen lib/libc/i386/string lib/libc/i386/sys lib/libkse/arch/i386/i386 sys/i386/include
Author: andreast Date: Thu Nov 21 22:31:18 2013 New Revision: 258451 URL: http://svnweb.freebsd.org/changeset/base/258451 Log: Replace the WEAK_ALIAS() alias with the WEAK_REFERENCE() alias. Use it and get rid of the __CONCAT and CNAME macros. Reviewed by: bde, kib Modified: head/lib/libc/i386/SYS.h head/lib/libc/i386/gen/_setjmp.S head/lib/libc/i386/gen/setjmp.S head/lib/libc/i386/gen/sigsetjmp.S head/lib/libc/i386/string/strchr.S head/lib/libc/i386/string/strrchr.S head/lib/libc/i386/sys/Ovfork.S head/lib/libc/i386/sys/getcontext.S head/lib/libkse/arch/i386/i386/thr_getcontext.S head/sys/i386/include/asm.h Modified: head/lib/libc/i386/SYS.h == --- head/lib/libc/i386/SYS.hThu Nov 21 22:17:55 2013(r258450) +++ head/lib/libc/i386/SYS.hThu Nov 21 22:31:18 2013(r258451) @@ -36,22 +36,19 @@ #include sys/syscall.h #include machine/asm.h -#defineSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ - .weak CNAME(x); \ - .set CNAME(x),CNAME(__CONCAT(__sys_,x));\ - .weak CNAME(__CONCAT(_,x)); \ - .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; \ - jb HIDENAME(cerror) +#defineSYSCALL(name) ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + mov $SYS_##name,%eax; KERNCALL; \ + jb HIDENAME(cerror) -#defineRSYSCALL(x) SYSCALL(x); ret; END(__CONCAT(__sys_,x)) +#defineRSYSCALL(name) SYSCALL(name); ret; END(__sys_##name) -#definePSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ - .weak CNAME(__CONCAT(_,x)); \ - .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; \ - jb HIDENAME(cerror); ret; \ - END(__CONCAT(__sys_,x)) +#definePSEUDO(name)ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + mov $SYS_##name,%eax; KERNCALL; \ + jb HIDENAME(cerror); ret; \ + END(__sys_##name) /* gas messes up offset -- although we don't currently need it, do for BCS */ #defineLCALL(x,y) .byte 0x9a ; .long y; .word x Modified: head/lib/libc/i386/gen/_setjmp.S == --- head/lib/libc/i386/gen/_setjmp.SThu Nov 21 22:17:55 2013 (r258450) +++ head/lib/libc/i386/gen/_setjmp.SThu Nov 21 22:31:18 2013 (r258451) @@ -60,8 +60,7 @@ ENTRY(_setjmp) ret END(_setjmp) - .weak CNAME(_longjmp) - .setCNAME(_longjmp),CNAME(___longjmp) + WEAK_REFERENCE(___longjmp, _longjmp) ENTRY(___longjmp) movl4(%esp),%edx movl8(%esp),%eax Modified: head/lib/libc/i386/gen/setjmp.S == --- head/lib/libc/i386/gen/setjmp.S Thu Nov 21 22:17:55 2013 (r258450) +++ head/lib/libc/i386/gen/setjmp.S Thu Nov 21 22:31:18 2013 (r258451) @@ -78,8 +78,7 @@ ENTRY(setjmp) ret END(setjmp) - .weak CNAME(longjmp) - .set CNAME(longjmp),CNAME(__longjmp) + WEAK_REFERENCE(__longjmp, longjmp) ENTRY(__longjmp) movl4(%esp),%edx PIC_PROLOGUE Modified: head/lib/libc/i386/gen/sigsetjmp.S == --- head/lib/libc/i386/gen/sigsetjmp.S Thu Nov 21 22:17:55 2013 (r258450) +++ head/lib/libc/i386/gen/sigsetjmp.S Thu Nov 21 22:31:18 2013 (r258451) @@ -87,8 +87,7 @@ ENTRY(sigsetjmp) ret END(sigsetjmp) - .weak CNAME(siglongjmp); - .set CNAME(siglongjmp),CNAME(__siglongjmp) + WEAK_REFERENCE(__siglongjmp, siglongjmp) ENTRY(__siglongjmp) movl4(%esp),%edx cmpl$0,44(%edx) Modified: head/lib/libc/i386/string/strchr.S == --- head/lib/libc/i386/string/strchr.S Thu Nov 21 22:17:55 2013 (r258450) +++ head/lib/libc/i386/string/strchr.S Thu Nov 21 22:31:18 2013 (r258451) @@ -63,6 +63,6 @@ L2: ret END(strchr) -WEAK_ALIAS(index, strchr) +WEAK_REFERENCE(strchr, index) .section .note.GNU-stack,,%progbits Modified:
svn commit: r258430 - head/usr.sbin/bsdconfig/networking/share
Author: dteske Date: Thu Nov 21 17:49:56 2013 New Revision: 258430 URL: http://svnweb.freebsd.org/changeset/base/258430 Log: Remove unused line -- cruft left over from SVN r258360. Modified: head/usr.sbin/bsdconfig/networking/share/device.subr Modified: head/usr.sbin/bsdconfig/networking/share/device.subr == --- head/usr.sbin/bsdconfig/networking/share/device.subrThu Nov 21 16:44:36 2013(r258429) +++ head/usr.sbin/bsdconfig/networking/share/device.subrThu Nov 21 17:49:56 2013(r258430) @@ -74,7 +74,6 @@ f_dialog_menu_netdev() # # Get list of usable network interfaces # - local d='[[:digit:]]+:' local if iflist= # Calculated below for if in $( ifconfig -l ); do # Skip unsavory interfaces ___ 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: r258448 - head/sys/geom/part
Author: marcel Date: Thu Nov 21 22:02:59 2013 New Revision: 258448 URL: http://svnweb.freebsd.org/changeset/base/258448 Log: Have the GPT probe return a lower priority when the MBR is not a PMBR The purpose of the PMBR is to have the disk appear in use to GPT unaware utilities (like fdisk). However, if the PMBR has been changed by a GPT unaware utlity then we must assume that this was deliberate (as it involved removal of the special slice) and we should not treat the unmodified GPT-specific sectors as being valid. By lowering the probe priority in that case, the MBR scheme will take precedence and the kernel will end up using the MBR and not the GPT. We will still use the GPT if the kernel does not support the MBR scheme. Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c == --- head/sys/geom/part/g_part_gpt.c Thu Nov 21 21:25:58 2013 (r258447) +++ head/sys/geom/part/g_part_gpt.c Thu Nov 21 22:02:59 2013 (r258448) @@ -759,8 +759,8 @@ static int g_part_gpt_probe(struct g_part_table *table, struct g_consumer *cp) { struct g_provider *pp; - char *buf; - int error, res; + u_char *buf; + int error, index, pri, res; /* We don't nest, which means that our depth should be 0. */ if (table-gpt_depth != 0) @@ -785,11 +785,21 @@ g_part_gpt_probe(struct g_part_table *ta if (pp-sectorsize MBRSIZE || pp-mediasize 6 * pp-sectorsize) return (ENOSPC); - /* Check that there's a MBR. */ + /* +* Check that there's a MBR or a PMBR. If it's a PMBR, we return +* as the highest priority on a match, otherwise we assume some +* GPT-unaware tool has destroyed the GPT by recreating a MBR and +* we really want the MBR scheme to take precedence. +*/ buf = g_read_data(cp, 0L, pp-sectorsize, error); if (buf == NULL) return (error); res = le16dec(buf + DOSMAGICOFFSET); + pri = G_PART_PROBE_PRI_LOW; + for (index = 0; index NDOSPART; index++) { + if (buf[DOSPARTOFF + DOSPARTSIZE * index + 4] == 0xee) + pri = G_PART_PROBE_PRI_HIGH; + } g_free(buf); if (res != DOSMAGIC) return (ENXIO); @@ -801,7 +811,7 @@ g_part_gpt_probe(struct g_part_table *ta res = memcmp(buf, GPT_HDR_SIG, 8); g_free(buf); if (res == 0) - return (G_PART_PROBE_PRI_HIGH); + return (pri); /* No primary? Check that there's a secondary. */ buf = g_read_data(cp, pp-mediasize - pp-sectorsize, pp-sectorsize, @@ -810,7 +820,7 @@ g_part_gpt_probe(struct g_part_table *ta return (error); res = memcmp(buf, GPT_HDR_SIG, 8); g_free(buf); - return ((res == 0) ? G_PART_PROBE_PRI_HIGH : ENXIO); + return ((res == 0) ? pri : ENXIO); } static int ___ 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: r258447 - in head: lib/libc/amd64 lib/libc/amd64/gen lib/libc/amd64/sys sys/amd64/include
Author: andreast Date: Thu Nov 21 21:25:58 2013 New Revision: 258447 URL: http://svnweb.freebsd.org/changeset/base/258447 Log: Introduce a WEAK_REFERENCE() alias and use it. Get rid of the CNAME and the CONCAT macros in SYS.h. Reviewed by: bde, kib Modified: head/lib/libc/amd64/SYS.h head/lib/libc/amd64/gen/_setjmp.S head/lib/libc/amd64/gen/setjmp.S head/lib/libc/amd64/gen/sigsetjmp.S head/lib/libc/amd64/sys/getcontext.S head/lib/libc/amd64/sys/pipe.S head/lib/libc/amd64/sys/reboot.S head/lib/libc/amd64/sys/setlogin.S head/lib/libc/amd64/sys/vfork.S head/sys/amd64/include/asm.h Modified: head/lib/libc/amd64/SYS.h == --- head/lib/libc/amd64/SYS.h Thu Nov 21 21:19:01 2013(r258446) +++ head/lib/libc/amd64/SYS.h Thu Nov 21 21:25:58 2013(r258447) @@ -36,20 +36,17 @@ #include sys/syscall.h #include machine/asm.h -#defineRSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ - .weak CNAME(x); \ - .set CNAME(x),CNAME(__CONCAT(__sys_,x));\ - .weak CNAME(__CONCAT(_,x)); \ - .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; \ +#defineRSYSCALL(name) ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + mov $SYS_##name,%eax; KERNCALL; \ jb HIDENAME(cerror); ret; \ - END(__CONCAT(__sys_,x)) + END(__sys_##name) -#definePSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ - .weak CNAME(__CONCAT(_,x)); \ - .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; \ +#definePSEUDO(name)ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + mov $SYS_##name,%eax; KERNCALL; \ jb HIDENAME(cerror); ret; \ - END(__CONCAT(__sys_,x)) + END(__sys_##name) -#define KERNCALL movq %rcx, %r10; syscall +#defineKERNCALLmovq %rcx, %r10; syscall Modified: head/lib/libc/amd64/gen/_setjmp.S == --- head/lib/libc/amd64/gen/_setjmp.S Thu Nov 21 21:19:01 2013 (r258446) +++ head/lib/libc/amd64/gen/_setjmp.S Thu Nov 21 21:25:58 2013 (r258447) @@ -63,8 +63,7 @@ ENTRY(_setjmp) ret END(_setjmp) - .weak CNAME(_longjmp) - .setCNAME(_longjmp),CNAME(___longjmp) + WEAK_REFERENCE(___longjmp, _longjmp) ENTRY(___longjmp) movq%rdi,%rdx /* Restore the mxcsr, but leave exception flags intact. */ Modified: head/lib/libc/amd64/gen/setjmp.S == --- head/lib/libc/amd64/gen/setjmp.SThu Nov 21 21:19:01 2013 (r258446) +++ head/lib/libc/amd64/gen/setjmp.SThu Nov 21 21:25:58 2013 (r258447) @@ -73,8 +73,7 @@ ENTRY(setjmp) ret END(setjmp) - .weak CNAME(longjmp) - .set CNAME(longjmp),CNAME(__longjmp) + WEAK_REFERENCE(__longjmp, longjmp) ENTRY(__longjmp) pushq %rdi pushq %rsi Modified: head/lib/libc/amd64/gen/sigsetjmp.S == --- head/lib/libc/amd64/gen/sigsetjmp.S Thu Nov 21 21:19:01 2013 (r258446) +++ head/lib/libc/amd64/gen/sigsetjmp.S Thu Nov 21 21:25:58 2013 (r258447) @@ -80,8 +80,7 @@ ENTRY(sigsetjmp) ret END(sigsetjmp) - .weak CNAME(siglongjmp) - .set CNAME(siglongjmp),CNAME(__siglongjmp) + WEAK_REFERENCE(__siglongjmp, siglongjmp) ENTRY(__siglongjmp) cmpl$0,88(%rdi) jz 2f Modified: head/lib/libc/amd64/sys/getcontext.S == --- head/lib/libc/amd64/sys/getcontext.SThu Nov 21 21:19:01 2013 (r258446) +++ head/lib/libc/amd64/sys/getcontext.SThu Nov 21 21:25:58 2013 (r258447) @@ -34,10 +34,8 @@ __FBSDID($FreeBSD$); * Otherwise, the setcontext() syscall will return here and we'll * pop off the return address and go to the *setcontext* call. */ - .weak _getcontext - .set_getcontext,__sys_getcontext - .weak getcontext - .setgetcontext,__sys_getcontext +
svn commit: r258455 - head/contrib/llvm/lib/Target/X86
Author: dim Date: Thu Nov 21 23:09:07 2013 New Revision: 258455 URL: http://svnweb.freebsd.org/changeset/base/258455 Log: Pull in r195318 from upstream llvm trunk: The basic problem is that some mainstream programs cannot deal with the way clang optimizes tail calls, as in this example: int foo(void); int bar(void) { return foo(); } where the call is transformed to: calll .L0$pb .L0$pb: popl %eax .Ltmp0: addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax movl foo@GOT(%eax), %eax popl %ebp jmpl *%eax # TAILCALL However, the GOT references must all be resolved at dlopen() time, and so this approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which usually populates the PLT with stubs that perform the actual resolving. This patch changes X86TargetLowering::LowerCall() to skip tail call optimization, if the called function is a global or external symbol. This fixes problems with loading X.org driver modules, which could occur when X.org was compiled on i386 with tailcall optimization on, for which ports r312583 was committed as a workaround. After this change, the workaround can be removed. MFC after:3 days Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp == --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppThu Nov 21 23:00:09 2013(r258454) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppThu Nov 21 23:09:07 2013(r258455) @@ -2449,21 +2449,15 @@ X86TargetLowering::LowerCall(TargetLower RegsToPass.push_back(std::make_pair(unsigned(X86::EBX), DAG.getNode(X86ISD::GlobalBaseReg, DebugLoc(), getPointerTy(; } else { - // If we are tail calling and generating PIC/GOT style code load the - // address of the callee into ECX. The value in ecx is used as target of - // the tail jump. This is done to circumvent the ebx/callee-saved problem - // for tail calls on PIC/GOT architectures. Normally we would just put the - // address of GOT into ebx and then call target@PLT. But for tail calls - // ebx would be restored (since ebx is callee saved) before jumping to the - // target@PLT. - - // Note: The actual moving to ECX is done further down. + // If we are tail calling a global or external symbol in GOT pic mode, we + // cannot use a direct jump, since that would make lazy dynamic linking + // impossible (see PR15086). So pretend this is not a tail call, to + // prevent the optimization to a jump. GlobalAddressSDNode *G = dyn_castGlobalAddressSDNode(Callee); - if (G !G-getGlobal()-hasHiddenVisibility() - !G-getGlobal()-hasProtectedVisibility()) -Callee = LowerGlobalAddress(Callee, DAG); - else if (isaExternalSymbolSDNode(Callee)) -Callee = LowerExternalSymbol(Callee, DAG); + if ((G !G-getGlobal()-hasHiddenVisibility() + !G-getGlobal()-hasProtectedVisibility()) || + isaExternalSymbolSDNode(Callee)) +isTailCall = false; } } ___ 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
Re: svn commit: r258285 - in head/lib/atf: libatf-c++/tests libatf-c/tests tests/test-programs
On Mon, Nov 18, 2013 at 7:33 PM, Simon J. Gerraty s...@juniper.net wrote: On Sun, 17 Nov 2013 23:12:55 +, Julio Merino writes: I am not sure how this ever worked before given that manual inspection of bsd.progs.mk clearly shows that the expected character between the two components is a dot and not an underscore... but I suspect the Actually . or _ worked, until recently. I think only supporting one form is better in the name of simplicity. Will fix. Garrett also mentioned to me that we should not be required to explicitly set SRCS.*: when building various programs, each of them should be able to determine a reasonable value for this variable on its own. In other words, what I did in r258298 should probably not be required. What do you think? -- Julio Merino / @jmmv ___ 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: r258428 - in head/contrib/gcc: . config config/i386 config/rs6000 cp doc
Author: pfg Date: Thu Nov 21 16:38:57 2013 New Revision: 258428 URL: http://svnweb.freebsd.org/changeset/base/258428 Log: gcc: another round of merges from the gcc pre-43 branch. Bring The following revisions from the gcc43 branch[1]: 118360, 118361, 118363, 118576, 119820, 123906, 125246, and 125721. They all have in common that the were merged long ago into Apple's gcc and should help improve the general quality of the compiler and make it easier to bring new features from Apple's gcc42. For details please review the additions to the files: gcc/ChangeLog.gcc43 gcc/cp/ChangeLog.gcc43 (new, adds previous revisions) Reference: [1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700 Obtained from:gcc pre4.3 (GPLv2) branch MFC after:3 weeks Added: head/contrib/gcc/cp/ChangeLog.gcc43 Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/Makefile.in head/contrib/gcc/builtin-types.def head/contrib/gcc/builtins.c head/contrib/gcc/builtins.def head/contrib/gcc/cgraphunit.c head/contrib/gcc/collect2.c head/contrib/gcc/config/i386/beos-elf.h head/contrib/gcc/config/i386/cygwin.h head/contrib/gcc/config/i386/i386.c head/contrib/gcc/config/i386/i386.h head/contrib/gcc/config/i386/i386.md head/contrib/gcc/config/i386/nto.h head/contrib/gcc/config/rs6000/aix.h head/contrib/gcc/config/rs6000/sysv4.h head/contrib/gcc/config/svr4.h head/contrib/gcc/configure head/contrib/gcc/configure.ac head/contrib/gcc/coverage.c head/contrib/gcc/cp/decl2.c head/contrib/gcc/cp/name-lookup.c head/contrib/gcc/cppdefault.c head/contrib/gcc/doc/extend.texi head/contrib/gcc/doc/libgcc.texi head/contrib/gcc/doc/rtl.texi head/contrib/gcc/dwarf2out.c head/contrib/gcc/expr.c head/contrib/gcc/fold-const.c head/contrib/gcc/gcc.c head/contrib/gcc/genattrtab.c head/contrib/gcc/genopinit.c head/contrib/gcc/libgcc-std.ver head/contrib/gcc/libgcc2.c head/contrib/gcc/libgcc2.h head/contrib/gcc/mips-tdump.c head/contrib/gcc/mips-tfile.c head/contrib/gcc/mklibgcc.in head/contrib/gcc/optabs.c head/contrib/gcc/optabs.h head/contrib/gcc/reload1.c head/contrib/gcc/rtl.def head/contrib/gcc/simplify-rtx.c head/contrib/gcc/tree-ssa-propagate.c head/contrib/gcc/tree.c head/contrib/gcc/tree.h Modified: head/contrib/gcc/ChangeLog.gcc43 == --- head/contrib/gcc/ChangeLog.gcc43Thu Nov 21 15:41:52 2013 (r258427) +++ head/contrib/gcc/ChangeLog.gcc43Thu Nov 21 16:38:57 2013 (r258428) @@ -10,6 +10,12 @@ * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-31 Eric Christopher echri...@apple.com + + * expr.c (convert_move): Assert that we don't have a BLKmode + operand. + (store_expr): Handle BLKmode moves by calling emit_block_move. + 2007-05-24 Richard Sandiford rsand...@nildram.co.uk (r125037) * postreload-gcse.c (reg_changed_after_insn_p): New function. @@ -99,6 +105,12 @@ (dwarf2out_imported_module_or_decl): Suppress struct debug information using should_emit_struct_debug when appropriate. +2007-04-16 Ian Lance Taylor i...@google.com (r123906) + + * tree-ssa-propagate.c (cfg_blocks_add): Insert blocks with fewer + predecessors at head rather than tail. + + 2007-04-12 Richard Guenther rguent...@suse.de (r123736) PR tree-optimization/24689 @@ -333,6 +345,28 @@ * doc/invoke.texi (Warning Options): Update -Wparentheses description. +2006-12-12 Geoffrey Keating geo...@apple.com (r119820) + + * mips-tdump.c: Replace CROSS_COMPILE with + CROSS_DIRECTORY_STRUCTURE. + * mips-tfile.c: Likewise. + * gcc.c: Likewise. + * configure.ac: Likewise. + * cppdefault.c: Likewise. + * Makefile.in: Likewise. + * config/alpha/osf.h: Likewise. + * config/i386/cygwin.h: Likewise. + * config/i386/beos-elf.h: Likewise. + * config/i386/nto.h: Likewise. + * config/svr4.h: Likewise. + * config/rs6000/aix.h: Likewise. + * config/rs6000/sysv4.h: Likewise. + * collect2.c: Likewise. + * configure: Regenerate. + + * doc/tm.texi (Alignment Output): Document that ASM_OUTPUT_SKIP + actually takes an unsigned HOST_WIDE_INT for its second parameter. + 2006-12-02 H.J. Lu hongjiu...@intel.com (r119454 - partial) PR target/30040 @@ -371,6 +405,30 @@ (override_options): Add entries for Core2. (ix86_issue_rate): Add case for Core2. +2006-11-07 Eric Christopher echri...@apple.com (r118576) + + * libgcc2.c (__bswapdi2): Rename from bswapDI2. + (__bswapsi2): Ditto. + * libgcc2.h: Remove transformation of bswap routines. + * config/i386/i386.md (bswapsi2): New. + (bswapdi2): Ditto. + +2006-10-31 Geoffrey Keating
svn commit: r258444 - head/lib/libpam/libpam
Author: pluknet Date: Thu Nov 21 20:43:43 2013 New Revision: 258444 URL: http://svnweb.freebsd.org/changeset/base/258444 Log: Catch up with OpenPAM Nummularia. This fixes libpam for build32 target to dlopen() pam libraries in /usr/lib32. Reviewed by: des (a while ago) MFC after:1 week Modified: head/lib/libpam/libpam/Makefile Modified: head/lib/libpam/libpam/Makefile == --- head/lib/libpam/libpam/Makefile Thu Nov 21 20:39:53 2013 (r258443) +++ head/lib/libpam/libpam/Makefile Thu Nov 21 20:43:43 2013 (r258444) @@ -154,7 +154,7 @@ MLINKS= pam.conf.5 pam.d.5 CSTD?= c99 CFLAGS+= -I${.CURDIR} -I${OPENPAM}/include CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR} -CFLAGS+= -DOPENPAM_MODULES_DIR='${PAM_MOD_DIR:C/\/*$//}/' +CFLAGS+= -DOPENPAM_MODULES_DIRECTORY='${PAM_MOD_DIR:C/\/*$//}/' CFLAGS+= -DHAVE_DLFUNC=1 CFLAGS+= -DHAVE_FDLOPEN=1 CFLAGS+= -DHAVE_FPURGE=1 ___ 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: r258456 - head/usr.sbin/mergemaster
Author: brooks Date: Fri Nov 22 00:06:11 2013 New Revision: 258456 URL: http://svnweb.freebsd.org/changeset/base/258456 Log: Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is nmtree. The mtree output used by mergemaster in this case was clearly not meant for computer consumption and an approach based on -f file1 -f file2 would probalby be a better idea, but this is a minimal change. MFC after:3 days X-MFC-with: r258437 Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh == --- head/usr.sbin/mergemaster/mergemaster.shThu Nov 21 23:09:07 2013 (r258455) +++ head/usr.sbin/mergemaster/mergemaster.shFri Nov 22 00:06:11 2013 (r258456) @@ -492,8 +492,14 @@ MM_MAKE=make ${ARCHSTRING} -m ${SOURCED # files the user changed from the reference files. # if [ -n ${AUTO_UPGRADE} -a -s ${MTREEFILE} ]; then + # Force FreeBSD 9 compatible output when available. + if mtree -F freebsd9 -c -p /var/empty/ /dev/null 21; then + MTREE_FLAVOR=-F freebsd9 + else + MTREE_FLAVOR= + fi CHANGED=: - for file in `mtree -eqL -f ${MTREEFILE} -p ${DESTDIR}/ \ + for file in `mtree -eqL ${MTREE_FLAVOR} -f ${MTREEFILE} -p ${DESTDIR}/ \ 2/dev/null | awk '($2 == changed) {print $1}'`; do if [ -f ${DESTDIR}/$file ]; then CHANGED=${CHANGED}${DESTDIR}/${file}: ___ 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: r258433 - head/release/doc/en_US.ISO8859-1/hardware
Author: rodrigc Date: Thu Nov 21 19:04:59 2013 New Revision: 258433 URL: http://svnweb.freebsd.org/changeset/base/258433 Log: Update text related to Intel CPU support and Apple hardware support. Submitted by: skreuzer Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml == --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Nov 21 19:00:21 2013(r258432) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Nov 21 19:04:59 2013(r258433) @@ -178,9 +178,7 @@ the a.smp; may yield some clues./para paraos; will take advantage of HyperThreading (HTT) support - on intel; CPUs that support this feature. A kernel with the - literaloptionsnbsp;SMP/literal feature enabled will - automatically detect the additional logical processors. The + on intel; CPUs that support this feature. The default os; scheduler treats the logical processors the same as additional physical processors; in other words, no attempt is made to optimize scheduling decisions given the shared @@ -303,63 +301,12 @@ sect2 xml:id=proc-powerpc titlepowerpc/title - paraThis section describes the systems currently known to be - supported by os; on the PowerPC platform. This list is not - exhaustive./para - - paraIn general, all New World architecture Apple hardware - is supported, as well a limited selection of non-Apple - machines./para - - paraAll systems listed below are fully supported, with the - exception that software fan control is currently missing on - some Power Macintosh G5 models. SMP is supported on all systems - with more than 1 processor./para + paraAll Apple PowerPC machines with built-in USB are supported, + as well a limited selection of non-Apple machines, + including KVM on POWER7/para - itemizedlist - listitem - paraApple iMac G3/para - /listitem - listitem - paraApple iMac G4/para - /listitem - listitem - paraApple iMac G5/para - /listitem - listitem - paraApple Power Macintosh G3 (Blue amp; White)/para - /listitem - listitem - paraApple Power Macintosh G4/para - /listitem - listitem - paraApple Power Macintosh G5/para - /listitem - listitem - paraApple iBook G3/para - /listitem - listitem - paraApple iBook G4/para - /listitem - listitem - paraApple PowerBook G3 (Lombard and Pismo)/para - /listitem - listitem - paraApple PowerBook G4/para - /listitem - listitem - paraApple XServe G4/para - /listitem - listitem - paraApple XServe G5/para - /listitem - listitem - paraApple Mac Mini/para - /listitem - listitem - paraEmbedded boards based on MPC85XX/para - /listitem - /itemizedlist + paraSMP is supported on all systems with more than + 1 processor./para /sect2 sect2 xml:id=proc-sparc64 @@ -367,10 +314,7 @@ paraThis section describes the systems currently known to be supported by os; on the Fujitsu sparc64; and Sun ultrasparc; - platforms. For - background information on the various hardware designs see the - link xlink:href=http://sunsolve.sun.com/handbook_pub/;Sun System - Handbook/link./para + platforms./para paraSMP is supported on all systems with more than 1 processor./para ___ 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: r258426 - head/contrib/libexecinfo
Author: emaste Date: Thu Nov 21 14:12:36 2013 New Revision: 258426 URL: http://svnweb.freebsd.org/changeset/base/258426 Log: libexecinfo: Include terminating null in byte count Otherwise, a formatted string with a strlen equal to the remaining buffer space would have the last character omitted (because vsnprintf always null-terminates), and later the assert in backtrace_symbols_fmt would fail. MFC after:3 days Sponsored by: DARPA, AFRL Modified: head/contrib/libexecinfo/backtrace.c Modified: head/contrib/libexecinfo/backtrace.c == --- head/contrib/libexecinfo/backtrace.cThu Nov 21 09:19:14 2013 (r258425) +++ head/contrib/libexecinfo/backtrace.cThu Nov 21 14:12:36 2013 (r258426) @@ -89,7 +89,7 @@ rasprintf(char **buf, size_t *bufsiz, si len = vsnprintf(*buf + offs, *bufsiz - offs, fmt, ap); va_end(ap); - if (len 0 || (size_t)len *bufsiz - offs) + if (len 0 || (size_t)len + 1 *bufsiz - offs) return len; nbufsiz = MAX(*bufsiz + 512, (size_t)len + 1); } else ___ 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: r258457 - in stable/10/sys/dev: qlxgbe qlxge
Author: davidcs Date: Fri Nov 22 00:26:21 2013 New Revision: 258457 URL: http://svnweb.freebsd.org/changeset/base/258457 Log: MFC r258155 ql_hw.[c,h]: set minimum thresholds on pkt size for lro path. ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP MFC r258156 qls_ioctl.c: Validate the buffer and its length passed to QLA_MPI_DUMP. copyout dump only if qls_mpi_core_dump() is successful. (like to credit x90c for pointing the issue) Approved by: re (delphij) Modified: stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_hw.h stable/10/sys/dev/qlxgbe/ql_ioctl.c stable/10/sys/dev/qlxge/qls_ioctl.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_hw.c == --- stable/10/sys/dev/qlxgbe/ql_hw.cFri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxgbe/ql_hw.cFri Nov 22 00:26:21 2013 (r258457) @@ -212,6 +212,12 @@ ql_hw_add_sysctls(qla_host_t *ha) Number of Rcv Rings Entries to post before updating RDS Ring Producer Index); + ha-hw.min_lro_pkt_size = 512; + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, min_lro_pkt_size, CTLFLAG_RD, ha-hw.min_lro_pkt_size, + ha-hw.min_lro_pkt_size, minimum packet size to trigger lro); + ha-hw.mdump_active = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -1069,6 +1075,11 @@ qla_config_fw_lro(qla_host_t *ha, uint16 fw_lro-cntxt_id = cntxt_id; + if (ha-hw.min_lro_pkt_size) { + fw_lro-flags |= Q8_MBX_FW_LRO_LOW_THRESHOLD; + fw_lro-low_threshold = ha-hw.min_lro_pkt_size; + } + if (qla_mbx_cmd(ha, (uint32_t *)fw_lro, (sizeof (q80_config_fw_lro_t) 2), ha-hw.mbox, (sizeof (q80_config_fw_lro_rsp_t) 2), 0)) { Modified: stable/10/sys/dev/qlxgbe/ql_hw.h == --- stable/10/sys/dev/qlxgbe/ql_hw.hFri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxgbe/ql_hw.hFri Nov 22 00:26:21 2013 (r258457) @@ -568,9 +568,13 @@ typedef struct _q80_config_fw_lro { #define Q8_MBX_FW_LRO_IPV6 0x2 #define Q8_MBX_FW_LRO_IPV4_WO_DST_IP_CHK 0x4 #define Q8_MBX_FW_LRO_IPV6_WO_DST_IP_CHK 0x8 +#define Q8_MBX_FW_LRO_LOW_THRESHOLD0x10 uint8_t rsrvd; uint16_tcntxt_id; + + uint16_tlow_threshold; + uint16_trsrvd0; } __packed q80_config_fw_lro_t; typedef struct _q80_config_fw_lro_rsp { @@ -1521,6 +1525,7 @@ typedef struct _qla_hw { uint32_thealth_count; uint32_tmax_tx_segs; + uint32_tmin_lro_pkt_size; /* Flash Descriptor Table */ qla_flash_desc_table_t fdt; Modified: stable/10/sys/dev/qlxgbe/ql_ioctl.c == --- stable/10/sys/dev/qlxgbe/ql_ioctl.c Fri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxgbe/ql_ioctl.c Fri Nov 22 00:26:21 2013 (r258457) @@ -223,6 +223,13 @@ ql_eioctl(struct cdev *dev, u_long cmd, } fw_dump = (qla_rd_fw_dump_t *)data; + + if ((fw_dump-md_template == NULL) || + (fw_dump-template_size != ha-hw.dma_buf.minidump.size)) { + rval = EINVAL; + break; + } + if ((rval = copyout(ha-hw.dma_buf.minidump.dma_b, fw_dump-md_template, fw_dump-template_size))) rval = ENXIO; Modified: stable/10/sys/dev/qlxge/qls_ioctl.c == --- stable/10/sys/dev/qlxge/qls_ioctl.c Fri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxge/qls_ioctl.c Fri Nov 22 00:26:21 2013 (r258457) @@ -100,13 +100,16 @@ qls_eioctl(struct cdev *dev, u_long cmd, if (mpi_dump-size == 0) { mpi_dump-size = sizeof (qls_mpi_coredump_t); } else { - if (mpi_dump-size sizeof (qls_mpi_coredump_t)) + if ((mpi_dump-size != sizeof (qls_mpi_coredump_t)) || + (mpi_dump-dbuf == NULL)) rval = EINVAL; else { - qls_mpi_core_dump(ha); - rval = copyout( ql_mpi_coredump, - mpi_dump-dbuf, - mpi_dump-size); +
Re: svn commit: r258285 - in head/lib/atf: libatf-c++/tests libatf-c/tests tests/test-programs
On Thu, 21 Nov 2013 18:29:15 -0500, Julio Merino writes: Actually . or _ worked, until recently. I think only supporting one form is better in the name of simplicity. Generally I would agree. Originally I used '_' for this and a number of other things, but in many cases find that '.' makes for easier reading. Will fix. Garrett also mentioned to me that we should not be required to explicitly set SRCS.*: when building various programs, each of them Being explicit doesn't hurt. ___ 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: r258432 - in head/release/doc/en_US.ISO8859-1: errata readme
Author: rodrigc Date: Thu Nov 21 19:00:21 2013 New Revision: 258432 URL: http://svnweb.freebsd.org/changeset/base/258432 Log: Update copyrights Submitted by: skreuzer Modified: head/release/doc/en_US.ISO8859-1/errata/article.xml head/release/doc/en_US.ISO8859-1/readme/article.xml Modified: head/release/doc/en_US.ISO8859-1/errata/article.xml == --- head/release/doc/en_US.ISO8859-1/errata/article.xml Thu Nov 21 18:37:11 2013(r258431) +++ head/release/doc/en_US.ISO8859-1/errata/article.xml Thu Nov 21 19:00:21 2013(r258432) @@ -32,6 +32,14 @@ year2003/year year2004/year year2005/year + year2006/year + year2007/year + year2008/year + year2009/year + year2010/year + year2011/year + year2012/year + year2013/year holder role=mailto:d...@freebsd.org;The os; Documentation Project/holder /copyright Modified: head/release/doc/en_US.ISO8859-1/readme/article.xml == --- head/release/doc/en_US.ISO8859-1/readme/article.xml Thu Nov 21 18:37:11 2013(r258431) +++ head/release/doc/en_US.ISO8859-1/readme/article.xml Thu Nov 21 19:00:21 2013(r258432) @@ -30,6 +30,11 @@ year2006/year year2007/year year2008/year + year2009/year + year2010/year + year2011/year + year2012/year + year2013/year holder role=mailto:d...@freebsd.org;The os; Documentation Project/holder /copyright ___ 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: r258458 - in head/usr.sbin/bsdconfig: networking networking/share share
Author: dteske Date: Fri Nov 22 00:32:32 2013 New Revision: 258458 URL: http://svnweb.freebsd.org/changeset/base/258458 Log: Improve network device scanning in the netdev module. First, make it use the `device.subr' framework (improving performane and reducing sub-shells). Next improve the `device.subr' framework itself. Make use of the `flags' device struct member for network interfaces to indicate if an interface is Active, Wired Ethernet, or 802.11 Wireless. Functions have been added to make checks against the `flags' bit-field quick and efficient. Last, add function for rescanning the network to update the device registers. Remove an unnecessary local (ifn) while we're here (use already provided local `if'). Modified: head/usr.sbin/bsdconfig/networking/devices head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/share/device.subr Modified: head/usr.sbin/bsdconfig/networking/devices == --- head/usr.sbin/bsdconfig/networking/devices Fri Nov 22 00:26:21 2013 (r258457) +++ head/usr.sbin/bsdconfig/networking/devices Fri Nov 22 00:32:32 2013 (r258458) @@ -28,6 +28,12 @@ # INCLUDES +# Prevent device.subr (included indirectly) from auto scanning; this will be +# performed indirectly later via f_dialog_menu_netdev() -- but only after we've +# successfully completed f_mustberoot_init(). +# +DEVICE_SELF_SCAN_ALL=NO + BSDCFG_SHARE=/usr/share/bsdconfig . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf %s: loading includes... $0 Modified: head/usr.sbin/bsdconfig/networking/share/device.subr == --- head/usr.sbin/bsdconfig/networking/share/device.subrFri Nov 22 00:26:21 2013(r258457) +++ head/usr.sbin/bsdconfig/networking/share/device.subrFri Nov 22 00:32:32 2013(r258458) @@ -74,8 +74,10 @@ f_dialog_menu_netdev() # # Get list of usable network interfaces # - local if iflist= # Calculated below - for if in $( ifconfig -l ); do + local devs if iflist= # Calculated below + f_device_rescan_network + f_device_find $DEVICE_TYPE_NETWORK devs + for if in $devs; do # Skip unsavory interfaces case $if in lo[0-9]*|ppp[0-9]*|sl[0-9]*|faith[0-9]*) continue ;; @@ -91,9 +93,8 @@ f_dialog_menu_netdev() if [ $DIALOG_MENU_NETDEV_KICK_INTERFACES ]; then DIALOG_MENU_NETDEV_KICK_INTERFACES= - local ifn - for ifn in $iflist; do - f_quietly ifconfig $ifn up + for if in $iflist; do + f_quietly ifconfig $if up done if [ $DIALOG_MENU_NETDEV_SLEEP_AFTER_KICK ]; then @@ -107,13 +108,14 @@ f_dialog_menu_netdev() # to the right of the device name. # menu_list=$( - for ifn in $iflist; do - active=$( ifconfig $ifn 2 /dev/null | awk ' - ($1 == status:) { - if ($2 == active) { print 1; exit } - }' ) - printf '%s%s' '%s'\n \ - $ifn ${active:+*} $( f_device_desc $ifn ) + for if in $iflist; do + f_device_desc $if $DEVICE_TYPE_NETWORK desc + f_shell_escape $desc desc + if f_device_is_active $if; then + printf '%s\*' '%s'\n $if $desc + else + printf '%s' '%s'\n $if $desc + fi done ) if [ ! $menu_list ]; then @@ -121,21 +123,14 @@ f_dialog_menu_netdev() return $DIALOG_CANCEL fi - # # Maybe the default item was marked as active - # - if [ $defaultitem ]; then - ifconfig $defaultitem 2 /dev/null | - awk '($1 == status: $2 == active){exit 1}' || - defaultitem=$defaultitem* - fi - - local hline=$hline_arrows_tab_enter + f_device_is_active $defaultitem defaultitem=$defaultitem* # # Ask user to select an interface # local prompt=$msg_select_network_interface + local hline=$hline_arrows_tab_enter local height width rows eval f_dialog_menu_size height width rows \ \\$DIALOG_TITLE\ \ Modified: head/usr.sbin/bsdconfig/share/device.subr == --- head/usr.sbin/bsdconfig/share/device.subr Fri Nov 22 00:26:21 2013 (r258457) +++ head/usr.sbin/bsdconfig/share/device.subr Fri Nov 22 00:32:32 2013
svn commit: r258437 - head/contrib/mtree
Author: brooks Date: Thu Nov 21 19:29:41 2013 New Revision: 258437 URL: http://svnweb.freebsd.org/changeset/base/258437 Log: Sync with NetBSD. The funtional change is to make the output when comparing a directory to an mtree file more compatible with fmtree when FreeBSD 9 compatiblity mode is on. This output is clearly intended for humans not computers, but some tools such as mergemaster's -U option rely on it. MFC after:3 days Modified: head/contrib/mtree/compare.c head/contrib/mtree/create.c head/contrib/mtree/spec.c Directory Properties: head/contrib/mtree/ (props changed) Modified: head/contrib/mtree/compare.c == --- head/contrib/mtree/compare.cThu Nov 21 19:20:08 2013 (r258436) +++ head/contrib/mtree/compare.cThu Nov 21 19:29:41 2013 (r258437) @@ -1,4 +1,4 @@ -/* $NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $*/ +/* $NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $*/ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = @(#)compare.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $); +__RCSID($NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $); #endif #endif /* not lint */ @@ -47,8 +47,8 @@ __RCSID($NetBSD: compare.c,v 1.56 2013/ #include errno.h #include fcntl.h -#include stdint.h #include stdio.h +#include stdint.h #include stdlib.h #include string.h #include time.h @@ -72,13 +72,18 @@ __RCSID($NetBSD: compare.c,v 1.56 2013/ #defineINDENTNAMELEN 8 #define MARK \ do { \ - len = printf(%s: , RP(p));\ - if (len INDENTNAMELEN) { \ + if (flavor == F_FREEBSD9) { \ + len = printf(%s changed\n, RP(p));\ tab = \t; \ - printf(\n); \ } else {\ - tab = ; \ - printf(%*s, INDENTNAMELEN - (int)len, );\ + len = printf(%s: , RP(p));\ + if (len INDENTNAMELEN) { \ + tab = \t; \ + printf(\n); \ + } else {\ + tab = ; \ + printf(%*s, INDENTNAMELEN - (int)len, );\ + } \ } \ } while (0) #defineLABEL if (!label++) MARK @@ -171,7 +176,8 @@ compare(NODE *s, FTSENT *p) break; #endif typeerr: LABEL; - printf(\ttype (%s, %s)\n, + printf(flavor == F_FREEBSD9 ? + \ttype expected %s found %s\n : \ttype (%s, %s)\n, nodetype(s-type), inotype(p-fts_statp-st_mode)); return (label); } @@ -193,7 +199,9 @@ typeerr:LABEL; (s-type == F_BLOCK || s-type == F_CHAR) s-st_rdev != p-fts_statp-st_rdev) { LABEL; - printf(%sdevice (%#jx, %#jx, + printf(flavor == F_FREEBSD9 ? + %sdevice expected %#jx found %#jx : + %sdevice (%#jx, %#jx, tab, (uintmax_t)s-st_rdev, (uintmax_t)p-fts_statp-st_rdev); if (uflag) { @@ -203,10 +211,12 @@ typeerr: LABEL; s-st_rdev) == -1) || (lchown(p-fts_accpath, p-fts_statp-st_uid, p-fts_statp-st_gid) == -1) ) - printf(, not modified: %s)\n, - strerror(errno)); + printf(, not modified: %s%s\n, + strerror(errno), + flavor == F_FREEBSD9 ? : )); else - printf(, modified)\n); + printf(, modified%s\n, + flavor == F_FREEBSD9 ? : )); } else printf()\n); tab = \t; @@ -214,28 +224,34 @@ typeerr: LABEL; /* Set the uid/gid first, then set the mode. */ if (s-flags (F_UID
Re: svn commit: r258328 - head/sys/net
On 21 November 2013 06:36, Hooman Fazaeli hoomanfaza...@gmail.com wrote: What are possible sideeffects? What are the benefits we achieve by a distinct queue structure and having both if_input and if_input_multi? Doing incremental development where you can minimise unintended side-effects during development? -adrian ___ 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: r258438 - head/usr.sbin/wpa/ndis_events
Author: pluknet Date: Thu Nov 21 19:31:57 2013 New Revision: 258438 URL: http://svnweb.freebsd.org/changeset/base/258438 Log: Fix reference to ioctl(2). Modified: head/usr.sbin/wpa/ndis_events/ndis_events.8 Modified: head/usr.sbin/wpa/ndis_events/ndis_events.8 == --- head/usr.sbin/wpa/ndis_events/ndis_events.8 Thu Nov 21 19:29:41 2013 (r258437) +++ head/usr.sbin/wpa/ndis_events/ndis_events.8 Thu Nov 21 19:31:57 2013 (r258438) @@ -81,7 +81,7 @@ The version performs the same functions as the .Tn Windows\[rg] one, except that it uses an -.Xr ioctl 4 +.Xr ioctl 2 and routing socket interface instead of WMI. .Pp Note that a single instance of ___ 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: r258446 - head/usr.bin/from
Author: eadler Date: Thu Nov 21 21:19:01 2013 New Revision: 258446 URL: http://svnweb.freebsd.org/changeset/base/258446 Log: Add static where appropriate. Sync with some of DragonflyBSD's latest cleanups Reviewed by: mjg Modified: head/usr.bin/from/from.c Modified: head/usr.bin/from/from.c == --- head/usr.bin/from/from.cThu Nov 21 21:05:11 2013(r258445) +++ head/usr.bin/from/from.cThu Nov 21 21:19:01 2013(r258446) @@ -51,7 +51,7 @@ __FBSDID($FreeBSD$); #include string.h #include unistd.h -int match(const char *, const char *); +static int match(const char *, const char *); static void usage(void); int @@ -81,8 +81,7 @@ main(int argc, char **argv) case 's': sender = optarg; for (p = sender; *p; ++p) - if (isupper(*p)) - *p = tolower(*p); + *p = tolower(*p); break; case '?': default: @@ -142,7 +141,7 @@ usage(void) exit(1); } -int +static int match(const char *line, const char *sender) { char ch, pch, first; @@ -152,15 +151,14 @@ match(const char *line, const char *send if (isspace(ch = *line)) return(0); ++line; - if (isupper(ch)) - ch = tolower(ch); + ch = tolower(ch); if (ch != first) continue; for (p = sender, t = line;;) { if (!(pch = *p++)) return(1); - if (isupper(ch = *t++)) - ch = tolower(ch); + ch = tolower(*t); + t++; if (ch != pch) break; } ___ 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
Re: svn commit: r256423 - head/sys/dev/xen/blkfront
On 10/12/2013 22:34, Justin T. Gibbs wrote: Author: gibbs Date: Sun Oct 13 02:34:20 2013 New Revision: 256423 URL: http://svnweb.freebsd.org/changeset/base/256423 Log: Allow FreeBSD to be booted from CDROM media on XenServer 6.2 and prior releases. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems RD Reviewed by:gibbs Approved by:re (gjb) sys/dev/xen/blkfront/blkfront.c: On XenServer versions up to an including 6.2, paravirtualized CDROM support is broken. When running in an HVM domain, ignore paravirtualized instances of CDROM media, and instead rely on native drivers attaching to emulated hardware. This functions correctly on all currently known Xen based platforms. Can this pretty please be MFC'ed for 10.0? I haven't heard of any problems with it, only successes on freebsd-...@freebsd.org (thread: FreeBSD Alpha5 amd64 - Citrix Xen 6.2 problem). Thanks! ___ 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
Re: svn commit: r256423 - head/sys/dev/xen/blkfront
On 11/21/2013 17:00, Adam McDougall wrote: On 10/12/2013 22:34, Justin T. Gibbs wrote: Author: gibbs Date: Sun Oct 13 02:34:20 2013 New Revision: 256423 URL: http://svnweb.freebsd.org/changeset/base/256423 Log: Allow FreeBSD to be booted from CDROM media on XenServer 6.2 and prior releases. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems RD Reviewed by: gibbs Approved by: re (gjb) sys/dev/xen/blkfront/blkfront.c: On XenServer versions up to an including 6.2, paravirtualized CDROM support is broken. When running in an HVM domain, ignore paravirtualized instances of CDROM media, and instead rely on native drivers attaching to emulated hardware. This functions correctly on all currently known Xen based platforms. Can this pretty please be MFC'ed for 10.0? I haven't heard of any problems with it, only successes on freebsd-...@freebsd.org (thread: FreeBSD Alpha5 amd64 - Citrix Xen 6.2 problem). Thanks! Oops nevermind! Mark clued me in to r256757 which is in BETA 3. Thanks again. ___ 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: r258439 - in head/usr.sbin/bsdconfig: dot includes
Author: dteske Date: Thu Nov 21 19:43:45 2013 New Revision: 258439 URL: http://svnweb.freebsd.org/changeset/base/258439 Log: f_die() (see `bsdconfig includes -dF die') uses a dialog box (and has been documented as such; I just forgot). These utilities are command-line only and as such should stick to either using f_die without arguments or printf) Modified: head/usr.sbin/bsdconfig/dot/dot head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/dot/dot == --- head/usr.sbin/bsdconfig/dot/dot Thu Nov 21 19:31:57 2013 (r258438) +++ head/usr.sbin/bsdconfig/dot/dot Thu Nov 21 19:43:45 2013 (r258439) @@ -163,7 +163,7 @@ while getopts cdhi flag; do done shift $(( $OPTIND - 1 )) -cd $BSDCFG_LIBE || f_die 1 $msg_directory_not_found $BSDCFG_LIB +cd $BSDCFG_LIBE || f_die # Pedantic # # Get a list of menu programs Modified: head/usr.sbin/bsdconfig/includes/includes == --- head/usr.sbin/bsdconfig/includes/includes Thu Nov 21 19:31:57 2013 (r258438) +++ head/usr.sbin/bsdconfig/includes/includes Thu Nov 21 19:43:45 2013 (r258439) @@ -137,7 +137,7 @@ done shift $(( $OPTIND - 1 )) # cd(1) to `share' dir so relative paths work for find and positional args -cd $BSDCFG_SHARE || f_die 1 $msg_directory_not_found $BSDCFG_SHARE +cd $BSDCFG_SHARE || f_die # Pedantic # # If given an argument, operate on it specifically (implied `-f') and exit @@ -147,9 +147,11 @@ for include in $@; do # See if they've just omitted the `*.subr' suffix [ -f $include.subr -a ! -f $include ] include=$include.subr if [ ! -f $include ]; then - f_die 1 $msg_no_such_file_or_directory $0 $include + printf $msg_no_such_file_or_directory $0 $include + exit $FAILURE elif [ ! -r $include ]; then - f_die 1 $msg_permission_denied $0 $include + printf $msg_permission_denied $0 $include + exit $FAILURE fi show_include $include || f_die done ___ 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: r258445 - in head/gnu/usr.bin/cc: . cc_tools
Author: andreast Date: Thu Nov 21 21:05:11 2013 New Revision: 258445 URL: http://svnweb.freebsd.org/changeset/base/258445 Log: Fix cross compilation after r258428. Reviewed by: pfg Modified: head/gnu/usr.bin/cc/Makefile.inc head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: head/gnu/usr.bin/cc/Makefile.inc == --- head/gnu/usr.bin/cc/Makefile.incThu Nov 21 20:43:43 2013 (r258444) +++ head/gnu/usr.bin/cc/Makefile.incThu Nov 21 21:05:11 2013 (r258445) @@ -23,7 +23,7 @@ CFLAGS+= -DPREFIX=\${TOOLS_PREFIX}/usr\ CSTD?= gnu89 .if ${TARGET_ARCH} != ${MACHINE_ARCH} -CFLAGS+= -DCROSS_COMPILE +CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE .endif .if ${TARGET_CPUARCH} == arm ${MK_ARM_EABI} != no Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h == --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Thu Nov 21 20:43:43 2013(r258444) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Thu Nov 21 21:05:11 2013(r258445) @@ -18,7 +18,7 @@ #define GPLUSPLUS_INCLUDE_DIR PREFIX/include/c++/GCCVER #defineGPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX/include/c++/GCCVER/backward #define GCC_INCLUDE_DIRPREFIX/include/gcc/GCCVER -#ifdef CROSS_COMPILE +#ifdef CROSS_DIRECTORY_STRUCTURE #define CROSS_INCLUDE_DIR PREFIX/include #else #define STANDARD_INCLUDE_DIR PREFIX/include ___ 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
Re: svn commit: r258328 - head/sys/net
On 11/21/2013 1:32 AM, Adrian Chadd wrote: Can we revert this and just quickly put together something else that won't potentially come back to bite us with weird side effects? My suggestions (and I'm happy to do this work if needed): * create a lightweight mbuf queue representation so an mbuf list isn't just the mbuf header pointer; * create a new ether input (say, ether_input_multi) that takes an mbuf list, so existing driver code does the right thing. After that it'd be nice to write a set of mbuf list macros for abstract the whole queue, dequeue, concat, iterate, etc (like sys/queue.h, but for mbufs.) What do people think? (I've been doing it for m-next chained things, but not m-m_nextpkt things..) -adrian What are possible sideeffects? What are the benefits we achieve by a distinct queue structure and having both if_input and if_input_multi? -- Best regards. Hooman Fazaeli ___ 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: r258429 - in head/contrib/libstdc++: include/bits include/ext libsupc++ src
Author: pfg Date: Thu Nov 21 16:44:36 2013 New Revision: 258429 URL: http://svnweb.freebsd.org/changeset/base/258429 Log: libstdc++: merge non-abi changes from Apple's developer tools Take some changes from Apple's Developer Tools 4.0 [1]: block.patch emergency-buffer-reduction.patch test_cleanup.patch vector_copy_no_alloc.patch problem/6473222 copy-constructing a std::vector from an empty std::vector calls malloc 2008-10-27 Howard Hinnant stl_tree_system_header.patch Added #pragma GCC system_header to stl_tree.h. copy_doc.patch Corrected documentation concerning copy in stl_algobase.h. string_compare.patch Fixed basic_string.h, basic_string.tcc, incorrect 64bit to 32bit narrowing. Reference: [1] http://opensource.apple.com/source/libstdcxx/libstdcxx-39/patches-4.2.1/ Obtained from:Apple MFC after:1 month Modified: head/contrib/libstdc++/include/bits/basic_string.h head/contrib/libstdc++/include/bits/basic_string.tcc head/contrib/libstdc++/include/bits/stl_algobase.h head/contrib/libstdc++/include/bits/stl_tree.h head/contrib/libstdc++/include/bits/stl_vector.h head/contrib/libstdc++/include/ext/mt_allocator.h head/contrib/libstdc++/include/ext/throw_allocator.h head/contrib/libstdc++/libsupc++/eh_alloc.cc head/contrib/libstdc++/src/mt_allocator.cc Modified: head/contrib/libstdc++/include/bits/basic_string.h == --- head/contrib/libstdc++/include/bits/basic_string.h Thu Nov 21 16:38:57 2013(r258428) +++ head/contrib/libstdc++/include/bits/basic_string.h Thu Nov 21 16:44:36 2013(r258429) @@ -390,6 +390,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } + static int + _S_compare(size_type __x, size_type __y) + { + if (__x __y) +return 1; + if (__x __y) +return -1; + return 0; + } + void _M_mutate(size_type __pos, size_type __len1, size_type __len2); @@ -1934,7 +1944,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) int __r = traits_type::compare(_M_data(), __str.data(), __len); if (!__r) - __r = __size - __osize; + __r = _S_compare(__size, __osize); return __r; } Modified: head/contrib/libstdc++/include/bits/basic_string.tcc == --- head/contrib/libstdc++/include/bits/basic_string.tccThu Nov 21 16:38:57 2013(r258428) +++ head/contrib/libstdc++/include/bits/basic_string.tccThu Nov 21 16:44:36 2013(r258429) @@ -903,7 +903,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const size_type __len = std::min(__n, __osize); int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); if (!__r) - __r = __n - __osize; + __r = _S_compare(__n, __osize); return __r; } @@ -921,7 +921,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) int __r = traits_type::compare(_M_data() + __pos1, __str.data() + __pos2, __len); if (!__r) - __r = __n1 - __n2; + __r = _S_compare(__n1, __n2); return __r; } @@ -936,7 +936,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __s, __len); if (!__r) - __r = __size - __osize; + __r = _S_compare(__size, __osize); return __r; } @@ -952,7 +952,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const size_type __len = std::min(__n1, __osize); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) - __r = __n1 - __osize; + __r = _S_compare(__n1, __osize); return __r; } @@ -968,7 +968,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) - __r = __n1 - __n2; + __r = _S_compare(__n1, __n2); return __r; } Modified: head/contrib/libstdc++/include/bits/stl_algobase.h == --- head/contrib/libstdc++/include/bits/stl_algobase.h Thu Nov 21 16:38:57 2013(r258428) +++ head/contrib/libstdc++/include/bits/stl_algobase.h Thu Nov 21 16:44:36 2013(r258429) @@ -373,7 +373,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * @param first An input iterator. * @param last An input iterator. * @param result An output iterator. - * @return result + (first - last) + * @return result + (last - first) * * This inline function will boil down to a call to @c memmove whenever * possible. Failing that, if random access iterators are
svn commit: r258442 - in stable/9/usr.bin: kdump truss
Author: jhb Date: Thu Nov 21 20:09:44 2013 New Revision: 258442 URL: http://svnweb.freebsd.org/changeset/base/258442 Log: MFC 226145,226147,226148,226150,226151,226153,226157,226158,226164,226246, 226262,226329,226344,226608: Merge most infrastructure changes to kdump to make other MFC's to add new decodings, etc. easier: - Some of the #defines or enums for which we auto-generate naming functions may be wider than int, so use intmax_t throughout. - Auto-generate kdump_subr.h. - Use a switch statement instead of a giant if-else. - Remove a lot of (void) casts. - Bring ioctlname() in line with all the other *name() functions, which actually print the name (or the numeric value, if they can't figure out the correct name) instead of just returning a pointer to it. Also, since ioctl numbers are not and probably never will be unique, drop support for using a switch statement instead of an if/else chain. - Mostly WARNS=6 clean. - Update mkioctls to still work with both kdump and truss. Deleted: stable/9/usr.bin/kdump/kdump_subr.h Modified: stable/9/usr.bin/kdump/Makefile stable/9/usr.bin/kdump/kdump.c stable/9/usr.bin/kdump/mkioctls stable/9/usr.bin/kdump/mksubr stable/9/usr.bin/truss/Makefile stable/9/usr.bin/truss/extern.h Directory Properties: stable/9/usr.bin/kdump/ (props changed) stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/kdump/Makefile == --- stable/9/usr.bin/kdump/Makefile Thu Nov 21 20:07:58 2013 (r258441) +++ stable/9/usr.bin/kdump/Makefile Thu Nov 21 20:09:44 2013 (r258442) @@ -8,23 +8,28 @@ SFX= 32 .PATH: ${.CURDIR}/../ktrace PROG= kdump -SRCS= kdump.c ioctl.c kdump_subr.c subr.c -CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. +SRCS= kdump_subr.c kdump.c ioctl.c subr.c +DPSRCS=kdump_subr.h +CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == i386 SRCS+= linux_syscalls.c .endif -WARNS?=0 +NO_WERROR?=YES -CLEANFILES=ioctl.c kdump_subr.c linux_syscalls.c +CLEANFILES=ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c ioctl.c: mkioctls - env CPP=${CPP} \ - sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include ${.TARGET} + env MACHINE=${MACHINE} CPP=${CPP} \ + sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include ${.TARGET} -kdump_subr.c: mksubr - sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include ${.TARGET} +kdump_subr.h: mksubr + sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \ + sed -n 's/^\([a-z].*)\)$$/void \1;/p' ${.TARGET} + +kdump_subr.c: mksubr kdump_subr.h + sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include ${.TARGET} linux_syscalls.c: /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ Modified: stable/9/usr.bin/kdump/kdump.c == --- stable/9/usr.bin/kdump/kdump.c Thu Nov 21 20:07:58 2013 (r258441) +++ stable/9/usr.bin/kdump/kdump.c Thu Nov 21 20:09:44 2013 (r258442) @@ -96,6 +96,8 @@ void ktrgenio(struct ktr_genio *, int); void ktrpsig(struct ktr_psig *); void ktrcsw(struct ktr_csw *); void ktrcsw_old(struct ktr_csw_old *); +void ktruser_malloc(unsigned char *); +void ktruser_rtld(int, unsigned char *); void ktruser(int, unsigned char *); void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); @@ -103,8 +105,7 @@ void ktrstruct(char *, size_t); void ktrfault(struct ktr_fault *); void ktrfaultend(struct ktr_faultend *); void usage(void); -void sockfamilyname(int); -const char *ioctlname(u_long); +void ioctlname(unsigned long, int); int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, resolv = 0, abiflag = 0; @@ -114,15 +115,15 @@ struct ktr_header ktr_header; #define TIME_FORMAT%b %e %T %Y #define eqs(s1, s2)(strcmp((s1), (s2)) == 0) -#define print_number(i,n,c) do { \ - if (decimal)\ - printf(%c%ld, c, (long)*i); \ - else\ - printf(%c%#lx, c, (long)*i); \ - i++;\ - n--;\ - c = ',';\ - } while (0); +#define print_number(i,n,c) do { \ + if (decimal)\ + printf(%c%jd, c, (intmax_t)*i); \ + else\ + printf(%c%#jx, c, (uintmax_t)(u_register_t)*i); \ + i++;\ + n--;
svn commit: r258431 - head/sys/amd64/amd64
Author: emaste Date: Thu Nov 21 18:37:11 2013 New Revision: 258431 URL: http://svnweb.freebsd.org/changeset/base/258431 Log: Disable amd64 boot time memory test by default The page presence memory test takes a long time on large memory systems and has little value on contemporary amd64 hardware. Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Thu Nov 21 17:49:56 2013 (r258430) +++ head/sys/amd64/amd64/machdep.c Thu Nov 21 18:37:11 2013 (r258431) @@ -1476,13 +1476,15 @@ getmemsize(caddr_t kmdp, u_int64_t first Maxmem = atop(physmem_tunable); /* -* By default enable the memory test on real hardware, and disable -* it if we appear to be running in a VM. This avoids touching all -* pages unnecessarily, which doesn't matter on real hardware but is -* bad for shared VM hosts. Use a general name so that -* one could eventually do more with the code than just disable it. +* The boot memory test is disabled by default, as it takes a +* significant amount of time on large-memory systems, and is +* unfriendly to virtual machines as it unnecessarily touches all +* pages. +* +* A general name is used as the code may be extended to support +* additional tests beyond the current page present test. */ - memtest = (vm_guest VM_GUEST_NO) ? 0 : 1; + memtest = 0; TUNABLE_ULONG_FETCH(hw.memtest.tests, memtest); /* ___ 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: r258454 - in stable/10/sys: netinet netinet6
Author: tuexen Date: Thu Nov 21 23:00:09 2013 New Revision: 258454 URL: http://svnweb.freebsd.org/changeset/base/258454 Log: MFC r256556: Remove a buggy comparision when setting manually the path MTU. After fixing, the comparision would have become redundant. Thanks to Andrew Galante for reporting the issue. MFC r257272: Fix compilation if SCTP_DONT_DO_PRIVADDR_SCOPE is defined. The issue was reported by Andrew Galante. MFC r257274: Fix the value of *optlen when calling getsockopt() for SCTP_REMOTE_UDP_ENCAPS_PORT. This issue was reported by Andrew Galante. MFC r257359: Terminate a debug output with a \n. MFC r257555: Changes from upstream to improve compilation when INET or INET6 or none of them is defined. MFC r257574: Unlock the lock before destroying it. This issue was reported by Andrew Galante. MFC r257800: Use htons()/ntohs() appropriately. These issues were reported by Andrew Galante. MFC r257803: Make sure that we don't try to build an ASCONF-ACK chunk larger than what fits in the the mbuf cluster. This issue was reported by Andrew Galante. MFC r257804: Get rid of the artification limitation enforced by SCTP_AUTH_RANDOM_SIZE_MAX. This was suggested by Andrew Galante. MFC r258221: Cleanups which result in fixes which have been made upstream and where partially suggested by Andrew Galante. There is no functional change in FreeBSD. MFC r258224: When determining if an address belongs to an stcb, take the address family into account for wildcard bound endpoints. MFC r258228: Remove a stray write operation. MFC r258235: Use SCTP_PR_SCTP_TTL when the user provides a positive timetolive in sctp_sendmsg(). Approved by: re@ Modified: stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_auth.c stable/10/sys/netinet/sctp_auth.h stable/10/sys/netinet/sctp_bsd_addr.c stable/10/sys/netinet/sctp_constants.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c stable/10/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/netinet/sctp_asconf.c == --- stable/10/sys/netinet/sctp_asconf.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_asconf.c Thu Nov 21 23:00:09 2013 (r258454) @@ -150,7 +150,12 @@ sctp_process_asconf_add_ip(struct sockad struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; int bad_address = 0; @@ -169,8 +174,9 @@ sctp_process_asconf_add_ip(struct sockad aparam_length = ntohs(aph-ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph-param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph-param_length); - +#endif sa = (struct sockaddr *)sa_store; switch (param_type) { #ifdef INET @@ -298,7 +304,12 @@ sctp_process_asconf_delete_ip(struct soc struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; int result; @@ -317,8 +328,9 @@ sctp_process_asconf_delete_ip(struct soc aparam_length = ntohs(aph-ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph-param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph-param_length); - +#endif sa = (struct sockaddr *)sa_store; switch (param_type) { #ifdef INET @@ -427,7 +439,12 @@ sctp_process_asconf_set_primary(struct s struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; @@ -445,8 +462,9 @@ sctp_process_asconf_set_primary(struct s aparam_length = ntohs(aph-ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph-param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph-param_length); - +#endif sa = (struct sockaddr *)sa_store;
svn commit: r258463 - head/sys/netpfil/ipfw
Author: luigi Date: Fri Nov 22 04:57:50 2013 New Revision: 258463 URL: http://svnweb.freebsd.org/changeset/base/258463 Log: make ipfw_check_packet() and ipfw_check_frame() public, so they can be used in the userspace version of ipfw/dummynet (normally using netmap for the I/O path). This is the first of a few commits to ease compiling the ipfw kernel code in userspace. Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c == --- head/sys/netpfil/ipfw/ip_fw_pfil.c Fri Nov 22 04:05:24 2013 (r258462) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Fri Nov 22 04:57:50 2013 (r258463) @@ -82,9 +82,9 @@ int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); /* Forward declarations. */ static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int); -static int ipfw_check_packet(void *, struct mbuf **, struct ifnet *, int, +int ipfw_check_packet(void *, struct mbuf **, struct ifnet *, int, struct inpcb *); -static int ipfw_check_frame(void *, struct mbuf **, struct ifnet *, int, +int ipfw_check_frame(void *, struct mbuf **, struct ifnet *, int, struct inpcb *); #ifdef SYSCTL_NODE @@ -116,7 +116,7 @@ SYSEND * dummynet, divert, netgraph or other modules. * The packet may be consumed. */ -static int +int ipfw_check_packet(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp) { @@ -292,7 +292,7 @@ again: * Inteface is NULL from ether_demux, and ifp from * ether_output_frame. */ -static int +int ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *dst, int dir, struct inpcb *inp) { ___ 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: r258464 - head/sys/netpfil/ipfw
Author: luigi Date: Fri Nov 22 04:59:17 2013 New Revision: 258464 URL: http://svnweb.freebsd.org/changeset/base/258464 Log: more support for userspace compiling of this code: emulate the uma_zone for dynamic rules. Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c == --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Nov 22 04:57:50 2013 (r258463) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Nov 22 04:59:17 2013 (r258464) @@ -181,6 +181,13 @@ static VNET_DEFINE(u_int32_t, dyn_max); #defineDYN_COUNT uma_zone_get_cur(V_ipfw_dyn_rule_zone) #defineV_dyn_max VNET(dyn_max) +/* for userspace, we emulate the uma_zone_counter with ipfw_dyn_count */ +static int ipfw_dyn_count; /* number of objects */ + +#ifdef USERSPACE /* emulation of UMA object counters for userspace */ +#define uma_zone_get_cur(x)ipfw_dyn_count +#endif /* USERSPACE */ + static int last_log; /* Log ratelimiting */ static void ipfw_dyn_tick(void *vnetx); @@ -579,6 +586,7 @@ add_dyn_rule(struct ipfw_flow_id *id, in } return NULL; } + ipfw_dyn_count++; /* * refcount on parent is already incremented, so @@ -1253,11 +1261,13 @@ check_dyn_rules(struct ip_fw_chain *chai for (q = exp_head; q != NULL; q = q_next) { q_next = q-next; uma_zfree(V_ipfw_dyn_rule_zone, q); + ipfw_dyn_count--; } for (q = exp_lhead; q != NULL; q = q_next) { q_next = q-next; uma_zfree(V_ipfw_dyn_rule_zone, q); + ipfw_dyn_count--; } /* ___ 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: r258465 - head/sys/netpfil/ipfw
Author: luigi Date: Fri Nov 22 05:00:18 2013 New Revision: 258465 URL: http://svnweb.freebsd.org/changeset/base/258465 Log: make this code compile in userspace on OSX Modified: head/sys/netpfil/ipfw/ip_fw_log.c Modified: head/sys/netpfil/ipfw/ip_fw_log.c == --- head/sys/netpfil/ipfw/ip_fw_log.c Fri Nov 22 04:59:17 2013 (r258464) +++ head/sys/netpfil/ipfw/ip_fw_log.c Fri Nov 22 05:00:18 2013 (r258465) @@ -85,8 +85,15 @@ __FBSDID($FreeBSD$); #defineICMP(p) ((struct icmphdr *)(p)) #defineICMP6(p)((struct icmp6_hdr *)(p)) +#ifdef __APPLE__ +#undef snprintf +#define snprintf sprintf +#define SNPARGS(buf, len) buf + len +#define SNP(buf) buf +#else /* !__APPLE__ */ #define SNPARGS(buf, len) buf + len, sizeof(buf) len ? sizeof(buf) - len : 0 #define SNP(buf) buf, sizeof(buf) +#endif /* !__APPLE__ */ #ifdef WITHOUT_BPF void ___ 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: r258466 - head/sys/netpfil/ipfw
Author: luigi Date: Fri Nov 22 05:01:38 2013 New Revision: 258466 URL: http://svnweb.freebsd.org/changeset/base/258466 Log: disable some ipfw match options when compiling in userspace Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c == --- head/sys/netpfil/ipfw/ip_fw2.c Fri Nov 22 05:00:18 2013 (r258465) +++ head/sys/netpfil/ipfw/ip_fw2.c Fri Nov 22 05:01:38 2013 (r258466) @@ -370,7 +370,7 @@ iface_match(struct ifnet *ifp, ipfw_insn return(1); } } else { -#ifdef __FreeBSD__ /* and OSX too ? */ +#if !defined(USERSPACE) defined(__FreeBSD__)/* and OSX too ? */ struct ifaddr *ia; if_addr_rlock(ifp); @@ -413,7 +413,7 @@ iface_match(struct ifnet *ifp, ipfw_insn static int verify_path(struct in_addr src, struct ifnet *ifp, u_int fib) { -#ifndef __FreeBSD__ +#if defined(USERSPACE) || !defined(__FreeBSD__) return 0; #else struct route ro; @@ -664,6 +664,9 @@ static int check_uidgid(ipfw_insn_u32 *insn, struct ip_fw_args *args, int *ugid_lookupp, struct ucred **uc) { +#if defined(USERSPACE) + return 0; // not supported in userspace +#else #ifndef __FreeBSD__ /* XXX */ return cred_check(insn, proto, oif, @@ -766,6 +769,7 @@ check_uidgid(ipfw_insn_u32 *insn, struct match = ((*uc)-cr_prison-pr_id == (int)insn-d[0]); return (match); #endif /* __FreeBSD__ */ +#endif /* not supported in userspace */ } /* @@ -1464,6 +1468,7 @@ do { \ key = htonl(dst_port); else if (v == 3) key = htonl(src_port); +#ifndef USERSPACE else if (v == 4 || v == 5) { check_uidgid( (ipfw_insn_u32 *)cmd, @@ -1483,6 +1488,7 @@ do { \ #endif /* !__FreeBSD__ */ key = htonl(key); } else +#endif /* !USERSPACE */ break; } match = ipfw_lookup_table(chain, @@ -1946,6 +1952,7 @@ do { \ break; case O_SOCKARG: { +#ifndef USERSPACE /* not supported in userspace */ struct inpcb *inp = args-inp; struct inpcbinfo *pi; @@ -1986,6 +1993,7 @@ do { \ match = 1; } } +#endif /* !USERSPACE */ break; } ___ 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: r258467 - head/sys/netpfil/ipfw
Author: luigi Date: Fri Nov 22 05:02:37 2013 New Revision: 258467 URL: http://svnweb.freebsd.org/changeset/base/258467 Log: add a counter on the struct mq (a queue of mbufs), and add a block for userspace compiling. Modified: head/sys/netpfil/ipfw/dn_sched.h head/sys/netpfil/ipfw/ip_dn_io.c head/sys/netpfil/ipfw/ip_dn_private.h Modified: head/sys/netpfil/ipfw/dn_sched.h == --- head/sys/netpfil/ipfw/dn_sched.hFri Nov 22 05:01:38 2013 (r258466) +++ head/sys/netpfil/ipfw/dn_sched.hFri Nov 22 05:02:37 2013 (r258467) @@ -166,6 +166,7 @@ dn_dequeue(struct dn_queue *q) if (m == NULL) return NULL; q-mq.head = m-m_nextpkt; + q-mq.count--; /* Update stats for the queue */ q-ni.length--; Modified: head/sys/netpfil/ipfw/ip_dn_io.c == --- head/sys/netpfil/ipfw/ip_dn_io.cFri Nov 22 05:01:38 2013 (r258466) +++ head/sys/netpfil/ipfw/ip_dn_io.cFri Nov 22 05:02:37 2013 (r258467) @@ -260,10 +260,39 @@ dn_tag_get(struct mbuf *m) static inline void mq_append(struct mq *q, struct mbuf *m) { +#ifdef USERSPACE + // buffers from netmap need to be copied + // XXX note that the routine is not expected to fail + ND(append %p to %p, m, q); + if (m-m_flags M_STACK) { + struct mbuf *m_new; + void *p; + int l, ofs; + + ofs = m-m_data - m-__m_extbuf; + // XXX allocate + MGETHDR(m_new, M_NOWAIT, MT_DATA); + ND(*** WARNING, volatile buf %p ext %p %d dofs %d m_new %p, + m, m-__m_extbuf, m-__m_extlen, ofs, m_new); + p = m_new-__m_extbuf; /* new pointer */ + l = m_new-__m_extlen; /* new len */ + if (l = m-__m_extlen) { + panic(extlen too large); + } + + *m_new = *m;// copy + m_new-m_flags = ~M_STACK; + m_new-__m_extbuf = p; // point to new buffer + pkt_copy(m-__m_extbuf, p, m-__m_extlen); + m_new-m_data = p + ofs; + m = m_new; + } +#endif /* USERSPACE */ if (q-head == NULL) q-head = m; else q-tail-m_nextpkt = m; + q-count++; q-tail = m; m-m_nextpkt = NULL; } @@ -455,6 +484,7 @@ transmit_event(struct mq *q, struct dela if (!DN_KEY_LEQ(pkt-output_time, now)) break; dline-mq.head = m-m_nextpkt; + dline-mq.count--; mq_append(q, m); } if (m != NULL) { Modified: head/sys/netpfil/ipfw/ip_dn_private.h == --- head/sys/netpfil/ipfw/ip_dn_private.h Fri Nov 22 05:01:38 2013 (r258466) +++ head/sys/netpfil/ipfw/ip_dn_private.h Fri Nov 22 05:02:37 2013 (r258467) @@ -83,6 +83,7 @@ SLIST_HEAD(dn_alg_head, dn_alg); struct mq {/* a basic queue of packets*/ struct mbuf *head, *tail; + int count; }; static inline void ___ 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