From owner-svn-src-stable@FreeBSD.ORG Sun Sep 6 06:05:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84A8A106566B; Sun, 6 Sep 2009 06:05:23 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73AA48FC14; Sun, 6 Sep 2009 06:05:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8665Nqg074681; Sun, 6 Sep 2009 06:05:23 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8665Npo074679; Sun, 6 Sep 2009 06:05:23 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200909060605.n8665Npo074679@svn.freebsd.org> From: Julian Elischer Date: Sun, 6 Sep 2009 06:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196876 - stable/8 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2009 06:05:23 -0000 Author: julian Date: Sun Sep 6 06:05:23 2009 New Revision: 196876 URL: http://svn.freebsd.org/changeset/base/196876 Log: MFC of r196477 Don't delete copies of nthread_create(9) we find inthe filesystem. we now link it to kproc_create(9), it's new name. Approved by: re (kib) Modified: stable/8/ObsoleteFiles.inc Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Sun Sep 6 01:03:19 2009 (r196875) +++ stable/8/ObsoleteFiles.inc Sun Sep 6 06:05:23 2009 (r196876) @@ -803,8 +803,6 @@ OLD_FILES+=rescue/bsdlabel OLD_FILES+=rescue/fdisk OLD_FILES+=rescue/gpt .endif -# 20071026: kthread(9)/kproc(9) API changes -OLD_FILES+=usr/share/man/man9/kthread_create.9.gz # 20071025: rc.d/nfslocking superceeded by rc.d/lockd and rc.d/statd OLD_FILES+=etc/rc.d/nfslocking # 20070930: rename of cached to nscd From owner-svn-src-stable@FreeBSD.ORG Sun Sep 6 14:05:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96AD6106566B; Sun, 6 Sep 2009 14:05:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83BF18FC1C; Sun, 6 Sep 2009 14:05:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n86E51aP085828; Sun, 6 Sep 2009 14:05:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n86E51PV085825; Sun, 6 Sep 2009 14:05:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200909061405.n86E51PV085825@svn.freebsd.org> From: Alexander Motin Date: Sun, 6 Sep 2009 14:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196892 - stable/8/sbin/camcontrol X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2009 14:05:01 -0000 Author: mav Date: Sun Sep 6 14:05:01 2009 New Revision: 196892 URL: http://svn.freebsd.org/changeset/base/196892 Log: MFC r196831: Add to `camcontrol cmd` support for sending arbitrary ATA commands. It could be used for broad range of tasks, such as configuring drive power management, caching, security and any other features and tasks, not supported by existing drivers. Approved by: re (ATA-CAM blanket) Modified: stable/8/sbin/camcontrol/ (props changed) stable/8/sbin/camcontrol/camcontrol.8 stable/8/sbin/camcontrol/camcontrol.c Modified: stable/8/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.8 Sun Sep 6 13:31:05 2009 (r196891) +++ stable/8/sbin/camcontrol/camcontrol.8 Sun Sep 6 14:05:01 2009 (r196892) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29, 2009 +.Dd September 4, 2009 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -120,10 +120,12 @@ .Ic cmd .Op device id .Op generic args +.Aq Fl a Ar cmd Op args .Aq Fl c Ar cmd Op args .Op Fl i Ar len Ar fmt .Bk -words .Op Fl o Ar len Ar fmt Op args +.Op Fl r Ar fmt .Ek .Nm .Ic debug @@ -486,12 +488,14 @@ Saved values .El .El .It Ic cmd -Allows the user to send an arbitrary SCSI CDB to any device. +Allows the user to send an arbitrary ATA or SCSI CDB to any device. The .Ic cmd function requires the .Fl c -argument to specify the CDB. +argument to specify SCSI CDB or the +.Fl a +argument to specify ATA Command Block registers values. Other arguments are optional, depending on the command type. The command and data specification syntax is documented @@ -503,9 +507,13 @@ SCSI device in question, you MUST specif or .Fl o . .Bl -tag -width 17n +.It Fl a Ar cmd Op args +This specifies the content of 12 ATA Command Block registers (command, +features, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp. +lba_high_exp, features_exp, sector_count, sector_count_exp). .It Fl c Ar cmd Op args This specifies the SCSI CDB. -CDBs may be 6, 10, 12 or 16 bytes. +SCSI CDBs may be 6, 10, 12 or 16 bytes. .It Fl i Ar len Ar fmt This specifies the amount of data to read, and how it should be displayed. If the format is @@ -519,6 +527,13 @@ If the format is .Sq - , .Ar len bytes of data will be read from standard input and written to the device. +.It Fl r Ar fmt +This specifies that 11 result ATA Command Block registers should be displayed +(status, error, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp, +lba_high_exp, sector_count, sector_count_exp), and how. +If the format is +.Sq - , +11 result registers will be written to standard output in hex. .El .It Ic debug Turn on CAM debugging printfs in the kernel. Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Sun Sep 6 13:31:05 2009 (r196891) +++ stable/8/sbin/camcontrol/camcontrol.c Sun Sep 6 14:05:01 2009 (r196892) @@ -120,7 +120,7 @@ struct camcontrol_opts { }; #ifndef MINIMALISTIC -static const char scsicmd_opts[] = "c:i:o:"; +static const char scsicmd_opts[] = "a:c:i:o:r"; static const char readdefect_opts[] = "f:GP"; static const char negotiate_opts[] = "acD:O:qR:T:UW:"; #endif @@ -2078,12 +2078,15 @@ scsicmd(struct cam_device *device, int a u_int32_t flags = CAM_DIR_NONE; u_int8_t *data_ptr = NULL; u_int8_t cdb[20]; + u_int8_t atacmd[12]; struct get_hook hook; int c, data_bytes = 0; int cdb_len = 0; - char *datastr = NULL, *tstr; + int atacmd_len = 0; + int need_res = 0; + char *datastr = NULL, *tstr, *resstr = NULL; int error = 0; - int fd_data = 0; + int fd_data = 0, fd_res = 0; int retval; ccb = cam_getccb(device); @@ -2094,10 +2097,32 @@ scsicmd(struct cam_device *device, int a } bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + sizeof(union ccb) - sizeof(struct ccb_hdr)); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { + case 'a': + tstr = optarg; + while (isspace(*tstr) && (*tstr != '\0')) + tstr++; + hook.argc = argc - optind; + hook.argv = argv + optind; + hook.got = 0; + atacmd_len = buff_encode_visit(atacmd, sizeof(atacmd), tstr, + iget, &hook); + /* + * Increment optind by the number of arguments the + * encoding routine processed. After each call to + * getopt(3), optind points to the argument that + * getopt should process _next_. In this case, + * that means it points to the first command string + * argument, if there is one. Once we increment + * this, it should point to either the next command + * line argument, or it should be past the end of + * the list. + */ + optind += hook.got; + break; case 'c': tstr = optarg; while (isspace(*tstr) && (*tstr != '\0')) @@ -2194,6 +2219,16 @@ scsicmd(struct cam_device *device, int a iget, &hook); optind += hook.got; break; + case 'r': + need_res = 1; + hook.argc = argc - optind; + hook.argv = argv + optind; + hook.got = 0; + resstr = cget(&hook, NULL); + if ((resstr != NULL) && (resstr[0] == '-')) + fd_res = 1; + optind += hook.got; + break; default: break; } @@ -2226,50 +2261,51 @@ scsicmd(struct cam_device *device, int a /* Disable freezing the device queue */ flags |= CAM_DEV_QFRZDIS; - /* - * This is taken from the SCSI-3 draft spec. - * (T10/1157D revision 0.3) - * The top 3 bits of an opcode are the group code. The next 5 bits - * are the command code. - * Group 0: six byte commands - * Group 1: ten byte commands - * Group 2: ten byte commands - * Group 3: reserved - * Group 4: sixteen byte commands - * Group 5: twelve byte commands - * Group 6: vendor specific - * Group 7: vendor specific - */ - switch((cdb[0] >> 5) & 0x7) { - case 0: - cdb_len = 6; - break; - case 1: - case 2: - cdb_len = 10; - break; - case 3: - case 6: - case 7: - /* computed by buff_encode_visit */ - break; - case 4: - cdb_len = 16; - break; - case 5: - cdb_len = 12; - break; - } + if (cdb_len) { + /* + * This is taken from the SCSI-3 draft spec. + * (T10/1157D revision 0.3) + * The top 3 bits of an opcode are the group code. + * The next 5 bits are the command code. + * Group 0: six byte commands + * Group 1: ten byte commands + * Group 2: ten byte commands + * Group 3: reserved + * Group 4: sixteen byte commands + * Group 5: twelve byte commands + * Group 6: vendor specific + * Group 7: vendor specific + */ + switch((cdb[0] >> 5) & 0x7) { + case 0: + cdb_len = 6; + break; + case 1: + case 2: + cdb_len = 10; + break; + case 3: + case 6: + case 7: + /* computed by buff_encode_visit */ + break; + case 4: + cdb_len = 16; + break; + case 5: + cdb_len = 12; + break; + } - /* - * We should probably use csio_build_visit or something like that - * here, but it's easier to encode arguments as you go. The - * alternative would be skipping the CDB argument and then encoding - * it here, since we've got the data buffer argument by now. - */ - bcopy(cdb, &ccb->csio.cdb_io.cdb_bytes, cdb_len); + /* + * We should probably use csio_build_visit or something like that + * here, but it's easier to encode arguments as you go. The + * alternative would be skipping the CDB argument and then encoding + * it here, since we've got the data buffer argument by now. + */ + bcopy(cdb, &ccb->csio.cdb_io.cdb_bytes, cdb_len); - cam_fill_csio(&ccb->csio, + cam_fill_csio(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, /*flags*/ flags, @@ -2279,6 +2315,21 @@ scsicmd(struct cam_device *device, int a /*sense_len*/ SSD_FULL_SIZE, /*cdb_len*/ cdb_len, /*timeout*/ timeout ? timeout : 5000); + } else { + atacmd_len = 12; + bcopy(atacmd, &ccb->ataio.cmd.command, atacmd_len); + if (need_res) + ccb->ataio.cmd.flags |= CAM_ATAIO_NEEDRESULT; + + cam_fill_ataio(&ccb->ataio, + /*retries*/ retry_count, + /*cbfcnp*/ NULL, + /*flags*/ flags, + /*tag_action*/ 0, + /*data_ptr*/ data_ptr, + /*dxfer_len*/ data_bytes, + /*timeout*/ timeout ? timeout : 5000); + } if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { @@ -2296,6 +2347,28 @@ scsicmd(struct cam_device *device, int a goto scsicmd_bailout; } + if (atacmd_len && need_res) { + if (fd_res == 0) { + buff_decode_visit(&ccb->ataio.res.status, 11, resstr, + arg_put, NULL); + fprintf(stdout, "\n"); + } else { + fprintf(stdout, + "%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", + ccb->ataio.res.status, + ccb->ataio.res.error, + ccb->ataio.res.lba_low, + ccb->ataio.res.lba_mid, + ccb->ataio.res.lba_high, + ccb->ataio.res.device, + ccb->ataio.res.lba_low_exp, + ccb->ataio.res.lba_mid_exp, + ccb->ataio.res.lba_high_exp, + ccb->ataio.res.sector_count, + ccb->ataio.res.sector_count_exp); + fflush(stdout); + } + } if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) && (arglist & CAM_ARG_CMD_IN) @@ -4029,8 +4102,9 @@ usage(int verbose) " camcontrol defects [dev_id][generic args] <-f format> [-P][-G]\n" " camcontrol modepage [dev_id][generic args] <-m page | -l>\n" " [-P pagectl][-e | -b][-d]\n" -" camcontrol cmd [dev_id][generic args] <-c cmd [args]>\n" -" [-i len fmt|-o len fmt [args]]\n" +" camcontrol cmd [dev_id][generic args]\n" +" <-a cmd [args] | -c cmd [args]>\n" +" [-i len fmt|-o len fmt [args]] [-r fmt]\n" " camcontrol debug [-I][-P][-T][-S][-X][-c]\n" " \n" " camcontrol tags [dev_id][generic args] [-N tags] [-q] [-v]\n" From owner-svn-src-stable@FreeBSD.ORG Sun Sep 6 15:23:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA33E106566C; Sun, 6 Sep 2009 15:23:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8CDC8FC0A; Sun, 6 Sep 2009 15:23:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n86FN3Ob087455; Sun, 6 Sep 2009 15:23:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n86FN3QP087453; Sun, 6 Sep 2009 15:23:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909061523.n86FN3QP087453@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 6 Sep 2009 15:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196894 - stable/7/sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2009 15:23:03 -0000 Author: kib Date: Sun Sep 6 15:23:03 2009 New Revision: 196894 URL: http://svn.freebsd.org/changeset/base/196894 Log: Partial MFC of r194459 by thompsa, without merge recording, to allow the vm_phys_paddr_to_vm_page(9) to return NULL instead of panicking when supplied physical address does not correspond to a vm page. This is needed for device pager (and not yet merged sg pager) to skip memattr checks on specific addresses. Reported by: Thierry Herbelot Modified: stable/7/sys/vm/vm_phys.c Modified: stable/7/sys/vm/vm_phys.c ============================================================================== --- stable/7/sys/vm/vm_phys.c Sun Sep 6 14:23:26 2009 (r196893) +++ stable/7/sys/vm/vm_phys.c Sun Sep 6 15:23:03 2009 (r196894) @@ -382,8 +382,7 @@ vm_phys_paddr_to_vm_page(vm_paddr_t pa) if (pa >= seg->start && pa < seg->end) return (&seg->first_page[atop(pa - seg->start)]); } - panic("vm_phys_paddr_to_vm_page: paddr %#jx is not in any segment", - (uintmax_t)pa); + return (NULL); } /* From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 08:37:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D73106566B; Mon, 7 Sep 2009 08:37:25 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5D08FC0A; Mon, 7 Sep 2009 08:37:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n878bPNV008237; Mon, 7 Sep 2009 08:37:25 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n878bP79008232; Mon, 7 Sep 2009 08:37:25 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909070837.n878bP79008232@svn.freebsd.org> From: Attilio Rao Date: Mon, 7 Sep 2009 08:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196912 - in stable/7/sys: kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 08:37:25 -0000 Author: attilio Date: Mon Sep 7 08:37:25 2009 New Revision: 196912 URL: http://svn.freebsd.org/changeset/base/196912 Log: MFC r196334: Add the macro ASSERT_ATOMIC_LOAD_PTR(), enabled through INVARIANTS, which asserts for the correct alignment of datas which need to be read atomically without locks. Use that macro in locking primitives. Modified: stable/7/sys/kern/kern_mutex.c stable/7/sys/kern/kern_rwlock.c stable/7/sys/kern/kern_sx.c stable/7/sys/sys/systm.h Modified: stable/7/sys/kern/kern_mutex.c ============================================================================== --- stable/7/sys/kern/kern_mutex.c Mon Sep 7 06:37:44 2009 (r196911) +++ stable/7/sys/kern/kern_mutex.c Mon Sep 7 08:37:25 2009 (r196912) @@ -724,6 +724,9 @@ mtx_init(struct mtx *m, const char *name MPASS((opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE | MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE)) == 0); + ASSERT_ATOMIC_LOAD_PTR(m->mtx_lock, + ("%s: mtx_lock not aligned for %s:%p", __func__, name, + &m->mtx_lock)); #ifdef MUTEX_DEBUG /* Diagnostic and error correction */ Modified: stable/7/sys/kern/kern_rwlock.c ============================================================================== --- stable/7/sys/kern/kern_rwlock.c Mon Sep 7 06:37:44 2009 (r196911) +++ stable/7/sys/kern/kern_rwlock.c Mon Sep 7 08:37:25 2009 (r196912) @@ -137,6 +137,9 @@ rw_init_flags(struct rwlock *rw, const c MPASS((opts & ~(RW_DUPOK | RW_NOPROFILE | RW_NOWITNESS | RW_QUIET | RW_RECURSE)) == 0); + ASSERT_ATOMIC_LOAD_PTR(rw->rw_lock, + ("%s: rw_lock not aligned for %s:%p", __func__, name, + &rw->rw_lock)); flags = LO_UPGRADABLE | LO_RECURSABLE; if (opts & RW_DUPOK) Modified: stable/7/sys/kern/kern_sx.c ============================================================================== --- stable/7/sys/kern/kern_sx.c Mon Sep 7 06:37:44 2009 (r196911) +++ stable/7/sys/kern/kern_sx.c Mon Sep 7 08:37:25 2009 (r196912) @@ -166,6 +166,9 @@ sx_init_flags(struct sx *sx, const char MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK | SX_NOPROFILE | SX_ADAPTIVESPIN)) == 0); + ASSERT_ATOMIC_LOAD_PTR(sx->sx_lock, + ("%s: sx_lock not aligned for %s:%p", __func__, description, + &sx->sx_lock)); flags = LO_RECURSABLE | LO_SLEEPABLE | LO_UPGRADABLE; if (opts & SX_DUPOK) Modified: stable/7/sys/sys/systm.h ============================================================================== --- stable/7/sys/sys/systm.h Mon Sep 7 06:37:44 2009 (r196911) +++ stable/7/sys/sys/systm.h Mon Sep 7 08:37:25 2009 (r196912) @@ -96,6 +96,17 @@ extern int maxusers; /* system tune hin #endif /* + * Assert that a pointer can be loaded from memory atomically. + * + * This assertion enforces stronger alignment than necessary. For example, + * on some architectures, atomicity for unaligned loads will depend on + * whether or not the load spans multiple cache lines. + */ +#define ASSERT_ATOMIC_LOAD_PTR(var, msg) \ + KASSERT(sizeof(var) == sizeof(void *) && \ + ((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg) + +/* * XXX the hints declarations are even more misplaced than most declarations * in this file, since they are needed in one file (per arch) and only used * in two files. From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 08:41:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3086106566C; Mon, 7 Sep 2009 08:41:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D200F8FC14; Mon, 7 Sep 2009 08:41:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n878fEHu008348; Mon, 7 Sep 2009 08:41:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n878fE6M008345; Mon, 7 Sep 2009 08:41:14 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909070841.n878fE6M008345@svn.freebsd.org> From: Attilio Rao Date: Mon, 7 Sep 2009 08:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196913 - stable/7/lib/libthr/thread X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 08:41:15 -0000 Author: attilio Date: Mon Sep 7 08:41:14 2009 New Revision: 196913 URL: http://svn.freebsd.org/changeset/base/196913 Log: MFC r195403: Fix a bug in read lock acquisition for rwlocks by bumping rdlock_count when a successfull rwlock_rdlock_common() take place. Modified: stable/7/lib/libthr/thread/thr_rtld.c stable/7/lib/libthr/thread/thr_rwlock.c Modified: stable/7/lib/libthr/thread/thr_rtld.c ============================================================================== --- stable/7/lib/libthr/thread/thr_rtld.c Mon Sep 7 08:37:25 2009 (r196912) +++ stable/7/lib/libthr/thread/thr_rtld.c Mon Sep 7 08:41:14 2009 (r196913) @@ -116,6 +116,7 @@ _thr_rtld_rlock_acquire(void *lock) THR_CRITICAL_ENTER(curthread); while (_thr_rwlock_rdlock(&l->lock, 0, NULL) != 0) ; + curthread->rdlock_count++; RESTORE_ERRNO(); } @@ -150,6 +151,7 @@ _thr_rtld_lock_release(void *lock) state = l->lock.rw_state; if (_thr_rwlock_unlock(&l->lock) == 0) { + curthread->rdlock_count--; if ((state & URWLOCK_WRITE_OWNER) == 0) { THR_CRITICAL_LEAVE(curthread); } else { Modified: stable/7/lib/libthr/thread/thr_rwlock.c ============================================================================== --- stable/7/lib/libthr/thread/thr_rwlock.c Mon Sep 7 08:37:25 2009 (r196912) +++ stable/7/lib/libthr/thread/thr_rwlock.c Mon Sep 7 08:41:14 2009 (r196913) @@ -177,10 +177,11 @@ rwlock_rdlock_common(pthread_rwlock_t *r /* if interrupted, try to lock it in userland again. */ if (_thr_rwlock_tryrdlock(&prwlock->lock, flags) == 0) { ret = 0; - curthread->rdlock_count++; break; } } + if (ret == 0) + curthread->rdlock_count++; return (ret); } From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 08:46:27 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03E69106566B; Mon, 7 Sep 2009 08:46:27 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1B0C8FC16; Mon, 7 Sep 2009 08:46:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n878kQAQ008511; Mon, 7 Sep 2009 08:46:26 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n878kQLe008508; Mon, 7 Sep 2009 08:46:26 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909070846.n878kQLe008508@svn.freebsd.org> From: Attilio Rao Date: Mon, 7 Sep 2009 08:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196914 - stable/7/usr.sbin/tzsetup X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 08:46:27 -0000 Author: attilio Date: Mon Sep 7 08:46:26 2009 New Revision: 196914 URL: http://svn.freebsd.org/changeset/base/196914 Log: MFC r195339: Add a new option (-s) that, when specified, skips the question about adjusting the clock to UTC. Sponsored by: Sandvine Incorporated Modified: stable/7/usr.sbin/tzsetup/tzsetup.8 stable/7/usr.sbin/tzsetup/tzsetup.c Modified: stable/7/usr.sbin/tzsetup/tzsetup.8 ============================================================================== --- stable/7/usr.sbin/tzsetup/tzsetup.8 Mon Sep 7 08:41:14 2009 (r196913) +++ stable/7/usr.sbin/tzsetup/tzsetup.8 Mon Sep 7 08:46:26 2009 (r196914) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd January 24, 1996 +.Dd September 05, 2009 .Dt TZSETUP 8 .Os .Sh NAME @@ -31,7 +31,7 @@ .Nd set local timezone .Sh SYNOPSIS .Nm -.Op Fl n +.Op Fl ns .Op Ar default .Sh DESCRIPTION The @@ -51,6 +51,9 @@ The following option is available: .Bl -tag -offset indent -width Fl .It Fl n Do not create or copy files. +.It Fl s +Skip the initial question about adjusting the clock if not set to +.Tn UTC . .El .Pp It is possible to short-circuit the menu system by specifying a Modified: stable/7/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- stable/7/usr.sbin/tzsetup/tzsetup.c Mon Sep 7 08:41:14 2009 (r196913) +++ stable/7/usr.sbin/tzsetup/tzsetup.c Mon Sep 7 08:46:26 2009 (r196914) @@ -648,11 +648,14 @@ main(int argc, char **argv) dialog_utc = dialog_noyes; #endif - while ((c = getopt(argc, argv, "n")) != -1) { + while ((c = getopt(argc, argv, "ns")) != -1) { switch(c) { case 'n': reallydoit = 0; break; + case 's': + dialog_utc = NULL; + break; default: usage(); @@ -671,22 +674,25 @@ main(int argc, char **argv) make_menus(); init_dialog(); - if (!dialog_utc("Select local or UTC (Greenwich Mean Time) clock", - "Is this machine's CMOS clock set to UTC? If it is set to local time,\n" - "or you don't know, please choose NO here!", 7, 72)) { - if (reallydoit) - unlink(_PATH_WALL_CMOS_CLOCK); - } else { - if (reallydoit) { - fd = open(_PATH_WALL_CMOS_CLOCK, - O_WRONLY|O_CREAT|O_TRUNC, - S_IRUSR|S_IRGRP|S_IROTH); - if (fd < 0) - err(1, "create %s", _PATH_WALL_CMOS_CLOCK); - close(fd); + if (dialog_utc != NULL) { + if (!dialog_utc("Select local or UTC (Greenwich Mean Time) clock", + "Is this machine's CMOS clock set to UTC? If it is set to local time,\n" + "or you don't know, please choose NO here!", 7, 72)) { + if (reallydoit) + unlink(_PATH_WALL_CMOS_CLOCK); + } else { + if (reallydoit) { + fd = open(_PATH_WALL_CMOS_CLOCK, + O_WRONLY|O_CREAT|O_TRUNC, + S_IRUSR|S_IRGRP|S_IROTH); + if (fd < 0) + err(1, "create %s", + _PATH_WALL_CMOS_CLOCK); + close(fd); + } } + dialog_clear_norefresh(); } - dialog_clear_norefresh(); if (optind == argc - 1) { char *msg; asprintf(&msg, "\nUse the default `%s' zone?", argv[optind]); From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 08:52:15 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEFC01065679; Mon, 7 Sep 2009 08:52:15 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C31F98FC13; Mon, 7 Sep 2009 08:52:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n878qFLJ008671; Mon, 7 Sep 2009 08:52:15 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n878qFds008667; Mon, 7 Sep 2009 08:52:15 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909070852.n878qFds008667@svn.freebsd.org> From: Attilio Rao Date: Mon, 7 Sep 2009 08:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196915 - in stable/7/sys: dev/hwpmc kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 08:52:16 -0000 Author: attilio Date: Mon Sep 7 08:52:15 2009 New Revision: 196915 URL: http://svn.freebsd.org/changeset/base/196915 Log: MFC r195159 and r195005: * Don't assume a fixed number of preloaded KLDs but calculate at runtime. This avoind ending up into an endless loop. * Fix a LOR between pmc_sx and allproc/proctree locks Sponsored by: Sandvine Incorporated Modified: stable/7/sys/dev/hwpmc/hwpmc_logging.c stable/7/sys/dev/hwpmc/hwpmc_mod.c stable/7/sys/kern/kern_linker.c Modified: stable/7/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_logging.c Mon Sep 7 08:46:26 2009 (r196914) +++ stable/7/sys/dev/hwpmc/hwpmc_logging.c Mon Sep 7 08:52:15 2009 (r196915) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -552,6 +553,12 @@ pmclog_configure_log(struct pmc_mdep *md int error; struct proc *p; + /* + * As long as it is possible to get a LOR between pmc_sx lock and + * proctree/allproc sx locks used for adding a new process, assure + * the former is not held here. + */ + sx_assert(&pmc_sx, SA_UNLOCKED); PMCDBG(LOG,CFG,1, "config po=%p logfd=%d", po, logfd); p = po->po_owner; Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_mod.c Mon Sep 7 08:46:26 2009 (r196914) +++ stable/7/sys/dev/hwpmc/hwpmc_mod.c Mon Sep 7 08:52:15 2009 (r196915) @@ -2666,7 +2666,7 @@ static const char *pmc_op_to_name[] = { static int pmc_syscall_handler(struct thread *td, void *syscall_args) { - int error, is_sx_downgraded, op; + int error, is_sx_downgraded, is_sx_locked, op; struct pmc_syscall_args *c; void *arg; @@ -2675,6 +2675,7 @@ pmc_syscall_handler(struct thread *td, v DROP_GIANT(); is_sx_downgraded = 0; + is_sx_locked = 1; c = (struct pmc_syscall_args *) syscall_args; @@ -2723,9 +2724,11 @@ pmc_syscall_handler(struct thread *td, v * a log file configured, flush its buffers and * de-configure it. */ - if (cl.pm_logfd >= 0) + if (cl.pm_logfd >= 0) { + sx_xunlock(&pmc_sx); + is_sx_locked = 0; error = pmclog_configure_log(md, po, cl.pm_logfd); - else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { + } else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { pmclog_process_closelog(po); error = pmclog_flush(po); if (error == 0) { @@ -3776,10 +3779,12 @@ pmc_syscall_handler(struct thread *td, v break; } - if (is_sx_downgraded) - sx_sunlock(&pmc_sx); - else - sx_xunlock(&pmc_sx); + if (is_sx_locked != 0) { + if (is_sx_downgraded) + sx_sunlock(&pmc_sx); + else + sx_xunlock(&pmc_sx); + } if (error) atomic_add_int(&pmc_stats.pm_syscall_errors, 1); Modified: stable/7/sys/kern/kern_linker.c ============================================================================== --- stable/7/sys/kern/kern_linker.c Mon Sep 7 08:46:26 2009 (r196914) +++ stable/7/sys/kern/kern_linker.c Mon Sep 7 08:52:15 2009 (r196915) @@ -1882,62 +1882,41 @@ linker_basename(const char *path) } #ifdef HWPMC_HOOKS - -struct hwpmc_context { - int nobjects; - int nmappings; - struct pmckern_map_in *kobase; -}; - -static int -linker_hwpmc_list_object(linker_file_t lf, void *arg) -{ - struct hwpmc_context *hc; - - hc = arg; - - /* If we run out of mappings, fail. */ - if (hc->nobjects >= hc->nmappings) - return (1); - - /* Save the info for this linker file. */ - hc->kobase[hc->nobjects].pm_file = lf->filename; - hc->kobase[hc->nobjects].pm_address = (uintptr_t)lf->address; - hc->nobjects++; - return (0); -} - /* * Inform hwpmc about the set of kernel modules currently loaded. */ void * linker_hwpmc_list_objects(void) { - struct hwpmc_context hc; + linker_file_t lf; + struct pmckern_map_in *kobase; + int i, nmappings; - hc.nmappings = 15; /* a reasonable default */ + nmappings = 0; + KLD_LOCK(); + TAILQ_FOREACH(lf, &linker_files, link) + nmappings++; - retry: - /* allocate nmappings+1 entries */ - MALLOC(hc.kobase, struct pmckern_map_in *, - (hc.nmappings + 1) * sizeof(struct pmckern_map_in), M_LINKER, - M_WAITOK | M_ZERO); - - hc.nobjects = 0; - if (linker_file_foreach(linker_hwpmc_list_object, &hc) != 0) { - hc.nmappings = hc.nobjects; - FREE(hc.kobase, M_LINKER); - goto retry; + /* Allocate nmappings + 1 entries. */ + kobase = malloc((nmappings + 1) * sizeof(struct pmckern_map_in), + M_LINKER, M_WAITOK | M_ZERO); + i = 0; + TAILQ_FOREACH(lf, &linker_files, link) { + + /* Save the info for this linker file. */ + kobase[i].pm_file = lf->filename; + kobase[i].pm_address = (uintptr_t)lf->address; + i++; } + KLD_UNLOCK(); - KASSERT(hc.nobjects > 0, ("linker_hpwmc_list_objects: no kernel " - "objects?")); + KASSERT(i > 0, ("linker_hwpmc_list_objects: no kernel objects?")); /* The last entry of the malloced area comprises of all zeros. */ - KASSERT(hc.kobase[hc.nobjects].pm_file == NULL, + KASSERT(kobase[i].pm_file == NULL, ("linker_hwpmc_list_objects: last object not NULL")); - return ((void *)hc.kobase); + return ((void *)kobase); } #endif From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 09:51:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9A111065672; Mon, 7 Sep 2009 09:51:23 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6B058FC2A; Mon, 7 Sep 2009 09:51:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n879pNtm010179; Mon, 7 Sep 2009 09:51:23 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n879pNst010173; Mon, 7 Sep 2009 09:51:23 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909070951.n879pNst010173@svn.freebsd.org> From: Attilio Rao Date: Mon, 7 Sep 2009 09:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196917 - in stable/7: bin/ps sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 09:51:24 -0000 Author: attilio Date: Mon Sep 7 09:51:23 2009 New Revision: 196917 URL: http://svn.freebsd.org/changeset/base/196917 Log: MFC r189078: * Implement ucomm with a dynamic size function in order to print out the threads name also in the case they are not the last one shown. * On AMD64 pointers don't have enough space to be printed. Fix it. * Check a return value for malloc which wasn't checked before Sponsored by: Sandvine Incorporated Modified: stable/7/bin/ps/extern.h stable/7/bin/ps/keyword.c stable/7/bin/ps/print.c stable/7/bin/ps/ps.c stable/7/sys/kern/kern_proc.c Modified: stable/7/bin/ps/extern.h ============================================================================== --- stable/7/bin/ps/extern.h Mon Sep 7 09:30:37 2009 (r196916) +++ stable/7/bin/ps/extern.h Mon Sep 7 09:51:23 2009 (r196917) @@ -39,7 +39,7 @@ extern fixpt_t ccpu; extern int cflag, eval, fscale, nlistread, rawcpu; extern unsigned long mempages; extern time_t now; -extern int sumrusage, termwidth, totwidth; +extern int showthreads, sumrusage, termwidth, totwidth; extern STAILQ_HEAD(velisthead, varent) varlist; __BEGIN_DECLS @@ -71,6 +71,7 @@ void priorityr(KINFO *, VARENT *); void rgroupname(KINFO *, VARENT *); void runame(KINFO *, VARENT *); void rvar(KINFO *, VARENT *); +int s_comm(KINFO *); int s_label(KINFO *); int s_rgroupname(KINFO *); int s_runame(KINFO *); Modified: stable/7/bin/ps/keyword.c ============================================================================== --- stable/7/bin/ps/keyword.c Mon Sep 7 09:30:37 2009 (r196916) +++ stable/7/bin/ps/keyword.c Mon Sep 7 09:51:23 2009 (r196917) @@ -79,8 +79,8 @@ static VAR var[] = { CHAR, NULL, 0}, {"blocked", "", "sigmask", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"caught", "", "sigcatch", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"comm", "COMMAND", NULL, LJUST, ucomm, NULL, MAXCOMLEN, 0, CHAR, - NULL, 0}, + {"comm", "COMMAND", NULL, LJUST|DSIZ, ucomm, s_comm, + COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, {"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0, CHAR, NULL, 0}, {"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d", @@ -135,12 +135,13 @@ static VAR var[] = { LONG, "ld", 0}, {"nvcsw", "NVCSW", NULL, USER, rvar, NULL, 5, ROFF(ru_nvcsw), LONG, "ld", 0}, - {"nwchan", "NWCHAN", NULL, LJUST, nwchan, NULL, 8, 0, CHAR, NULL, 0}, + {"nwchan", "NWCHAN", NULL, LJUST, nwchan, NULL, sizeof(void *) * 2, 0, + CHAR, NULL, 0}, {"oublk", "OUBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_oublock), LONG, "ld", 0}, {"oublock", "", "oublk", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"paddr", "PADDR", NULL, 0, kvar, NULL, 8, KOFF(ki_paddr), KPTR, - "lx", 0}, + {"paddr", "PADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2, + KOFF(ki_paddr), KPTR, "lx", 0}, {"pagein", "PAGEIN", NULL, USER, pagein, NULL, 6, 0, CHAR, NULL, 0}, {"pcpu", "", "%cpu", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"pending", "", "sig", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, @@ -194,13 +195,13 @@ static VAR var[] = { {"tsiz", "TSIZ", NULL, 0, kvar, NULL, 4, KOFF(ki_tsize), PGTOK, "ld", 0}, {"tt", "TT ", NULL, 0, tname, NULL, 4, 0, CHAR, NULL, 0}, {"tty", "TTY", NULL, LJUST, longtname, NULL, 8, 0, CHAR, NULL, 0}, - {"ucomm", "UCOMM", NULL, LJUST, ucomm, NULL, MAXCOMLEN, 0, CHAR, NULL, - 0}, + {"ucomm", "UCOMM", NULL, LJUST|DSIZ, ucomm, s_comm, + COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, {"uid", "UID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_uid), UINT, UIDFMT, 0}, {"upr", "UPR", NULL, 0, upr, NULL, 3, 0, CHAR, NULL, 0}, - {"uprocp", "UPROCP", NULL, 0, kvar, NULL, 8, KOFF(ki_paddr), KPTR, - "lx", 0}, + {"uprocp", "UPROCP", NULL, 0, kvar, NULL, sizeof(void *) * 2, + KOFF(ki_paddr), KPTR, "lx", 0}, {"user", "USER", NULL, LJUST|DSIZ, uname, s_uname, USERLEN, 0, CHAR, NULL, 0}, {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, @@ -324,6 +325,8 @@ findvar(char *p, int user, char **header */ rflen = strlen(v->alias) + strlen(hp) + 2; realfmt = malloc(rflen); + if (realfmt == NULL) + errx(1, "malloc failed"); snprintf(realfmt, rflen, "%s=%s", v->alias, hp); parsefmt(realfmt, user); } Modified: stable/7/bin/ps/print.c ============================================================================== --- stable/7/bin/ps/print.c Mon Sep 7 09:30:37 2009 (r196916) +++ stable/7/bin/ps/print.c Mon Sep 7 09:51:23 2009 (r196917) @@ -186,6 +186,7 @@ command(KINFO *k, VARENT *ve) void ucomm(KINFO *k, VARENT *ve) { + char tmpbuff[COMMLEN + OCOMMLEN + 2]; VAR *v; v = ve->var; @@ -193,8 +194,15 @@ ucomm(KINFO *k, VARENT *ve) if (k->ki_d.prefix) (void)printf("%s", k->ki_d.prefix); (void)printf("%s", k->ki_p->ki_comm); - } else - (void)printf("%-*s", v->width, k->ki_p->ki_comm); + } else { + bzero(tmpbuff, sizeof(tmpbuff)); + if (showthreads && k->ki_p->ki_numthreads > 1) + sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, + k->ki_p->ki_ocomm); + else + sprintf(tmpbuff, "%s", k->ki_p->ki_comm); + (void)printf("%-*s", v->width, tmpbuff); + } } void @@ -822,6 +830,20 @@ out: } int +s_comm(KINFO *k) +{ + char tmpbuff[COMMLEN + OCOMMLEN + 2]; + + bzero(tmpbuff, sizeof(tmpbuff)); + if (showthreads && k->ki_p->ki_numthreads > 1) + sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, + k->ki_p->ki_ocomm); + else + sprintf(tmpbuff, "%s", k->ki_p->ki_comm); + return (strlen(tmpbuff)); +} + +int s_label(KINFO *k) { char *string = NULL; Modified: stable/7/bin/ps/ps.c ============================================================================== --- stable/7/bin/ps/ps.c Mon Sep 7 09:30:37 2009 (r196916) +++ stable/7/bin/ps/ps.c Mon Sep 7 09:51:23 2009 (r196917) @@ -100,6 +100,7 @@ int rawcpu; /* -C */ int sumrusage; /* -S */ int termwidth; /* Width of the screen (0 == infinity). */ int totwidth; /* Calculated-width of requested variables. */ +int showthreads; /* will threads be shown? */ struct velisthead varlist = STAILQ_HEAD_INITIALIZER(varlist); @@ -178,7 +179,7 @@ main(int argc, char *argv[]) char *cols; int all, ch, elem, flag, _fmt, i, lineno; int descendancy, nentries, nkept, nselectors; - int prtheader, showthreads, wflag, what, xkeep, xkeep_implied; + int prtheader, wflag, what, xkeep, xkeep_implied; char errbuf[_POSIX2_LINE_MAX]; (void) setlocale(LC_ALL, ""); Modified: stable/7/sys/kern/kern_proc.c ============================================================================== --- stable/7/sys/kern/kern_proc.c Mon Sep 7 09:30:37 2009 (r196916) +++ stable/7/sys/kern/kern_proc.c Mon Sep 7 09:51:23 2009 (r196917) @@ -115,6 +115,7 @@ MALLOC_DEFINE(M_SUBPROC, "subproc", "Pro static void doenterpgrp(struct proc *, struct pgrp *); static void orphanpg(struct pgrp *pg); +static void fill_kinfo_aggregate(struct proc *p, struct kinfo_proc *kp); static void fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp); static void fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp, int preferthread); @@ -670,6 +671,30 @@ DB_SHOW_COMMAND(pgrpdump, pgrpdump) #endif /* DDB */ /* + * Rework the kinfo_proc members which need to be aggregated in the + * case of process-ware informations. + * Must be called with the target spinlock process held. + */ +static void +fill_kinfo_aggregate(struct proc *p, struct kinfo_proc *kp) +{ + struct thread *td; + + PROC_SLOCK_ASSERT(p, MA_OWNED); + + kp->ki_estcpu = 0; + kp->ki_pctcpu = 0; + kp->ki_runtime = 0; + FOREACH_THREAD_IN_PROC(p, td) { + thread_lock(td); + kp->ki_pctcpu += sched_pctcpu(td); + kp->ki_runtime += cputick2usec(td->td_runtime); + kp->ki_estcpu += td->td_estcpu; + thread_unlock(td); + } +} + +/* * Clear kinfo_proc and fill in any information that is common * to all threads in the process. * Must be called with the target process locked. @@ -868,14 +893,15 @@ fill_kinfo_thread(struct thread *td, str kp->ki_numthreads = p->p_numthreads; kp->ki_pcb = td->td_pcb; kp->ki_kstack = (void *)td->td_kstack; - kp->ki_pctcpu = sched_pctcpu(td); - kp->ki_estcpu = td->td_estcpu; kp->ki_slptime = (ticks - td->td_slptick) / hz; kp->ki_pri.pri_class = td->td_pri_class; kp->ki_pri.pri_user = td->td_user_pri; - if (preferthread) + if (preferthread) { kp->ki_runtime = cputick2usec(td->td_runtime); + kp->ki_pctcpu = sched_pctcpu(td); + kp->ki_estcpu = td->td_estcpu; + } /* We can't get this anymore but ps etc never used it anyway. */ kp->ki_rqindex = 0; @@ -895,8 +921,9 @@ fill_kinfo_proc(struct proc *p, struct k fill_kinfo_proc_only(p, kp); PROC_SLOCK(p); - if (FIRST_THREAD_IN_PROC(p) != NULL) - fill_kinfo_thread(FIRST_THREAD_IN_PROC(p), kp, 0); + MPASS (FIRST_THREAD_IN_PROC(p) != NULL); + fill_kinfo_thread(FIRST_THREAD_IN_PROC(p), kp, 0); + fill_kinfo_aggregate(p, kp); PROC_SUNLOCK(p); } @@ -962,28 +989,20 @@ sysctl_out_proc(struct proc *p, struct s PROC_LOCK_ASSERT(p, MA_OWNED); - fill_kinfo_proc_only(p, &kinfo_proc); - if (flags & KERN_PROC_NOTHREADS) { - PROC_SLOCK(p); - if (FIRST_THREAD_IN_PROC(p) != NULL) - fill_kinfo_thread(FIRST_THREAD_IN_PROC(p), - &kinfo_proc, 0); - PROC_SUNLOCK(p); + fill_kinfo_proc(p, &kinfo_proc); + if (flags & KERN_PROC_NOTHREADS) error = SYSCTL_OUT(req, (caddr_t)&kinfo_proc, - sizeof(kinfo_proc)); - } else { + sizeof(kinfo_proc)); + else { PROC_SLOCK(p); - if (FIRST_THREAD_IN_PROC(p) != NULL) - FOREACH_THREAD_IN_PROC(p, td) { - fill_kinfo_thread(td, &kinfo_proc, 1); - error = SYSCTL_OUT(req, (caddr_t)&kinfo_proc, - sizeof(kinfo_proc)); - if (error) - break; - } - else + MPASS(FIRST_THREAD_IN_PROC(p) != NULL); + FOREACH_THREAD_IN_PROC(p, td) { + fill_kinfo_thread(td, &kinfo_proc, 1); error = SYSCTL_OUT(req, (caddr_t)&kinfo_proc, - sizeof(kinfo_proc)); + sizeof(kinfo_proc)); + if (error) + break; + } PROC_SUNLOCK(p); } PROC_UNLOCK(p); From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 10:15:51 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11652106566B; Mon, 7 Sep 2009 10:15:51 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1BB28FC15; Mon, 7 Sep 2009 10:15:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87AFoUg011808; Mon, 7 Sep 2009 10:15:50 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87AFoDx011798; Mon, 7 Sep 2009 10:15:50 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200909071015.n87AFoDx011798@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 7 Sep 2009 10:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196918 - in stable/7: sbin/ifconfig share/man/man4 sys/net sys/netinet sys/netinet6 sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 10:15:51 -0000 Author: ume Date: Mon Sep 7 10:15:50 2009 New Revision: 196918 URL: http://svn.freebsd.org/changeset/base/196918 Log: MFC r193664, r193796, r193815: Fix and add a workaround on an issue of EtherIP packet with reversed version field sent via gif(4)+if_bridge(4). The EtherIP implementation found on FreeBSD 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 had an interoperability issue because it sent the incorrect EtherIP packets and discarded the correct ones. Approved by: hrs Added: stable/7/sbin/ifconfig/ifgif.c - copied unchanged from r193664, head/sbin/ifconfig/ifgif.c Modified: stable/7/sbin/ifconfig/ (props changed) stable/7/sbin/ifconfig/Makefile stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/gif.4 stable/7/share/man/man4/if_bridge.4 stable/7/sys/net/ (props changed) stable/7/sys/net/if_gif.c stable/7/sys/net/if_gif.h stable/7/sys/netinet/in_gif.c stable/7/sys/netinet6/in6_gif.c stable/7/sys/sys/priv.h Modified: stable/7/sbin/ifconfig/Makefile ============================================================================== --- stable/7/sbin/ifconfig/Makefile Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/sbin/ifconfig/Makefile Mon Sep 7 10:15:50 2009 (r196918) @@ -25,6 +25,7 @@ SRCS+= ifmedia.c # SIOC[GS]IFMEDIA supp SRCS+= ifvlan.c # SIOC[GS]ETVLAN support SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support SRCS+= ifgre.c # GRE keys etc +SRCS+= ifgif.c # GIF reversed header workaround SRCS+= ifcarp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... Copied: stable/7/sbin/ifconfig/ifgif.c (from r193664, head/sbin/ifconfig/ifgif.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sbin/ifconfig/ifgif.c Mon Sep 7 10:15:50 2009 (r196918, copy of r193664, head/sbin/ifconfig/ifgif.c) @@ -0,0 +1,132 @@ +/*- + * Copyright (c) 2009 Hiroki Sato. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "ifconfig.h" + +static void gif_status(int); + +static struct { + const char *label; + u_int mask; +} gif_opts[] = { + { "ACCEPT_REV_ETHIP_VER", GIF_ACCEPT_REVETHIP }, + { "SEND_REV_ETHIP_VER", GIF_SEND_REVETHIP }, +}; + +static void +gif_status(int s) +{ + int opts; + int nopts = 0; + int i; + + ifr.ifr_data = (caddr_t)&opts; + if (ioctl(s, GIFGOPTS, &ifr) == -1) + return; + + printf("\toptions=%d<", opts); + for (i=0; i < sizeof(gif_opts)/sizeof(gif_opts[0]); i++) { + if (opts & gif_opts[i].mask) { + if (nopts++) + printf(","); + printf("%s", gif_opts[i].label); + } + } + printf(">\n"); +} + +static void +setgifopts(const char *val, + int d, int s, const struct afswtch *afp) +{ + int opts; + + ifr.ifr_data = (caddr_t)&opts; + if (ioctl(s, GIFGOPTS, &ifr) == -1) { + warn("ioctl(GIFGOPTS)"); + return; + } + + if (d < 0) + opts &= ~(-d); + else + opts |= d; + + if (ioctl(s, GIFSOPTS, &ifr) == -1) { + warn("ioctl(GIFSOPTS)"); + return; + } +} + +static struct cmd gif_cmds[] = { + DEF_CMD("accept_rev_ethip_ver", GIF_ACCEPT_REVETHIP, setgifopts), + DEF_CMD("-accept_rev_ethip_ver",-GIF_ACCEPT_REVETHIP, setgifopts), + DEF_CMD("send_rev_ethip_ver", GIF_SEND_REVETHIP, setgifopts), + DEF_CMD("-send_rev_ethip_ver", -GIF_SEND_REVETHIP, setgifopts), +}; + +static struct afswtch af_gif = { + .af_name = "af_gif", + .af_af = AF_UNSPEC, + .af_other_status = gif_status, +}; + +static __constructor void +gif_ctor(void) +{ +#define N(a) (sizeof(a) / sizeof(a[0])) + int i; + + for (i = 0; i < N(gif_cmds); i++) + cmd_register(&gif_cmds[i]); + af_register(&af_gif); +#undef N +} Modified: stable/7/share/man/man4/gif.4 ============================================================================== --- stable/7/share/man/man4/gif.4 Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/share/man/man4/gif.4 Mon Sep 7 10:15:50 2009 (r196918) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 1999 +.Dd June 8, 2009 .Dt GIF 4 .Os .Sh NAME @@ -256,3 +256,32 @@ had a multi-destination behavior, config .Dv IFF_LINK0 flag. The behavior is obsolete and is no longer supported. +.Pp +On +.Fx +6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 +the +.Nm +sends and receives incorrect EtherIP packets with reversed version +field when +.Xr if_bridge 4 +is used together. As a workaround on this interoperability issue, the +following two +.Xr ifconfig 8 +flags can be used: +.Bl -tag -width "accept_rev_ethip_ver" -offset indent +.It accept_rev_ethip_ver +accepts both correct EtherIP packets and ones with reversed version +field, if enabled. If disabled, the +.Nm +accepts the correct packets only. This flag is enabled by default. +.It send_rev_ethip_ver +sends EtherIP packets with reversed version field intentionally, if +enabled. If disabled, the +.Nm +sends the correct packets only. This flag is disabled by default. +.El +.Pp +If interoperability with the older +.Fx +machines is needed, both of these two flags must be enabled. Modified: stable/7/share/man/man4/if_bridge.4 ============================================================================== --- stable/7/share/man/man4/if_bridge.4 Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/share/man/man4/if_bridge.4 Mon Sep 7 10:15:50 2009 (r196918) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2007 +.Dd June 8, 2009 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -389,6 +389,12 @@ ifconfig gif0 tunnel 1.2.3.4 5.6.7.8 up ifconfig bridge0 create ifconfig bridge0 addm fxp0 addm gif0 up .Ed +.Pp +Note that +.Fx +6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 have a bug in the EtherIP protocol. +For more details and workaround, see +.Xr gif 4 manual page. .Sh SEE ALSO .Xr gif 4 , .Xr ipf 4 , Modified: stable/7/sys/net/if_gif.c ============================================================================== --- stable/7/sys/net/if_gif.c Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/sys/net/if_gif.c Mon Sep 7 10:15:50 2009 (r196918) @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -169,6 +170,7 @@ gif_clone_create(ifc, unit, params) if_initname(GIF2IFP(sc), ifc->ifc_name, unit); sc->encap_cookie4 = sc->encap_cookie6 = NULL; + sc->gif_options = GIF_ACCEPT_REVETHIP; GIF2IFP(sc)->if_addrlen = 0; GIF2IFP(sc)->if_mtu = GIF_MTU; @@ -479,6 +481,7 @@ gif_input(m, af, ifp) struct ifnet *ifp; { int isr, n; + struct gif_softc *sc = ifp->if_softc; struct etherip_header *eip; struct ether_header *eh; struct ifnet *oldifp; @@ -539,11 +542,25 @@ gif_input(m, af, ifp) } eip = mtod(m, struct etherip_header *); - if (eip->eip_ver != - (ETHERIP_VERSION & ETHERIP_VER_VERS_MASK)) { - /* discard unknown versions */ - m_freem(m); - return; + /* + * GIF_ACCEPT_REVETHIP (enabled by default) intentionally + * accepts an EtherIP packet with revered version field in + * the header. This is a knob for backward compatibility + * with FreeBSD 7.2R or prior. + */ + if (sc->gif_options & GIF_ACCEPT_REVETHIP) { + if (eip->eip_resvl != ETHERIP_VERSION + && eip->eip_ver != ETHERIP_VERSION) { + /* discard unknown versions */ + m_freem(m); + return; + } + } else { + if (eip->eip_ver != ETHERIP_VERSION) { + /* discard unknown versions */ + m_freem(m); + return; + } } m_adj(m, sizeof(struct etherip_header)); @@ -598,6 +615,7 @@ gif_ioctl(ifp, cmd, data) struct gif_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq*)data; int error = 0, size; + u_int options; struct sockaddr *dst, *src; #ifdef SIOCSIFMTU /* xxx */ u_long mtu; @@ -832,6 +850,24 @@ gif_ioctl(ifp, cmd, data) /* if_ioctl() takes care of it */ break; + case GIFGOPTS: + options = sc->gif_options; + error = copyout(&options, ifr->ifr_data, + sizeof(options)); + break; + + case GIFSOPTS: + if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) + break; + error = copyin(ifr->ifr_data, &options, sizeof(options)); + if (error) + break; + if (options & ~GIF_OPTMASK) + error = EINVAL; + else + sc->gif_options = options; + break; + default: error = EINVAL; break; Modified: stable/7/sys/net/if_gif.h ============================================================================== --- stable/7/sys/net/if_gif.h Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/sys/net/if_gif.h Mon Sep 7 10:15:50 2009 (r196918) @@ -71,6 +71,7 @@ struct gif_softc { const struct encaptab *encap_cookie4; const struct encaptab *encap_cookie6; void *gif_netgraph; /* ng_gif(4) netgraph node info */ + u_int gif_options; LIST_ENTRY(gif_softc) gif_list; /* all gif's are linked */ }; #define GIF2IFP(sc) ((sc)->gif_ifp) @@ -94,12 +95,18 @@ struct gif_softc { #define MTAG_GIF_CALLED 0 struct etherip_header { - u_int8_t eip_ver; /* version/reserved */ - u_int8_t eip_pad; /* required padding byte */ -}; -#define ETHERIP_VER_VERS_MASK 0x0f -#define ETHERIP_VER_RSVD_MASK 0xf0 -#define ETHERIP_VERSION 0x03 +#if BYTE_ORDER == LITTLE_ENDIAN + u_int eip_resvl:4, /* reserved */ + eip_ver:4; /* version */ +#endif +#if BYTE_ORDER == BIG_ENDIAN + u_int eip_ver:4, /* version */ + eip_resvl:4; /* reserved */ +#endif + u_int8_t eip_resvh; /* reserved */ +} __packed; + +#define ETHERIP_VERSION 0x3 /* mbuf adjust factor to force 32-bit alignment of IP header */ #define ETHERIP_ALIGN 2 @@ -114,4 +121,11 @@ int gif_encapcheck(const struct mbuf *, #endif /* _KERNEL */ +#define GIFGOPTS _IOWR('i', 150, struct ifreq) +#define GIFSOPTS _IOW('i', 151, struct ifreq) + +#define GIF_ACCEPT_REVETHIP 0x0001 +#define GIF_SEND_REVETHIP 0x0010 +#define GIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP) + #endif /* _NET_IF_GIF_H_ */ Modified: stable/7/sys/netinet/in_gif.c ============================================================================== --- stable/7/sys/netinet/in_gif.c Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/sys/netinet/in_gif.c Mon Sep 7 10:15:50 2009 (r196918) @@ -144,8 +144,22 @@ in_gif_output(struct ifnet *ifp, int fam #endif /* INET6 */ case AF_LINK: proto = IPPROTO_ETHERIP; - eiphdr.eip_ver = ETHERIP_VERSION & ETHERIP_VER_VERS_MASK; - eiphdr.eip_pad = 0; + + /* + * GIF_SEND_REVETHIP (disabled by default) intentionally + * sends an EtherIP packet with revered version field in + * the header. This is a knob for backward compatibility + * with FreeBSD 7.2R or prior. + */ + if ((sc->gif_options & GIF_SEND_REVETHIP)) { + eiphdr.eip_ver = 0; + eiphdr.eip_resvl = ETHERIP_VERSION; + eiphdr.eip_resvh = 0; + } else { + eiphdr.eip_ver = ETHERIP_VERSION; + eiphdr.eip_resvl = 0; + eiphdr.eip_resvh = 0; + } /* prepend Ethernet-in-IP header */ M_PREPEND(m, sizeof(struct etherip_header), M_DONTWAIT); if (m && m->m_len < sizeof(struct etherip_header)) Modified: stable/7/sys/netinet6/in6_gif.c ============================================================================== --- stable/7/sys/netinet6/in6_gif.c Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/sys/netinet6/in6_gif.c Mon Sep 7 10:15:50 2009 (r196918) @@ -142,8 +142,22 @@ in6_gif_output(struct ifnet *ifp, #endif case AF_LINK: proto = IPPROTO_ETHERIP; - eiphdr.eip_ver = ETHERIP_VERSION & ETHERIP_VER_VERS_MASK; - eiphdr.eip_pad = 0; + + /* + * GIF_SEND_REVETHIP (disabled by default) intentionally + * sends an EtherIP packet with revered version field in + * the header. This is a knob for backward compatibility + * with FreeBSD 7.2R or prior. + */ + if ((sc->gif_options & GIF_SEND_REVETHIP)) { + eiphdr.eip_ver = 0; + eiphdr.eip_resvl = ETHERIP_VERSION; + eiphdr.eip_resvh = 0; + } else { + eiphdr.eip_ver = ETHERIP_VERSION; + eiphdr.eip_resvl = 0; + eiphdr.eip_resvh = 0; + } /* prepend Ethernet-in-IP header */ M_PREPEND(m, sizeof(struct etherip_header), M_DONTWAIT); if (m && m->m_len < sizeof(struct etherip_header)) Modified: stable/7/sys/sys/priv.h ============================================================================== --- stable/7/sys/sys/priv.h Mon Sep 7 09:51:23 2009 (r196917) +++ stable/7/sys/sys/priv.h Mon Sep 7 10:15:50 2009 (r196918) @@ -327,6 +327,7 @@ #define PRIV_NET_ADDIFADDR 413 /* Add protocol addr to interface. */ #define PRIV_NET_DELIFADDR 414 /* Delete protocol addr on interface. */ #define PRIV_NET_LAGG 415 /* Administer lagg interface. */ +#define PRIV_NET_GIF 416 /* Administer gif interface. */ /* * 802.11-related privileges. From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 12:39:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27F131065670; Mon, 7 Sep 2009 12:39:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15FC98FC0C; Mon, 7 Sep 2009 12:39:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87CdsTA014742; Mon, 7 Sep 2009 12:39:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87Cds3C014740; Mon, 7 Sep 2009 12:39:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909071239.n87Cds3C014740@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 7 Sep 2009 12:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196922 - in stable/7/sys: . contrib/pf net ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 12:39:55 -0000 Author: kib Date: Mon Sep 7 12:39:54 2009 New Revision: 196922 URL: http://svn.freebsd.org/changeset/base/196922 Log: MFC r196206. Take the number of allocated freeblks into consideration for softdep_slowdown(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/net/ (props changed) stable/7/sys/ufs/ffs/ffs_softdep.c Modified: stable/7/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_softdep.c Mon Sep 7 12:10:41 2009 (r196921) +++ stable/7/sys/ufs/ffs/ffs_softdep.c Mon Sep 7 12:39:54 2009 (r196922) @@ -671,6 +671,8 @@ static int req_clear_inodedeps; /* synce static int req_clear_remove; /* syncer process flush some freeblks */ #define FLUSH_REMOVE 2 #define FLUSH_REMOVE_WAIT 3 +static long num_freeblkdep; /* number of freeblks workitems allocated */ + /* * runtime statistics */ @@ -2230,6 +2232,9 @@ softdep_setup_freeblocks(ip, length, fla freeblks->fb_uid = ip->i_uid; freeblks->fb_previousinum = ip->i_number; freeblks->fb_devvp = ip->i_devvp; + ACQUIRE_LOCK(&lk); + num_freeblkdep++; + FREE_LOCK(&lk); extblocks = 0; if (fs->fs_magic == FS_UFS2_MAGIC) extblocks = btodb(fragroundup(fs, ip->i_din2->di_extsize)); @@ -2821,6 +2826,7 @@ handle_workitem_freeblocks(freeblks, fla ACQUIRE_LOCK(&lk); WORKITEM_FREE(freeblks, D_FREEBLKS); + num_freeblkdep--; FREE_LOCK(&lk); } @@ -5748,7 +5754,8 @@ softdep_slowdown(vp) max_softdeps_hard = max_softdeps * 11 / 10; if (num_dirrem < max_softdeps_hard / 2 && num_inodedep < max_softdeps_hard && - VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps) { + VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps && + num_freeblkdep < max_softdeps_hard) { FREE_LOCK(&lk); return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 13:37:04 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83D6D106568B; Mon, 7 Sep 2009 13:37:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70E968FC17; Mon, 7 Sep 2009 13:37:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87Db4na016094; Mon, 7 Sep 2009 13:37:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87Db4tN016089; Mon, 7 Sep 2009 13:37:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200909071337.n87Db4tN016089@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 7 Sep 2009 13:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196924 - in stable/7/sys: . amd64/amd64 compat/ia32 contrib/pf i386/i386 kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 13:37:04 -0000 Author: bz Date: Mon Sep 7 13:37:04 2009 New Revision: 196924 URL: http://svn.freebsd.org/changeset/base/196924 Log: MFC r196653: Make sure FreeBSD binaries without .note.ABI-tag section work correctly and do not match a colliding Debian GNU/kFreeBSD brandinfo statements. For this mark the Debian GNU/kFreeBSD brandinfo that it must have an .note.ABI-tag section and ignore the old EI_OSABI brandinfo when comparing a possibly colliding set of options. Due to SYSINIT we add the brandinfo in a non-deterministic order, so native FreeBSD is not always first. We may want to consider to force native FreeBSD to come first as well. The only way a problem could currently be noticed is when running an i386 binary without the .note.ABI-tag on amd64 and the Debian GNU/kFreeBSD brandinfo was matched first, as the fallback to ld-elf32.so.1 does not exist in that case. Reported and tested by: ticso In collaboration with: kib Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/elf_machdep.c stable/7/sys/compat/ia32/ia32_sysvec.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/i386/elf_machdep.c stable/7/sys/kern/imgact_elf.c stable/7/sys/sys/imgact_elf.h Modified: stable/7/sys/amd64/amd64/elf_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/elf_machdep.c Mon Sep 7 12:41:19 2009 (r196923) +++ stable/7/sys/amd64/amd64/elf_machdep.c Mon Sep 7 13:37:04 2009 (r196924) @@ -117,7 +117,7 @@ static Elf64_Brandinfo kfreebsd_brand_in .sysvec = &elf64_freebsd_sysvec, .interp_newpath = NULL, .brand_note = &elf64_kfreebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; SYSINIT(kelf64, SI_SUB_EXEC, SI_ORDER_ANY, Modified: stable/7/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/7/sys/compat/ia32/ia32_sysvec.c Mon Sep 7 12:41:19 2009 (r196923) +++ stable/7/sys/compat/ia32/ia32_sysvec.c Mon Sep 7 13:37:04 2009 (r196924) @@ -179,7 +179,7 @@ static Elf32_Brandinfo kia32_brand_info .interp_path = "/lib/ld.so.1", .sysvec = &ia32_freebsd_sysvec, .brand_note = &elf32_kfreebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; SYSINIT(kia32, SI_SUB_EXEC, SI_ORDER_ANY, Modified: stable/7/sys/i386/i386/elf_machdep.c ============================================================================== --- stable/7/sys/i386/i386/elf_machdep.c Mon Sep 7 12:41:19 2009 (r196923) +++ stable/7/sys/i386/i386/elf_machdep.c Mon Sep 7 13:37:04 2009 (r196924) @@ -116,7 +116,7 @@ static Elf32_Brandinfo kfreebsd_brand_in .sysvec = &elf32_freebsd_sysvec, .interp_newpath = NULL, .brand_note = &elf32_kfreebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; SYSINIT(kelf32, SI_SUB_EXEC, SI_ORDER_ANY, Modified: stable/7/sys/kern/imgact_elf.c ============================================================================== --- stable/7/sys/kern/imgact_elf.c Mon Sep 7 12:41:19 2009 (r196923) +++ stable/7/sys/kern/imgact_elf.c Mon Sep 7 13:37:04 2009 (r196924) @@ -241,8 +241,10 @@ __elfN(get_brandinfo)(struct image_param /* Look for an ".note.ABI-tag" ELF section */ for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; - if (bi != NULL && hdr->e_machine == bi->machine && - (bi->flags & BI_BRAND_NOTE) != 0) { + if (bi == NULL) + continue; + if (hdr->e_machine == bi->machine && (bi->flags & + (BI_BRAND_NOTE|BI_BRAND_NOTE_MANDATORY)) != 0) { ret = __elfN(check_note)(imgp, bi->brand_note, osrel); if (ret) return (bi); @@ -252,7 +254,9 @@ __elfN(get_brandinfo)(struct image_param /* If the executable has a brand, search for it in the brand list. */ for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; - if (bi != NULL && hdr->e_machine == bi->machine && + if (bi == NULL || bi->flags & BI_BRAND_NOTE_MANDATORY) + continue; + if (hdr->e_machine == bi->machine && (hdr->e_ident[EI_OSABI] == bi->brand || strncmp((const char *)&hdr->e_ident[OLD_EI_BRAND], bi->compat_3_brand, strlen(bi->compat_3_brand)) == 0)) @@ -263,7 +267,9 @@ __elfN(get_brandinfo)(struct image_param if (interp != NULL) { for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; - if (bi != NULL && hdr->e_machine == bi->machine && + if (bi == NULL || bi->flags & BI_BRAND_NOTE_MANDATORY) + continue; + if (hdr->e_machine == bi->machine && strcmp(interp, bi->interp_path) == 0) return (bi); } @@ -272,7 +278,9 @@ __elfN(get_brandinfo)(struct image_param /* Lacking a recognized interpreter, try the default brand */ for (i = 0; i < MAX_BRANDS; i++) { bi = elf_brand_list[i]; - if (bi != NULL && hdr->e_machine == bi->machine && + if (bi == NULL || bi->flags & BI_BRAND_NOTE_MANDATORY) + continue; + if (hdr->e_machine == bi->machine && __elfN(fallback_brand) == bi->brand) return (bi); } Modified: stable/7/sys/sys/imgact_elf.h ============================================================================== --- stable/7/sys/sys/imgact_elf.h Mon Sep 7 12:41:19 2009 (r196923) +++ stable/7/sys/sys/imgact_elf.h Mon Sep 7 13:37:04 2009 (r196924) @@ -75,8 +75,9 @@ typedef struct { const char *interp_newpath; int flags; Elf_Brandnote *brand_note; -#define BI_CAN_EXEC_DYN 0x0001 -#define BI_BRAND_NOTE 0x0002 +#define BI_CAN_EXEC_DYN 0x0001 +#define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ +#define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ } __ElfN(Brandinfo); __ElfType(Auxargs); From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 13:58:27 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54AE9106566B; Mon, 7 Sep 2009 13:58:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 426578FC15; Mon, 7 Sep 2009 13:58:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87DwRI6016562; Mon, 7 Sep 2009 13:58:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87DwRYP016560; Mon, 7 Sep 2009 13:58:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909071358.n87DwRYP016560@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 7 Sep 2009 13:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196925 - in stable/6/sys: . conf contrib/pf dev/cxgb ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 13:58:27 -0000 Author: kib Date: Mon Sep 7 13:58:26 2009 New Revision: 196925 URL: http://svn.freebsd.org/changeset/base/196925 Log: MFC r196206. Take the number of allocated freeblks into consideration for softdep_slowdown(). Tested by: pluknet gmail com Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) stable/6/sys/ufs/ffs/ffs_softdep.c Modified: stable/6/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/6/sys/ufs/ffs/ffs_softdep.c Mon Sep 7 13:37:04 2009 (r196924) +++ stable/6/sys/ufs/ffs/ffs_softdep.c Mon Sep 7 13:58:26 2009 (r196925) @@ -668,6 +668,8 @@ static int req_clear_inodedeps; /* synce static int req_clear_remove; /* syncer process flush some freeblks */ #define FLUSH_REMOVE 2 #define FLUSH_REMOVE_WAIT 3 +static long num_freeblkdep; /* number of freeblks workitems allocated */ + /* * runtime statistics */ @@ -2195,6 +2197,9 @@ softdep_setup_freeblocks(ip, length, fla freeblks->fb_uid = ip->i_uid; freeblks->fb_previousinum = ip->i_number; freeblks->fb_devvp = ip->i_devvp; + ACQUIRE_LOCK(&lk); + num_freeblkdep++; + FREE_LOCK(&lk); extblocks = 0; if (fs->fs_magic == FS_UFS2_MAGIC) extblocks = btodb(fragroundup(fs, ip->i_din2->di_extsize)); @@ -2784,6 +2789,7 @@ handle_workitem_freeblocks(freeblks, fla ACQUIRE_LOCK(&lk); WORKITEM_FREE(freeblks, D_FREEBLKS); + num_freeblkdep--; FREE_LOCK(&lk); } @@ -5708,7 +5714,8 @@ softdep_slowdown(vp) max_softdeps_hard = max_softdeps * 11 / 10; if (num_dirrem < max_softdeps_hard / 2 && num_inodedep < max_softdeps_hard && - VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps) { + VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps && + num_freeblkdep < max_softdeps_hard) { FREE_LOCK(&lk); return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 14:10:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1D1E1065672; Mon, 7 Sep 2009 14:10:55 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A62CD8FC0C; Mon, 7 Sep 2009 14:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87EAtrW016933; Mon, 7 Sep 2009 14:10:55 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87EAtqO016929; Mon, 7 Sep 2009 14:10:55 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200909071410.n87EAtqO016929@svn.freebsd.org> From: Remko Lodder Date: Mon, 7 Sep 2009 14:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196926 - in stable/8: . etc libexec X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 14:10:55 -0000 Author: remko Date: Mon Sep 7 14:10:55 2009 New Revision: 196926 URL: http://svn.freebsd.org/changeset/base/196926 Log: MFC r196787 Do the first step in removing lukemftpd from the base system. Disconnect it from the build. If you are using the FTP daemon, please consider using the port ftp/tnftpd which is the same FTP server, but newer and might have more/better functionality. This results in us providing only one ftp daemon by default. Reviewed by: bz Approved by: imp (mentor, implicit) MFC after: 3 days Silence from: obrien Approved by: re (kib), imp (mentor, implicit) Modified: stable/8/ObsoleteFiles.inc (contents, props changed) stable/8/etc/inetd.conf stable/8/libexec/Makefile Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Mon Sep 7 13:58:26 2009 (r196925) +++ stable/8/ObsoleteFiles.inc Mon Sep 7 14:10:55 2009 (r196926) @@ -14,6 +14,11 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090904: remove lukemftpd +OLD_FILES+=usr/libexec/lukemftpd +OLD_FILES+=usr/share/man/man5/ftpd.conf.5.gz +OLD_FILES+=usr/share/man/man5/ftpusers.5.gz +OLD_FILES+=usr/share/man/man8/lukemftpd.8.gz # 20090801: vimage.h removed in favour of vnet.h OLD_FILES+=usr/include/sys/vimage.h # 20090719: library version bump for 8.0 Modified: stable/8/etc/inetd.conf ============================================================================== --- stable/8/etc/inetd.conf Mon Sep 7 13:58:26 2009 (r196925) +++ stable/8/etc/inetd.conf Mon Sep 7 14:10:55 2009 (r196926) @@ -8,8 +8,6 @@ # #ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l #ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l -#ftp stream tcp nowait root /usr/libexec/lukemftpd ftpd -l -r -#ftp stream tcp6 nowait root /usr/libexec/lukemftpd ftpd -l -r #ssh stream tcp nowait root /usr/sbin/sshd sshd -i -4 #ssh stream tcp6 nowait root /usr/sbin/sshd sshd -i -6 #telnet stream tcp nowait root /usr/libexec/telnetd telnetd Modified: stable/8/libexec/Makefile ============================================================================== --- stable/8/libexec/Makefile Mon Sep 7 13:58:26 2009 (r196925) +++ stable/8/libexec/Makefile Mon Sep 7 14:10:55 2009 (r196926) @@ -9,7 +9,6 @@ SUBDIR= ${_atrun} \ fingerd \ ftpd \ getty \ - lukemftpd \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 16:25:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33A881065672; Mon, 7 Sep 2009 16:25:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 204DA8FC12; Mon, 7 Sep 2009 16:25:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87GPA2p020397; Mon, 7 Sep 2009 16:25:10 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87GPAxt020395; Mon, 7 Sep 2009 16:25:10 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909071625.n87GPAxt020395@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 7 Sep 2009 16:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196937 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci geom/multipath X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 16:25:10 -0000 Author: pjd Date: Mon Sep 7 16:25:09 2009 New Revision: 196937 URL: http://svn.freebsd.org/changeset/base/196937 Log: MFC r196579: Fix an obvious topology lock leak. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/multipath/g_multipath.c Modified: stable/8/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/8/sys/geom/multipath/g_multipath.c Mon Sep 7 16:19:32 2009 (r196936) +++ stable/8/sys/geom/multipath/g_multipath.c Mon Sep 7 16:25:09 2009 (r196937) @@ -198,6 +198,7 @@ g_multipath_done_error(struct bio *bp) if (sc->cp_active == NULL) { printf("GEOM_MULTIPATH: out of providers for %s\n", sc->sc_name); + g_topology_unlock(); return; } else { printf("GEOM_MULTIPATH: %s now active path in %s\n", From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 16:33:27 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94CEB106566C; Mon, 7 Sep 2009 16:33:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 818918FC13; Mon, 7 Sep 2009 16:33:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87GXRog020643; Mon, 7 Sep 2009 16:33:27 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87GXRBM020641; Mon, 7 Sep 2009 16:33:27 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200909071633.n87GXRBM020641@svn.freebsd.org> From: Sam Leffler Date: Mon, 7 Sep 2009 16:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196939 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net80211 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 16:33:27 -0000 Author: sam Date: Mon Sep 7 16:33:27 2009 New Revision: 196939 URL: http://svn.freebsd.org/changeset/base/196939 Log: MFC r196785: correct timeout for doing NOL processing; need a ticks-relative value Approved by: re (kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/net80211/ieee80211_dfs.c Modified: stable/8/sys/net80211/ieee80211_dfs.c ============================================================================== --- stable/8/sys/net80211/ieee80211_dfs.c Mon Sep 7 16:26:03 2009 (r196938) +++ stable/8/sys/net80211/ieee80211_dfs.c Mon Sep 7 16:33:27 2009 (r196939) @@ -235,7 +235,7 @@ dfs_timeout(void *arg) } if (oldest != now) { /* arrange to process next channel up for a status change */ - callout_schedule(&dfs->nol_timer, oldest + NOL_TIMEOUT); + callout_schedule(&dfs->nol_timer, oldest + NOL_TIMEOUT - now); } } From owner-svn-src-stable@FreeBSD.ORG Mon Sep 7 16:41:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B6821065672; Mon, 7 Sep 2009 16:41:19 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECB818FC13; Mon, 7 Sep 2009 16:41:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n87GfIs2020844; Mon, 7 Sep 2009 16:41:18 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n87GfINm020842; Mon, 7 Sep 2009 16:41:18 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200909071641.n87GfINm020842@svn.freebsd.org> From: Sam Leffler Date: Mon, 7 Sep 2009 16:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196940 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ath dev/xen/xenpci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 16:41:19 -0000 Author: sam Date: Mon Sep 7 16:41:18 2009 New Revision: 196940 URL: http://svn.freebsd.org/changeset/base/196940 Log: MFC r196717: fix beacon timers on resume in sta mode so raoming works Approved by: re (kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ath/if_ath.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ath/if_ath.c ============================================================================== --- stable/8/sys/dev/ath/if_ath.c Mon Sep 7 16:33:27 2009 (r196939) +++ stable/8/sys/dev/ath/if_ath.c Mon Sep 7 16:41:18 2009 (r196940) @@ -1236,7 +1236,16 @@ ath_resume(struct ath_softc *sc) if (sc->sc_resume_up) { if (ic->ic_opmode == IEEE80211_M_STA) { ath_init(sc); - ieee80211_beacon_miss(ic); + /* + * Program the beacon registers using the last rx'd + * beacon frame and enable sync on the next beacon + * we see. This should handle the case where we + * wakeup and find the same AP and also the case where + * we wakeup and need to roam. For the latter we + * should get bmiss events that trigger a roam. + */ + ath_beacon_config(sc, NULL); + sc->sc_syncbeacon = 1; } else ieee80211_resume_all(ic); } From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 14:15:15 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 481CA106568F; Tue, 8 Sep 2009 14:15:15 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35DBF8FC1C; Tue, 8 Sep 2009 14:15:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88EFF4v049885; Tue, 8 Sep 2009 14:15:15 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88EFF4R049882; Tue, 8 Sep 2009 14:15:15 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909081415.n88EFF4R049882@svn.freebsd.org> From: Attilio Rao Date: Tue, 8 Sep 2009 14:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196972 - stable/6/usr.sbin/tzsetup X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 14:15:15 -0000 Author: attilio Date: Tue Sep 8 14:15:14 2009 New Revision: 196972 URL: http://svn.freebsd.org/changeset/base/196972 Log: MFC r195339: Add a new option (-s) that, when specified, skips the question about adjusting the clock to UTC. Sponsored by: Sandvine Incorporated Modified: stable/6/usr.sbin/tzsetup/tzsetup.8 stable/6/usr.sbin/tzsetup/tzsetup.c Modified: stable/6/usr.sbin/tzsetup/tzsetup.8 ============================================================================== --- stable/6/usr.sbin/tzsetup/tzsetup.8 Tue Sep 8 13:24:36 2009 (r196971) +++ stable/6/usr.sbin/tzsetup/tzsetup.8 Tue Sep 8 14:15:14 2009 (r196972) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd January 24, 1996 +.Dd September 08, 2009 .Dt TZSETUP 8 .Os .Sh NAME @@ -31,7 +31,7 @@ .Nd set local timezone .Sh SYNOPSIS .Nm -.Op Fl n +.Op Fl ns .Op Ar default .Sh DESCRIPTION The @@ -51,6 +51,9 @@ The following option is available: .Bl -tag -offset indent -width Fl .It Fl n Do not create or copy files. +.It Fl s +Skip the initial question about adjusting the clock if not set to +.Tn UTC . .El .Pp It is possible to short-circuit the menu system by specifying a Modified: stable/6/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- stable/6/usr.sbin/tzsetup/tzsetup.c Tue Sep 8 13:24:36 2009 (r196971) +++ stable/6/usr.sbin/tzsetup/tzsetup.c Tue Sep 8 14:15:14 2009 (r196972) @@ -648,11 +648,14 @@ main(int argc, char **argv) dialog_utc = dialog_noyes; #endif - while ((c = getopt(argc, argv, "n")) != -1) { + while ((c = getopt(argc, argv, "ns")) != -1) { switch(c) { case 'n': reallydoit = 0; break; + case 's': + dialog_utc = NULL; + break; default: usage(); @@ -671,22 +674,25 @@ main(int argc, char **argv) make_menus(); init_dialog(); - if (!dialog_utc("Select local or UTC (Greenwich Mean Time) clock", - "Is this machine's CMOS clock set to UTC? If it is set to local time,\n" - "or you don't know, please choose NO here!", 7, 72)) { - if (reallydoit) - unlink(_PATH_WALL_CMOS_CLOCK); - } else { - if (reallydoit) { - fd = open(_PATH_WALL_CMOS_CLOCK, - O_WRONLY|O_CREAT|O_TRUNC, - S_IRUSR|S_IRGRP|S_IROTH); - if (fd < 0) - err(1, "create %s", _PATH_WALL_CMOS_CLOCK); - close(fd); + if (dialog_utc != NULL) { + if (!dialog_utc("Select local or UTC (Greenwich Mean Time) clock", + "Is this machine's CMOS clock set to UTC? If it is set to local time,\n" + "or you don't know, please choose NO here!", 7, 72)) { + if (reallydoit) + unlink(_PATH_WALL_CMOS_CLOCK); + } else { + if (reallydoit) { + fd = open(_PATH_WALL_CMOS_CLOCK, + O_WRONLY|O_CREAT|O_TRUNC, + S_IRUSR|S_IRGRP|S_IROTH); + if (fd < 0) + err(1, "create %s", + _PATH_WALL_CMOS_CLOCK); + close(fd); + } } + dialog_clear_norefresh(); } - dialog_clear_norefresh(); if (optind == argc - 1) { char *msg; asprintf(&msg, "\nUse the default `%s' zone?", argv[optind]); From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 14:19:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A018106566B; Tue, 8 Sep 2009 14:19:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DBE28FC22; Tue, 8 Sep 2009 14:19:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88EJEba049983; Tue, 8 Sep 2009 14:19:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88EJE4P049981; Tue, 8 Sep 2009 14:19:14 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909081419.n88EJE4P049981@svn.freebsd.org> From: Attilio Rao Date: Tue, 8 Sep 2009 14:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196973 - stable/6/sys/ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 14:19:14 -0000 Author: attilio Date: Tue Sep 8 14:19:14 2009 New Revision: 196973 URL: http://svn.freebsd.org/changeset/base/196973 Log: MFC r180758: Prevent the bdflush() activity when trying to lock an indirect block buffer setting TDP_INBDFUSH in the appropriate code paths. Sponsored by: Sandvine Incorporated Modified: stable/6/sys/ufs/ffs/ffs_balloc.c Modified: stable/6/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- stable/6/sys/ufs/ffs/ffs_balloc.c Tue Sep 8 14:15:14 2009 (r196972) +++ stable/6/sys/ufs/ffs/ffs_balloc.c Tue Sep 8 14:19:14 2009 (r196973) @@ -104,6 +104,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t ufs1_daddr_t *allocib, *blkp, *allocblk, allociblk[NIADDR + 1]; ufs2_daddr_t *lbns_remfree, lbns[NIADDR + 1]; int unwindidx = -1; + int saved_inbdflush; ip = VTOI(vp); dp = ip->i_din1; @@ -225,6 +226,9 @@ ffs_balloc_ufs1(struct vnode *vp, off_t if (num < 1) panic ("ffs_balloc_ufs1: ufs_getlbns returned indirect block"); #endif + saved_inbdflush = ~TDP_INBDFLUSH | (curthread->td_pflags & + TDP_INBDFLUSH); + curthread->td_pflags |= TDP_INBDFLUSH; /* * Fetch the first indirect block allocating if necessary. */ @@ -237,8 +241,10 @@ ffs_balloc_ufs1(struct vnode *vp, off_t UFS_LOCK(ump); pref = ffs_blkpref_ufs1(ip, lbn, 0, (ufs1_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, - cred, &newb)) != 0) + cred, &newb)) != 0) { + curthread->td_pflags &= saved_inbdflush; return (error); + } nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; @@ -329,6 +335,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { + curthread->td_pflags &= saved_inbdflush; *bpp = bp; return (0); } @@ -366,6 +373,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); } @@ -387,9 +395,11 @@ ffs_balloc_ufs1(struct vnode *vp, off_t nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); fail: + curthread->td_pflags &= saved_inbdflush; /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file. @@ -489,6 +499,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t ufs2_daddr_t *lbns_remfree, lbns[NIADDR + 1]; int deallocated, osize, nsize, num, i, error; int unwindidx = -1; + int saved_inbdflush; ip = VTOI(vp); dp = ip->i_din2; @@ -719,6 +730,9 @@ ffs_balloc_ufs2(struct vnode *vp, off_t if (num < 1) panic ("ffs_balloc_ufs2: ufs_getlbns returned indirect block"); #endif + saved_inbdflush = ~TDP_INBDFLUSH | (curthread->td_pflags & + TDP_INBDFLUSH); + curthread->td_pflags |= TDP_INBDFLUSH; /* * Fetch the first indirect block allocating if necessary. */ @@ -731,8 +745,10 @@ ffs_balloc_ufs2(struct vnode *vp, off_t UFS_LOCK(ump); pref = ffs_blkpref_ufs2(ip, lbn, 0, (ufs2_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, - cred, &newb)) != 0) + cred, &newb)) != 0) { + curthread->td_pflags &= saved_inbdflush; return (error); + } nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; @@ -823,6 +839,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { + curthread->td_pflags &= saved_inbdflush; *bpp = bp; return (0); } @@ -860,6 +877,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); } @@ -887,9 +905,11 @@ ffs_balloc_ufs2(struct vnode *vp, off_t nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); fail: + curthread->td_pflags &= saved_inbdflush; /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file. From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 14:43:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECC2B106568B; Tue, 8 Sep 2009 14:43:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D97FD8FC21; Tue, 8 Sep 2009 14:43:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88EhgQD050550; Tue, 8 Sep 2009 14:43:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88EhgHj050548; Tue, 8 Sep 2009 14:43:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909081443.n88EhgHj050548@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 8 Sep 2009 14:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196974 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 14:43:43 -0000 Author: kib Date: Tue Sep 8 14:43:42 2009 New Revision: 196974 URL: http://svn.freebsd.org/changeset/base/196974 Log: MFC r196692: Make the mnt_writeopcount and mnt_secondary_writes counters, used by the suspension code, not greater then mnt_ref reference counter value. MFC r196733: Fix mount reference leak when V_XSLEEP is specified to vn_start_write(). Approved by: re (kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/vfs_vnops.c Modified: stable/8/sys/kern/vfs_vnops.c ============================================================================== --- stable/8/sys/kern/vfs_vnops.c Tue Sep 8 14:19:14 2009 (r196973) +++ stable/8/sys/kern/vfs_vnops.c Tue Sep 8 14:43:42 2009 (r196974) @@ -999,7 +999,8 @@ vn_start_write(vp, mpp, flags) goto unlock; mp->mnt_writeopcount++; unlock: - MNT_REL(mp); + if (error != 0 || (flags & V_XSLEEP) != 0) + MNT_REL(mp); MNT_IUNLOCK(mp); return (error); } @@ -1049,7 +1050,6 @@ vn_start_secondary_write(vp, mpp, flags) if ((mp->mnt_kern_flag & (MNTK_SUSPENDED | MNTK_SUSPEND2)) == 0) { mp->mnt_secondary_writes++; mp->mnt_secondary_accwrites++; - MNT_REL(mp); MNT_IUNLOCK(mp); return (0); } @@ -1081,6 +1081,7 @@ vn_finished_write(mp) if (mp == NULL) return; MNT_ILOCK(mp); + MNT_REL(mp); mp->mnt_writeopcount--; if (mp->mnt_writeopcount < 0) panic("vn_finished_write: neg cnt"); @@ -1103,6 +1104,7 @@ vn_finished_secondary_write(mp) if (mp == NULL) return; MNT_ILOCK(mp); + MNT_REL(mp); mp->mnt_secondary_writes--; if (mp->mnt_secondary_writes < 0) panic("vn_finished_secondary_write: neg cnt"); From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 15:13:50 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14A621065679; Tue, 8 Sep 2009 15:13:50 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 010728FC19; Tue, 8 Sep 2009 15:13:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88FDnOk051226; Tue, 8 Sep 2009 15:13:49 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88FDn06051220; Tue, 8 Sep 2009 15:13:49 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909081513.n88FDn06051220@svn.freebsd.org> From: Attilio Rao Date: Tue, 8 Sep 2009 15:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196975 - in stable/6: bin/ps sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 15:13:50 -0000 Author: attilio Date: Tue Sep 8 15:13:49 2009 New Revision: 196975 URL: http://svn.freebsd.org/changeset/base/196975 Log: MFC r189078: * Implement ucomm with a dynamic size function in order to print out the threads name also in the case they are not the last one shown. * On AMD64 pointers don't have enough space to be printed. Fix it. * Check a return value for malloc which wasn't checked before Sponsored by: Sandvine Incorporated Modified: stable/6/bin/ps/extern.h stable/6/bin/ps/keyword.c stable/6/bin/ps/print.c stable/6/bin/ps/ps.c stable/6/sys/kern/kern_proc.c Modified: stable/6/bin/ps/extern.h ============================================================================== --- stable/6/bin/ps/extern.h Tue Sep 8 14:43:42 2009 (r196974) +++ stable/6/bin/ps/extern.h Tue Sep 8 15:13:49 2009 (r196975) @@ -39,7 +39,7 @@ extern fixpt_t ccpu; extern int cflag, eval, fscale, nlistread, rawcpu; extern unsigned long mempages; extern time_t now; -extern int sumrusage, termwidth, totwidth; +extern int showthreads, sumrusage, termwidth, totwidth; extern STAILQ_HEAD(velisthead, varent) varlist; __BEGIN_DECLS @@ -71,6 +71,7 @@ void priorityr(KINFO *, VARENT *); void rgroupname(KINFO *, VARENT *); void runame(KINFO *, VARENT *); void rvar(KINFO *, VARENT *); +int s_comm(KINFO *); int s_label(KINFO *); int s_rgroupname(KINFO *); int s_runame(KINFO *); Modified: stable/6/bin/ps/keyword.c ============================================================================== --- stable/6/bin/ps/keyword.c Tue Sep 8 14:43:42 2009 (r196974) +++ stable/6/bin/ps/keyword.c Tue Sep 8 15:13:49 2009 (r196975) @@ -79,8 +79,8 @@ static VAR var[] = { CHAR, NULL, 0}, {"blocked", "", "sigmask", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"caught", "", "sigcatch", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"comm", "COMMAND", NULL, LJUST, ucomm, NULL, MAXCOMLEN, 0, CHAR, - NULL, 0}, + {"comm", "COMMAND", NULL, LJUST|DSIZ, ucomm, s_comm, + COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, {"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0, CHAR, NULL, 0}, {"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d", @@ -135,12 +135,13 @@ static VAR var[] = { LONG, "ld", 0}, {"nvcsw", "NVCSW", NULL, USER, rvar, NULL, 5, ROFF(ru_nvcsw), LONG, "ld", 0}, - {"nwchan", "NWCHAN", NULL, LJUST, nwchan, NULL, 8, 0, CHAR, NULL, 0}, + {"nwchan", "NWCHAN", NULL, LJUST, nwchan, NULL, sizeof(void *) * 2, 0, + CHAR, NULL, 0}, {"oublk", "OUBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_oublock), LONG, "ld", 0}, {"oublock", "", "oublk", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"paddr", "PADDR", NULL, 0, kvar, NULL, 8, KOFF(ki_paddr), KPTR, - "lx", 0}, + {"paddr", "PADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2, + KOFF(ki_paddr), KPTR, "lx", 0}, {"pagein", "PAGEIN", NULL, USER, pagein, NULL, 6, 0, CHAR, NULL, 0}, {"pcpu", "", "%cpu", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"pending", "", "sig", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, @@ -194,13 +195,13 @@ static VAR var[] = { {"tsiz", "TSIZ", NULL, 0, kvar, NULL, 4, KOFF(ki_tsize), PGTOK, "ld", 0}, {"tt", "TT ", NULL, 0, tname, NULL, 4, 0, CHAR, NULL, 0}, {"tty", "TTY", NULL, LJUST, longtname, NULL, 8, 0, CHAR, NULL, 0}, - {"ucomm", "UCOMM", NULL, LJUST, ucomm, NULL, MAXCOMLEN, 0, CHAR, NULL, - 0}, + {"ucomm", "UCOMM", NULL, LJUST|DSIZ, ucomm, s_comm, + COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, {"uid", "UID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_uid), UINT, UIDFMT, 0}, {"upr", "UPR", NULL, 0, upr, NULL, 3, 0, CHAR, NULL, 0}, - {"uprocp", "UPROCP", NULL, 0, kvar, NULL, 8, KOFF(ki_paddr), KPTR, - "lx", 0}, + {"uprocp", "UPROCP", NULL, 0, kvar, NULL, sizeof(void *) * 2, + KOFF(ki_paddr), KPTR, "lx", 0}, {"user", "USER", NULL, LJUST|DSIZ, uname, s_uname, USERLEN, 0, CHAR, NULL, 0}, {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, @@ -324,6 +325,8 @@ findvar(char *p, int user, char **header */ rflen = strlen(v->alias) + strlen(hp) + 2; realfmt = malloc(rflen); + if (realfmt == NULL) + errx(1, "malloc failed"); snprintf(realfmt, rflen, "%s=%s", v->alias, hp); parsefmt(realfmt, user); } Modified: stable/6/bin/ps/print.c ============================================================================== --- stable/6/bin/ps/print.c Tue Sep 8 14:43:42 2009 (r196974) +++ stable/6/bin/ps/print.c Tue Sep 8 15:13:49 2009 (r196975) @@ -175,13 +175,22 @@ command(KINFO *k, VARENT *ve) void ucomm(KINFO *k, VARENT *ve) { + char tmpbuff[COMMLEN + OCOMMLEN + 2]; VAR *v; v = ve->var; if (STAILQ_NEXT(ve, next_ve) == NULL) /* last field, don't pad */ (void)printf("%s", k->ki_p->ki_comm); - else - (void)printf("%-*s", v->width, k->ki_p->ki_comm); + else { + bzero(tmpbuff, sizeof(tmpbuff)); + if (showthreads && k->ki_p->ki_numthreads > 1) + sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, + k->ki_p->ki_ocomm); + else + sprintf(tmpbuff, "%s", k->ki_p->ki_comm); + (void)printf("%-*s", v->width, tmpbuff); + } + } void @@ -804,6 +813,20 @@ out: } int +s_comm(KINFO *k) +{ + char tmpbuff[COMMLEN + OCOMMLEN + 2]; + + bzero(tmpbuff, sizeof(tmpbuff)); + if (showthreads && k->ki_p->ki_numthreads > 1) + sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, + k->ki_p->ki_ocomm); + else + sprintf(tmpbuff, "%s", k->ki_p->ki_comm); + return (strlen(tmpbuff)); +} + +int s_label(KINFO *k) { char *string = NULL; Modified: stable/6/bin/ps/ps.c ============================================================================== --- stable/6/bin/ps/ps.c Tue Sep 8 14:43:42 2009 (r196974) +++ stable/6/bin/ps/ps.c Tue Sep 8 15:13:49 2009 (r196975) @@ -98,6 +98,7 @@ int rawcpu; /* -C */ int sumrusage; /* -S */ int termwidth; /* Width of the screen (0 == infinity). */ int totwidth; /* Calculated-width of requested variables. */ +int showthreads; /* will threads be shown? */ struct velisthead varlist = STAILQ_HEAD_INITIALIZER(varlist); @@ -175,7 +176,7 @@ main(int argc, char *argv[]) char *cols; int all, ch, elem, flag, _fmt, i, lineno; int nentries, nkept, nselectors; - int prtheader, showthreads, wflag, what, xkeep, xkeep_implied; + int prtheader, wflag, what, xkeep, xkeep_implied; char errbuf[_POSIX2_LINE_MAX]; (void) setlocale(LC_ALL, ""); Modified: stable/6/sys/kern/kern_proc.c ============================================================================== --- stable/6/sys/kern/kern_proc.c Tue Sep 8 14:43:42 2009 (r196974) +++ stable/6/sys/kern/kern_proc.c Tue Sep 8 15:13:49 2009 (r196975) @@ -72,6 +72,7 @@ MALLOC_DEFINE(M_SUBPROC, "subproc", "Pro static void doenterpgrp(struct proc *, struct pgrp *); static void orphanpg(struct pgrp *pg); +static void fill_kinfo_aggregate(struct proc *p, struct kinfo_proc *kp); static void fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp); static void fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp); static void pgadjustjobc(struct pgrp *pgrp, int entering); @@ -611,6 +612,26 @@ DB_SHOW_COMMAND(pgrpdump, pgrpdump) #endif /* DDB */ /* + * Rework the kinfo_proc members which need to be aggregated in the + * case of process-ware informations. + * Must be called with sched_lock held. + */ +static void +fill_kinfo_aggregate(struct proc *p, struct kinfo_proc *kp) +{ + struct thread *td; + + mtx_assert(&sched_lock, MA_OWNED); + + kp->ki_estcpu = 0; + kp->ki_pctcpu = 0; + FOREACH_THREAD_IN_PROC(p, td) { + kp->ki_pctcpu += sched_pctcpu(td); + kp->ki_estcpu += td->td_ksegrp->kg_estcpu; + } +} + +/* * Clear kinfo_proc and fill in any information that is common * to all threads in the process. * Must be called with the target process locked. @@ -830,8 +851,9 @@ fill_kinfo_proc(struct proc *p, struct k fill_kinfo_proc_only(p, kp); mtx_lock_spin(&sched_lock); - if (FIRST_THREAD_IN_PROC(p) != NULL) - fill_kinfo_thread(FIRST_THREAD_IN_PROC(p), kp); + MPASS(FIRST_THREAD_IN_PROC(p) != NULL); + fill_kinfo_thread(FIRST_THREAD_IN_PROC(p), kp); + fill_kinfo_aggregate(p, kp); mtx_unlock_spin(&sched_lock); } @@ -897,27 +919,20 @@ sysctl_out_proc(struct proc *p, struct s PROC_LOCK_ASSERT(p, MA_OWNED); - fill_kinfo_proc_only(p, &kinfo_proc); - if (flags & KERN_PROC_NOTHREADS) { - mtx_lock_spin(&sched_lock); - if (FIRST_THREAD_IN_PROC(p) != NULL) - fill_kinfo_thread(FIRST_THREAD_IN_PROC(p), &kinfo_proc); - mtx_unlock_spin(&sched_lock); + fill_kinfo_proc(p, &kinfo_proc); + if (flags & KERN_PROC_NOTHREADS) error = SYSCTL_OUT(req, (caddr_t)&kinfo_proc, - sizeof(kinfo_proc)); - } else { + sizeof(kinfo_proc)); + else { mtx_lock_spin(&sched_lock); - if (FIRST_THREAD_IN_PROC(p) != NULL) - FOREACH_THREAD_IN_PROC(p, td) { - fill_kinfo_thread(td, &kinfo_proc); - error = SYSCTL_OUT(req, (caddr_t)&kinfo_proc, - sizeof(kinfo_proc)); - if (error) - break; - } - else + MPASS(FIRST_THREAD_IN_PROC(p) != NULL); + FOREACH_THREAD_IN_PROC(p, td) { + fill_kinfo_thread(td, &kinfo_proc); error = SYSCTL_OUT(req, (caddr_t)&kinfo_proc, - sizeof(kinfo_proc)); + sizeof(kinfo_proc)); + if (error) + break; + } mtx_unlock_spin(&sched_lock); } PROC_UNLOCK(p); From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 15:31:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D28D41065693; Tue, 8 Sep 2009 15:31:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD7BD8FC21; Tue, 8 Sep 2009 15:31:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88FVNOk051741; Tue, 8 Sep 2009 15:31:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88FVNDQ051731; Tue, 8 Sep 2009 15:31:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909081531.n88FVNDQ051731@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 8 Sep 2009 15:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196977 - in stable/8/sys: . amd64/include/xen arm/arm cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern sys vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 15:31:23 -0000 Author: kib Date: Tue Sep 8 15:31:23 2009 New Revision: 196977 URL: http://svn.freebsd.org/changeset/base/196977 Log: MFC r196730: Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Not a merge: instead of removing td_altkstack* members of struct thread, replace them with placeholders to keep struct thread layout on the stable branch. Also, record r196640, r196644 and r196648 as merged. Approved by: re (kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/arm/vm_machdep.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_fork.c stable/8/sys/kern/kern_kthread.c stable/8/sys/kern/kern_proc.c stable/8/sys/kern/kern_thr.c stable/8/sys/kern/kern_thread.c stable/8/sys/sys/proc.h stable/8/sys/vm/vm_extern.h stable/8/sys/vm/vm_glue.c Modified: stable/8/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/8/sys/arm/arm/vm_machdep.c Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/arm/arm/vm_machdep.c Tue Sep 8 15:31:23 2009 (r196977) @@ -119,9 +119,6 @@ cpu_fork(register struct thread *td1, re #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td2->td_kstack, td2->td_kstack_pages * PAGE_SIZE); - if (td2->td_altkstack) - pmap_use_minicache(td2->td_altkstack, td2->td_altkstack_pages * - PAGE_SIZE); #endif #endif td2->td_pcb = pcb2; Modified: stable/8/sys/kern/kern_fork.c ============================================================================== --- stable/8/sys/kern/kern_fork.c Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/kern/kern_fork.c Tue Sep 8 15:31:23 2009 (r196977) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kdtrace.h" #include "opt_ktrace.h" +#include "opt_kstack_pages.h" #include #include @@ -276,25 +277,29 @@ norfproc_fail: mem_charged = 0; vm2 = NULL; + if (pages == 0) + pages = KSTACK_PAGES; /* Allocate new proc. */ newproc = uma_zalloc(proc_zone, M_WAITOK); - if (TAILQ_EMPTY(&newproc->p_threads)) { - td2 = thread_alloc(); + td2 = FIRST_THREAD_IN_PROC(newproc); + if (td2 == NULL) { + td2 = thread_alloc(pages); if (td2 == NULL) { error = ENOMEM; goto fail1; } proc_linkup(newproc, td2); - } else - td2 = FIRST_THREAD_IN_PROC(newproc); - - /* Allocate and switch to an alternate kstack if specified. */ - if (pages != 0) { - if (!vm_thread_new_altkstack(td2, pages)) { - error = ENOMEM; - goto fail1; + } else { + if (td2->td_kstack == 0 || td2->td_kstack_pages != pages) { + if (td2->td_kstack != 0) + vm_thread_dispose(td2); + if (!thread_alloc_stack(td2, pages)) { + error = ENOMEM; + goto fail1; + } } } + if ((flags & RFMEM) == 0) { vm2 = vmspace_fork(p1->p_vmspace, &mem_charged); if (vm2 == NULL) { Modified: stable/8/sys/kern/kern_kthread.c ============================================================================== --- stable/8/sys/kern/kern_kthread.c Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/kern/kern_kthread.c Tue Sep 8 15:31:23 2009 (r196977) @@ -256,7 +256,7 @@ kthread_add(void (*func)(void *), void * } /* Initialize our new td */ - newtd = thread_alloc(); + newtd = thread_alloc(pages); if (newtd == NULL) return (ENOMEM); @@ -282,9 +282,6 @@ kthread_add(void (*func)(void *), void * newtd->td_pflags |= TDP_KTHREAD; newtd->td_ucred = crhold(p->p_ucred); - /* Allocate and switch to an alternate kstack if specified. */ - if (pages != 0) - vm_thread_new_altkstack(newtd, pages); /* this code almost the same as create_thread() in kern_thr.c */ PROC_LOCK(p); Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/kern/kern_proc.c Tue Sep 8 15:31:23 2009 (r196977) @@ -203,14 +203,6 @@ proc_dtor(void *mem, int size, void *arg #endif /* Free all OSD associated to this thread. */ osd_thread_exit(td); - - /* Dispose of an alternate kstack, if it exists. - * XXX What if there are more than one thread in the proc? - * The first thread in the proc is special and not - * freed, so you gotta do this here. - */ - if (((p->p_flag & P_KTHREAD) != 0) && (td->td_altkstack != 0)) - vm_thread_dispose_altkstack(td); } EVENTHANDLER_INVOKE(process_dtor, p); if (p->p_ksi != NULL) @@ -767,8 +759,6 @@ fill_kinfo_proc_only(struct proc *p, str FOREACH_THREAD_IN_PROC(p, td0) { if (!TD_IS_SWAPPED(td0)) kp->ki_rssize += td0->td_kstack_pages; - if (td0->td_altkstack_obj != NULL) - kp->ki_rssize += td0->td_altkstack_pages; } kp->ki_swrss = vm->vm_swrss; kp->ki_tsize = vm->vm_tsize; Modified: stable/8/sys/kern/kern_thr.c ============================================================================== --- stable/8/sys/kern/kern_thr.c Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/kern/kern_thr.c Tue Sep 8 15:31:23 2009 (r196977) @@ -176,7 +176,7 @@ create_thread(struct thread *td, mcontex } /* Initialize our td */ - newtd = thread_alloc(); + newtd = thread_alloc(0); if (newtd == NULL) return (ENOMEM); Modified: stable/8/sys/kern/kern_thread.c ============================================================================== --- stable/8/sys/kern/kern_thread.c Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/kern/kern_thread.c Tue Sep 8 15:31:23 2009 (r196977) @@ -283,7 +283,7 @@ thread_reap(void) * Allocate a thread. */ struct thread * -thread_alloc(void) +thread_alloc(int pages) { struct thread *td; @@ -291,7 +291,7 @@ thread_alloc(void) td = (struct thread *)uma_zalloc(thread_zone, M_WAITOK); KASSERT(td->td_kstack == 0, ("thread_alloc got thread with kstack")); - if (!vm_thread_new(td, 0)) { + if (!vm_thread_new(td, pages)) { uma_zfree(thread_zone, td); return (NULL); } @@ -299,6 +299,17 @@ thread_alloc(void) return (td); } +int +thread_alloc_stack(struct thread *td, int pages) +{ + + KASSERT(td->td_kstack == 0, + ("thread_alloc_stack called on a thread with kstack")); + if (!vm_thread_new(td, pages)) + return (0); + cpu_thread_alloc(td); + return (1); +} /* * Deallocate a thread. @@ -312,8 +323,6 @@ thread_free(struct thread *td) cpuset_rel(td->td_cpuset); td->td_cpuset = NULL; cpu_thread_free(td); - if (td->td_altkstack != 0) - vm_thread_dispose_altkstack(td); if (td->td_kstack != 0) vm_thread_dispose(td); uma_zfree(thread_zone, td); Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/sys/proc.h Tue Sep 8 15:31:23 2009 (r196977) @@ -267,9 +267,9 @@ struct thread { struct vm_object *td_kstack_obj;/* (a) Kstack object. */ vm_offset_t td_kstack; /* (a) Kernel VA of kstack. */ int td_kstack_pages; /* (a) Size of the kstack. */ - struct vm_object *td_altkstack_obj;/* (a) Alternate kstack object. */ - vm_offset_t td_altkstack; /* (a) Kernel VA of alternate kstack. */ - int td_altkstack_pages; /* (a) Size of alternate kstack. */ + void *td_space1; + vm_offset_t td_space2; + int td_space3; volatile u_int td_critnest; /* (k*) Critical section nest level. */ struct mdthread td_md; /* (k) Any machine-dependent fields. */ struct td_sched *td_sched; /* (*) Scheduler-specific data. */ @@ -850,7 +850,8 @@ void cpu_thread_exit(struct thread *); void cpu_thread_free(struct thread *); void cpu_thread_swapin(struct thread *); void cpu_thread_swapout(struct thread *); -struct thread *thread_alloc(void); +struct thread *thread_alloc(int pages); +int thread_alloc_stack(struct thread *, int pages); void thread_exit(void) __dead2; void thread_free(struct thread *td); void thread_link(struct thread *td, struct proc *p); Modified: stable/8/sys/vm/vm_extern.h ============================================================================== --- stable/8/sys/vm/vm_extern.h Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/vm/vm_extern.h Tue Sep 8 15:31:23 2009 (r196977) @@ -80,9 +80,7 @@ int vm_fault_quick(caddr_t v, int prot); struct sf_buf *vm_imgact_map_page(vm_object_t object, vm_ooffset_t offset); void vm_imgact_unmap_page(struct sf_buf *sf); void vm_thread_dispose(struct thread *td); -void vm_thread_dispose_altkstack(struct thread *td); int vm_thread_new(struct thread *td, int pages); -int vm_thread_new_altkstack(struct thread *td, int pages); void vm_thread_swapin(struct thread *td); void vm_thread_swapout(struct thread *td); #endif /* _KERNEL */ Modified: stable/8/sys/vm/vm_glue.c ============================================================================== --- stable/8/sys/vm/vm_glue.c Tue Sep 8 15:18:25 2009 (r196976) +++ stable/8/sys/vm/vm_glue.c Tue Sep 8 15:31:23 2009 (r196977) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -308,6 +309,20 @@ vm_imgact_unmap_page(struct sf_buf *sf) vm_page_unlock_queues(); } +struct kstack_cache_entry { + vm_object_t ksobj; + struct kstack_cache_entry *next_ks_entry; +}; + +static struct kstack_cache_entry *kstack_cache; +static int kstack_cache_size = 128; +static int kstacks; +static struct mtx kstack_cache_mtx; +SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0, + ""); +SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0, + ""); + #ifndef KSTACK_MAX_PAGES #define KSTACK_MAX_PAGES 32 #endif @@ -323,6 +338,7 @@ vm_thread_new(struct thread *td, int pag vm_object_t ksobj; vm_offset_t ks; vm_page_t m, ma[KSTACK_MAX_PAGES]; + struct kstack_cache_entry *ks_ce; int i; /* Bounds check */ @@ -330,6 +346,22 @@ vm_thread_new(struct thread *td, int pag pages = KSTACK_PAGES; else if (pages > KSTACK_MAX_PAGES) pages = KSTACK_MAX_PAGES; + + if (pages == KSTACK_PAGES) { + mtx_lock(&kstack_cache_mtx); + if (kstack_cache != NULL) { + ks_ce = kstack_cache; + kstack_cache = ks_ce->next_ks_entry; + mtx_unlock(&kstack_cache_mtx); + + td->td_kstack_obj = ks_ce->ksobj; + td->td_kstack = (vm_offset_t)ks_ce; + td->td_kstack_pages = KSTACK_PAGES; + return (1); + } + mtx_unlock(&kstack_cache_mtx); + } + /* * Allocate an object for the kstack. */ @@ -345,7 +377,8 @@ vm_thread_new(struct thread *td, int pag vm_object_deallocate(ksobj); return (0); } - + + atomic_add_int(&kstacks, 1); if (KSTACK_GUARD_PAGES != 0) { pmap_qremove(ks, KSTACK_GUARD_PAGES); ks += KSTACK_GUARD_PAGES * PAGE_SIZE; @@ -376,20 +409,13 @@ vm_thread_new(struct thread *td, int pag return (1); } -/* - * Dispose of a thread's kernel stack. - */ -void -vm_thread_dispose(struct thread *td) +static void +vm_thread_stack_dispose(vm_object_t ksobj, vm_offset_t ks, int pages) { - vm_object_t ksobj; - vm_offset_t ks; vm_page_t m; - int i, pages; + int i; - pages = td->td_kstack_pages; - ksobj = td->td_kstack_obj; - ks = td->td_kstack; + atomic_add_int(&kstacks, -1); pmap_qremove(ks, pages); VM_OBJECT_LOCK(ksobj); for (i = 0; i < pages; i++) { @@ -405,9 +431,66 @@ vm_thread_dispose(struct thread *td) vm_object_deallocate(ksobj); kmem_free(kernel_map, ks - (KSTACK_GUARD_PAGES * PAGE_SIZE), (pages + KSTACK_GUARD_PAGES) * PAGE_SIZE); +} + +/* + * Dispose of a thread's kernel stack. + */ +void +vm_thread_dispose(struct thread *td) +{ + vm_object_t ksobj; + vm_offset_t ks; + struct kstack_cache_entry *ks_ce; + int pages; + + pages = td->td_kstack_pages; + ksobj = td->td_kstack_obj; + ks = td->td_kstack; td->td_kstack = 0; + td->td_kstack_pages = 0; + if (pages == KSTACK_PAGES && kstacks <= kstack_cache_size) { + ks_ce = (struct kstack_cache_entry *)ks; + ks_ce->ksobj = ksobj; + mtx_lock(&kstack_cache_mtx); + ks_ce->next_ks_entry = kstack_cache; + kstack_cache = ks_ce; + mtx_unlock(&kstack_cache_mtx); + return; + } + vm_thread_stack_dispose(ksobj, ks, pages); +} + +static void +vm_thread_stack_lowmem(void *nulll) +{ + struct kstack_cache_entry *ks_ce, *ks_ce1; + + mtx_lock(&kstack_cache_mtx); + ks_ce = kstack_cache; + kstack_cache = NULL; + mtx_unlock(&kstack_cache_mtx); + + while (ks_ce != NULL) { + ks_ce1 = ks_ce; + ks_ce = ks_ce->next_ks_entry; + + vm_thread_stack_dispose(ks_ce1->ksobj, (vm_offset_t)ks_ce1, + KSTACK_PAGES); + } +} + +static void +kstack_cache_init(void *nulll) +{ + + EVENTHANDLER_REGISTER(vm_lowmem, vm_thread_stack_lowmem, NULL, + EVENTHANDLER_PRI_ANY); } +MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); +SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL); + /* * Allow a thread's kernel stack to be paged out. */ @@ -468,37 +551,6 @@ vm_thread_swapin(struct thread *td) } /* - * Set up a variable-sized alternate kstack. - */ -int -vm_thread_new_altkstack(struct thread *td, int pages) -{ - - td->td_altkstack = td->td_kstack; - td->td_altkstack_obj = td->td_kstack_obj; - td->td_altkstack_pages = td->td_kstack_pages; - - return (vm_thread_new(td, pages)); -} - -/* - * Restore the original kstack. - */ -void -vm_thread_dispose_altkstack(struct thread *td) -{ - - vm_thread_dispose(td); - - td->td_kstack = td->td_altkstack; - td->td_kstack_obj = td->td_altkstack_obj; - td->td_kstack_pages = td->td_altkstack_pages; - td->td_altkstack = 0; - td->td_altkstack_obj = NULL; - td->td_altkstack_pages = 0; -} - -/* * Implement fork's actions on an address space. * Here we arrange for the address space to be copied or referenced, * allocate a user struct (pcb and kernel stack), then call the From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 19:18:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 471301065670; Tue, 8 Sep 2009 19:18:03 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B80A8FC13; Tue, 8 Sep 2009 19:18:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88JI3Wm057180; Tue, 8 Sep 2009 19:18:03 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88JI33k057178; Tue, 8 Sep 2009 19:18:03 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200909081918.n88JI33k057178@svn.freebsd.org> From: Jamie Gritton Date: Tue, 8 Sep 2009 19:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196989 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 19:18:03 -0000 Author: jamie Date: Tue Sep 8 19:18:02 2009 New Revision: 196989 URL: http://svn.freebsd.org/changeset/base/196989 Log: MFC r196835: Allow a jail's name to be the same as its jid (which is the default if no name is specified), and let a numeric name specify the jid for a new jail when the jid isn't otherwise set. Still disallow other numeric names. Reviewed by: zec Approved by: re (kib), bz (mentor) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_jail.c Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Tue Sep 8 19:15:29 2009 (r196988) +++ stable/8/sys/kern/kern_jail.c Tue Sep 8 19:18:02 2009 (r196989) @@ -478,7 +478,7 @@ kern_jail_set(struct thread *td, struct struct vfsoptlist *opts; struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; - char *domain, *errmsg, *host, *name, *p, *path, *uuid; + char *domain, *errmsg, *host, *name, *namelc, *p, *path, *uuid; #if defined(INET) || defined(INET6) struct prison *tppr; void *op; @@ -907,6 +907,13 @@ kern_jail_set(struct thread *td, struct goto done_unlock_list; } pr = NULL; + namelc = NULL; + if (cuflags == JAIL_CREATE && jid == 0 && name != NULL) { + namelc = strrchr(name, '.'); + jid = strtoul(namelc != NULL ? namelc + 1 : name, &p, 10); + if (*p != '\0') + jid = 0; + } if (jid != 0) { /* * See if a requested jid already exists. There is an @@ -973,17 +980,19 @@ kern_jail_set(struct thread *td, struct * because that is the jail being updated). */ if (name != NULL) { - p = strrchr(name, '.'); - if (p != NULL) { + namelc = strrchr(name, '.'); + if (namelc == NULL) + namelc = name; + else { /* * This is a hierarchical name. Split it into the * parent and child names, and make sure the parent * exists or matches an already found jail. */ - *p = '\0'; + *namelc = '\0'; if (pr != NULL) { - if (strncmp(name, ppr->pr_name, p - name) || - ppr->pr_name[p - name] != '\0') { + if (strncmp(name, ppr->pr_name, namelc - name) + || ppr->pr_name[namelc - name] != '\0') { mtx_unlock(&pr->pr_mtx); error = EINVAL; vfs_opterror(opts, @@ -1000,7 +1009,7 @@ kern_jail_set(struct thread *td, struct } mtx_unlock(&ppr->pr_mtx); } - name = p + 1; + name = ++namelc; } if (name[0] != '\0') { namelen = @@ -1412,9 +1421,11 @@ kern_jail_set(struct thread *td, struct /* Give a default name of the jid. */ if (name[0] == '\0') snprintf(name = numbuf, sizeof(numbuf), "%d", jid); - else if (strtoul(name, &p, 10) != jid && *p == '\0') { + else if (*namelc == '0' || (strtoul(namelc, &p, 10) != jid && + *p == '\0')) { error = EINVAL; - vfs_opterror(opts, "name cannot be numeric"); + vfs_opterror(opts, + "name cannot be numeric (unless it is the jid)"); goto done_deref_locked; } /* From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 21:50:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E212F1065672; Tue, 8 Sep 2009 21:50:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C888E8FC16; Tue, 8 Sep 2009 21:50:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88LoZMo061444; Tue, 8 Sep 2009 21:50:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88LoYUI061443; Tue, 8 Sep 2009 21:50:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200909082150.n88LoYUI061443@svn.freebsd.org> From: John Baldwin Date: Tue, 8 Sep 2009 21:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196996 - in stable/8/sys: . amd64/amd64 amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 21:50:36 -0000 Author: jhb Date: Tue Sep 8 21:50:34 2009 New Revision: 196996 URL: http://svn.freebsd.org/changeset/base/196996 Log: MFC 196745: Don't attempt to bind the current thread to the CPU an IRQ is bound to when removing an interrupt handler from an IRQ during shutdown. During shutdown we are already bound to CPU 0 and this was triggering a panic. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/i386/i386/local_apic.c Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Tue Sep 8 21:17:17 2009 (r196995) +++ stable/8/sys/amd64/amd64/local_apic.c Tue Sep 8 21:50:34 2009 (r196996) @@ -990,18 +990,21 @@ apic_free_vector(u_int apic_id, u_int ve * we don't lose an interrupt delivery race. */ td = curthread; - thread_lock(td); - if (sched_is_bound(td)) - panic("apic_free_vector: Thread already bound.\n"); - sched_bind(td, apic_cpuid(apic_id)); - thread_unlock(td); + if (!rebooting) { + thread_lock(td); + if (sched_is_bound(td)) + panic("apic_free_vector: Thread already bound.\n"); + sched_bind(td, apic_cpuid(apic_id)); + thread_unlock(td); + } mtx_lock_spin(&icu_lock); lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS] = -1; mtx_unlock_spin(&icu_lock); - thread_lock(td); - sched_unbind(td); - thread_unlock(td); - + if (!rebooting) { + thread_lock(td); + sched_unbind(td); + thread_unlock(td); + } } /* Map an IDT vector (APIC) to an IRQ (interrupt source). */ Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Tue Sep 8 21:17:17 2009 (r196995) +++ stable/8/sys/i386/i386/local_apic.c Tue Sep 8 21:50:34 2009 (r196996) @@ -994,18 +994,21 @@ apic_free_vector(u_int apic_id, u_int ve * we don't lose an interrupt delivery race. */ td = curthread; - thread_lock(td); - if (sched_is_bound(td)) - panic("apic_free_vector: Thread already bound.\n"); - sched_bind(td, apic_cpuid(apic_id)); - thread_unlock(td); + if (!rebooting) { + thread_lock(td); + if (sched_is_bound(td)) + panic("apic_free_vector: Thread already bound.\n"); + sched_bind(td, apic_cpuid(apic_id)); + thread_unlock(td); + } mtx_lock_spin(&icu_lock); lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS] = -1; mtx_unlock_spin(&icu_lock); - thread_lock(td); - sched_unbind(td); - thread_unlock(td); - + if (!rebooting) { + thread_lock(td); + sched_unbind(td); + thread_unlock(td); + } } /* Map an IDT vector (APIC) to an IRQ (interrupt source). */ From owner-svn-src-stable@FreeBSD.ORG Tue Sep 8 23:25:39 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC08106566B; Tue, 8 Sep 2009 23:25:39 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA5B18FC14; Tue, 8 Sep 2009 23:25:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88NPduY064555; Tue, 8 Sep 2009 23:25:39 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88NPdDs064553; Tue, 8 Sep 2009 23:25:39 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <200909082325.n88NPdDs064553@svn.freebsd.org> From: Jack F Vogel Date: Tue, 8 Sep 2009 23:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196997 - stable/8/sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 23:25:40 -0000 Author: jfv Date: Tue Sep 8 23:25:39 2009 New Revision: 196997 URL: http://svn.freebsd.org/changeset/base/196997 Log: Make LRO turned off uncategorically for devices attached to the bridge, rather than just in the case when some device cannot do TSO. Customer tests have shown that even when all devices can do TSO that LRO will cause problems when bridging. Approved by: re Modified: stable/8/sys/net/if_bridge.c Modified: stable/8/sys/net/if_bridge.c ============================================================================== --- stable/8/sys/net/if_bridge.c Tue Sep 8 21:50:34 2009 (r196996) +++ stable/8/sys/net/if_bridge.c Tue Sep 8 23:25:39 2009 (r196997) @@ -171,6 +171,11 @@ __FBSDID("$FreeBSD$"); #define BRIDGE_IFCAPS_MASK (IFCAP_TOE|IFCAP_TSO|IFCAP_TXCSUM) /* + * List of capabilities to strip + */ +#define BRIDGE_IFCAPS_STRIP IFCAP_LRO + +/* * Bridge interface list entry. */ struct bridge_iflist { @@ -802,16 +807,10 @@ bridge_mutecaps(struct bridge_softc *sc) LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { enabled = bif->bif_ifp->if_capenable; + enabled &= ~BRIDGE_IFCAPS_STRIP; /* strip off mask bits and enable them again if allowed */ enabled &= ~BRIDGE_IFCAPS_MASK; enabled |= mask; - /* - * Receive offload can only be enabled if all members also - * support send offload. - */ - if ((enabled & IFCAP_TSO) == 0) - enabled &= ~IFCAP_LRO; - bridge_set_ifcap(sc, bif, enabled); } From owner-svn-src-stable@FreeBSD.ORG Wed Sep 9 00:15:43 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD7E81065670; Wed, 9 Sep 2009 00:15:43 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC0C18FC0A; Wed, 9 Sep 2009 00:15:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n890FhAC066122; Wed, 9 Sep 2009 00:15:43 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n890Fhnp066119; Wed, 9 Sep 2009 00:15:43 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200909090015.n890Fhnp066119@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 9 Sep 2009 00:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197001 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2009 00:15:43 -0000 Author: edwin Date: Wed Sep 9 00:15:43 2009 New Revision: 197001 URL: http://svn.freebsd.org/changeset/base/197001 Log: MFC from 197000: Update to tzdata2008m: Samoa will go in DST on 4 October 2009 till 28 March 2010 Palestine will go back from DST on 4 September 2009 Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/australasia Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Wed Sep 9 00:07:05 2009 (r197000) +++ stable/7/share/zoneinfo/asia Wed Sep 9 00:15:43 2009 (r197001) @@ -1,5 +1,5 @@ #
-# @(#)asia	8.36
+# @(#)asia	8.40
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1836,6 +1836,42 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_westbank01.html
 # 
 
+# From Steffen Thorsen (2009-08-31):
+# Palestine's Council of Ministers announced that they will revert back to
+# winter time on Friday, 2009-09-04.
+#
+# One news source:
+# 
+# http://www.safa.ps/ara/?action=showdetail&seid=4158
+# 
+# (Palestinian press agency, Arabic),
+# Google translate: "Decided that the Palestinian government in Ramallah
+# headed by Salam Fayyad, the start of work in time for the winter of
+# 2009, starting on Friday approved the fourth delay Sept. clock sixty
+# minutes per hour as of Friday morning."
+#
+# We are not sure if Gaza will do the same, last year they had a different
+# end date, we will keep this page updated:
+# 
+# http://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
+# 
+
+# From Alexander Krivenyshev (2009-09-02):
+# Seems that Gaza Strip will go back to Winter Time same date as West Bank.
+#
+# According to Palestinian Ministry Of Interior, West Bank and Gaza Strip plan
+# to change time back to Standard time on September 4, 2009.
+#
+# "Winter time unite the West Bank and Gaza"
+# (from Palestinian National Authority):
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html
+# 
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -1854,7 +1890,7 @@ Rule Palestine	2006	only	-	Sep	22	0:00	0
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
 Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
 Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2009	max	-	Sep	lastMon	2:00	0	-
+Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct

Modified: stable/7/share/zoneinfo/australasia
==============================================================================
--- stable/7/share/zoneinfo/australasia	Wed Sep  9 00:07:05 2009	(r197000)
+++ stable/7/share/zoneinfo/australasia	Wed Sep  9 00:15:43 2009	(r197001)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.12
+# @(#)australasia	8.13
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -443,10 +443,26 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.worldtimezone.com/dst_news/dst_news_samoa01.html
 # 
 
+# From Steffen Thorsen (2009-08-27):
+# Samoa's parliament passed the Daylight Saving Bill 2009, and will start 
+# daylight saving time on the first Sunday of October 2009 and end on the 
+# last Sunday of March 2010. We hope that the full text will be published 
+# soon, but we believe that the bill is only valid for 2009-2010. Samoa's 
+# Daylight Saving Act 2009 will be enforced as soon as the Head of State 
+# executes a proclamation publicizing this Act.
+#
+# Some background information here, which will be updated once we have 
+# more details:
+# 
+# http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
+# 
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
-			-11:00	-	WST			# Samoa Time
+			-11:00	-	WST	2009 Oct 4
+			-11:00	1:00	WSDT	2010 Mar 28
+			-11:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep  9 00:16:49 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E66C41065693;
	Wed,  9 Sep 2009 00:16:49 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D548D8FC12;
	Wed,  9 Sep 2009 00:16:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n890GnZs066191;
	Wed, 9 Sep 2009 00:16:49 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n890Gnvw066188;
	Wed, 9 Sep 2009 00:16:49 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200909090016.n890Gnvw066188@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 9 Sep 2009 00:16:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197002 - stable/6/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Sep 2009 00:16:50 -0000

Author: edwin
Date: Wed Sep  9 00:16:49 2009
New Revision: 197002
URL: http://svn.freebsd.org/changeset/base/197002

Log:
  MFC from 197000:
  
  Update to tzdata2008m:
  
  Samoa will go in DST on 4 October 2009 till 28 March 2010
  Palestine will go back from DST on 4 September 2009

Modified:
  stable/6/share/zoneinfo/   (props changed)
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/australasia

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Wed Sep  9 00:15:43 2009	(r197001)
+++ stable/6/share/zoneinfo/asia	Wed Sep  9 00:16:49 2009	(r197002)
@@ -1,5 +1,5 @@
 # 
-# @(#)asia	8.36
+# @(#)asia	8.40
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1836,6 +1836,42 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_westbank01.html
 # 
 
+# From Steffen Thorsen (2009-08-31):
+# Palestine's Council of Ministers announced that they will revert back to
+# winter time on Friday, 2009-09-04.
+#
+# One news source:
+# 
+# http://www.safa.ps/ara/?action=showdetail&seid=4158
+# 
+# (Palestinian press agency, Arabic),
+# Google translate: "Decided that the Palestinian government in Ramallah
+# headed by Salam Fayyad, the start of work in time for the winter of
+# 2009, starting on Friday approved the fourth delay Sept. clock sixty
+# minutes per hour as of Friday morning."
+#
+# We are not sure if Gaza will do the same, last year they had a different
+# end date, we will keep this page updated:
+# 
+# http://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
+# 
+
+# From Alexander Krivenyshev (2009-09-02):
+# Seems that Gaza Strip will go back to Winter Time same date as West Bank.
+#
+# According to Palestinian Ministry Of Interior, West Bank and Gaza Strip plan
+# to change time back to Standard time on September 4, 2009.
+#
+# "Winter time unite the West Bank and Gaza"
+# (from Palestinian National Authority):
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html
+# 
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -1854,7 +1890,7 @@ Rule Palestine	2006	only	-	Sep	22	0:00	0
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
 Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
 Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2009	max	-	Sep	lastMon	2:00	0	-
+Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct

Modified: stable/6/share/zoneinfo/australasia
==============================================================================
--- stable/6/share/zoneinfo/australasia	Wed Sep  9 00:15:43 2009	(r197001)
+++ stable/6/share/zoneinfo/australasia	Wed Sep  9 00:16:49 2009	(r197002)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.12
+# @(#)australasia	8.13
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -443,10 +443,26 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.worldtimezone.com/dst_news/dst_news_samoa01.html
 # 
 
+# From Steffen Thorsen (2009-08-27):
+# Samoa's parliament passed the Daylight Saving Bill 2009, and will start 
+# daylight saving time on the first Sunday of October 2009 and end on the 
+# last Sunday of March 2010. We hope that the full text will be published 
+# soon, but we believe that the bill is only valid for 2009-2010. Samoa's 
+# Daylight Saving Act 2009 will be enforced as soon as the Head of State 
+# executes a proclamation publicizing this Act.
+#
+# Some background information here, which will be updated once we have 
+# more details:
+# 
+# http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
+# 
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
-			-11:00	-	WST			# Samoa Time
+			-11:00	-	WST	2009 Oct 4
+			-11:00	1:00	WSDT	2010 Mar 28
+			-11:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep  9 09:17:31 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9DF41106568B;
	Wed,  9 Sep 2009 09:17:31 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 83F918FC22;
	Wed,  9 Sep 2009 09:17:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n899HVnh079025;
	Wed, 9 Sep 2009 09:17:31 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n899HVEC079022;
	Wed, 9 Sep 2009 09:17:31 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200909090917.n899HVEC079022@svn.freebsd.org>
From: Attilio Rao 
Date: Wed, 9 Sep 2009 09:17:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197023 - stable/8/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Sep 2009 09:17:31 -0000

Author: attilio
Date: Wed Sep  9 09:17:31 2009
New Revision: 197023
URL: http://svn.freebsd.org/changeset/base/197023

Log:
  MFC r196772:
  fix adaptive spinning in lockmgr by using correctly GIANT_RESTORE and
  continue statement and improve adaptive spinning for sx lock by just
  doing once GIANT_SAVE.
  
  Approved by:	re (kib)

Modified:
  stable/8/sys/kern/   (props changed)
  stable/8/sys/kern/kern_lock.c
  stable/8/sys/kern/kern_sx.c

Modified: stable/8/sys/kern/kern_lock.c
==============================================================================
--- stable/8/sys/kern/kern_lock.c	Wed Sep  9 07:45:08 2009	(r197022)
+++ stable/8/sys/kern/kern_lock.c	Wed Sep  9 09:17:31 2009	(r197023)
@@ -467,7 +467,10 @@ __lockmgr_args(struct lock *lk, u_int fl
 			/*
 			 * If the owner is running on another CPU, spin until
 			 * the owner stops running or the state of the lock
-			 * changes.
+			 * changes.  We need a double-state handle here
+			 * because for a failed acquisition the lock can be
+			 * either held in exclusive mode or shared mode
+			 * (for the writer starvation avoidance technique).
 			 */
 			if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) == 0 &&
 			    LK_HOLDER(x) != LK_KERNPROC) {
@@ -491,8 +494,10 @@ __lockmgr_args(struct lock *lk, u_int fl
 				while (LK_HOLDER(lk->lk_lock) ==
 				    (uintptr_t)owner && TD_IS_RUNNING(owner))
 					cpu_spinwait();
+				GIANT_RESTORE();
+				continue;
 			} else if (LK_CAN_ADAPT(lk, flags) &&
-			    (x & LK_SHARE) !=0 && LK_SHARERS(x) &&
+			    (x & LK_SHARE) != 0 && LK_SHARERS(x) &&
 			    spintries < alk_retries) {
 				if (flags & LK_INTERLOCK) {
 					class->lc_unlock(ilk);
@@ -511,6 +516,7 @@ __lockmgr_args(struct lock *lk, u_int fl
 						break;
 					cpu_spinwait();
 				}
+				GIANT_RESTORE();
 				if (i != alk_loops)
 					continue;
 			}
@@ -704,6 +710,8 @@ __lockmgr_args(struct lock *lk, u_int fl
 				while (LK_HOLDER(lk->lk_lock) ==
 				    (uintptr_t)owner && TD_IS_RUNNING(owner))
 					cpu_spinwait();
+				GIANT_RESTORE();
+				continue;
 			} else if (LK_CAN_ADAPT(lk, flags) &&
 			    (x & LK_SHARE) != 0 && LK_SHARERS(x) &&
 			    spintries < alk_retries) {
@@ -727,6 +735,7 @@ __lockmgr_args(struct lock *lk, u_int fl
 						break;
 					cpu_spinwait();
 				}
+				GIANT_RESTORE();
 				if (i != alk_loops)
 					continue;
 			}

Modified: stable/8/sys/kern/kern_sx.c
==============================================================================
--- stable/8/sys/kern/kern_sx.c	Wed Sep  9 07:45:08 2009	(r197022)
+++ stable/8/sys/kern/kern_sx.c	Wed Sep  9 09:17:31 2009	(r197023)
@@ -531,13 +531,13 @@ _sx_xlock_hard(struct sx *sx, uintptr_t 
 					continue;
 				}
 			} else if (SX_SHARERS(x) && spintries < asx_retries) {
+				GIANT_SAVE();
 				spintries++;
 				for (i = 0; i < asx_loops; i++) {
 					if (LOCK_LOG_TEST(&sx->lock_object, 0))
 						CTR4(KTR_LOCK,
 				    "%s: shared spinning on %p with %u and %u",
 						    __func__, sx, spintries, i);
-					GIANT_SAVE();
 					x = sx->sx_lock;
 					if ((x & SX_LOCK_SHARED) == 0 ||
 					    SX_SHARERS(x) == 0)

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep  9 09:34:13 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6F7A2106566B;
	Wed,  9 Sep 2009 09:34:13 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F9128FC1A;
	Wed,  9 Sep 2009 09:34:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n899YDa6079431;
	Wed, 9 Sep 2009 09:34:13 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n899YDP6079427;
	Wed, 9 Sep 2009 09:34:13 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200909090934.n899YDP6079427@svn.freebsd.org>
From: Attilio Rao 
Date: Wed, 9 Sep 2009 09:34:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197024 - stable/8/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Sep 2009 09:34:13 -0000

Author: attilio
Date: Wed Sep  9 09:34:13 2009
New Revision: 197024
URL: http://svn.freebsd.org/changeset/base/197024

Log:
  Adaptive spinning for locking primitives, in read-mode, have some tuning
  SYSCTLs which are inappropriate for a daily use of the machine (mostly
  useful only by a developer which wants to run benchmarks on it).
  Remove them before the release as long as we do not want to ship with
  them in.
  
  Now that the SYSCTLs are gone, instead than use static storage for some
  constants, use real numeric constants in order to avoid eventual compiler
  dumbiness and the risk to share a storage (and then a cache-line) among
  CPUs when doing adaptive spinning together.
  
  Pleasse note that the sys/linker_set.h inclusion in lockmgr and sx lock
  support could have been gone, but re@ preferred them to be in order to
  minimize the risk of problems on future merging.
  
  Please note that this patch is not a MFC, but an 'edge case' as commit
  directly to stable/8, which creates a diverging from HEAD.
  
  Tested by:      Giovanni Trematerra 
  Approved by:	re (kib)

Modified:
  stable/8/sys/kern/kern_lock.c
  stable/8/sys/kern/kern_rwlock.c
  stable/8/sys/kern/kern_sx.c

Modified: stable/8/sys/kern/kern_lock.c
==============================================================================
--- stable/8/sys/kern/kern_lock.c	Wed Sep  9 09:17:31 2009	(r197023)
+++ stable/8/sys/kern/kern_lock.c	Wed Sep  9 09:34:13 2009	(r197024)
@@ -62,6 +62,11 @@ CTASSERT(LK_UNLOCKED == (LK_UNLOCKED &
 #define	SQ_EXCLUSIVE_QUEUE	0
 #define	SQ_SHARED_QUEUE		1
 
+#ifdef ADAPTIVE_LOCKMGRS
+#define	ALK_RETRIES		10
+#define	ALK_LOOPS		10000
+#endif
+
 #ifndef INVARIANTS
 #define	_lockmgr_assert(lk, what, file, line)
 #define	TD_LOCKS_INC(td)
@@ -156,14 +161,6 @@ struct lock_class lock_class_lockmgr = {
 #endif
 };
 
-#ifdef ADAPTIVE_LOCKMGRS
-static u_int alk_retries = 10;
-static u_int alk_loops = 10000;
-SYSCTL_NODE(_debug, OID_AUTO, lockmgr, CTLFLAG_RD, NULL, "lockmgr debugging");
-SYSCTL_UINT(_debug_lockmgr, OID_AUTO, retries, CTLFLAG_RW, &alk_retries, 0, "");
-SYSCTL_UINT(_debug_lockmgr, OID_AUTO, loops, CTLFLAG_RW, &alk_loops, 0, "");
-#endif
-
 static __inline struct thread *
 lockmgr_xholder(struct lock *lk)
 {
@@ -498,14 +495,14 @@ __lockmgr_args(struct lock *lk, u_int fl
 				continue;
 			} else if (LK_CAN_ADAPT(lk, flags) &&
 			    (x & LK_SHARE) != 0 && LK_SHARERS(x) &&
-			    spintries < alk_retries) {
+			    spintries < ALK_RETRIES) {
 				if (flags & LK_INTERLOCK) {
 					class->lc_unlock(ilk);
 					flags &= ~LK_INTERLOCK;
 				}
 				GIANT_SAVE();
 				spintries++;
-				for (i = 0; i < alk_loops; i++) {
+				for (i = 0; i < ALK_LOOPS; i++) {
 					if (LOCK_LOG_TEST(&lk->lock_object, 0))
 						CTR4(KTR_LOCK,
 				    "%s: shared spinning on %p with %u and %u",
@@ -517,7 +514,7 @@ __lockmgr_args(struct lock *lk, u_int fl
 					cpu_spinwait();
 				}
 				GIANT_RESTORE();
-				if (i != alk_loops)
+				if (i != ALK_LOOPS)
 					continue;
 			}
 #endif
@@ -714,7 +711,7 @@ __lockmgr_args(struct lock *lk, u_int fl
 				continue;
 			} else if (LK_CAN_ADAPT(lk, flags) &&
 			    (x & LK_SHARE) != 0 && LK_SHARERS(x) &&
-			    spintries < alk_retries) {
+			    spintries < ALK_RETRIES) {
 				if ((x & LK_EXCLUSIVE_SPINNERS) == 0 &&
 				    !atomic_cmpset_ptr(&lk->lk_lock, x,
 				    x | LK_EXCLUSIVE_SPINNERS))
@@ -725,7 +722,7 @@ __lockmgr_args(struct lock *lk, u_int fl
 				}
 				GIANT_SAVE();
 				spintries++;
-				for (i = 0; i < alk_loops; i++) {
+				for (i = 0; i < ALK_LOOPS; i++) {
 					if (LOCK_LOG_TEST(&lk->lock_object, 0))
 						CTR4(KTR_LOCK,
 				    "%s: shared spinning on %p with %u and %u",
@@ -736,7 +733,7 @@ __lockmgr_args(struct lock *lk, u_int fl
 					cpu_spinwait();
 				}
 				GIANT_RESTORE();
-				if (i != alk_loops)
+				if (i != ALK_LOOPS)
 					continue;
 			}
 #endif

Modified: stable/8/sys/kern/kern_rwlock.c
==============================================================================
--- stable/8/sys/kern/kern_rwlock.c	Wed Sep  9 09:17:31 2009	(r197023)
+++ stable/8/sys/kern/kern_rwlock.c	Wed Sep  9 09:34:13 2009	(r197024)
@@ -56,11 +56,8 @@ __FBSDID("$FreeBSD$");
 #endif
 
 #ifdef ADAPTIVE_RWLOCKS
-static int rowner_retries = 10;
-static int rowner_loops = 10000;
-SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL, "rwlock debugging");
-SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, "");
-SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, "");
+#define	ROWNER_RETRIES	10
+#define	ROWNER_LOOPS	10000
 #endif
 
 #ifdef DDB
@@ -380,15 +377,15 @@ _rw_rlock(struct rwlock *rw, const char 
 				}
 				continue;
 			}
-		} else if (spintries < rowner_retries) {
+		} else if (spintries < ROWNER_RETRIES) {
 			spintries++;
-			for (i = 0; i < rowner_loops; i++) {
+			for (i = 0; i < ROWNER_LOOPS; i++) {
 				v = rw->rw_lock;
 				if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v))
 					break;
 				cpu_spinwait();
 			}
-			if (i != rowner_loops)
+			if (i != ROWNER_LOOPS)
 				continue;
 		}
 #endif
@@ -690,7 +687,7 @@ _rw_wlock_hard(struct rwlock *rw, uintpt
 			continue;
 		}
 		if ((v & RW_LOCK_READ) && RW_READERS(v) &&
-		    spintries < rowner_retries) {
+		    spintries < ROWNER_RETRIES) {
 			if (!(v & RW_LOCK_WRITE_SPINNER)) {
 				if (!atomic_cmpset_ptr(&rw->rw_lock, v,
 				    v | RW_LOCK_WRITE_SPINNER)) {
@@ -698,15 +695,15 @@ _rw_wlock_hard(struct rwlock *rw, uintpt
 				}
 			}
 			spintries++;
-			for (i = 0; i < rowner_loops; i++) {
+			for (i = 0; i < ROWNER_LOOPS; i++) {
 				if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0)
 					break;
 				cpu_spinwait();
 			}
 #ifdef KDTRACE_HOOKS
-			spin_cnt += rowner_loops - i;
+			spin_cnt += ROWNER_LOOPS - i;
 #endif
-			if (i != rowner_loops)
+			if (i != ROWNER_LOOPS)
 				continue;
 		}
 #endif

Modified: stable/8/sys/kern/kern_sx.c
==============================================================================
--- stable/8/sys/kern/kern_sx.c	Wed Sep  9 09:17:31 2009	(r197023)
+++ stable/8/sys/kern/kern_sx.c	Wed Sep  9 09:34:13 2009	(r197024)
@@ -72,6 +72,11 @@ CTASSERT((SX_NOADAPTIVE & LO_CLASSFLAGS)
 #define	SQ_EXCLUSIVE_QUEUE	0
 #define	SQ_SHARED_QUEUE		1
 
+#ifdef ADAPTIVE_SX
+#define	ASX_RETRIES		10
+#define	ASX_LOOPS		10000
+#endif
+
 /*
  * Variations on DROP_GIANT()/PICKUP_GIANT() for use in this file.  We
  * drop Giant anytime we have to sleep or if we adaptively spin.
@@ -134,14 +139,6 @@ struct lock_class lock_class_sx = {
 #define	_sx_assert(sx, what, file, line)
 #endif
 
-#ifdef ADAPTIVE_SX
-static u_int asx_retries = 10;
-static u_int asx_loops = 10000;
-SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging");
-SYSCTL_INT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, "");
-SYSCTL_INT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, "");
-#endif
-
 void
 assert_sx(struct lock_object *lock, int what)
 {
@@ -530,10 +527,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t 
 					}
 					continue;
 				}
-			} else if (SX_SHARERS(x) && spintries < asx_retries) {
+			} else if (SX_SHARERS(x) && spintries < ASX_RETRIES) {
 				GIANT_SAVE();
 				spintries++;
-				for (i = 0; i < asx_loops; i++) {
+				for (i = 0; i < ASX_LOOPS; i++) {
 					if (LOCK_LOG_TEST(&sx->lock_object, 0))
 						CTR4(KTR_LOCK,
 				    "%s: shared spinning on %p with %u and %u",
@@ -547,7 +544,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t 
 					spin_cnt++;
 #endif
 				}
-				if (i != asx_loops)
+				if (i != ASX_LOOPS)
 					continue;
 			}
 		}

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep  9 10:31:11 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 432AB1065670;
	Wed,  9 Sep 2009 10:31:10 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 326BD8FC1B;
	Wed,  9 Sep 2009 10:31:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n89AVA9d082725;
	Wed, 9 Sep 2009 10:31:10 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n89AVA8b082723;
	Wed, 9 Sep 2009 10:31:10 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909091031.n89AVA8b082723@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 9 Sep 2009 10:31:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197028 - stable/8/sys/sys
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Sep 2009 10:31:11 -0000

Author: kib
Date: Wed Sep  9 10:31:09 2009
New Revision: 197028
URL: http://svn.freebsd.org/changeset/base/197028

Log:
  Use traditional td_unusedX names for the padding members.
  
  Suggested by:	julian
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/sys/proc.h

Modified: stable/8/sys/sys/proc.h
==============================================================================
--- stable/8/sys/sys/proc.h	Wed Sep  9 10:13:56 2009	(r197027)
+++ stable/8/sys/sys/proc.h	Wed Sep  9 10:31:09 2009	(r197028)
@@ -267,9 +267,9 @@ struct thread {
 	struct vm_object *td_kstack_obj;/* (a) Kstack object. */
 	vm_offset_t	td_kstack;	/* (a) Kernel VA of kstack. */
 	int		td_kstack_pages; /* (a) Size of the kstack. */
-	void		*td_space1;
-	vm_offset_t	td_space2;
-	int		td_space3;
+	void		*td_unused1;
+	vm_offset_t	td_unused2;
+	int		td_unused3;
 	volatile u_int	td_critnest;	/* (k*) Critical section nest level. */
 	struct mdthread td_md;		/* (k) Any machine-dependent fields. */
 	struct td_sched	*td_sched;	/* (*) Scheduler-specific data. */

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep  9 12:19:44 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 48597106566B;
	Wed,  9 Sep 2009 12:19:44 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 347328FC08;
	Wed,  9 Sep 2009 12:19:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n89CJiVh085371;
	Wed, 9 Sep 2009 12:19:44 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n89CJiRP085365;
	Wed, 9 Sep 2009 12:19:44 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200909091219.n89CJiRP085365@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 9 Sep 2009 12:19:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197038 - stable/8/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Sep 2009 12:19:44 -0000

Author: edwin
Date: Wed Sep  9 12:19:43 2009
New Revision: 197038
URL: http://svn.freebsd.org/changeset/base/197038

Log:
  MFC of r196581 r196582 r197000
  Import of tzdata 2009k, 2009l and 2009m
  
  - Changes in Mauritius and Bangladesh
  - No leapsecond at the end of December 2009
  
  - Egypt will go to Wintertime on 21 August 2009
  
  - Samoa will go in DST on 4 October 2009 till 28 March 2010
  - Palestine will go back from DST on 4 September 2009
  
  Approved by:	re (kostik)

Modified:
  stable/8/share/zoneinfo/   (props changed)
  stable/8/share/zoneinfo/africa
  stable/8/share/zoneinfo/asia
  stable/8/share/zoneinfo/australasia
  stable/8/share/zoneinfo/europe
  stable/8/share/zoneinfo/leapseconds

Modified: stable/8/share/zoneinfo/africa
==============================================================================
--- stable/8/share/zoneinfo/africa	Wed Sep  9 11:36:30 2009	(r197037)
+++ stable/8/share/zoneinfo/africa	Wed Sep  9 12:19:43 2009	(r197038)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.21
+# @(#)africa	8.23
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -276,8 +276,27 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # In 2009 (and for the next several years), Ramadan ends before the fourth
 # Thursday in September; Egypt is expected to revert to the last Thursday
 # in September.
+
+# From Steffen Thorsen (2009-08-11):
+# We have been able to confirm the August change with the Egyptian Cabinet 
+# Information and Decision Support Center:
+# 
+# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
+# 
+# 
+# The Middle East News Agency
+# 
+# http://www.mena.org.eg/index.aspx
+# 
+# also reports "Egypt starts winter time on August 21"
+# today in article numbered "71, 11/08/2009 12:25 GMT." 
+# Only the title above is available without a subscription to their service,
+# and can be found by searching for "winter" in their search engine
+# (at least today).
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
-Rule	Egypt	2009	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
+Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct
@@ -502,11 +521,33 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
 # 
 
+# From Steffen Thorsen (2009-06-05):
+# According to several sources, Mauritius will not continue to observe
+# DST the coming summer...
+#
+# Some sources, in French:
+# 
+# http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB
+# 
+# 
+# http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
+# 
+#
+# Our wrap-up:
+# 
+# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
+# 
+
+# From Arthur David Olson (2009-07-11):
+# The "mauritius-dst-will-not-repeat" wrapup includes this: 
+# "The trial ended on March 29, 2009, when the clocks moved back by one hour
+# at 2am (or 02:00) local time..."
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule Mauritius	1982	only	-	Oct	10	0:00	1:00	S
 Rule Mauritius	1983	only	-	Mar	21	0:00	0	-
-Rule Mauritius	2008	max	-	Oct	lastSun	2:00s	1:00	S
-Rule Mauritius	2009	max	-	Mar	lastSun	2:00s	0	-
+Rule Mauritius	2008	only	-	Oct	lastSun	2:00	1:00	S
+Rule Mauritius	2009	only	-	Mar	lastSun	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Indian/Mauritius	3:50:00 -	LMT	1907		# Port Louis
 			4:00 Mauritius	MU%sT	# Mauritius Time

Modified: stable/8/share/zoneinfo/asia
==============================================================================
--- stable/8/share/zoneinfo/asia	Wed Sep  9 11:36:30 2009	(r197037)
+++ stable/8/share/zoneinfo/asia	Wed Sep  9 12:19:43 2009	(r197038)
@@ -1,5 +1,5 @@
 # 
-# @(#)asia	8.35
+# @(#)asia	8.40
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -172,6 +172,12 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 #
 # No DST end date has been announced yet.
 
+# From Arthur David Olson (2009-07-11):
+# Arbitrarily end DST at the end of 2009 so that a POSIX-sytle time zone string
+# can appear in the Dhaka binary file and for the benefit of old glibc
+# reimplementations of the time zone software that mishandle permanent DST.
+# A change will be required once the end date is known.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
@@ -180,7 +186,8 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
 			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
-			6:00	1:00	BDST
+			6:00	1:00	BDST	2010
+			6:00	-	BDT
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1829,6 +1836,42 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_westbank01.html
 # 
 
+# From Steffen Thorsen (2009-08-31):
+# Palestine's Council of Ministers announced that they will revert back to
+# winter time on Friday, 2009-09-04.
+#
+# One news source:
+# 
+# http://www.safa.ps/ara/?action=showdetail&seid=4158
+# 
+# (Palestinian press agency, Arabic),
+# Google translate: "Decided that the Palestinian government in Ramallah
+# headed by Salam Fayyad, the start of work in time for the winter of
+# 2009, starting on Friday approved the fourth delay Sept. clock sixty
+# minutes per hour as of Friday morning."
+#
+# We are not sure if Gaza will do the same, last year they had a different
+# end date, we will keep this page updated:
+# 
+# http://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
+# 
+
+# From Alexander Krivenyshev (2009-09-02):
+# Seems that Gaza Strip will go back to Winter Time same date as West Bank.
+#
+# According to Palestinian Ministry Of Interior, West Bank and Gaza Strip plan
+# to change time back to Standard time on September 4, 2009.
+#
+# "Winter time unite the West Bank and Gaza"
+# (from Palestinian National Authority):
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html
+# 
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -1847,7 +1890,7 @@ Rule Palestine	2006	only	-	Sep	22	0:00	0
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
 Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
 Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2009	max	-	Sep	lastMon	2:00	0	-
+Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct

Modified: stable/8/share/zoneinfo/australasia
==============================================================================
--- stable/8/share/zoneinfo/australasia	Wed Sep  9 11:36:30 2009	(r197037)
+++ stable/8/share/zoneinfo/australasia	Wed Sep  9 12:19:43 2009	(r197038)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.11
+# @(#)australasia	8.13
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -427,10 +427,42 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 			-11:00	-	SST			# S=Samoa
 
 # Samoa
+
+# From Alexander Krivenyshev (2008-12-06):
+# The Samoa government (Western Samoa) may implement DST on the first Sunday of 
+# October 2009 (October 4, 2009) until the last Sunday of March 2010 (March 28, 
+# 2010). 
+# 
+# "Selected Committee reports to Cabinet on Daylight Saving Time",
+# Government of Samoa:
+# 
+# http://www.govt.ws/pr_article.cfm?pr_id=560
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_samoa01.html
+# 
+
+# From Steffen Thorsen (2009-08-27):
+# Samoa's parliament passed the Daylight Saving Bill 2009, and will start 
+# daylight saving time on the first Sunday of October 2009 and end on the 
+# last Sunday of March 2010. We hope that the full text will be published 
+# soon, but we believe that the bill is only valid for 2009-2010. Samoa's 
+# Daylight Saving Act 2009 will be enforced as soon as the Head of State 
+# executes a proclamation publicizing this Act.
+#
+# Some background information here, which will be updated once we have 
+# more details:
+# 
+# http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
+# 
+
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
-			-11:00	-	WST			# Samoa Time
+			-11:00	-	WST	2009 Oct 4
+			-11:00	1:00	WSDT	2010 Mar 28
+			-11:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Wed Sep  9 11:36:30 2009	(r197037)
+++ stable/8/share/zoneinfo/europe	Wed Sep  9 12:19:43 2009	(r197038)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.21
+# @(#)europe	8.22
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -459,7 +459,7 @@ Rule	EU	1979	1995	-	Sep	lastSun	 1:00u	0
 Rule	EU	1981	max	-	Mar	lastSun	 1:00u	1:00	S
 Rule	EU	1996	max	-	Oct	lastSun	 1:00u	0	-
 # The most recent directive covers the years starting in 2002.  See:
-# 
+# 
 # Directive 2000/84/EC of the European Parliament and of the Council
 # of 19 January 2001 on summer-time arrangements.
 # 

Modified: stable/8/share/zoneinfo/leapseconds
==============================================================================
--- stable/8/share/zoneinfo/leapseconds	Wed Sep  9 11:36:30 2009	(r197037)
+++ stable/8/share/zoneinfo/leapseconds	Wed Sep  9 12:19:43 2009	(r197038)
@@ -1,5 +1,5 @@
 # 
-# @(#)leapseconds	8.8
+# @(#)leapseconds	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,29 +58,30 @@ Leap	2008	Dec	31	23:59:60	+	S
 # 61, Av. de l'Observatoire 75014 PARIS (France)
 # Tel.      : 33 (0) 1 40 51 22 26
 # FAX       : 33 (0) 1 40 51 22 91
-# e-mail    : services.iers@obspm.fr
-# http://hpiers.obspm.fr/eop-pc
+# Internet  : services.iers@obspm.fr
 #
-# Paris, 15 January 2009
+# Paris, 4 July 2009
 #
-# Bulletin C 37
+# Bulletin C 38
 #
 # To authorities responsible
 # for the measurement and
 # distribution of time
 #
-# NO positive leap second will be introduced at the end of June 2009.
-# The difference between Coordinated Universal Time UTC and the 
-# International Atomic Time TAI is :             
-#                
-#     from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
+# INFORMATION ON UTC - TAI
+#
+# NO positive leap second will be introduced at the end of December 2009.
+# The difference between Coordinated Universal Time UTC and the
+# International Atomic Time TAI is :		
+#
+# from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
 #
 # Leap seconds can be introduced in UTC at the end of the months of December
-# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC or to confirm that there
+# or June,  depending on the evolution of UT1-TAI. Bulletin C is mailed every
+# six months, either to announce a time step in UTC, or to confirm that there
 # will be no time step at the next possible date.
 #
 # Daniel GAMBIS
-# Head		
+# Director			
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep  9 13:28:19 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4E94710656A9;
	Wed,  9 Sep 2009 13:28:19 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B01C8FC15;
	Wed,  9 Sep 2009 13:28:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n89DSJVY086880;
	Wed, 9 Sep 2009 13:28:19 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n89DSJkP086878;
	Wed, 9 Sep 2009 13:28:19 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909091328.n89DSJkP086878@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 9 Sep 2009 13:28:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197041 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 09 Sep 2009 13:28:19 -0000

Author: kib
Date: Wed Sep  9 13:28:18 2009
New Revision: 197041
URL: http://svn.freebsd.org/changeset/base/197041

Log:
  MFC r196887:
  In fhopen, vfs_ref() the mount point while vnode is unlocked, to prevent
  vn_start_write(NULL, &mp) from operating on potentially freed or reused
  struct mount *.
  
  Remove unmatched vfs_rel() in cleanup.
  
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/   (props changed)
  stable/8/sys/kern/vfs_syscalls.c

Modified: stable/8/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/8/sys/kern/vfs_syscalls.c	Wed Sep  9 13:23:26 2009	(r197040)
+++ stable/8/sys/kern/vfs_syscalls.c	Wed Sep  9 13:28:18 2009	(r197041)
@@ -4439,12 +4439,15 @@ fhopen(td, uap)
 			goto bad;
 	}
 	if (fmode & O_TRUNC) {
+		vfs_ref(mp);
 		VOP_UNLOCK(vp, 0);				/* XXX */
 		if ((error = vn_start_write(NULL, &mp, V_WAIT | PCATCH)) != 0) {
 			vrele(vp);
+			vfs_rel(mp);
 			goto out;
 		}
 		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);	/* XXX */
+		vfs_rel(mp);
 #ifdef MAC
 		/*
 		 * We don't yet have fp->f_cred, so use td->td_ucred, which
@@ -4516,7 +4519,6 @@ fhopen(td, uap)
 
 	VOP_UNLOCK(vp, 0);
 	fdrop(fp, td);
-	vfs_rel(mp);
 	VFS_UNLOCK_GIANT(vfslocked);
 	td->td_retval[0] = indx;
 	return (0);

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 11:27:07 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 60F4610656C1;
	Thu, 10 Sep 2009 11:27:07 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 500378FC12;
	Thu, 10 Sep 2009 11:27:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8ABR7k2018060;
	Thu, 10 Sep 2009 11:27:07 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8ABR76M018057;
	Thu, 10 Sep 2009 11:27:07 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200909101127.n8ABR76M018057@svn.freebsd.org>
From: Attilio Rao 
Date: Thu, 10 Sep 2009 11:27:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197058 - stable/8/contrib/gdtoa
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 11:27:07 -0000

Author: attilio
Date: Thu Sep 10 11:27:07 2009
New Revision: 197058
URL: http://svn.freebsd.org/changeset/base/197058

Log:
  MFC r196916:
  Fix a list overrun.
  
  Sponsored by:	Sandvine Incorporated
  Approved by:	re (kib)

Modified:
  stable/8/contrib/gdtoa/gdtoaimp.h
  stable/8/contrib/gdtoa/misc.c

Modified: stable/8/contrib/gdtoa/gdtoaimp.h
==============================================================================
--- stable/8/contrib/gdtoa/gdtoaimp.h	Thu Sep 10 08:33:28 2009	(r197057)
+++ stable/8/contrib/gdtoa/gdtoaimp.h	Thu Sep 10 11:27:07 2009	(r197058)
@@ -485,7 +485,7 @@ extern pthread_mutex_t __gdtoa_locks[2];
 		_pthread_mutex_unlock(&__gdtoa_locks[n]);	\
 } while(0)
 
-#define Kmax 15
+#define Kmax 9
 
  struct
 Bigint {

Modified: stable/8/contrib/gdtoa/misc.c
==============================================================================
--- stable/8/contrib/gdtoa/misc.c	Thu Sep 10 08:33:28 2009	(r197057)
+++ stable/8/contrib/gdtoa/misc.c	Thu Sep 10 11:27:07 2009	(r197058)
@@ -55,7 +55,9 @@ Balloc
 #endif
 
 	ACQUIRE_DTOA_LOCK(0);
-	if ( (rv = freelist[k]) !=0) {
+	/* The k > Kmax case does not need ACQUIRE_DTOA_LOCK(0), */
+	/* but this case seems very unlikely. */
+	if (k <= Kmax && (rv = freelist[k]) !=0) {
 		freelist[k] = rv->next;
 		}
 	else {
@@ -65,7 +67,7 @@ Balloc
 #else
 		len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
 			/sizeof(double);
-		if (pmem_next - private_mem + len <= PRIVATE_mem) {
+		if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) {
 			rv = (Bigint*)pmem_next;
 			pmem_next += len;
 			}
@@ -89,10 +91,14 @@ Bfree
 #endif
 {
 	if (v) {
-		ACQUIRE_DTOA_LOCK(0);
-		v->next = freelist[v->k];
-		freelist[v->k] = v;
-		FREE_DTOA_LOCK(0);
+		if (v->k > Kmax)
+			free((void*)v);
+		else {
+			ACQUIRE_DTOA_LOCK(0);
+			v->next = freelist[v->k];
+			freelist[v->k] = v;
+			FREE_DTOA_LOCK(0);
+			}
 		}
 	}
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 11:44:51 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A0A13106566C;
	Thu, 10 Sep 2009 11:44:51 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8F6448FC0A;
	Thu, 10 Sep 2009 11:44:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8ABiptb018457;
	Thu, 10 Sep 2009 11:44:51 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8ABipTW018454;
	Thu, 10 Sep 2009 11:44:51 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200909101144.n8ABipTW018454@svn.freebsd.org>
From: Attilio Rao 
Date: Thu, 10 Sep 2009 11:44:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197059 - stable/7/contrib/gdtoa
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 11:44:51 -0000

Author: attilio
Date: Thu Sep 10 11:44:51 2009
New Revision: 197059
URL: http://svn.freebsd.org/changeset/base/197059

Log:
  MFC r196916:
  Fix a list overrun.
  
  Sponsored by: Sandvine Incorporated

Modified:
  stable/7/contrib/gdtoa/gdtoaimp.h
  stable/7/contrib/gdtoa/misc.c

Modified: stable/7/contrib/gdtoa/gdtoaimp.h
==============================================================================
--- stable/7/contrib/gdtoa/gdtoaimp.h	Thu Sep 10 11:27:07 2009	(r197058)
+++ stable/7/contrib/gdtoa/gdtoaimp.h	Thu Sep 10 11:44:51 2009	(r197059)
@@ -472,7 +472,7 @@ extern pthread_mutex_t __gdtoa_locks[2];
 		_pthread_mutex_unlock(&__gdtoa_locks[n]);	\
 } while(0)
 
-#define Kmax 15
+#define Kmax 9
 
  struct
 Bigint {

Modified: stable/7/contrib/gdtoa/misc.c
==============================================================================
--- stable/7/contrib/gdtoa/misc.c	Thu Sep 10 11:27:07 2009	(r197058)
+++ stable/7/contrib/gdtoa/misc.c	Thu Sep 10 11:44:51 2009	(r197059)
@@ -55,7 +55,9 @@ Balloc
 #endif
 
 	ACQUIRE_DTOA_LOCK(0);
-	if ( (rv = freelist[k]) !=0) {
+	/* The k > Kmax case does not need ACQUIRE_DTOA_LOCK(0), */
+	/* but this case seems very unlikely. */
+	if (k <= Kmax && (rv = freelist[k]) !=0) {
 		freelist[k] = rv->next;
 		}
 	else {
@@ -65,7 +67,7 @@ Balloc
 #else
 		len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
 			/sizeof(double);
-		if (pmem_next - private_mem + len <= PRIVATE_mem) {
+		if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) {
 			rv = (Bigint*)pmem_next;
 			pmem_next += len;
 			}
@@ -89,10 +91,14 @@ Bfree
 #endif
 {
 	if (v) {
-		ACQUIRE_DTOA_LOCK(0);
-		v->next = freelist[v->k];
-		freelist[v->k] = v;
-		FREE_DTOA_LOCK(0);
+		if (v->k > Kmax)
+			free((void*)v);
+		else {
+			ACQUIRE_DTOA_LOCK(0);
+			v->next = freelist[v->k];
+			freelist[v->k] = v;
+			FREE_DTOA_LOCK(0);
+			}
 		}
 	}
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 12:42:36 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E2EAF106566C;
	Thu, 10 Sep 2009 12:42:36 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CFEC78FC0A;
	Thu, 10 Sep 2009 12:42:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8ACga72019701;
	Thu, 10 Sep 2009 12:42:36 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8ACga1H019699;
	Thu, 10 Sep 2009 12:42:36 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909101242.n8ACga1H019699@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 10 Sep 2009 12:42:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197060 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci fs/pseudofs kern ufs/ffs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 12:42:37 -0000

Author: kib
Date: Thu Sep 10 12:42:36 2009
New Revision: 197060
URL: http://svn.freebsd.org/changeset/base/197060

Log:
  MFC r196920:
  insmntque_stddtr() clears vp->v_data and resets vp->v_op to
  dead_vnodeops before calling vgone(). Revert r189706 and corresponding
  part of the r186560.
  
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/fs/pseudofs/pseudofs_vncache.c
  stable/8/sys/kern/   (props changed)
  stable/8/sys/ufs/ffs/ffs_vfsops.c

Modified: stable/8/sys/fs/pseudofs/pseudofs_vncache.c
==============================================================================
--- stable/8/sys/fs/pseudofs/pseudofs_vncache.c	Thu Sep 10 11:44:51 2009	(r197059)
+++ stable/8/sys/fs/pseudofs/pseudofs_vncache.c	Thu Sep 10 12:42:36 2009	(r197060)
@@ -193,6 +193,7 @@ retry:
 	vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
 	error = insmntque(*vpp, mp);
 	if (error != 0) {
+		free(pvd, M_PFSVNCACHE);
 		*vpp = NULLVP;
 		return (error);
 	}

Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- stable/8/sys/ufs/ffs/ffs_vfsops.c	Thu Sep 10 11:44:51 2009	(r197059)
+++ stable/8/sys/ufs/ffs/ffs_vfsops.c	Thu Sep 10 12:42:36 2009	(r197060)
@@ -1467,6 +1467,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags
 		vp->v_vflag |= VV_FORCEINSMQ;
 	error = insmntque(vp, mp);
 	if (error != 0) {
+		uma_zfree(uma_inode, ip);
 		*vpp = NULL;
 		return (error);
 	}

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 12:55:09 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5BF69106566C;
	Thu, 10 Sep 2009 12:55:09 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4A6958FC19;
	Thu, 10 Sep 2009 12:55:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8ACt9mu020014;
	Thu, 10 Sep 2009 12:55:09 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8ACt9EO020011;
	Thu, 10 Sep 2009 12:55:09 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <200909101255.n8ACt9EO020011@svn.freebsd.org>
From: Attilio Rao 
Date: Thu, 10 Sep 2009 12:55:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197061 - stable/6/contrib/gdtoa
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 12:55:09 -0000

Author: attilio
Date: Thu Sep 10 12:55:09 2009
New Revision: 197061
URL: http://svn.freebsd.org/changeset/base/197061

Log:
  MFC r196916:
  Fix a list overrun.
  
  Sponsored by: Sandvine Incorporated

Modified:
  stable/6/contrib/gdtoa/gdtoaimp.h
  stable/6/contrib/gdtoa/misc.c

Modified: stable/6/contrib/gdtoa/gdtoaimp.h
==============================================================================
--- stable/6/contrib/gdtoa/gdtoaimp.h	Thu Sep 10 12:42:36 2009	(r197060)
+++ stable/6/contrib/gdtoa/gdtoaimp.h	Thu Sep 10 12:55:09 2009	(r197061)
@@ -479,7 +479,7 @@ extern pthread_mutex_t __gdtoa_locks[2];
 		_pthread_mutex_unlock(&__gdtoa_locks[n]);	\
 } while(0)
 
-#define Kmax 15
+#define Kmax 9
 
  struct
 Bigint {

Modified: stable/6/contrib/gdtoa/misc.c
==============================================================================
--- stable/6/contrib/gdtoa/misc.c	Thu Sep 10 12:42:36 2009	(r197060)
+++ stable/6/contrib/gdtoa/misc.c	Thu Sep 10 12:55:09 2009	(r197061)
@@ -61,7 +61,9 @@ Balloc
 #endif
 
 	ACQUIRE_DTOA_LOCK(0);
-	if ( (rv = freelist[k]) !=0) {
+	/* The k > Kmax case does not need ACQUIRE_DTOA_LOCK(0), */
+	/* but this case seems very unlikely. */
+	if (k <= Kmax && (rv = freelist[k]) !=0) {
 		freelist[k] = rv->next;
 		}
 	else {
@@ -71,7 +73,7 @@ Balloc
 #else
 		len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
 			/sizeof(double);
-		if (pmem_next - private_mem + len <= PRIVATE_mem) {
+		if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) {
 			rv = (Bigint*)pmem_next;
 			pmem_next += len;
 			}
@@ -95,10 +97,14 @@ Bfree
 #endif
 {
 	if (v) {
-		ACQUIRE_DTOA_LOCK(0);
-		v->next = freelist[v->k];
-		freelist[v->k] = v;
-		FREE_DTOA_LOCK(0);
+		if (v->k > Kmax)
+			free((void*)v);
+		else {
+			ACQUIRE_DTOA_LOCK(0);
+			v->next = freelist[v->k];
+			freelist[v->k] = v;
+			FREE_DTOA_LOCK(0);
+			}
 		}
 	}
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 13:01:23 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8EA73106566B;
	Thu, 10 Sep 2009 13:01:23 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C8CA8FC0A;
	Thu, 10 Sep 2009 13:01:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8AD1NW6020221;
	Thu, 10 Sep 2009 13:01:23 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8AD1NDW020218;
	Thu, 10 Sep 2009 13:01:23 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909101301.n8AD1NDW020218@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 10 Sep 2009 13:01:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197063 - in stable/7/sys: . contrib/pf fs/pseudofs net
	ufs/ffs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 13:01:23 -0000

Author: kib
Date: Thu Sep 10 13:01:23 2009
New Revision: 197063
URL: http://svn.freebsd.org/changeset/base/197063

Log:
  MFC r196920:
  insmntque_stddtr() clears vp->v_data and resets vp->v_op to
  dead_vnodeops before calling vgone(). Revert r189706 and corresponding
  part of the r186560.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/fs/pseudofs/pseudofs_vncache.c
  stable/7/sys/net/   (props changed)
  stable/7/sys/ufs/ffs/ffs_vfsops.c

Modified: stable/7/sys/fs/pseudofs/pseudofs_vncache.c
==============================================================================
--- stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Thu Sep 10 12:58:37 2009	(r197062)
+++ stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Thu Sep 10 13:01:23 2009	(r197063)
@@ -193,6 +193,7 @@ retry:
 	vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, curthread);
 	error = insmntque(*vpp, mp);
 	if (error != 0) {
+		free(pvd, M_PFSVNCACHE);
 		*vpp = NULLVP;
 		return (error);
 	}

Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- stable/7/sys/ufs/ffs/ffs_vfsops.c	Thu Sep 10 12:58:37 2009	(r197062)
+++ stable/7/sys/ufs/ffs/ffs_vfsops.c	Thu Sep 10 13:01:23 2009	(r197063)
@@ -1466,6 +1466,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags
 		vp->v_vflag |= VV_FORCEINSMQ;
 	error = insmntque(vp, mp);
 	if (error != 0) {
+		uma_zfree(uma_inode, ip);
 		*vpp = NULL;
 		return (error);
 	}

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 14:04:01 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 777611065670;
	Thu, 10 Sep 2009 14:04:01 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 62F9D8FC0A;
	Thu, 10 Sep 2009 14:04:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8AE41e4021597;
	Thu, 10 Sep 2009 14:04:01 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8AE41C6021588;
	Thu, 10 Sep 2009 14:04:01 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200909101404.n8AE41C6021588@svn.freebsd.org>
From: Ken Smith 
Date: Thu, 10 Sep 2009 14:04:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 14:04:01 -0000

Author: kensmith
Date: Thu Sep 10 14:04:00 2009
New Revision: 197065
URL: http://svn.freebsd.org/changeset/base/197065

Log:
  Remove extra debugging support that is turned on for head but turned off
  for stable branches:
  
  	- shift to MALLOC_PRODUCTION
  	- turn off automatic crash dumps
  	- Remove kernel debuggers, INVARIANTS*[1], WITNESS* from
  	  GENERIC kernel config files[2]
  
  [1] INVARIANTS* left on for ia64 by request marcel
  [2] sun4v was left as-is
  
  Reviewed by:	marcel, kib
  Approved by:	re (implicit)

Modified:
  stable/8/etc/defaults/rc.conf
  stable/8/lib/libc/stdlib/malloc.c
  stable/8/sys/amd64/conf/GENERIC
  stable/8/sys/i386/conf/GENERIC
  stable/8/sys/ia64/conf/GENERIC
  stable/8/sys/pc98/conf/GENERIC
  stable/8/sys/powerpc/conf/GENERIC
  stable/8/sys/sparc64/conf/GENERIC

Modified: stable/8/etc/defaults/rc.conf
==============================================================================
--- stable/8/etc/defaults/rc.conf	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/etc/defaults/rc.conf	Thu Sep 10 14:04:00 2009	(r197065)
@@ -549,7 +549,7 @@ lpd_flags=""		# Flags to lpd (if enabled
 nscd_enable="NO"	# Run the nsswitch caching daemon.
 chkprintcap_enable="NO"	# Run chkprintcap(8) before running lpd.
 chkprintcap_flags="-d"	# Create missing directories by default.
-dumpdev="AUTO"		# Device to crashdump to (device name, AUTO, or NO).
+dumpdev="NO"		# Device to crashdump to (device name, AUTO, or NO).
 dumpdir="/var/crash"	# Directory where crash dumps are to be stored
 savecore_flags=""	# Used if dumpdev is enabled above, and present.
 crashinfo_enable="YES"	# Automatically generate crash dump summary.

Modified: stable/8/lib/libc/stdlib/malloc.c
==============================================================================
--- stable/8/lib/libc/stdlib/malloc.c	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/lib/libc/stdlib/malloc.c	Thu Sep 10 14:04:00 2009	(r197065)
@@ -114,7 +114,7 @@
  * defaults the A and J runtime options to off.  These settings are appropriate
  * for production systems.
  */
-/* #define	MALLOC_PRODUCTION */
+#define	MALLOC_PRODUCTION
 
 #ifndef MALLOC_PRODUCTION
    /*

Modified: stable/8/sys/amd64/conf/GENERIC
==============================================================================
--- stable/8/sys/amd64/conf/GENERIC	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/sys/amd64/conf/GENERIC	Thu Sep 10 14:04:00 2009	(r197065)
@@ -76,15 +76,6 @@ options		FLOWTABLE		# per-cpu routing ca
 #options 	KDTRACE_FRAME		# Ensure frames are compiled in
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	INVARIANTS		# Enable calls of extra sanity checking
-options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
-options 	WITNESS			# Enable checks to detect deadlocks and cycles
-options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
-
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel
 

Modified: stable/8/sys/i386/conf/GENERIC
==============================================================================
--- stable/8/sys/i386/conf/GENERIC	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/sys/i386/conf/GENERIC	Thu Sep 10 14:04:00 2009	(r197065)
@@ -76,15 +76,6 @@ options 	MAC			# TrustedBSD MAC Framewor
 options		FLOWTABLE		# per-cpu routing cache
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	INVARIANTS		# Enable calls of extra sanity checking
-options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
-options 	WITNESS			# Enable checks to detect deadlocks and cycles
-options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
-
 # To make an SMP kernel, the next two lines are needed
 options 	SMP			# Symmetric MultiProcessor Kernel
 device		apic			# I/O APIC

Modified: stable/8/sys/ia64/conf/GENERIC
==============================================================================
--- stable/8/sys/ia64/conf/GENERIC	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/sys/ia64/conf/GENERIC	Thu Sep 10 14:04:00 2009	(r197065)
@@ -30,15 +30,12 @@ options 	CD9660		# ISO 9660 Filesystem
 options 	COMPAT_43TTY	# BSD 4.3 TTY compat (sgtty)
 options 	COMPAT_FREEBSD6	# Compatible with FreeBSD6
 options 	COMPAT_FREEBSD7	# Compatible with FreeBSD7
-options 	DDB		# Support DDB
 options 	FFS		# Berkeley Fast Filesystem
-options 	GDB		# Support remote GDB
 options 	GEOM_LABEL	# Provides labelization
 options 	INET		# InterNETworking
 options 	INET6		# IPv6 communications protocols
 options 	INVARIANTS	# Enable calls of extra sanity checking
 options 	INVARIANT_SUPPORT # required by INVARIANTS
-options 	KDB		# Enable kernel debugger support
 options 	KTRACE		# ktrace(1) syscall trace support
 options 	MAC			# TrustedBSD MAC Framework
 options 	MD_ROOT		# MD usable as root device
@@ -62,8 +59,6 @@ options 	P1003_1B_SEMAPHORES	# POSIX-sty
 options 	UFS_ACL		# Support for access control lists
 options 	UFS_DIRHASH	# Hash-based directory lookup scheme
 options 	UFS_GJOURNAL	# Enable gjournal-based UFS journaling
-options 	WITNESS		# Enable checks to detect deadlocks and cycles
-options 	WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
 options 	_KPOSIX_PRIORITY_SCHEDULING	# Posix P1003_1B RT extensions
 options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
 

Modified: stable/8/sys/pc98/conf/GENERIC
==============================================================================
--- stable/8/sys/pc98/conf/GENERIC	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/sys/pc98/conf/GENERIC	Thu Sep 10 14:04:00 2009	(r197065)
@@ -76,15 +76,6 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	INVARIANTS		# Enable calls of extra sanity checking
-options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
-options 	WITNESS			# Enable checks to detect deadlocks and cycles
-options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
-
 # To make an SMP kernel, the next two lines are needed
 #options 	SMP			# Symmetric MultiProcessor Kernel
 #device		apic			# I/O APIC

Modified: stable/8/sys/powerpc/conf/GENERIC
==============================================================================
--- stable/8/sys/powerpc/conf/GENERIC	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/sys/powerpc/conf/GENERIC	Thu Sep 10 14:04:00 2009	(r197065)
@@ -67,14 +67,6 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 
-# Debugging for use in -current
-options 	KDB			#Enable the kernel debugger
-options 	DDB			#Support DDB
-options 	INVARIANTS		#Enable calls of extra sanity checking
-options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
-options 	WITNESS			#Enable checks to detect deadlocks and cycles
-options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
-
 # To make an SMP kernel, the next line is needed
 #options 	SMP			# Symmetric MultiProcessor Kernel
 

Modified: stable/8/sys/sparc64/conf/GENERIC
==============================================================================
--- stable/8/sys/sparc64/conf/GENERIC	Thu Sep 10 13:20:27 2009	(r197064)
+++ stable/8/sys/sparc64/conf/GENERIC	Thu Sep 10 14:04:00 2009	(r197065)
@@ -72,15 +72,6 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	INVARIANTS		# Enable calls of extra sanity checking
-options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
-options 	WITNESS			# Enable checks to detect deadlocks and cycles
-options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
-
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 14:08:28 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D09A7106566C;
	Thu, 10 Sep 2009 14:08:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A4FFB8FC08;
	Thu, 10 Sep 2009 14:08:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8AE8Snf021756;
	Thu, 10 Sep 2009 14:08:28 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8AE8Skq021754;
	Thu, 10 Sep 2009 14:08:28 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200909101408.n8AE8Skq021754@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 10 Sep 2009 14:08:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197066 - stable/7/share/man/man7
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 14:08:28 -0000

Author: jhb
Date: Thu Sep 10 14:08:28 2009
New Revision: 197066
URL: http://svn.freebsd.org/changeset/base/197066

Log:
  MFC 196337 and 196356:
  Document SVN* and MAKE_DVD variables.

Modified:
  stable/7/share/man/man7/   (props changed)
  stable/7/share/man/man7/release.7

Modified: stable/7/share/man/man7/release.7
==============================================================================
--- stable/7/share/man/man7/release.7	Thu Sep 10 14:04:00 2009	(r197065)
+++ stable/7/share/man/man7/release.7	Thu Sep 10 14:08:28 2009	(r197066)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 12, 2006
+.Dd August 17, 2009
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -332,6 +332,10 @@ patch file.
 A script that will be run in the
 .Xr chroot 8
 environment immediately after any local patches are applied.
+.It Va MAKE_DVD
+If defined, build a bootable ISO DVD image in the CD-ROM
+stage directory.
+This option may not be available for all architectures.
 .It Va MAKE_ISOS
 If defined, bootable ISO CD-ROM images will be created from the
 contents of the CD-ROM stage directory.
@@ -390,6 +394,35 @@ of the CVS tree
 .It Va SEPARATE_LIVEFS
 Store the live file system on its own CD-ROM image rather than placing it on
 the first disc.
+.It Va SVNCMDARGS
+Additional arguments for svn
+.Ic checkout
+and
+.Ic switch
+commands.
+.It Va SVNROOT
+The location of the FreeBSD SVN source repository.
+If this variable is set,
+then the source tree will be extracted using Subversion rather than
+CVS.
+.It Va SVNBRANCH
+The branch to check out from a SVN source repository.
+It is specified as a path such as
+.Pa head
+or
+.Pa stable/7 .
+If this variable is not set,
+then the branch that corresponds to the current value of
+.Va RELEASETAG
+will be used.
+If neither
+.Va SVNBRANCH
+nor
+.Va RELEASETAG
+are set,
+then the
+.Pa head
+branch will be used.
 .It Va TARGET_ARCH
 The target machine processor architecture.
 This is analogous to the
@@ -474,6 +507,7 @@ make release CHROOTDIR=/local3/release B
 .Xr install 1 ,
 .Xr make 1 ,
 .Xr patch 1 ,
+.Xr svn 1 Pq Pa ports/devel/subversion-freebsd ,
 .Xr uname 1 ,
 .Xr md 4 ,
 .Xr make.conf 5 ,
@@ -511,7 +545,7 @@ effort was spent getting
 into a shape where it could at least automate most of the tediousness
 of building a release in a sterile environment.
 .Pp
-With its almost 1000 revisions spread over multiple branches, the
+At near 1000 revisions spread over multiple branches, the
 .Xr cvs 1
 log of
 .Pa src/release/Makefile

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 14:16:05 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF69F1065676;
	Thu, 10 Sep 2009 14:16:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D09B8FC0C;
	Thu, 10 Sep 2009 14:16:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8AEG52C021984;
	Thu, 10 Sep 2009 14:16:05 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8AEG5jf021981;
	Thu, 10 Sep 2009 14:16:05 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200909101416.n8AEG5jf021981@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 10 Sep 2009 14:16:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197067 - stable/7/release
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 14:16:05 -0000

Author: jhb
Date: Thu Sep 10 14:16:05 2009
New Revision: 197067
URL: http://svn.freebsd.org/changeset/base/197067

Log:
  MFC 196221:
  Add the ability to build a release from an SVN checkout instead of a CVS
  checkout.  If SVNROOT is specified, then the source tree will be checked
  out from that SVN repository instead of using CVS.  ports and docs still
  use CVS.  If SVNROOT is not specified, then the source tree will be checked
  out using CVS.  An explicit SVN branch can be specified using SVNBRANCH
  (e.g. SVNBRANCH=stable/8).  If SVNBRANCH is not set but RELEASETAG is set
  to a CVS branch (such as RELENG_8) the appropriate SVN branch will be
  inferred from the CVS branch using svnbranch.awk.

Added:
  stable/7/release/svnbranch.awk
     - copied unchanged from r196221, head/release/svnbranch.awk
Modified:
  stable/7/release/   (props changed)
  stable/7/release/Makefile

Modified: stable/7/release/Makefile
==============================================================================
--- stable/7/release/Makefile	Thu Sep 10 14:08:28 2009	(r197066)
+++ stable/7/release/Makefile	Thu Sep 10 14:16:05 2009	(r197067)
@@ -1,7 +1,8 @@
 # $FreeBSD$
 #
 # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \
-#     [RELEASETAG=tag]
+#     [RELEASETAG=tag] [SVNROOT=svn://svn.freebsd.org/base] \
+#     [SVNBRANCH=some/branch]
 #
 # Where "/some/dir" is the pathname of a directory on a some filesystem with
 # at least 1000MB of free space, "somename" is what you want the release to
@@ -9,6 +10,11 @@
 # which CVS "tag" name should be used when checking out the sources to build
 # the release (default is HEAD).
 #
+# Please note the support for building from SVN is preliminary and there
+# are still questions about things like how to handle updates of
+# /usr/src on production systems (csup(1) replacement).  It is a work
+# in progress and may change as the other issues get worked out.
+#
 # Please note: the md(4) driver must be present in the kernel
 # (either by being compiled in or available as a kld(4) module),
 # otherwise the target 'release.8' and possibly others will fail.
@@ -45,12 +51,25 @@ BUILDNAME?=${BASE}-${DATE}-SNAP
 # To add other options to the CVS command, set
 #CVSARGS="-lfq"
 #
-# To prefix the cvs command
+# To prefix the CVS command
 #CVSPREFIX="/usr/bin/time"
 #
 # Where the CVS repository is
 #CVSROOT="/home/ncvs"
 #
+# To add other options to the Subversion subcommands (co,up), set
+#SVNCMDARGS="-r '{ 01/01/2002 00:00:00 UTC }'"
+#
+# To prefix the Subversion command
+#SVNPREFIX="/usr/bin/time"
+#
+# Where the Subversion repository is
+#SVNROOT=svn://svn.freebsd.org/base
+#
+# Subversion branch to build for src.  If this is not set then it is
+# automatically computed from RELEASETAG.
+#SVNBRANCH=stable/7
+#
 # Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we
 # are building an official release.  Otherwise, we are building for
 # a branch.
@@ -64,6 +83,16 @@ PORTSRELEASETAG?=	${AUXRELEASETAG}
 .endif
 .endif
 
+# Determine the Subversion source branch that corresponds to the requested
+# RELEASETAG.
+.if !defined(SVNBRANCH)
+.if defined(RELEASETAG)
+SVNBRANCH!=	echo "${RELEASETAG}" | awk -f ${.CURDIR}/svnbranch.awk
+.else
+SVNBRANCH=	head
+.endif
+.endif
+
 # If you want to pass flags to the world build such as -j X, use
 # WORLD_FLAGS.  Similarly, you can specify make flags for kernel
 # builds via KERNEL_FLAGS.
@@ -342,8 +371,17 @@ CVS_PORTSARGS+=	-r ${PORTSRELEASETAG}
 WORLDDIR?=	${.CURDIR}/..
 
 release rerelease:
-.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT)
-	@echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
+.if !defined(CHROOTDIR) || !defined(BUILDNAME)
+	@echo "To make a release you must set CHROOTDIR and BUILDNAME" && false
+.endif
+.if !defined(NOPORTSATALL) && !defined(EXTPORTSDIR) && !defined(CVSROOT)
+	@echo "Building ports requires CVSROOT or EXTPORTSDIR" && false
+.endif
+.if !defined(NODOC) && !defined(EXTDOCDIR) && !defined(CVSROOT)
+	@echo "Building docs requires CVSROOT or EXTDOCDIR" && false
+.endif
+.if !defined(EXTSRCDIR) && !defined(CVSROOT) && !defined(SVNROOT)
+	@echo "The source tree requires SVNROOT, CVSROOT, or EXTSRCDIR" && false
 .endif
 .if defined(NOPORTSATALL) && !defined(NODOC)
 	@echo "Ports are required for building the docs.  Either set NODOC or"
@@ -388,6 +426,10 @@ release rerelease:
 .if defined(EXTSRCDIR)
 	cd ${CHROOTDIR}/usr && \
 	    cp -R -H ${EXTSRCDIR} src
+.elif defined(SVNROOT)
+	cd ${CHROOTDIR}/usr && \
+	    ${SVNPREFIX} svn co ${SVNCMDARGS} ${SVNROOT}/${SVNBRANCH} \
+	    ${RELEASESRCMODULE} 
 .else
 	cd ${CHROOTDIR}/usr && \
 	    ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \
@@ -433,7 +475,10 @@ release rerelease:
 .endif
 .if make(rerelease)
 .if !defined(RELEASENOUPDATE) && !defined(EXTSRCDIR)
-.if !defined(RELEASETAG)
+.if defined(SVNROOT)
+	cd ${CHROOTDIR}/usr/src && ${SVNPREFIX} svn switch ${SVNCMDARGS} \
+	    ${SVNROOT}/${SVNBRANCH}
+.elif !defined(RELEASETAG)
 	cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \
 	    update ${CVSCMDARGS} -P -d -A
 .else

Copied: stable/7/release/svnbranch.awk (from r196221, head/release/svnbranch.awk)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/release/svnbranch.awk	Thu Sep 10 14:16:05 2009	(r197067, copy of r196221, head/release/svnbranch.awk)
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+BEGIN {
+	FS = "_"
+}
+
+/RELENG_.*_RELEASE/ {
+	if (NF == 5) {
+		printf "release/%s.%s.%s", $2, $3, $4
+		exit
+	}
+}
+
+/RELENG_.*/ {
+	if (NF == 3) {
+		printf "releng/%s.%s", $2, $3
+		exit
+	}
+
+	if (NF == 2) {
+		printf "stable/%s", $2
+		exit
+	}
+}
+
+// {
+	printf "unknown_branch"
+}

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 14:23:50 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 31B86106566B;
	Thu, 10 Sep 2009 14:23:50 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id F40998FC0A;
	Thu, 10 Sep 2009 14:23:49 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 9F59546B2C;
	Thu, 10 Sep 2009 10:23:49 -0400 (EDT)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id EAD708A01B;
	Thu, 10 Sep 2009 10:23:48 -0400 (EDT)
From: John Baldwin 
To: Ken Smith 
Date: Thu, 10 Sep 2009 10:23:44 -0400
User-Agent: KMail/1.9.7
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
In-Reply-To: <200909101404.n8AE41C6021588@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200909101023.44913.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 10 Sep 2009 10:23:48 -0400 (EDT)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 14:23:50 -0000

On Thursday 10 September 2009 10:04:00 am Ken Smith wrote:
> Author: kensmith
> Date: Thu Sep 10 14:04:00 2009
> New Revision: 197065
> URL: http://svn.freebsd.org/changeset/base/197065
> 
> Log:
>   Remove extra debugging support that is turned on for head but turned off
>   for stable branches:
>   
>   	- shift to MALLOC_PRODUCTION
>   	- turn off automatic crash dumps
>   	- Remove kernel debuggers, INVARIANTS*[1], WITNESS* from
>   	  GENERIC kernel config files[2]
>   
>   [1] INVARIANTS* left on for ia64 by request marcel
>   [2] sun4v was left as-is
>   
>   Reviewed by:	marcel, kib
>   Approved by:	re (implicit)
> 
> Modified:
>   stable/8/etc/defaults/rc.conf
>   stable/8/lib/libc/stdlib/malloc.c
>   stable/8/sys/amd64/conf/GENERIC
>   stable/8/sys/i386/conf/GENERIC
>   stable/8/sys/ia64/conf/GENERIC
>   stable/8/sys/pc98/conf/GENERIC
>   stable/8/sys/powerpc/conf/GENERIC
>   stable/8/sys/sparc64/conf/GENERIC
> 
> Modified: stable/8/etc/defaults/rc.conf
> 
==============================================================================
> --- stable/8/etc/defaults/rc.conf	Thu Sep 10 13:20:27 2009	(r197064)
> +++ stable/8/etc/defaults/rc.conf	Thu Sep 10 14:04:00 2009	(r197065)
> @@ -549,7 +549,7 @@ lpd_flags=""		# Flags to lpd (if enabled
>  nscd_enable="NO"	# Run the nsswitch caching daemon.
>  chkprintcap_enable="NO"	# Run chkprintcap(8) before running lpd.
>  chkprintcap_flags="-d"	# Create missing directories by default.
> -dumpdev="AUTO"		# Device to crashdump to (device name, AUTO, or NO).
> +dumpdev="NO"		# Device to crashdump to (device name, AUTO, or NO).
>  dumpdir="/var/crash"	# Directory where crash dumps are to be stored
>  savecore_flags=""	# Used if dumpdev is enabled above, and present.
>  crashinfo_enable="YES"	# Automatically generate crash dump summary.

Are we sure we want to change this?  It is set to "AUTO" in stable/7.

-- 
John Baldwin

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 14:24:11 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E5C1B106574D;
	Thu, 10 Sep 2009 14:24:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D2F268FC1D;
	Thu, 10 Sep 2009 14:24:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8AEOBZu022230;
	Thu, 10 Sep 2009 14:24:11 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8AEOB4s022229;
	Thu, 10 Sep 2009 14:24:11 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200909101424.n8AEOB4s022229@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 10 Sep 2009 14:24:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197068 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 14:24:12 -0000

Author: jhb
Date: Thu Sep 10 14:24:11 2009
New Revision: 197068
URL: http://svn.freebsd.org/changeset/base/197068

Log:
  Move mergeinfo for 196772 up to sys/.
  
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 14:32:39 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1307B1065672;
	Thu, 10 Sep 2009 14:32:39 +0000 (UTC)
	(envelope-from kensmith@cse.Buffalo.EDU)
Received: from phoebe.cse.buffalo.edu (phoebe.cse.buffalo.edu [128.205.32.89])
	by mx1.freebsd.org (Postfix) with ESMTP id C01348FC1E;
	Thu, 10 Sep 2009 14:32:38 +0000 (UTC)
Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76])
	(authenticated bits=0)
	by phoebe.cse.buffalo.edu (8.14.1/8.13.7) with ESMTP id n8AEWWQv037042
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 10 Sep 2009 10:32:38 -0400 (EDT)
	(envelope-from kensmith@cse.buffalo.edu)
From: Ken Smith 
To: John Baldwin 
In-Reply-To: <200909101023.44913.jhb@freebsd.org>
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
Content-Type: multipart/signed; micalg="pgp-sha1";
	protocol="application/pgp-signature";
	boundary="=-p89po3VOkzyAQyzrNtiE"
Organization: U. Buffalo CSE Department
Date: Thu, 10 Sep 2009 10:32:29 -0400
Message-Id: <1252593149.75144.18.camel@bauer.cse.buffalo.edu>
Mime-Version: 1.0
X-Mailer: Evolution 2.24.5 FreeBSD GNOME Team Port 
X-DCC--Metrics: phoebe.cse.buffalo.edu 1335; Body=0 Fuz1=0 Fuz2=0
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults
 lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 14:32:39 -0000


--=-p89po3VOkzyAQyzrNtiE
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2009-09-10 at 10:23 -0400, John Baldwin wrote:
> > --- stable/8/etc/defaults/rc.conf     Thu Sep 10 13:20:27 2009        (=
r197064)
> > +++ stable/8/etc/defaults/rc.conf     Thu Sep 10 14:04:00 2009        (=
r197065)
> > @@ -549,7 +549,7 @@ lpd_flags=3D""              # Flags to lpd (if enab=
led
> >  nscd_enable=3D"NO"     # Run the nsswitch caching daemon.
> >  chkprintcap_enable=3D"NO"      # Run chkprintcap(8) before running lpd=
.
> >  chkprintcap_flags=3D"-d"       # Create missing directories by default=
.
> > -dumpdev=3D"AUTO"               # Device to crashdump to (device name, =
AUTO, or NO).
> > +dumpdev=3D"NO"         # Device to crashdump to (device name, AUTO, or=
 NO).
> >  dumpdir=3D"/var/crash" # Directory where crash dumps are to be stored
> >  savecore_flags=3D""    # Used if dumpdev is enabled above, and present=
.
> >  crashinfo_enable=3D"YES"       # Automatically generate crash dump sum=
mary.
>=20
> Are we sure we want to change this?  It is set to "AUTO" in stable/7.

It has been pointed out to me on the mailing lists that leaving it on
for stable/7 was an oversight, it is off on previous branches.

I can understand the motivation for it.  In a data center full of
production machines crash dumps cause reboots to take longer and
potentially cause disk space issues.  In those sorts of environments
it's best if by *default* the crash dumps don't happen and if an admin
finds they need it they turn it on.

This is one of those "There is no right answer" things...

--=20
                                                Ken Smith
- From there to here, from here to      |       kensmith@cse.buffalo.edu
  there, funny things are everywhere.   |
                      - Theodore Geisel |


--=-p89po3VOkzyAQyzrNtiE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkqpDf0ACgkQ/G14VSmup/Z6uACaArSRA3xuAlaSgzkJnnLuo4Hf
9GYAn3J0nrqpE7ylVH/u2Wh0BS0gB3AP
=D9Fc
-----END PGP SIGNATURE-----

--=-p89po3VOkzyAQyzrNtiE--


From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:00:42 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 31EE8106568D;
	Thu, 10 Sep 2009 15:00:42 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from mail-gw2.york.ac.uk (mail-gw2.york.ac.uk [144.32.128.247])
	by mx1.freebsd.org (Postfix) with ESMTP id B6CF88FC13;
	Thu, 10 Sep 2009 15:00:41 +0000 (UTC)
Received: from mail-gw6.york.ac.uk (mail-gw6.york.ac.uk [144.32.129.26])
	by mail-gw2.york.ac.uk (8.13.6/8.13.6) with ESMTP id n8AETCEG003595;
	Thu, 10 Sep 2009 15:29:12 +0100 (BST)
Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk)
	by mail-gw6.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68)
	(envelope-from )
	id 1Mlke8-0001OY-3O; Thu, 10 Sep 2009 15:29:12 +0100
Received: from buffy.york.ac.uk (localhost [127.0.0.1])
	by buffy.york.ac.uk (8.14.3/8.14.3) with ESMTP id n8AETBBY069401;
	Thu, 10 Sep 2009 15:29:11 +0100 (BST)
	(envelope-from gavin@FreeBSD.org)
Received: (from ga9@localhost)
	by buffy.york.ac.uk (8.14.3/8.14.3/Submit) id n8AETBMn069400;
	Thu, 10 Sep 2009 15:29:11 +0100 (BST)
	(envelope-from gavin@FreeBSD.org)
X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to
	gavin@FreeBSD.org using -f
From: Gavin Atkinson 
To: Ken Smith 
In-Reply-To: <200909101404.n8AE41C6021588@svn.freebsd.org>
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date: Thu, 10 Sep 2009 15:29:11 +0100
Message-Id: <1252592951.49151.3.camel@buffy.york.ac.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.22.2 FreeBSD GNOME Team Port 
X-York-MailScanner: Found to be clean
X-York-MailScanner-From: gavin@freebsd.org
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults
	lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf
	sys/pc98/conf sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:00:42 -0000

On Thu, 2009-09-10 at 14:04 +0000, Ken Smith wrote:
> Author: kensmith
> Date: Thu Sep 10 14:04:00 2009
> New Revision: 197065
> URL: http://svn.freebsd.org/changeset/base/197065
> 
> Log:
>   Remove extra debugging support that is turned on for head but turned off
>   for stable branches:
>   
[...]
>   	- turn off automatic crash dumps
[...]
> 
> Modified: stable/8/etc/defaults/rc.conf
> ==============================================================================
> --- stable/8/etc/defaults/rc.conf	Thu Sep 10 13:20:27 2009	(r197064)
> +++ stable/8/etc/defaults/rc.conf	Thu Sep 10 14:04:00 2009	(r197065)
> @@ -549,7 +549,7 @@ lpd_flags=""		# Flags to lpd (if enabled
>  nscd_enable="NO"	# Run the nsswitch caching daemon.
>  chkprintcap_enable="NO"	# Run chkprintcap(8) before running lpd.
>  chkprintcap_flags="-d"	# Create missing directories by default.
> -dumpdev="AUTO"		# Device to crashdump to (device name, AUTO, or NO).
> +dumpdev="NO"		# Device to crashdump to (device name, AUTO, or NO).
>  dumpdir="/var/crash"	# Directory where crash dumps are to be stored
>  savecore_flags=""	# Used if dumpdev is enabled above, and present.
>  crashinfo_enable="YES"	# Automatically generate crash dump summary.

This seems like a step backwards to me: crash dumps have been left
enabled in 7.x and have proved very useful from the point of view of
improved quality of received PRs.  I'm not aware of any problems
relating to leaving them enabled.

I'd appreciate it if this decision was reconsidered.

Gavin

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:17:22 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 12BD9106566C;
	Thu, 10 Sep 2009 15:17:22 +0000 (UTC)
	(envelope-from kensmith@cse.Buffalo.EDU)
Received: from phoebe.cse.buffalo.edu (phoebe.cse.buffalo.edu [128.205.32.89])
	by mx1.freebsd.org (Postfix) with ESMTP id D28FC8FC13;
	Thu, 10 Sep 2009 15:17:21 +0000 (UTC)
Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76])
	(authenticated bits=0)
	by phoebe.cse.buffalo.edu (8.14.1/8.13.7) with ESMTP id n8AFHJum037159
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 10 Sep 2009 11:17:21 -0400 (EDT)
	(envelope-from kensmith@cse.buffalo.edu)
From: Ken Smith 
To: Gavin Atkinson 
In-Reply-To: <1252592951.49151.3.camel@buffy.york.ac.uk>
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<1252592951.49151.3.camel@buffy.york.ac.uk>
Content-Type: multipart/signed; micalg="pgp-sha1";
	protocol="application/pgp-signature";
	boundary="=-upvYi8cf+Hhp+xMBOJcS"
Organization: U. Buffalo CSE Department
Date: Thu, 10 Sep 2009 11:17:19 -0400
Message-Id: <1252595839.75144.26.camel@bauer.cse.buffalo.edu>
Mime-Version: 1.0
X-Mailer: Evolution 2.24.5 FreeBSD GNOME Team Port 
X-DCC-Buffalo.EDU-Metrics: phoebe.cse.buffalo.edu 1335; Body=0 Fuz1=0 Fuz2=0
Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults
 lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:17:22 -0000


--=-upvYi8cf+Hhp+xMBOJcS
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2009-09-10 at 15:29 +0100, Gavin Atkinson wrote:
> On Thu, 2009-09-10 at 14:04 +0000, Ken Smith wrote:
> > Author: kensmith
> > Date: Thu Sep 10 14:04:00 2009
> > New Revision: 197065
> > URL: http://svn.freebsd.org/changeset/base/197065
> >=20
> > Log:
> >   Remove extra debugging support that is turned on for head but turned =
off
> >   for stable branches:
> >  =20
> [...]
> >   	- turn off automatic crash dumps
> [...]
> >=20
> > Modified: stable/8/etc/defaults/rc.conf
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> > --- stable/8/etc/defaults/rc.conf	Thu Sep 10 13:20:27 2009	(r197064)
> > +++ stable/8/etc/defaults/rc.conf	Thu Sep 10 14:04:00 2009	(r197065)
> > @@ -549,7 +549,7 @@ lpd_flags=3D""		# Flags to lpd (if enabled
> >  nscd_enable=3D"NO"	# Run the nsswitch caching daemon.
> >  chkprintcap_enable=3D"NO"	# Run chkprintcap(8) before running lpd.
> >  chkprintcap_flags=3D"-d"	# Create missing directories by default.
> > -dumpdev=3D"AUTO"		# Device to crashdump to (device name, AUTO, or NO).
> > +dumpdev=3D"NO"		# Device to crashdump to (device name, AUTO, or NO).
> >  dumpdir=3D"/var/crash"	# Directory where crash dumps are to be stored
> >  savecore_flags=3D""	# Used if dumpdev is enabled above, and present.
> >  crashinfo_enable=3D"YES"	# Automatically generate crash dump summary.
>=20
> This seems like a step backwards to me: crash dumps have been left
> enabled in 7.x and have proved very useful from the point of view of
> improved quality of received PRs.  I'm not aware of any problems
> relating to leaving them enabled.
>=20
> I'd appreciate it if this decision was reconsidered.
>=20

Unfortunately as I said before there is no "Right answer" for this one.
If there is (a lot) more push-back on this we'll reconsider it.  But the
AUTO setting is only appropriate for machines that are "actively being
watched over".  In -stable branches we start to have people using it for
large data centers full of machines that are only "partially watched
over" at best as well as machines stuffed in phone closets in remote
locations, etc.  Having the AUTO setting for situations like that can
mean increased time for a reboot to happen, there is extra risk of the
machine wedging and not rebooting at all (requiring manual intervention
to get it back up), there is risk of disk space issues, etc.

Having the default be NO and the user needing to do something to turn it
on is more appropriate for those environments and helps insure that if
crash dumps are being generated someone is actually interested in them.

Typically this is something that's beneficial to us as you very
correctly point out above but it's not necessarily beneficial to the
end-users...

--=20
                                                Ken Smith
- From there to here, from here to      |       kensmith@cse.buffalo.edu
  there, funny things are everywhere.   |
                      - Theodore Geisel |


--=-upvYi8cf+Hhp+xMBOJcS
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkqpGH8ACgkQ/G14VSmup/b7bACfYaoh+W45ZFr/liqUEr7592AQ
RPkAn3EtMsxZa9bcoHsd8J3AIbIf1eTS
=2aqK
-----END PGP SIGNATURE-----

--=-upvYi8cf+Hhp+xMBOJcS--


From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:18:48 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1F58710656DF;
	Thu, 10 Sep 2009 15:18:48 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id DFD748FC29;
	Thu, 10 Sep 2009 15:18:47 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 3D26546B52;
	Thu, 10 Sep 2009 11:18:47 -0400 (EDT)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 881468A01B;
	Thu, 10 Sep 2009 11:18:46 -0400 (EDT)
From: John Baldwin 
To: Ken Smith 
Date: Thu, 10 Sep 2009 11:18:21 -0400
User-Agent: KMail/1.9.7
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
In-Reply-To: <1252593149.75144.18.camel@bauer.cse.buffalo.edu>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200909101118.22525.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 10 Sep 2009 11:18:46 -0400 (EDT)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:18:48 -0000

On Thursday 10 September 2009 10:32:29 am Ken Smith wrote:
> On Thu, 2009-09-10 at 10:23 -0400, John Baldwin wrote:
> > > --- stable/8/etc/defaults/rc.conf     Thu Sep 10 13:20:27 2009        
(r197064)
> > > +++ stable/8/etc/defaults/rc.conf     Thu Sep 10 14:04:00 2009        
(r197065)
> > > @@ -549,7 +549,7 @@ lpd_flags=""              # Flags to lpd (if enabled
> > >  nscd_enable="NO"     # Run the nsswitch caching daemon.
> > >  chkprintcap_enable="NO"      # Run chkprintcap(8) before running lpd.
> > >  chkprintcap_flags="-d"       # Create missing directories by default.
> > > -dumpdev="AUTO"               # Device to crashdump to (device name, 
AUTO, or NO).
> > > +dumpdev="NO"         # Device to crashdump to (device name, AUTO, or 
NO).
> > >  dumpdir="/var/crash" # Directory where crash dumps are to be stored
> > >  savecore_flags=""    # Used if dumpdev is enabled above, and present.
> > >  crashinfo_enable="YES"       # Automatically generate crash dump 
summary.
> > 
> > Are we sure we want to change this?  It is set to "AUTO" in stable/7.
> 
> It has been pointed out to me on the mailing lists that leaving it on
> for stable/7 was an oversight, it is off on previous branches.
> 
> I can understand the motivation for it.  In a data center full of
> production machines crash dumps cause reboots to take longer and
> potentially cause disk space issues.  In those sorts of environments
> it's best if by *default* the crash dumps don't happen and if an admin
> finds they need it they turn it on.
> 
> This is one of those "There is no right answer" things...

Hmm, I thought the crashdumps were a conscious descision as part of another 
change in 7.x (shipping with debug symbols enabled by default) to try to make 
it easier to get more useful crash reports from stock kernels.  Having the 
debug symbols present is probably enough for that though since it is fairly 
easy to enable crashdumps in rc.conf vs. having to build a new kernel just to 
get debug symbols.  Should we change the default behavior in 7?

-- 
John Baldwin

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:24:14 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D20351065695;
	Thu, 10 Sep 2009 15:24:14 +0000 (UTC)
	(envelope-from kensmith@cse.Buffalo.EDU)
Received: from phoebe.cse.buffalo.edu (phoebe.cse.buffalo.edu [128.205.32.89])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F3F18FC1A;
	Thu, 10 Sep 2009 15:24:14 +0000 (UTC)
Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76])
	(authenticated bits=0)
	by phoebe.cse.buffalo.edu (8.14.1/8.13.7) with ESMTP id n8AFO7c5037180
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 10 Sep 2009 11:24:13 -0400 (EDT)
	(envelope-from kensmith@cse.buffalo.edu)
From: Ken Smith 
To: John Baldwin 
In-Reply-To: <200909101118.22525.jhb@freebsd.org>
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
	<200909101118.22525.jhb@freebsd.org>
Content-Type: multipart/signed; micalg="pgp-sha1";
	protocol="application/pgp-signature";
	boundary="=-RPLxmuc3Ffg6rfHMXyCa"
Organization: U. Buffalo CSE Department
Date: Thu, 10 Sep 2009 11:24:07 -0400
Message-Id: <1252596247.75144.29.camel@bauer.cse.buffalo.edu>
Mime-Version: 1.0
X-Mailer: Evolution 2.24.5 FreeBSD GNOME Team Port 
X-DCC-Buffalo.EDU-Metrics: phoebe.cse.buffalo.edu 1335; Body=0 Fuz1=0 Fuz2=0
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults
 lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:24:14 -0000


--=-RPLxmuc3Ffg6rfHMXyCa
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2009-09-10 at 11:18 -0400, John Baldwin wrote:
> Having the=20
> debug symbols present is probably enough for that though since it is fair=
ly=20
> easy to enable crashdumps in rc.conf vs. having to build a new kernel jus=
t to=20
> get debug symbols.  Should we change the default behavior in 7?

I was waffling over that since it's a user-visible change in an already
established -stable branch...  :-(

There is another user-visible change coming (after 8.X is out I'll shift
stable/7 over to using TCP by default for NFS; we decided to go ahead
with that a while ago).  I could change the default behavior for crash
dumps as part of doing that saying it was an oversight on my part that
it didn't happen when stable/7 was first set up.

--=20
                                                Ken Smith
- From there to here, from here to      |       kensmith@cse.buffalo.edu
  there, funny things are everywhere.   |
                      - Theodore Geisel |


--=-RPLxmuc3Ffg6rfHMXyCa
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkqpGhcACgkQ/G14VSmup/YUZgCcC9/zJeEknk7OA5+AR2urpxLQ
QRkAnAg7AoySYJskX0BVaBOaMeiKGcdU
=Go2e
-----END PGP SIGNATURE-----

--=-RPLxmuc3Ffg6rfHMXyCa--


From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:27:09 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3E8A51065672;
	Thu, 10 Sep 2009 15:27:09 +0000 (UTC)
	(envelope-from ivoras@gmail.com)
Received: from mail-ew0-f208.google.com (mail-ew0-f208.google.com
	[209.85.219.208])
	by mx1.freebsd.org (Postfix) with ESMTP id 414D98FC0A;
	Thu, 10 Sep 2009 15:27:08 +0000 (UTC)
Received: by ewy4 with SMTP id 4so215563ewy.36
	for ; Thu, 10 Sep 2009 08:27:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:from:date:x-google-sender-auth:message-id:subject:to:cc
	:content-type:content-transfer-encoding;
	bh=Quf+yuqcxNb2w1HRgAhAS1HMW2gTAYVU0R4UDISe0J8=;
	b=ZWmSuSgRmwLBhWHfBHJ77d0OpZe2SYKmqiREqoFguEsgG2elLg7UTMlUWNwlWVhw2+
	b1BzaWbhUhRM72+89ZxUCNu5Q8sidiVPOduoyOt9PifbMdQUH57P8V8we2io6lyPBVKB
	FcUAgk7hVbIK675RIAQFxeiWUngVan4iNKCQ4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	b=nujie3Tho5UJL0grefJeZoaFHF3j0T5tlQb6VNHTFbRKKjiMMH9dG45VHiGnSn0TQO
	BdButVjkliAAzXi5fHkA0CUwn/NtB4+MpznMn1pFHlG3jR7AKSA2EQ5rX9PIoyrIg0FZ
	1wtgAKEJXabRK4cCisguuGoQCYNk+u3vQ77H8=
MIME-Version: 1.0
Sender: ivoras@gmail.com
Received: by 10.216.89.80 with SMTP id b58mr436145wef.73.1252595142430; Thu, 
	10 Sep 2009 08:05:42 -0700 (PDT)
In-Reply-To: <1252592951.49151.3.camel@buffy.york.ac.uk>
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<1252592951.49151.3.camel@buffy.york.ac.uk>
From: Ivan Voras 
Date: Thu, 10 Sep 2009 17:05:22 +0200
X-Google-Sender-Auth: 401e01abca55aebc
Message-ID: <9bbcef730909100805w279153e4nb304fd0d0c6c7d9c@mail.gmail.com>
To: Gavin Atkinson 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:27:09 -0000

2009/9/10 Gavin Atkinson :

> This seems like a step backwards to me: crash dumps have been left
> enabled in 7.x and have proved very useful from the point of view of
> improved quality of received PRs. =C2=A0I'm not aware of any problems
> relating to leaving them enabled.
>
> I'd appreciate it if this decision was reconsidered.

+1

Kernel symbols and crash dumps in 7 were useful.


--=20
f+rEnSIBITAhITAhLR1nM9F4cIs5KJrhbcsVtUIt7K1MhWJy1A=3D=3D

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:37:19 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B6FD106568D;
	Thu, 10 Sep 2009 15:37:19 +0000 (UTC)
	(envelope-from ivoras@gmail.com)
Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26])
	by mx1.freebsd.org (Postfix) with ESMTP id ABD588FC28;
	Thu, 10 Sep 2009 15:37:17 +0000 (UTC)
Received: by ey-out-2122.google.com with SMTP id 4so80173eyf.9
	for ; Thu, 10 Sep 2009 08:37:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:from:date:x-google-sender-auth:message-id:subject:to:cc
	:content-type:content-transfer-encoding;
	bh=Yeg2iHVA9rDtTmaZmvW+fzoDtbnSDW2j1xj4NYeuJ7U=;
	b=B49vyiZ+irSXAZS7Ac3yzapMIhqIwnJacwiNTaBDCQfZsbSSo/YhbK9crF2Z+5wOP/
	4FrKHWtfkQNUEf4MOlS3Kt2SBYLqyBlHizM/u8Ic9x4VILQztcexPsr6IpnzUeER/r3R
	afcMycgOWE+YdAwnQPooIKXw46pkmC1D0s2AA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	b=vUlFpOGJ6wjMpSFmvisC4SN2PeBIcZIjHNarIAFUFp5TtuC1J2pCnknFO0zh+DoURh
	6+Lg3j1tStfUf8mf12VKGxmylFM6JnaZMjN/dk2Ew26tpS4yoSd+tGq5TFM4RE5fiUR1
	ZlKk7s2/5CDs9TgoCAK1P58G9KVAUSRugz+Mc=
MIME-Version: 1.0
Sender: ivoras@gmail.com
Received: by 10.216.7.212 with SMTP id 62mr494977wep.92.1252597036478; Thu, 10 
	Sep 2009 08:37:16 -0700 (PDT)
In-Reply-To: <1252595839.75144.26.camel@bauer.cse.buffalo.edu>
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<1252592951.49151.3.camel@buffy.york.ac.uk> 
	<1252595839.75144.26.camel@bauer.cse.buffalo.edu>
From: Ivan Voras 
Date: Thu, 10 Sep 2009 17:36:56 +0200
X-Google-Sender-Auth: 0da9531aab6da75e
Message-ID: <9bbcef730909100836l3835825cy83082a2cfe4da0c3@mail.gmail.com>
To: Ken Smith 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: stable@freebsd.org, src-committers@freebsd.org, svn-src-stable@freebsd.org,
	svn-src-all@freebsd.org, Gavin Atkinson ,
	svn-src-stable-8@freebsd.org, Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:37:19 -0000

2009/9/10 Ken Smith :
> On Thu, 2009-09-10 at 15:29 +0100, Gavin Atkinson wrote:

>> This seems like a step backwards to me: crash dumps have been left
>> enabled in 7.x and have proved very useful from the point of view of
>> improved quality of received PRs. =C2=A0I'm not aware of any problems
>> relating to leaving them enabled.
>>
>> I'd appreciate it if this decision was reconsidered.
>>
>
> Unfortunately as I said before there is no "Right answer" for this one.

No, but there is an "80% right" one, based on the question: did the
change in 7 cause known problems for any significant number of users
(or one of two big users - that should be enough).

After all, if users were fine with crashdumps & symbols being enabled
in 7, they should be find with them being enabled in 8.

> If there is (a lot) more push-back on this we'll reconsider it.  But the
> AUTO setting is only appropriate for machines that are "actively being
> watched over".  In -stable branches we start to have people using it for
> large data centers full of machines that are only "partially watched
> over" at best as well as machines stuffed in phone closets in remote
> locations, etc.  Having the AUTO setting for situations like that can
> mean increased time for a reboot to happen, there is extra risk of the
> machine wedging and not rebooting at all (requiring manual intervention
> to get it back up), there is risk of disk space issues, etc.

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:40:15 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB6661065670;
	Thu, 10 Sep 2009 15:40:15 +0000 (UTC)
	(envelope-from freebsd@nagilum.org)
Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10])
	by mx1.freebsd.org (Postfix) with ESMTP id 5FB418FC1A;
	Thu, 10 Sep 2009 15:40:15 +0000 (UTC)
Received: from cakebox.homeunix.net (p5B2F11A5.dip0.t-ipconnect.de
	[91.47.17.165])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0MKsym-1MllYE1HmW-000llO; Thu, 10 Sep 2009 17:27:11 +0200
Received: from cakebox.homeunix.net (localhost [127.0.0.1])
	by cakebox.homeunix.net (Postfix) with ESMTP id 3F769689AE;
	Thu, 10 Sep 2009 17:26:19 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on cakebox.tis
X-Spam-Level: 
X-Spam-Status: No, score=-3.9 required=2.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
Received: by cakebox.homeunix.net (Postfix, from userid 80)
	id 1F4D7689AD; Thu, 10 Sep 2009 17:26:17 +0200 (CEST)
Received: from internal-host.emea.hpqcorp.net
	(internal-host.emea.hpqcorp.net [15.197.221.71]) by
	cakebox.homeunix.net
	(Horde Framework) with HTTP; Thu, 10 Sep 2009 17:26:15 +0200
Message-ID: <20090910172615.10546acbv5w0uykg@cakebox.homeunix.net>
Date: Thu, 10 Sep 2009 17:26:15 +0200
From: Alexander 
To: Ken Smith 
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<1252592951.49151.3.camel@buffy.york.ac.uk>
	<1252595839.75144.26.camel@bauer.cse.buffalo.edu>
In-Reply-To: <1252595839.75144.26.camel@bauer.cse.buffalo.edu>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=ISO-8859-2;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.2)
X-Provags-ID: V01U2FsdGVkX18OO29mwIt/da9bqgL1ReTn2Gl24+oU3nYUPwp
	HOsLpoy7qegZu7TQFZag83oZSrU5Iz91jKLF8GsMUNcp3vvvJG
	xnjGAMZ+dFspeFWMFEXbhtMWHpWHxpr
Cc: src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org,
	svn-src-all@FreeBSD.org, Gavin Atkinson ,
	svn-src-stable-8@FreeBSD.org, Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults
 lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:40:15 -0000


----- Message from kensmith@cse.Buffalo.EDU ---------
     Date: Thu, 10 Sep 2009 11:17:19 -0400
     From: Ken Smith 
  Subject: Re: svn commit: r197065 - in stable/8: etc/defaults  
lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf  
sys/pc98/conf sys/powerpc/conf sys/sparc64/conf
       To: Gavin Atkinson 
       Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org,  
src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org, Ken Smith  



> On Thu, 2009-09-10 at 15:29 +0100, Gavin Atkinson wrote:
>> On Thu, 2009-09-10 at 14:04 +0000, Ken Smith wrote:
>> > Author: kensmith
>> > Date: Thu Sep 10 14:04:00 2009
>> > New Revision: 197065
>> > URL: http://svn.freebsd.org/changeset/base/197065
>> >
>> > Log:
>> >   Remove extra debugging support that is turned on for head but turned off
>> >   for stable branches:
>> >
>> [...]
>> >   	- turn off automatic crash dumps
>> [...]
>> >
>> > Modified: stable/8/etc/defaults/rc.conf
>> >  
>> ==============================================================================
>> > --- stable/8/etc/defaults/rc.conf	Thu Sep 10 13:20:27 2009	(r197064)
>> > +++ stable/8/etc/defaults/rc.conf	Thu Sep 10 14:04:00 2009	(r197065)
>> > @@ -549,7 +549,7 @@ lpd_flags=""		# Flags to lpd (if enabled
>> >  nscd_enable="NO"	# Run the nsswitch caching daemon.
>> >  chkprintcap_enable="NO"	# Run chkprintcap(8) before running lpd.
>> >  chkprintcap_flags="-d"	# Create missing directories by default.
>> > -dumpdev="AUTO"		# Device to crashdump to (device name, AUTO, or NO).
>> > +dumpdev="NO"		# Device to crashdump to (device name, AUTO, or NO).
>> >  dumpdir="/var/crash"	# Directory where crash dumps are to be stored
>> >  savecore_flags=""	# Used if dumpdev is enabled above, and present.
>> >  crashinfo_enable="YES"	# Automatically generate crash dump summary.
>>

Since it's a change in default behaviour I think it should be noted in  
/usr/src/UPDATING.


> --
>                                                 Ken Smith
> - From there to here, from here to      |       kensmith@cse.buffalo.edu
>   there, funny things are everywhere.   |
>                       - Theodore Geisel |
>
>


----- End message from kensmith@cse.Buffalo.EDU -----




----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 15:43:35 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C462B106566B;
	Thu, 10 Sep 2009 15:43:35 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 97B798FC15;
	Thu, 10 Sep 2009 15:43:35 +0000 (UTC)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id 4213A46B53;
	Thu, 10 Sep 2009 11:43:35 -0400 (EDT)
Date: Thu, 10 Sep 2009 16:43:35 +0100 (BST)
From: Robert Watson 
X-X-Sender: robert@fledge.watson.org
To: John Baldwin 
In-Reply-To: <200909101118.22525.jhb@freebsd.org>
Message-ID: 
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
	<200909101118.22525.jhb@freebsd.org>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org,
	svn-src-all@freebsd.org, svn-src-stable-8@freebsd.org,
	Ken Smith , Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
 sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 15:43:35 -0000


On Thu, 10 Sep 2009, John Baldwin wrote:

>> It has been pointed out to me on the mailing lists that leaving it on for 
>> stable/7 was an oversight, it is off on previous branches.
>>
>> I can understand the motivation for it.  In a data center full of 
>> production machines crash dumps cause reboots to take longer and 
>> potentially cause disk space issues.  In those sorts of environments it's 
>> best if by *default* the crash dumps don't happen and if an admin finds 
>> they need it they turn it on.
>>
>> This is one of those "There is no right answer" things...
>
> Hmm, I thought the crashdumps were a conscious descision as part of another 
> change in 7.x (shipping with debug symbols enabled by default) to try to 
> make it easier to get more useful crash reports from stock kernels.  Having 
> the debug symbols present is probably enough for that though since it is 
> fairly easy to enable crashdumps in rc.conf vs. having to build a new kernel 
> just to get debug symbols.  Should we change the default behavior in 7?

I wonder if we could teach libkvm how to work directly from a crashdump in 
situ in the swap partition?  This would not fix "slower reboot times" but it 
would help a lot with the "running out of disk space" thing.  I see no reason 
at all we shouldn't be logging things like panics/stack traces for every crash 
in our normal logs -- in fact, that was much of the motivation for text dumps 
(and crashinfo too, no doubt): capture critical crash information in a compact 
way that can be e-maile around, etc, without the overhead of multi-gig dumps. 
Teaching libkvm how to work on crash dump partitions would let us avoid having 
the crashdump reside in the file system and help a lot with that problem.

Robert N M Watson
Computer Laboratory
University of Cambridge

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 16:03:12 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 539511065670;
	Thu, 10 Sep 2009 16:03:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 279B18FC19;
	Thu, 10 Sep 2009 16:03:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8AG3CLG024373;
	Thu, 10 Sep 2009 16:03:12 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8AG3CTS024372;
	Thu, 10 Sep 2009 16:03:12 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200909101603.n8AG3CTS024372@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 10 Sep 2009 16:03:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197069 - in stable/7/sys: . contrib/pf net
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 16:03:12 -0000

Author: jhb
Date: Thu Sep 10 16:03:11 2009
New Revision: 197069
URL: http://svn.freebsd.org/changeset/base/197069

Log:
  Hoist some mergeinfo up from sys/net to sys/.
  
  Reported by:	kib

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/net/   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 16:10:12 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4D0A41065676;
	Thu, 10 Sep 2009 16:10:12 +0000 (UTC) (envelope-from avg@freebsd.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
	by mx1.freebsd.org (Postfix) with ESMTP id 801268FC08;
	Thu, 10 Sep 2009 16:10:10 +0000 (UTC)
Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua
	[212.40.38.101])
	by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA24801;
	Thu, 10 Sep 2009 19:10:08 +0300 (EEST)
	(envelope-from avg@freebsd.org)
Message-ID: <4AA924DF.7080009@freebsd.org>
Date: Thu, 10 Sep 2009 19:10:07 +0300
From: Andriy Gapon 
User-Agent: Thunderbird 2.0.0.22 (X11/20090724)
MIME-Version: 1.0
To: John Baldwin 
References: <200909101603.n8AG3CTS024372@svn.freebsd.org>
In-Reply-To: <200909101603.n8AG3CTS024372@svn.freebsd.org>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r197069 - in stable/7/sys: . contrib/pf net
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 16:10:12 -0000

on 10/09/2009 19:03 John Baldwin said the following:
> Author: jhb
> Date: Thu Sep 10 16:03:11 2009
> New Revision: 197069
> URL: http://svn.freebsd.org/changeset/base/197069
> 
> Log:
>   Hoist some mergeinfo up from sys/net to sys/.
>   
>   Reported by:	kib

Perhaps it's possible to develop a commit hook that would reject mergeinfo being
set on some entities? E.g. individual files, or directories under sys.

-- 
Andriy Gapon

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 16:57:10 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DECE11065670;
	Thu, 10 Sep 2009 16:57:10 +0000 (UTC)
	(envelope-from remko@elvandar.org)
Received: from websrv01.jr-hosting.nl (websrv01.jr-hosting.nl [78.47.69.233])
	by mx1.freebsd.org (Postfix) with ESMTP id 934048FC17;
	Thu, 10 Sep 2009 16:57:10 +0000 (UTC)
Received: from a83-163-38-147.adsl.xs4all.nl ([83.163.38.147] helo=[10.0.2.66])
	by websrv01.jr-hosting.nl with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69 (FreeBSD)) (envelope-from )
	id 1MlmxJ-0001T4-4P; Thu, 10 Sep 2009 18:57:09 +0200
Mime-Version: 1.0 (Apple Message framework v1075.2)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
From: Remko Lodder 
In-Reply-To: 
Date: Thu, 10 Sep 2009 18:57:07 +0200
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
	<200909101118.22525.jhb@freebsd.org>
	
To: Robert Watson 
X-Mailer: Apple Mail (2.1075.2)
Cc: src-committers@freebsd.org, John Baldwin ,
	svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable-8@freebsd.org, Ken Smith ,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 16:57:11 -0000


On Sep 10, 2009, at 5:43 PM, Robert Watson wrote:

>
> On Thu, 10 Sep 2009, John Baldwin wrote:
>
>>> It has been pointed out to me on the mailing lists that leaving it  
>>> on for stable/7 was an oversight, it is off on previous branches.
>>>
>>> I can understand the motivation for it.  In a data center full of  
>>> production machines crash dumps cause reboots to take longer and  
>>> potentially cause disk space issues.  In those sorts of  
>>> environments it's best if by *default* the crash dumps don't  
>>> happen and if an admin finds they need it they turn it on.
>>>
>>> This is one of those "There is no right answer" things...
>>
>> Hmm, I thought the crashdumps were a conscious descision as part of  
>> another change in 7.x (shipping with debug symbols enabled by  
>> default) to try to make it easier to get more useful crash reports  
>> from stock kernels.  Having the debug symbols present is probably  
>> enough for that though since it is fairly easy to enable crashdumps  
>> in rc.conf vs. having to build a new kernel just to get debug  
>> symbols.  Should we change the default behavior in 7?
>
> I wonder if we could teach libkvm how to work directly from a  
> crashdump in situ in the swap partition?  This would not fix "slower  
> reboot times" but it would help a lot with the "running out of disk  
> space" thing.  I see no reason at all we shouldn't be logging things  
> like panics/stack traces for every crash in our normal logs -- in  
> fact, that was much of the motivation for text dumps (and crashinfo  
> too, no doubt): capture critical crash information in a compact way  
> that can be e-maile around, etc, without the overhead of multi-gig  
> dumps. Teaching libkvm how to work on crash dump partitions would  
> let us avoid having the crashdump reside in the file system and help  
> a lot with that problem.
>
> Robert N M Watson
> Computer Laboratory
> University of Cambridge

I agree with that; it would (!) help the bugbusting team in gathering  
required information. If there is an way to automate crashdumps and  
proper reporting and stick that in /var/crash/crash.$date or something  
and tell people that
they can report their problems on the bugs list where needed, we have  
information upfront. I still remember the time where we had to chase  
people to get this information, sometimes never being able to properly  
get the information.
If it is there by default, it will help.

Please consider keeping it enabled..

Thanks,
Remko

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 17:00:31 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87D231065693;
	Thu, 10 Sep 2009 17:00:31 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 57BCF8FC36;
	Thu, 10 Sep 2009 17:00:31 +0000 (UTC)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id D11C646B03;
	Thu, 10 Sep 2009 13:00:30 -0400 (EDT)
Date: Thu, 10 Sep 2009 18:00:30 +0100 (BST)
From: Robert Watson 
X-X-Sender: robert@fledge.watson.org
To: Remko Lodder 
In-Reply-To: 
Message-ID: 
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
	<200909101118.22525.jhb@freebsd.org>
	
	
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: src-committers@freebsd.org, John Baldwin ,
	svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable-8@freebsd.org, Ken Smith ,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
 sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 17:00:31 -0000


On Thu, 10 Sep 2009, Remko Lodder wrote:

> I agree with that; it would (!) help the bugbusting team in gathering 
> required information. If there is an way to automate crashdumps and proper 
> reporting and stick that in /var/crash/crash.$date or something and tell 
> people that they can report their problems on the bugs list where needed, we 
> have information upfront. I still remember the time where we had to chase 
> people to get this information, sometimes never being able to properly get 
> the information. If it is there by default, it will help.
>
> Please consider keeping it enabled..

Well, John's crashinfo(8) tool from Yahoo! does all this, the only "problem" 
is that it requires extracting the crashdump to a local file system.  It seems 
like we have a lot of the right ingredients, maybe we can have a 
brain-storming session on distributed diagnostics and debugging at the 
Devsummit on how to find some better middle grounds here.

Robert N M Watson
Computer Laboratory
University of Cambridge

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 17:58:00 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 882B81065670;
	Thu, 10 Sep 2009 17:58:00 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 56DF68FC19;
	Thu, 10 Sep 2009 17:58:00 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 07B3246B06;
	Thu, 10 Sep 2009 13:58:00 -0400 (EDT)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 6A9D98A01B;
	Thu, 10 Sep 2009 13:57:59 -0400 (EDT)
From: John Baldwin 
To: Andriy Gapon 
Date: Thu, 10 Sep 2009 13:27:22 -0400
User-Agent: KMail/1.9.7
References: <200909101603.n8AG3CTS024372@svn.freebsd.org>
	<4AA924DF.7080009@freebsd.org>
In-Reply-To: <4AA924DF.7080009@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200909101327.23113.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 10 Sep 2009 13:57:59 -0400 (EDT)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r197069 - in stable/7/sys: . contrib/pf net
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 17:58:00 -0000

On Thursday 10 September 2009 12:10:07 pm Andriy Gapon wrote:
> on 10/09/2009 19:03 John Baldwin said the following:
> > Author: jhb
> > Date: Thu Sep 10 16:03:11 2009
> > New Revision: 197069
> > URL: http://svn.freebsd.org/changeset/base/197069
> > 
> > Log:
> >   Hoist some mergeinfo up from sys/net to sys/.
> >   
> >   Reported by:	kib
> 
> Perhaps it's possible to develop a commit hook that would reject mergeinfo being
> set on some entities? E.g. individual files, or directories under sys.

In some cases it is valid to add the mergeinfo, though that is probably
restricted to certain subdirectories (contrib, cddl, crypto).  I don't know
enough of the SVN internals to look at doing that.

-- 
John Baldwin

From owner-svn-src-stable@FreeBSD.ORG  Thu Sep 10 20:31:34 2009
Return-Path: 
Delivered-To: svn-src-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5026710656AA;
	Thu, 10 Sep 2009 20:31:34 +0000 (UTC)
	(envelope-from brooks@lor.one-eyed-alien.net)
Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net
	[IPv6:2001:4830:1200:a1::2])
	by mx1.freebsd.org (Postfix) with ESMTP id A19D18FC08;
	Thu, 10 Sep 2009 20:31:33 +0000 (UTC)
Received: from lor.one-eyed-alien.net (localhost [127.0.0.1])
	by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n8AKVuXk056518; 
	Thu, 10 Sep 2009 15:31:56 -0500 (CDT)
	(envelope-from brooks@lor.one-eyed-alien.net)
Received: (from brooks@localhost)
	by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n8AKVuU7056517;
	Thu, 10 Sep 2009 15:31:56 -0500 (CDT) (envelope-from brooks)
Date: Thu, 10 Sep 2009 15:31:56 -0500
From: Brooks Davis 
To: Ivan Voras 
Message-ID: <20090910203156.GA55545@lor.one-eyed-alien.net>
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<1252592951.49151.3.camel@buffy.york.ac.uk>
	<1252595839.75144.26.camel@bauer.cse.buffalo.edu>
	<9bbcef730909100836l3835825cy83082a2cfe4da0c3@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL"
Content-Disposition: inline
In-Reply-To: <9bbcef730909100836l3835825cy83082a2cfe4da0c3@mail.gmail.com>
User-Agent: Mutt/1.5.17 (2007-11-01)
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0
	(lor.one-eyed-alien.net [127.0.0.1]);
	Thu, 10 Sep 2009 15:31:57 -0500 (CDT)
Cc: stable@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org,
	svn-src-all@FreeBSD.org, Gavin Atkinson ,
	svn-src-stable-8@FreeBSD.org, Ken Smith ,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults
	lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf
	sys/pc98/conf sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 10 Sep 2009 20:31:34 -0000


--vtzGhvizbBRQ85DL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 10, 2009 at 05:36:56PM +0200, Ivan Voras wrote:
> 2009/9/10 Ken Smith :
> > On Thu, 2009-09-10 at 15:29 +0100, Gavin Atkinson wrote:
>=20
> >> This seems like a step backwards to me: crash dumps have been left
> >> enabled in 7.x and have proved very useful from the point of view of
> >> improved quality of received PRs. ??I'm not aware of any problems
> >> relating to leaving them enabled.
> >>
> >> I'd appreciate it if this decision was reconsidered.
> >>
> >
> > Unfortunately as I said before there is no "Right answer" for this one.
>=20
> No, but there is an "80% right" one, based on the question: did the
> change in 7 cause known problems for any significant number of users
> (or one of two big users - that should be enough).

Given that we've shipped three releases with it this way we should have
an answer here.  If we can't identify real problem instances by now,
there probably aren't significant ones in practice.  IMO, we have always
gone too far in disabling debugging.

-- Brooks

--vtzGhvizbBRQ85DL
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iD8DBQFKqWI7XY6L6fI4GtQRApVRAJ9lNRRakKrMBkKAk7k86/LTCDc8FgCglCMY
UU+/Ic0xHH2niGUX7iXKafs=
=Mye5
-----END PGP SIGNATURE-----

--vtzGhvizbBRQ85DL--

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 06:27:06 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E56A81065670;
	Fri, 11 Sep 2009 06:27:05 +0000 (UTC)
	(envelope-from jasonh@DataIX.net)
Received: from www6.pairlite.com (www6.pairlite.com [64.130.10.16])
	by mx1.freebsd.org (Postfix) with ESMTP id B3B218FC1B;
	Fri, 11 Sep 2009 06:27:05 +0000 (UTC)
Received: from firewall.5p.local (unknown [99.19.41.238])
	by www6.pairlite.com (Postfix) with ESMTP id 69213B827;
	Fri, 11 Sep 2009 02:01:00 -0400 (EDT)
Date: Fri, 11 Sep 2009 02:00:58 -0400
From: "Jason J. Hellenthal" 
To: Robert Watson 
In-Reply-To: 
Message-ID: 
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
	<200909101118.22525.jhb@freebsd.org>
	
	
	
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
X-OpenPGP-Key-ID: 0x691411AC
X-OpenPGP-Key-Fingerprint: 6F56 3B10 D8AD 1D33 96E7  5946 E3B6 2768 6914 11AC
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: Remko Lodder , John Baldwin ,
	svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	Ken Smith , Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
 sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: "Jason J. Hellenthal" 
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 06:27:06 -0000

On Thu, 10 Sep 2009 13:00 -0000, rwatson wrote:

>
> On Thu, 10 Sep 2009, Remko Lodder wrote:
>
>> I agree with that; it would (!) help the bugbusting team in gathering 
>> required information. If there is an way to automate crashdumps and proper 
>> reporting and stick that in /var/crash/crash.$date or something and tell 
>> people that they can report their problems on the bugs list where needed, 
>> we have information upfront. I still remember the time where we had to 
>> chase people to get this information, sometimes never being able to 
>> properly get the information. If it is there by default, it will help.
>> 
>> Please consider keeping it enabled..
>
> Well, John's crashinfo(8) tool from Yahoo! does all this, the only "problem" 
> is that it requires extracting the crashdump to a local file system.  It 
> seems like we have a lot of the right ingredients, maybe we can have a 
> brain-storming session on distributed diagnostics and debugging at the 
> Devsummit on how to find some better middle grounds here.
>
> Robert N M Watson
> Computer Laboratory
> University of Cambridge
> 
>

If I may, I would like to introduce a distributed targeting system to this 
conversation in addition to crashinfo. Given with the above conversations I cant 
help but think that in a case like this it would be helpful to setup a central 
database for collection of information and write a little bit more code into 
crashinfo for uuencoding a blob to send through email or maybe another way so 
data can be collected, sorted & analyzed with statistics spilled out into a web 
page for review.

A rough overview of enabling this would be done through a rcvar that would 
auto-enable crash dumps, crashinfo & the reporting system together. As for the 
client ( does not exist yet. or maybe there is something similar ). But this 
would be just a opt-in type of rcvar that should be enabled by default for 
-CURRENT possibly -STABLE but off for all -RELEASE.

I would like to think that something like this would certainly improve 
development by help programmers focus specifically on areas that need attention 
while not having to hunt down core dumps for specific circumstances. And mostly 
amazing at the number of people that are willing to turn these things on.

RFC???

Best regards

PS: I most certainly would love to volunteer whatever I could do to make this 
happen.

-- 

  Jason J. Hellenthal
  http://www.DataIX.net/
  jasonh@DataIX.net
  0x691411AC

  - (2^(N-1))

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 07:22:34 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 62CF31065670;
	Fri, 11 Sep 2009 07:22:34 +0000 (UTC) (envelope-from des@des.no)
Received: from tim.des.no (tim.des.no [194.63.250.121])
	by mx1.freebsd.org (Postfix) with ESMTP id 124A68FC17;
	Fri, 11 Sep 2009 07:22:33 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 154116D452;
	Fri, 11 Sep 2009 07:22:33 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id E8678844C4; Fri, 11 Sep 2009 09:22:32 +0200 (CEST)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: "Jason J. Hellenthal" 
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
	<200909101118.22525.jhb@freebsd.org>
	
	
	
	
Date: Fri, 11 Sep 2009 09:22:32 +0200
In-Reply-To:  (Jason
	J. Hellenthal's message of "Fri, 11 Sep 2009 02:00:58 -0400")
Message-ID: <86tyza6j47.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Fri, 11 Sep 2009 11:12:49 +0000
Cc: Remko Lodder , John Baldwin ,
	svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Robert Watson ,
	svn-src-stable-8@freebsd.org, Ken Smith ,
	Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 07:22:34 -0000

"Jason J. Hellenthal"  writes:
> If I may, I would like to introduce a distributed targeting system to
> this conversation in addition to crashinfo. Given with the above
> conversations I cant help but think that in a case like this it would
> be helpful to setup a central database for collection of information
> and write a little bit more code into crashinfo for uuencoding a blob
> to send through email or maybe another way so data can be collected,
> sorted & analyzed with statistics spilled out into a web page for
> review.

It's a good idea in principle, but I'm worried that such a system might
get flooded with crash reports from people running old -STABLE versions
and / or local patches.  There is no way we can control that, neither in
the client script nor at the receiving end.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 12:56:14 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 47316106566C;
	Fri, 11 Sep 2009 12:56:14 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 355658FC13;
	Fri, 11 Sep 2009 12:56:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BCuDgF052682;
	Fri, 11 Sep 2009 12:56:13 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BCuD0X052680;
	Fri, 11 Sep 2009 12:56:13 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909111256.n8BCuD0X052680@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 11 Sep 2009 12:56:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197087 - in stable/8/sys: . amd64/include/xen
	cddl/compat/opensolaris/kern cddl/contrib/opensolaris
	contrib/dev/acpica contrib/pf dev/xen/xenpci
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 12:56:14 -0000

Author: kib
Date: Fri Sep 11 12:56:13 2009
New Revision: 197087
URL: http://svn.freebsd.org/changeset/base/197087

Log:
  MFC r196966:
  Lock Giant around vn_open_cred().
  Remove innocent unnecessary call to NDFREE().
  
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
==============================================================================
--- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c	Fri Sep 11 11:42:56 2009	(r197086)
+++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c	Fri Sep 11 12:56:13 2009	(r197087)
@@ -69,7 +69,7 @@ kobj_open_file_vnode(const char *file)
 	struct thread *td = curthread;
 	struct filedesc *fd;
 	struct nameidata nd;
-	int error, flags;
+	int error, flags, vfslocked;
 
 	fd = td->td_proc->p_fd;
 	FILEDESC_XLOCK(fd);
@@ -86,11 +86,13 @@ kobj_open_file_vnode(const char *file)
 	flags = FREAD | O_NOFOLLOW;
 	NDINIT(&nd, LOOKUP, MPSAFE, UIO_SYSSPACE, file, td);
 	error = vn_open_cred(&nd, &flags, 0, 0, curthread->td_ucred, NULL);
-	NDFREE(&nd, NDF_ONLY_PNBUF);
 	if (error != 0)
 		return (NULL);
+	vfslocked = NDHASGIANT(&nd);
+	NDFREE(&nd, NDF_ONLY_PNBUF);
 	/* We just unlock so we hold a reference. */
 	VOP_UNLOCK(nd.ni_vp, 0);
+	VFS_UNLOCK_GIANT(vfslocked);
 	return (nd.ni_vp);
 }
 

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 13:46:28 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A520E1065679;
	Fri, 11 Sep 2009 13:46:28 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 934F58FC0C;
	Fri, 11 Sep 2009 13:46:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BDkSn9053691;
	Fri, 11 Sep 2009 13:46:28 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BDkSDe053689;
	Fri, 11 Sep 2009 13:46:28 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200909111346.n8BDkSDe053689@svn.freebsd.org>
From: Ken Smith 
Date: Fri, 11 Sep 2009 13:46:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197088 - in stable/8/release: . doc scripts
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 13:46:28 -0000

Author: kensmith
Date: Fri Sep 11 13:46:28 2009
New Revision: 197088
URL: http://svn.freebsd.org/changeset/base/197088

Log:
  MFC r196942:
  > Bring the layout of package-split.py more in line with where we're going
  > with packages on the release media.  It looks like we'll be putting just
  > the doc packages on the new "memory stick" image as well as disc1.  There
  > will be no other packages on the CDROM-sized media.  The DVD sized media
  > will include the doc packages plus whatever other packages we decide to
  > make part of the release.
  >
  > This commit just brings the basic structure in line with being able to
  > do this.  We still need to discuss with various people exactly which
  > packages will be included on the DVD.
  >
  > If the environement variable "PKG_DVD" is set a tree suitable for the
  > DVD media is generated.  Otherwise a tree suitable for the "memory stick"
  > and disc1 is generated.
  
  Approved by:	re (kib)

Modified:
  stable/8/release/   (props changed)
  stable/8/release/doc/   (props changed)
  stable/8/release/scripts/package-split.py

Modified: stable/8/release/scripts/package-split.py
==============================================================================
--- stable/8/release/scripts/package-split.py	Fri Sep 11 12:56:13 2009	(r197087)
+++ stable/8/release/scripts/package-split.py	Fri Sep 11 13:46:28 2009	(r197088)
@@ -23,71 +23,14 @@ if 'PKG_VERBOSE' in os.environ:
 else:
     verbose = 0
 
-# List of packages for disc1.  This just includes packages sysinstall can
-# install as a distribution
-def disc1_packages():
-    pkgs = ['lang/perl5.8']
-    pkgs.extend(['x11/xorg',
-                 'devel/imake'])
-    if arch == 'i386':
-        pkgs.append('emulators/linux_base-fc4')
-    return pkgs
-
-# List of packages for disc2.  This includes packages that the X desktop
-# menu depends on (if it still exists) and other "nice to have" packages.
-# For architectures that use a separate livefs, this is actually disc3.
-def disc2_packages():
-            # X Desktops
-    if arch == 'ia64':
-	pkgs = ['x11/gnome2-lite',
-		'x11/kde-lite']
-    else:
-	pkgs = ['x11/gnome2',
-		'x11/kde3']
-    pkgs.extend(['x11-wm/afterstep',
-            'x11-wm/windowmaker',
-            'x11-wm/fvwm2',
-            # "Nice to have"
-            'archivers/unzip',
-            'astro/xearth',                 
-            'devel/gmake',
-            'editors/emacs',
-            'editors/vim-lite',
-            'emulators/mtools',
-            'graphics/png',
-            'graphics/xv',
-            'irc/xchat',
-            'mail/exim',
-            'mail/fetchmail',
-            'mail/mutt',
-            'mail/pine4',
-            'mail/popd',
-            'mail/xfmail',
-            'mail/postfix',
-            'net/cvsup-without-gui',
-            'net/rsync',
-            'net/samba3',
-            'news/slrn',
-            'news/tin',
-            'ports-mgmt/portupgrade',
-            'print/a2ps-letter',
-            'print/apsfilter',
-            'print/ghostscript-gnu-nox11',
-            'print/gv',
-            'print/psutils-letter',
-            'shells/bash',
-            'shells/pdksh',
-            'shells/zsh',
-            'security/sudo',
-            'www/links',
-            'www/lynx',
-            'x11/rxvt',
-            # Formerly on disc3
-            'ports-mgmt/portaudit'])
-    return pkgs
+if 'PKG_DVD' in os.environ:
+    doing_dvd = 1
+else:
+    doing_dvd = 0
 
-def docs_packages():
-    pkgs = ['misc/freebsd-doc-bn',
+# List of packages for disc1.
+def disc1_packages():
+    pkgs = ['misc/freebsd-doc-bn', 
 	    'misc/freebsd-doc-da',
 	    'misc/freebsd-doc-de',
 	    'misc/freebsd-doc-el',
@@ -106,14 +49,58 @@ def docs_packages():
 	    'misc/freebsd-doc-tr',
 	    'misc/freebsd-doc-zh_cn',
 	    'misc/freebsd-doc-zh_tw']
+
+    if doing_dvd:
+	pkgs.extend(['lang/perl5.8',
+	    'x11/xorg',
+	    'devel/imake',
+	    'emulators/linux_base-fc4',
+	    'x11/gnome2',
+	    'x11/kde4',
+	    'x11-wm/afterstep',
+	    'x11-wm/windowmaker',
+	    'x11-wm/fvwm2',
+	    'archivers/unzip',
+	    'astro/xearth',
+	    'devel/gmake',
+	    'editors/emacs',
+	    'editors/vim-lite',
+	    'emulators/mtools',
+	    'graphics/png',
+	    'graphics/xv',
+	    'irc/xchat',
+	    'mail/exim',
+	    'mail/fetchmail',
+	    'mail/mutt',
+	    'mail/alpine',
+	    'mail/popd',
+	    'mail/xfmail',
+	    'mail/postfix',
+	    'net/cvsup-without-gui',
+	    'net/rsync',
+	    'net/samba3',
+	    'news/slrn',
+	    'news/tin',
+	    'ports-mgmt/portupgrade',
+	    'print/a2ps-letter',
+	    'print/apsfilter',
+	    'print/ghostscript7-nox11',
+	    'print/gv',
+	    'print/psutils-letter',
+	    'shells/bash',
+	    'shells/pdksh',
+	    'shells/zsh',
+	    'security/sudo',
+	    'www/links',
+	    'www/lynx',
+	    'x11/rxvt',
+	    'ports-mgmt/portaudit'])
     return pkgs
 
 # The list of desired packages
 def desired_packages():
     disc1 = disc1_packages()
-    disc2 = disc2_packages()
-    docs = docs_packages()
-    return [disc1, disc2, docs]
+    return [disc1]
 
 # Suck the entire INDEX file into a two different dictionaries.  The first
 # dictionary maps port names (origins) to package names.  The second

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 15:07:36 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BAC0C106568D;
	Fri, 11 Sep 2009 15:07:36 +0000 (UTC)
	(envelope-from syrinx@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A92898FC26;
	Fri, 11 Sep 2009 15:07:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BF7aUO055392;
	Fri, 11 Sep 2009 15:07:36 GMT (envelope-from syrinx@svn.freebsd.org)
Received: (from syrinx@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BF7aWI055390;
	Fri, 11 Sep 2009 15:07:36 GMT (envelope-from syrinx@svn.freebsd.org)
Message-Id: <200909111507.n8BF7aWI055390@svn.freebsd.org>
From: Shteryana Shopova 
Date: Fri, 11 Sep 2009 15:07:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197089 - stable/8/sys/netinet
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 15:07:36 -0000

Author: syrinx
Date: Fri Sep 11 15:07:36 2009
New Revision: 197089
URL: http://svn.freebsd.org/changeset/base/197089

Log:
  MFC r196932:
  
  When joining a multicast group, the inp_lookup_mcast_ifp call
  does a KASSERT that the group address is multicast, so the
  check if this is indeed true and eventually return a EINVAL if not,
  should be done before calling inp_lookup_mcast_ifp. This fixes a kernel
  crash when calling setsockopt (sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,...)
  with invalid group address.
  
  Reviewed by:	bms
  Approved by:	re (kib)

Modified:
  stable/8/sys/netinet/in_mcast.c

Modified: stable/8/sys/netinet/in_mcast.c
==============================================================================
--- stable/8/sys/netinet/in_mcast.c	Fri Sep 11 13:46:28 2009	(r197088)
+++ stable/8/sys/netinet/in_mcast.c	Fri Sep 11 15:07:36 2009	(r197089)
@@ -1899,6 +1899,9 @@ inp_join_group(struct inpcb *inp, struct
 			ssa->sin.sin_addr = mreqs.imr_sourceaddr;
 		}
 
+		if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr)))
+			return (EINVAL);
+
 		ifp = inp_lookup_mcast_ifp(inp, &gsa->sin,
 		    mreqs.imr_interface);
 		CTR3(KTR_IGMPV3, "%s: imr_interface = %s, ifp = %p",
@@ -1936,6 +1939,9 @@ inp_join_group(struct inpcb *inp, struct
 			ssa->sin.sin_port = 0;
 		}
 
+		if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr)))
+			return (EINVAL);
+
 		if (gsr.gsr_interface == 0 || V_if_index < gsr.gsr_interface)
 			return (EADDRNOTAVAIL);
 		ifp = ifnet_byindex(gsr.gsr_interface);
@@ -1948,9 +1954,6 @@ inp_join_group(struct inpcb *inp, struct
 		break;
 	}
 
-	if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr)))
-		return (EINVAL);
-
 	if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0)
 		return (EADDRNOTAVAIL);
 

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 15:19:30 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 11CE61065670;
	Fri, 11 Sep 2009 15:19:30 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id D10A48FC19;
	Fri, 11 Sep 2009 15:19:29 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 7360946B2A;
	Fri, 11 Sep 2009 11:19:29 -0400 (EDT)
Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 8D4488A020;
	Fri, 11 Sep 2009 11:19:28 -0400 (EDT)
From: John Baldwin 
To: "Jason J. Hellenthal" 
Date: Fri, 11 Sep 2009 11:11:51 -0400
User-Agent: KMail/1.9.7
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	
	
In-Reply-To: 
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200909111111.52627.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Fri, 11 Sep 2009 11:19:28 -0400 (EDT)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE
	autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: Remko Lodder , svn-src-stable@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Robert Watson , svn-src-stable-8@freebsd.org,
	Ken Smith , Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 15:19:30 -0000

On Friday 11 September 2009 2:00:58 am Jason J. Hellenthal wrote:
> On Thu, 10 Sep 2009 13:00 -0000, rwatson wrote:
> 
> >
> > On Thu, 10 Sep 2009, Remko Lodder wrote:
> >
> >> I agree with that; it would (!) help the bugbusting team in gathering 
> >> required information. If there is an way to automate crashdumps and proper 
> >> reporting and stick that in /var/crash/crash.$date or something and tell 
> >> people that they can report their problems on the bugs list where needed, 
> >> we have information upfront. I still remember the time where we had to 
> >> chase people to get this information, sometimes never being able to 
> >> properly get the information. If it is there by default, it will help.
> >> 
> >> Please consider keeping it enabled..
> >
> > Well, John's crashinfo(8) tool from Yahoo! does all this, the only "problem" 
> > is that it requires extracting the crashdump to a local file system.  It 
> > seems like we have a lot of the right ingredients, maybe we can have a 
> > brain-storming session on distributed diagnostics and debugging at the 
> > Devsummit on how to find some better middle grounds here.
> >
> > Robert N M Watson
> > Computer Laboratory
> > University of Cambridge
> > 
> >
> 
> If I may, I would like to introduce a distributed targeting system to this 
> conversation in addition to crashinfo. Given with the above conversations I cant 
> help but think that in a case like this it would be helpful to setup a central 
> database for collection of information and write a little bit more code into 
> crashinfo for uuencoding a blob to send through email or maybe another way so 
> data can be collected, sorted & analyzed with statistics spilled out into a web 
> page for review.

My previous job actually stored the output of a crashinfo-like script for
each panic into a database along with metadata such as a one-line summary
(it even had some limited ability to auto-tag known panics).  However, it
required a good chunk of time *every* day to check new panics received each
day to see if any were not previously seen before, or new variants on an old
panic, etc.  The time was non-trivial and I do not think would scale well to
the all-FreeBSD-users universe.

-- 
John Baldwin

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 16:53:12 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D24AB1065695;
	Fri, 11 Sep 2009 16:53:12 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BF6A88FC19;
	Fri, 11 Sep 2009 16:53:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BGrCn2057725;
	Fri, 11 Sep 2009 16:53:12 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BGrCd3057722;
	Fri, 11 Sep 2009 16:53:12 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <200909111653.n8BGrCd3057722@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 11 Sep 2009 16:53:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197093 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/e1000 dev/xen/xenpci
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 16:53:13 -0000

Author: jfv
Date: Fri Sep 11 16:53:12 2009
New Revision: 197093
URL: http://svn.freebsd.org/changeset/base/197093

Log:
  This fixes kern/138516, an mbuf leak in both the em
  and igb driver, when a transmit fails the packet/mbuf
  was not being requeued. Thanks to those that pointed
  this problem out.
  
  Approved by:  re

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/if_em.c
  stable/8/sys/dev/e1000/if_igb.c
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/e1000/if_em.c
==============================================================================
--- stable/8/sys/dev/e1000/if_em.c	Fri Sep 11 15:38:27 2009	(r197092)
+++ stable/8/sys/dev/e1000/if_em.c	Fri Sep 11 16:53:12 2009	(r197093)
@@ -1034,9 +1034,10 @@ em_mq_start_locked(struct ifnet *ifp, st
 		return (error);
 	} else if (drbr_empty(ifp, adapter->br) &&
 	    (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) {
-		if (em_xmit(adapter, &m)) {
-			if (m && (error = drbr_enqueue(ifp, adapter->br, m)) != 0)
-				return (error);
+		if ((error = em_xmit(adapter, &m)) != 0) {
+			if (m != NULL)
+				error = drbr_enqueue(ifp, adapter->br, m);
+			return (error);
 		} else {
 			/*
 			 * We've bypassed the buf ring so we need to update
@@ -1063,8 +1064,12 @@ process:
                 next = drbr_dequeue(ifp, adapter->br);
                 if (next == NULL)
                         break;
-                if (em_xmit(adapter, &next))
+                if ((error = em_xmit(adapter, &next)) != 0) {
+			if (next != NULL)
+				error = drbr_enqueue(ifp, adapter->br, next);
                         break;
+		}
+		drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
                 ETHER_BPF_MTAP(ifp, next);
                 /* Set the watchdog */
                 adapter->watchdog_timer = EM_TX_TIMEOUT;
@@ -1073,7 +1078,7 @@ process:
         if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD)
                 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 
-	return (0);
+	return (error);
 }
 
 /*

Modified: stable/8/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/8/sys/dev/e1000/if_igb.c	Fri Sep 11 15:38:27 2009	(r197092)
+++ stable/8/sys/dev/e1000/if_igb.c	Fri Sep 11 16:53:12 2009	(r197093)
@@ -854,9 +854,10 @@ igb_mq_start_locked(struct ifnet *ifp, s
 
 	/* If nothing queued go right to xmit */
 	if (drbr_empty(ifp, txr->br)) {
-		if (igb_xmit(txr, &m)) {
-			if (m && (err = drbr_enqueue(ifp, txr->br, m)) != 0)
-                                return (err);
+		if ((err = igb_xmit(txr, &m)) != 0) {
+			if (m != NULL)
+				err = drbr_enqueue(ifp, txr->br, m);
+			return (err);
 		} else {
 			/* Success, update stats */
 			drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags);
@@ -880,8 +881,12 @@ process:
 		next = drbr_dequeue(ifp, txr->br);
 		if (next == NULL)
 			break;
-		if (igb_xmit(txr, &next))
+		if ((err = igb_xmit(txr, &next)) != 0) {
+			if (next != NULL)
+				err = drbr_enqueue(ifp, txr->br, next);
 			break;
+		}
+		drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
 		ETHER_BPF_MTAP(ifp, next);
 		/* Set the watchdog */
 		txr->watchdog_timer = IGB_TX_TIMEOUT;
@@ -1531,8 +1536,11 @@ igb_update_aim(struct rx_ring *rxr)
 	if (olditr != newitr) {
 		/* Change interrupt rate */
 		rxr->eitr_setting = newitr;
-		E1000_WRITE_REG(&adapter->hw, E1000_EITR(rxr->me),
-		    newitr | (newitr << 16));
+		if (adapter->hw.mac.type == e1000_82575)
+			newitr |= newitr << 16;
+		else
+			newitr |= 0x8000000;
+		E1000_WRITE_REG(&adapter->hw, E1000_EITR(rxr->me), newitr);
 	}
 
 	rxr->bytes = 0;

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 17:12:44 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 730FC106566C;
	Fri, 11 Sep 2009 17:12:44 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 618998FC14;
	Fri, 11 Sep 2009 17:12:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BHCium058174;
	Fri, 11 Sep 2009 17:12:44 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BHCikr058172;
	Fri, 11 Sep 2009 17:12:44 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200909111712.n8BHCikr058172@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 11 Sep 2009 17:12:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197094 - in stable/7/sys: . contrib/pf dev/mii
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 17:12:44 -0000

Author: yongari
Date: Fri Sep 11 17:12:43 2009
New Revision: 197094
URL: http://svn.freebsd.org/changeset/base/197094

Log:
  MFC r196366:
    Backout r193289. r193289 restored page select bits to previous
    value instead of blindly resetting it to 0. However, it seems page
    select bits of some 88E1116 PHY is initialized to invalid one such
    that restoring page select bits after programming broke MII
    register access. The correct solution would be reset page select
    bits to 0 in PHY attach stage but it would require more testing.
    Since we're in BETA stage such a change would be dangerous so just
    back it out.
    This change should fix nfe(4) breakage on NVIDIA MCP55.
  
    Reported by:	Ryan Rogers < webmaster <> doghouserepair dot com >
  		Sam Fourman Jr. < sfourman <> gmail dot com >
    Tested by:	Ryan Rogers < webmaster <> doghouserepair dot com >
  		Sam Fourman Jr. < sfourman <> gmail dot com >

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/mii/e1000phy.c

Modified: stable/7/sys/dev/mii/e1000phy.c
==============================================================================
--- stable/7/sys/dev/mii/e1000phy.c	Fri Sep 11 16:53:12 2009	(r197093)
+++ stable/7/sys/dev/mii/e1000phy.c	Fri Sep 11 17:12:43 2009	(r197094)
@@ -239,13 +239,11 @@ e1000phy_reset(struct mii_softc *sc)
 
 		if (esc->mii_model == MII_MODEL_MARVELL_E1116 ||
 		    esc->mii_model == MII_MODEL_MARVELL_E1149) {
-			page = PHY_READ(sc, E1000_EADR);
-			/* Select page 2, MAC specific control register. */
 			PHY_WRITE(sc, E1000_EADR, 2);
 			reg = PHY_READ(sc, E1000_SCR);
 			reg |= E1000_SCR_RGMII_POWER_UP;
 			PHY_WRITE(sc, E1000_SCR, reg);
-			PHY_WRITE(sc, E1000_EADR, page);
+			PHY_WRITE(sc, E1000_EADR, 0);
 		}
 	}
 

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 17:15:18 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DBF6F1065676;
	Fri, 11 Sep 2009 17:15:18 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B214B8FC1D;
	Fri, 11 Sep 2009 17:15:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BHFI8v058285;
	Fri, 11 Sep 2009 17:15:18 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BHFIgW058282;
	Fri, 11 Sep 2009 17:15:18 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200909111715.n8BHFIgW058282@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 11 Sep 2009 17:15:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197095 - in stable/7/sys: . contrib/pf dev/re pci
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 17:15:19 -0000

Author: yongari
Date: Fri Sep 11 17:15:18 2009
New Revision: 197095
URL: http://svn.freebsd.org/changeset/base/197095

Log:
  MFC r196516:
    Add RTL8168DP/RTL8111DP device id. While I'm here append "8111D" to
    the description of RTL8168D as RL_HWREV_8168D can be either
    RTL8168D or RTL8111D.
  
    PR:	kern/137672

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/re/if_re.c
  stable/7/sys/pci/if_rlreg.h

Modified: stable/7/sys/dev/re/if_re.c
==============================================================================
--- stable/7/sys/dev/re/if_re.c	Fri Sep 11 17:12:43 2009	(r197094)
+++ stable/7/sys/dev/re/if_re.c	Fri Sep 11 17:15:18 2009	(r197095)
@@ -174,8 +174,8 @@ static struct rl_type re_devs[] = {
 	{ RT_VENDORID, RT_DEVICEID_8101E, 0,
 	    "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" },
 	{ RT_VENDORID, RT_DEVICEID_8168, 0,
-	    "RealTek 8168/8168B/8168C/8168CP/8168D/8111B/8111C/8111CP PCIe "
-	    "Gigabit Ethernet" },
+	    "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/"
+	    "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" },
 	{ RT_VENDORID, RT_DEVICEID_8169, 0,
 	    "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" },
 	{ RT_VENDORID, RT_DEVICEID_8169SC, 0,
@@ -216,7 +216,8 @@ static struct rl_hwrev re_hwrevs[] = {
 	{ RL_HWREV_8168C, RL_8169, "8168C/8111C"},
 	{ RL_HWREV_8168C_SPIN2, RL_8169, "8168C/8111C"},
 	{ RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"},
-	{ RL_HWREV_8168D, RL_8169, "8168D"},
+	{ RL_HWREV_8168D, RL_8169, "8168D/8111D"},
+	{ RL_HWREV_8168DP, RL_8169, "8168DP/8111DP"},
 	{ 0, 0, NULL }
 };
 
@@ -1280,6 +1281,7 @@ re_attach(device_t dev)
 		/* FALLTHROUGH */
 	case RL_HWREV_8168CP:
 	case RL_HWREV_8168D:
+	case RL_HWREV_8168DP:
 		sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR |
 		    RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP;
 		/*

Modified: stable/7/sys/pci/if_rlreg.h
==============================================================================
--- stable/7/sys/pci/if_rlreg.h	Fri Sep 11 17:12:43 2009	(r197094)
+++ stable/7/sys/pci/if_rlreg.h	Fri Sep 11 17:15:18 2009	(r197095)
@@ -160,6 +160,7 @@
 #define RL_HWREV_8169_8110SC	0x18000000
 #define RL_HWREV_8102EL		0x24800000
 #define RL_HWREV_8168D		0x28000000
+#define RL_HWREV_8168DP		0x28800000
 #define RL_HWREV_8168_SPIN1	0x30000000
 #define RL_HWREV_8100E		0x30800000
 #define RL_HWREV_8101E		0x34000000

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 17:18:08 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F4B31065698;
	Fri, 11 Sep 2009 17:18:08 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7E5758FC13;
	Fri, 11 Sep 2009 17:18:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BHI8Ao058384;
	Fri, 11 Sep 2009 17:18:08 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BHI83b058382;
	Fri, 11 Sep 2009 17:18:08 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200909111718.n8BHI83b058382@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 11 Sep 2009 17:18:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197096 - in stable/7/sys: . contrib/pf dev/alc
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 17:18:08 -0000

Author: yongari
Date: Fri Sep 11 17:18:08 2009
New Revision: 197096
URL: http://svn.freebsd.org/changeset/base/197096

Log:
  MFC r195989:
    Free allocated Rx ring dma memory/tags.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/alc/if_alc.c

Modified: stable/7/sys/dev/alc/if_alc.c
==============================================================================
--- stable/7/sys/dev/alc/if_alc.c	Fri Sep 11 17:15:18 2009	(r197095)
+++ stable/7/sys/dev/alc/if_alc.c	Fri Sep 11 17:18:08 2009	(r197096)
@@ -1501,6 +1501,21 @@ alc_dma_free(struct alc_softc *sc)
 		bus_dma_tag_destroy(sc->alc_cdata.alc_tx_ring_tag);
 		sc->alc_cdata.alc_tx_ring_tag = NULL;
 	}
+	/* Rx ring. */
+	if (sc->alc_cdata.alc_rx_ring_tag != NULL) {
+		if (sc->alc_cdata.alc_rx_ring_map != NULL)
+			bus_dmamap_unload(sc->alc_cdata.alc_rx_ring_tag,
+			    sc->alc_cdata.alc_rx_ring_map);
+		if (sc->alc_cdata.alc_rx_ring_map != NULL &&
+		    sc->alc_rdata.alc_rx_ring != NULL)
+			bus_dmamem_free(sc->alc_cdata.alc_rx_ring_tag,
+			    sc->alc_rdata.alc_rx_ring,
+			    sc->alc_cdata.alc_rx_ring_map);
+		sc->alc_rdata.alc_rx_ring = NULL;
+		sc->alc_cdata.alc_rx_ring_map = NULL;
+		bus_dma_tag_destroy(sc->alc_cdata.alc_rx_ring_tag);
+		sc->alc_cdata.alc_rx_ring_tag = NULL;
+	}
 	/* Rx return ring. */
 	if (sc->alc_cdata.alc_rr_ring_tag != NULL) {
 		if (sc->alc_cdata.alc_rr_ring_map != NULL)

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 17:20:11 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E4378106566B;
	Fri, 11 Sep 2009 17:20:11 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C5BF58FC1C;
	Fri, 11 Sep 2009 17:20:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BHKB3u058478;
	Fri, 11 Sep 2009 17:20:11 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BHKBCn058476;
	Fri, 11 Sep 2009 17:20:11 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200909111720.n8BHKBCn058476@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 11 Sep 2009 17:20:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197097 - in stable/7/sys: . contrib/pf dev/alc
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 17:20:12 -0000

Author: yongari
Date: Fri Sep 11 17:20:11 2009
New Revision: 197097
URL: http://svn.freebsd.org/changeset/base/197097

Log:
  MFC r196517:
    Don't try to power down PHY when alc(4) failed to map the device.
    This fixes system crash when mapping alc(4) device failed in device
    attach.
  
    Reported by:	Jim < stapleton.41 <> gmail DOT com >

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/alc/if_alc.c

Modified: stable/7/sys/dev/alc/if_alc.c
==============================================================================
--- stable/7/sys/dev/alc/if_alc.c	Fri Sep 11 17:18:08 2009	(r197096)
+++ stable/7/sys/dev/alc/if_alc.c	Fri Sep 11 17:20:11 2009	(r197097)
@@ -858,7 +858,8 @@ alc_detach(device_t dev)
 			sc->alc_intrhand[i] = NULL;
 		}
 	}
-	alc_phy_down(sc);
+	if (sc->alc_res[0] != NULL)
+		alc_phy_down(sc);
 	bus_release_resources(dev, sc->alc_irq_spec, sc->alc_irq);
 	if ((sc->alc_flags & (ALC_FLAG_MSI | ALC_FLAG_MSIX)) != 0)
 		pci_release_msi(dev);

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 17:25:25 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1206F1065694;
	Fri, 11 Sep 2009 17:25:25 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 00B9E8FC15;
	Fri, 11 Sep 2009 17:25:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BHPOE8058645;
	Fri, 11 Sep 2009 17:25:24 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BHPOQt058643;
	Fri, 11 Sep 2009 17:25:24 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200909111725.n8BHPOQt058643@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 11 Sep 2009 17:25:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197098 - in stable/7/sys: . contrib/pf dev/txp
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 17:25:25 -0000

Author: yongari
Date: Fri Sep 11 17:25:24 2009
New Revision: 197098
URL: http://svn.freebsd.org/changeset/base/197098

Log:
  MFC r196721:
    Make sure rx descriptor ring align on 16 bytes. I guess the
    alignment requirement could be multiple of 4 bytes but I think
    using descriptor size would make intention clearer.
    Previously the size of rx descriptor was not power of 2 so it
    caused panic in bus_dmamem_alloc(9).
  
    Reported by:	Jeff Blank (jb000003 <> mr-happy dot com)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/txp/if_txp.c

Modified: stable/7/sys/dev/txp/if_txp.c
==============================================================================
--- stable/7/sys/dev/txp/if_txp.c	Fri Sep 11 17:20:11 2009	(r197097)
+++ stable/7/sys/dev/txp/if_txp.c	Fri Sep 11 17:25:24 2009	(r197098)
@@ -1389,7 +1389,8 @@ txp_alloc_rings(struct txp_softc *sc)
 
 	/* High priority rx ring. */
 	error = txp_dma_alloc(sc, "hi priority rx ring",
-	    &sc->sc_cdata.txp_rxhiring_tag, sizeof(struct txp_rx_desc), 0,
+	    &sc->sc_cdata.txp_rxhiring_tag,
+	    roundup(sizeof(struct txp_rx_desc), 16), 0,
 	    &sc->sc_cdata.txp_rxhiring_map, (void **)&sc->sc_ldata.txp_rxhiring,
 	    sizeof(struct txp_rx_desc) * RX_ENTRIES,
 	    &sc->sc_ldata.txp_rxhiring_paddr);
@@ -1409,7 +1410,8 @@ txp_alloc_rings(struct txp_softc *sc)
 
 	/* Low priority rx ring. */
 	error = txp_dma_alloc(sc, "low priority rx ring",
-	    &sc->sc_cdata.txp_rxloring_tag, sizeof(struct txp_rx_desc), 0,
+	    &sc->sc_cdata.txp_rxloring_tag,
+	    roundup(sizeof(struct txp_rx_desc), 16), 0,
 	    &sc->sc_cdata.txp_rxloring_map, (void **)&sc->sc_ldata.txp_rxloring,
 	    sizeof(struct txp_rx_desc) * RX_ENTRIES,
 	    &sc->sc_ldata.txp_rxloring_paddr);

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 21:09:59 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A35A71065670;
	Fri, 11 Sep 2009 21:09:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 926548FC20;
	Fri, 11 Sep 2009 21:09:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BL9x3M063584;
	Fri, 11 Sep 2009 21:09:59 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BL9xbb063582;
	Fri, 11 Sep 2009 21:09:59 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200909112109.n8BL9xbb063582@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 11 Sep 2009 21:09:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197101 - stable/7/release
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 21:09:59 -0000

Author: jhb
Date: Fri Sep 11 21:09:59 2009
New Revision: 197101
URL: http://svn.freebsd.org/changeset/base/197101

Log:
  MFC part of 180012:
  Changes to exclude .svn directories when building tarballs during release
  builds (not documented in the original commit to HEAD).

Modified:
  stable/7/release/   (props changed)
  stable/7/release/Makefile

Modified: stable/7/release/Makefile
==============================================================================
--- stable/7/release/Makefile	Fri Sep 11 19:23:11 2009	(r197100)
+++ stable/7/release/Makefile	Fri Sep 11 21:09:59 2009	(r197101)
@@ -731,7 +731,7 @@ release.6:
 	@rm -rf ${RD}/dists/ports/ports*
 	@mkdir -p ${RD}/dists/ports
 	@echo rolling ports/ports tarball
-	@tar --exclude CVS --exclude 'ports/distfiles/*' \
+	@tar --exclude CVS --exclude .svn --exclude 'ports/distfiles/*' \
 	  -czf ${RD}/dists/ports/ports.tgz -C /usr ports
 	@cp ${.CURDIR}/scripts/ports-install.sh ${RD}/dists/ports/install.sh
 	@(cd ${RD}/dists/ports; \
@@ -834,7 +834,8 @@ release.8:
 .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64"
 	@cp ${RD}/trees/base/boot/mbr ${RD}/mfsfd/boot
 .endif
-	@tar --exclude CVS -cf - -C ${.CURDIR}/../usr.sbin/sysinstall help | \
+	@tar --exclude CVS --exclude .svn -cf - \
+		-C ${.CURDIR}/../usr.sbin/sysinstall help | \
 		tar xf - -C ${RD}/mfsfd/stand
 	@mkdir -p ${RD}/mfsroot
 	sh -e ${DOFS_SH} ${RD}/mfsroot/mfsroot ${RD} ${MNT} \
@@ -1232,7 +1233,7 @@ doTARBALL:
 	@( cd ${SD} && \
 		tn=`echo ${TN} | tr 'A-Z' 'a-z'` && \
 		echo rolling ${TD}/$$tn tarball &&\
-		tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \
+		tar --exclude CVS --exclude .svn --exclude obj --exclude BOOTMFS -cf - ${ARG} | \
 		${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \
 		sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn \
 		    > ${RD}/dists/${TD}/$$tn.inf && \

From owner-svn-src-stable@FreeBSD.ORG  Fri Sep 11 15:02:28 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3BD8B106566C;
	Fri, 11 Sep 2009 15:02:28 +0000 (UTC)
	(envelope-from jasonh@DataIX.net)
Received: from www6.pairlite.com (www6.pairlite.com [64.130.10.16])
	by mx1.freebsd.org (Postfix) with ESMTP id 079658FC08;
	Fri, 11 Sep 2009 15:02:27 +0000 (UTC)
Received: from firewall.5p.local (unknown [99.19.41.238])
	by www6.pairlite.com (Postfix) with ESMTP id DA9C8B828;
	Fri, 11 Sep 2009 11:02:25 -0400 (EDT)
Date: Fri, 11 Sep 2009 11:02:18 -0400
From: "Jason J. Hellenthal" 
To: =?ISO-8859-15?Q?Dag-Erling_Sm=F8rgrav?= 
In-Reply-To: <86tyza6j47.fsf@ds4.des.no>
Message-ID: 
References: <200909101404.n8AE41C6021588@svn.freebsd.org>
	<200909101023.44913.jhb@freebsd.org>
	<1252593149.75144.18.camel@bauer.cse.buffalo.edu>
	<200909101118.22525.jhb@freebsd.org>
	
	
	
	
	<86tyza6j47.fsf@ds4.des.no>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
X-OpenPGP-Key-ID: 0x691411AC
X-OpenPGP-Key-Fingerprint: 6F56 3B10 D8AD 1D33 96E7  5946 E3B6 2768 6914 11AC
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Mailman-Approved-At: Fri, 11 Sep 2009 23:46:53 +0000
Cc: Remko Lodder , John Baldwin ,
	svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Robert Watson ,
	svn-src-stable-8@freebsd.org, Ken Smith ,
	"Jason J. Hellenthal" , Ken Smith 
Subject: Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib
 sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: "Jason J. Hellenthal" 
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 11 Sep 2009 15:02:28 -0000

On Fri, 11 Sep 2009 03:22 -0000, des wrote:

> "Jason J. Hellenthal"  writes:
>> If I may, I would like to introduce a distributed targeting system to
>> this conversation in addition to crashinfo. Given with the above
>> conversations I cant help but think that in a case like this it would
>> be helpful to setup a central database for collection of information
>> and write a little bit more code into crashinfo for uuencoding a blob
>> to send through email or maybe another way so data can be collected,
>> sorted & analyzed with statistics spilled out into a web page for
>> review.
>
> It's a good idea in principle, but I'm worried that such a system might
> get flooded with crash reports from people running old -STABLE versions
> and / or local patches.  There is no way we can control that, neither in
> the client script nor at the receiving end.
>
> DES
>

I am thinking more of something like the distributed.net project where as they 
have two very well defined projects or areas that they can allow their users to 
work on and that they can close at any point in time. This would certainly get 
rid of the unwanted branch reports.

As for the others I can only help but think of Subversion, uuids, md5 sums, and 
specific version strings that are made up on compile time so as if r??????M is a 
version that is being submitted it would be turned down by the waiting server 
or stopped directly on client side. And for the rest of the world running CVS ;) 
I don't have something coming to mind at the moment.

I am pretty sure though by any means that a solution to all the above can be met 
with prejudice.


-- 

  Jason J. Hellenthal
  http://www.DataIX.net/
  jasonh@DataIX.net
  0x691411AC

  - (2^(N-1))

From owner-svn-src-stable@FreeBSD.ORG  Sat Sep 12 17:58:16 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 080C6106568B;
	Sat, 12 Sep 2009 17:58:16 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E90498FC1E;
	Sat, 12 Sep 2009 17:58:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8CHwFko092984;
	Sat, 12 Sep 2009 17:58:15 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8CHwFD7092982;
	Sat, 12 Sep 2009 17:58:15 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200909121758.n8CHwFD7092982@svn.freebsd.org>
From: Michael Tuexen 
Date: Sat, 12 Sep 2009 17:58:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197122 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci netinet
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 12 Sep 2009 17:58:16 -0000

Author: tuexen
Date: Sat Sep 12 17:58:15 2009
New Revision: 197122
URL: http://svn.freebsd.org/changeset/base/197122

Log:
  This fixes a bug where the value set by SCTP_PARTIAL_DELIVERY_POINT
  was not honored, if the socket buffer size was not 4 times that large.
  MFC of 196509.
  
  Approved by: re, rrs (mentor)`

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/sctp_indata.c

Modified: stable/8/sys/netinet/sctp_indata.c
==============================================================================
--- stable/8/sys/netinet/sctp_indata.c	Sat Sep 12 17:36:00 2009	(r197121)
+++ stable/8/sys/netinet/sctp_indata.c	Sat Sep 12 17:58:15 2009	(r197122)
@@ -921,7 +921,7 @@ doit_again:
 			 * but should we?
 			 */
 			if (stcb->sctp_socket) {
-				pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT,
+				pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket),
 				    stcb->sctp_ep->partial_delivery_point);
 			} else {
 				pd_point = stcb->sctp_ep->partial_delivery_point;
@@ -2862,11 +2862,11 @@ doit_again:
 
 		/*
 		 * Before we start though either all of the message should
-		 * be here or 1/4 the socket buffer max or nothing on the
+		 * be here or the socket buffer max or nothing on the
 		 * delivery queue and something can be delivered.
 		 */
 		if (stcb->sctp_socket) {
-			pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT,
+			pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket),
 			    stcb->sctp_ep->partial_delivery_point);
 		} else {
 			pd_point = stcb->sctp_ep->partial_delivery_point;

From owner-svn-src-stable@FreeBSD.ORG  Sat Sep 12 18:02:58 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 16310106566B;
	Sat, 12 Sep 2009 18:02:58 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0316B8FC0A;
	Sat, 12 Sep 2009 18:02:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8CI2vLK093178;
	Sat, 12 Sep 2009 18:02:57 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8CI2vJp093176;
	Sat, 12 Sep 2009 18:02:57 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909121802.n8CI2vJp093176@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 12 Sep 2009 18:02:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197123 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 12 Sep 2009 18:02:58 -0000

Author: kib
Date: Sat Sep 12 18:02:57 2009
New Revision: 197123
URL: http://svn.freebsd.org/changeset/base/197123

Log:
  MFC r197030:
  In vfs_mark_atime(9), be resistent against reclaimed vnodes.
  Assert that neccessary locks are taken, since vop might not be called.
  
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/vfs_subr.c

Modified: stable/8/sys/kern/vfs_subr.c
==============================================================================
--- stable/8/sys/kern/vfs_subr.c	Sat Sep 12 17:58:15 2009	(r197122)
+++ stable/8/sys/kern/vfs_subr.c	Sat Sep 12 18:02:57 2009	(r197123)
@@ -4269,8 +4269,12 @@ vfs_read_dirent(struct vop_readdir_args 
 void
 vfs_mark_atime(struct vnode *vp, struct ucred *cred)
 {
+	struct mount *mp;
 
-	if ((vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0)
+	mp = vp->v_mount;
+	VFS_ASSERT_GIANT(mp);
+	ASSERT_VOP_LOCKED(vp, "vfs_mark_atime");
+	if (mp != NULL && (mp->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0)
 		(void)VOP_MARKATIME(vp);
 }
 

From owner-svn-src-stable@FreeBSD.ORG  Sat Sep 12 18:05:57 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 662ED1065670;
	Sat, 12 Sep 2009 18:05:57 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 537D88FC08;
	Sat, 12 Sep 2009 18:05:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8CI5vmT093276;
	Sat, 12 Sep 2009 18:05:57 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8CI5vLd093274;
	Sat, 12 Sep 2009 18:05:57 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909121805.n8CI5vLd093274@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 12 Sep 2009 18:05:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197124 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 12 Sep 2009 18:05:57 -0000

Author: kib
Date: Sat Sep 12 18:05:57 2009
New Revision: 197124
URL: http://svn.freebsd.org/changeset/base/197124

Log:
  MFC r197031:
  Unlock the image vnode around the call of pmc PMC_FN_PROCESS_EXEC hook.
  The hook calls vn_fullpath(9), that should not be executed with a vnode
  lock held.
  
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/kern_exec.c

Modified: stable/8/sys/kern/kern_exec.c
==============================================================================
--- stable/8/sys/kern/kern_exec.c	Sat Sep 12 18:02:57 2009	(r197123)
+++ stable/8/sys/kern/kern_exec.c	Sat Sep 12 18:05:57 2009	(r197124)
@@ -786,10 +786,12 @@ interpret:
 	 */
 	if (PMC_SYSTEM_SAMPLING_ACTIVE() || PMC_PROC_IS_USING_PMCS(p)) {
 		PROC_UNLOCK(p);
+		VOP_UNLOCK(imgp->vp, 0);
 		pe.pm_credentialschanged = credential_changing;
 		pe.pm_entryaddr = imgp->entry_addr;
 
 		PMC_CALL_HOOK_X(td, PMC_FN_PROCESS_EXEC, (void *) &pe);
+		vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
 	} else
 		PROC_UNLOCK(p);
 #else  /* !HWPMC_HOOKS */

From owner-svn-src-stable@FreeBSD.ORG  Sat Sep 12 18:08:44 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9312A1065679;
	Sat, 12 Sep 2009 18:08:44 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 802B68FC1F;
	Sat, 12 Sep 2009 18:08:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8CI8i0x093428;
	Sat, 12 Sep 2009 18:08:44 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8CI8it3093426;
	Sat, 12 Sep 2009 18:08:44 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <200909121808.n8CI8it3093426@svn.freebsd.org>
From: Michael Tuexen 
Date: Sat, 12 Sep 2009 18:08:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197125 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci netinet
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 12 Sep 2009 18:08:44 -0000

Author: tuexen
Date: Sat Sep 12 18:08:44 2009
New Revision: 197125
URL: http://svn.freebsd.org/changeset/base/197125

Log:
  MFC 196610:
  Fix a bug where vlan interfaces are not supported by SCTP.
  
  Approved by: re, rrs (mentor)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/sctp_bsd_addr.c

Modified: stable/8/sys/netinet/sctp_bsd_addr.c
==============================================================================
--- stable/8/sys/netinet/sctp_bsd_addr.c	Sat Sep 12 18:05:57 2009	(r197124)
+++ stable/8/sys/netinet/sctp_bsd_addr.c	Sat Sep 12 18:08:44 2009	(r197125)
@@ -175,6 +175,7 @@ sctp_is_desired_interface_type(struct if
 	case IFT_LOOP:
 	case IFT_SLIP:
 	case IFT_GIF:
+	case IFT_L2VLAN:
 	case IFT_IP:
 	case IFT_IPOVERCDLC:
 	case IFT_IPOVERCLAW:

From owner-svn-src-stable@FreeBSD.ORG  Sat Sep 12 18:11:48 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A7C2F106566B;
	Sat, 12 Sep 2009 18:11:48 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 94AFB8FC17;
	Sat, 12 Sep 2009 18:11:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8CIBmG2093545;
	Sat, 12 Sep 2009 18:11:48 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8CIBmsK093543;
	Sat, 12 Sep 2009 18:11:48 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909121811.n8CIBmsK093543@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 12 Sep 2009 18:11:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197126 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci i386/xen
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 12 Sep 2009 18:11:48 -0000

Author: kib
Date: Sat Sep 12 18:11:48 2009
New Revision: 197126
URL: http://svn.freebsd.org/changeset/base/197126

Log:
  MFC r197046:
  As was done in r196643 for i386 and amd64, swap the start/end virtual
  addresses in pmap_invalidate_cache_range().
  
  Approved by:	re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/i386/xen/pmap.c

Modified: stable/8/sys/i386/xen/pmap.c
==============================================================================
--- stable/8/sys/i386/xen/pmap.c	Sat Sep 12 18:08:44 2009	(r197125)
+++ stable/8/sys/i386/xen/pmap.c	Sat Sep 12 18:11:48 2009	(r197126)
@@ -1010,8 +1010,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 		 * coherence domain.
 		 */
 		mfence();
-		for (; eva < sva; eva += cpu_clflush_line_size)
-			clflush(eva);
+		for (; sva < eva; sva += cpu_clflush_line_size)
+			clflush(sva);
 		mfence();
 	} else {
 

From owner-svn-src-stable@FreeBSD.ORG  Sat Sep 12 18:16:46 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2504106568D;
	Sat, 12 Sep 2009 18:16:46 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 55A748FC17;
	Sat, 12 Sep 2009 18:16:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8CIGkBn093700;
	Sat, 12 Sep 2009 18:16:46 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8CIGk3k093698;
	Sat, 12 Sep 2009 18:16:46 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200909121816.n8CIGk3k093698@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 12 Sep 2009 18:16:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197127 - in stable/8/lib/libc: . stdio stdlib stdtime
	string
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 12 Sep 2009 18:16:46 -0000

Author: kib
Date: Sat Sep 12 18:16:46 2009
New Revision: 197127
URL: http://svn.freebsd.org/changeset/base/197127

Log:
  MFC r196861:
  Handle zero size for posix_memalign. Return NULL or unique address
  according to the 'V' option.
  
  Approved by:	re (kensmith)

Modified:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdio/asprintf.c   (props changed)
  stable/8/lib/libc/stdlib/malloc.c
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc/string/ffsll.c   (props changed)
  stable/8/lib/libc/string/flsll.c   (props changed)
  stable/8/lib/libc/string/wcpcpy.c   (props changed)
  stable/8/lib/libc/string/wcpncpy.c   (props changed)

Modified: stable/8/lib/libc/stdlib/malloc.c
==============================================================================
--- stable/8/lib/libc/stdlib/malloc.c	Sat Sep 12 18:11:48 2009	(r197126)
+++ stable/8/lib/libc/stdlib/malloc.c	Sat Sep 12 18:16:46 2009	(r197127)
@@ -5320,6 +5320,15 @@ posix_memalign(void **memptr, size_t ali
 			goto RETURN;
 		}
 
+		if (size == 0) {
+			if (opt_sysv == false)
+				size = 1;
+			else {
+				result = NULL;
+				ret = 0;
+				goto RETURN;
+			}
+		}
 		result = ipalloc(alignment, size);
 	}