From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 02:07:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E974106566B; Sun, 30 Aug 2009 02:07:23 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D6278FC17; Sun, 30 Aug 2009 02:07: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 n7U27Nwc080436; Sun, 30 Aug 2009 02:07:23 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7U27Nxc080434; Sun, 30 Aug 2009 02:07:23 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908300207.n7U27Nxc080434@svn.freebsd.org> From: Qing Li Date: Sun, 30 Aug 2009 02:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196649 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 02:07:23 -0000 Author: qingli Date: Sun Aug 30 02:07:23 2009 New Revision: 196649 URL: http://svn.freebsd.org/changeset/base/196649 Log: Prefix on-link verification is being performed on statically configured prefixes. Since these statically configured prefixes do not have any associated advertising routers, these prefixes are treated as unreachable and those prefix routes are deleted from the routing table. Therefore bypass prefixes that are not learned from router advertisements during prefix on-link check. Reviewed by: hrs Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Sat Aug 29 21:53:08 2009 (r196648) +++ head/sys/netinet6/nd6_rtr.c Sun Aug 30 02:07:23 2009 (r196649) @@ -1415,6 +1415,9 @@ pfxlist_onlink_check() if (pr->ndpr_raf_onlink == 0) continue; + if (pr->ndpr_raf_auto == 0) + continue; + if ((pr->ndpr_stateflags & NDPRF_DETACHED) == 0 && find_pfxlist_reachable_router(pr) == NULL) pr->ndpr_stateflags |= NDPRF_DETACHED; @@ -1431,6 +1434,9 @@ pfxlist_onlink_check() if (pr->ndpr_raf_onlink == 0) continue; + if (pr->ndpr_raf_auto == 0) + continue; + if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0) pr->ndpr_stateflags &= ~NDPRF_DETACHED; } @@ -1454,6 +1460,9 @@ pfxlist_onlink_check() if (pr->ndpr_raf_onlink == 0) continue; + if (pr->ndpr_raf_auto == 0) + continue; + if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0 && (pr->ndpr_stateflags & NDPRF_ONLINK) != 0) { if ((e = nd6_prefix_offlink(pr)) != 0) { From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 05:12:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD916106564A; Sun, 30 Aug 2009 05:12:37 +0000 (UTC) (envelope-from jon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 983DF8FC0A; Sun, 30 Aug 2009 05:12:37 +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 n7U5Cbt6084040; Sun, 30 Aug 2009 05:12:37 GMT (envelope-from jon@svn.freebsd.org) Received: (from jon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7U5Cbg2084038; Sun, 30 Aug 2009 05:12:37 GMT (envelope-from jon@svn.freebsd.org) Message-Id: <200908300512.n7U5Cbg2084038@svn.freebsd.org> From: Jonathan Chen Date: Sun, 30 Aug 2009 05:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196650 - head/lib/libpam/modules/pam_lastlog X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 05:12:38 -0000 Author: jon Date: Sun Aug 30 05:12:37 2009 New Revision: 196650 URL: http://svn.freebsd.org/changeset/base/196650 Log: Prevents pam_lastlog from segfaulting on session close when tty is null. MFC after: 1 month Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.c ============================================================================== --- head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sun Aug 30 02:07:23 2009 (r196649) +++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sun Aug 30 05:12:37 2009 (r196650) @@ -183,6 +183,11 @@ pam_sm_close_session(pam_handle_t *pamh pam_err = pam_get_item(pamh, PAM_TTY, (const void **)&tty); if (pam_err != PAM_SUCCESS) goto err; + if (tty == NULL) { + PAM_LOG("No PAM_TTY"); + pam_err = PAM_SERVICE_ERR; + goto err; + } if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0) tty = (const char *)tty + strlen(_PATH_DEV); if (*(const char *)tty == '\0') From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 10:47:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 829E8106564A; Sun, 30 Aug 2009 10:47:00 +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 71ED28FC0A; Sun, 30 Aug 2009 10:47:00 +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 n7UAl0Nm093032; Sun, 30 Aug 2009 10:47:00 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UAl0Kp093030; Sun, 30 Aug 2009 10:47:00 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200908301047.n7UAl0Kp093030@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 30 Aug 2009 10:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196651 - head/share/timedef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 10:47:00 -0000 Author: ume Date: Sun Aug 30 10:47:00 2009 New Revision: 196651 URL: http://svn.freebsd.org/changeset/base/196651 Log: AM/PM date format for ja_JP.eucJP and ja_JP.SJIS were localized by r193869. However, ja_JP.UTF-8 wasn't. So, reflect it to ja_JP.UTF-8 as well. Modified: head/share/timedef/ja_JP.UTF-8.src Modified: head/share/timedef/ja_JP.UTF-8.src ============================================================================== --- head/share/timedef/ja_JP.UTF-8.src Sun Aug 30 05:12:37 2009 (r196650) +++ head/share/timedef/ja_JP.UTF-8.src Sun Aug 30 10:47:00 2009 (r196651) @@ -68,13 +68,11 @@ # # am # -#午前 -AM +午前 # # pm # -#午後 -PM +午後 # # date_fmt # From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 11:17:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF96A1065674; Sun, 30 Aug 2009 11:17:42 +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 BE87B8FC16; Sun, 30 Aug 2009 11:17: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 n7UBHgSo093704; Sun, 30 Aug 2009 11:17:42 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UBHgS9093700; Sun, 30 Aug 2009 11:17:42 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200908301117.n7UBHgS9093700@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 30 Aug 2009 11:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196652 - head/usr.bin/w X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 11:17:43 -0000 Author: ume Date: Sun Aug 30 11:17:42 2009 New Revision: 196652 URL: http://svn.freebsd.org/changeset/base/196652 Log: Fix the problem that the entry broke into two lines with multi-byte AM/PM format. Reported by: takawata Modified: head/usr.bin/w/extern.h head/usr.bin/w/pr_time.c head/usr.bin/w/w.c Modified: head/usr.bin/w/extern.h ============================================================================== --- head/usr.bin/w/extern.h Sun Aug 30 10:47:00 2009 (r196651) +++ head/usr.bin/w/extern.h Sun Aug 30 11:17:42 2009 (r196652) @@ -38,6 +38,6 @@ extern int use_ampm; struct kinfo_proc; -void pr_attime(time_t *, time_t *); +int pr_attime(time_t *, time_t *); int pr_idle(time_t); int proc_compare(struct kinfo_proc *, struct kinfo_proc *); Modified: head/usr.bin/w/pr_time.c ============================================================================== --- head/usr.bin/w/pr_time.c Sun Aug 30 10:47:00 2009 (r196651) +++ head/usr.bin/w/pr_time.c Sun Aug 30 11:17:42 2009 (r196652) @@ -52,13 +52,14 @@ static const char sccsid[] = "@(#)pr_tim * pr_attime -- * Print the time since the user logged in. */ -void +int pr_attime(time_t *started, time_t *now) { - static char buf[256]; + static wchar_t buf[256]; struct tm tp, tm; time_t diff; - char fmt[20]; + wchar_t *fmt; + int len, width, offset = 0; tp = *localtime(started); tm = *localtime(now); @@ -66,7 +67,7 @@ pr_attime(time_t *started, time_t *now) /* If more than a week, use day-month-year. */ if (diff > 86400 * 7) - (void)strcpy(fmt, "%d%b%y"); + fmt = L"%d%b%y"; /* If not today, use day-hour-am/pm. */ else if (tm.tm_mday != tp.tm_mday || @@ -74,16 +75,26 @@ pr_attime(time_t *started, time_t *now) tm.tm_year != tp.tm_year) { /* The line below does not take DST into consideration */ /* else if (*now / 86400 != *started / 86400) { */ - (void)strcpy(fmt, use_ampm ? "%a%I%p" : "%a%H"); + fmt = use_ampm ? L"%a%I%p" : L"%a%H"; } /* Default is hh:mm{am,pm}. */ else { - (void)strcpy(fmt, use_ampm ? "%l:%M%p" : "%k:%M"); + fmt = use_ampm ? L"%l:%M%p" : L"%k:%M"; } - (void)strftime(buf, sizeof(buf), fmt, &tp); - (void)wprintf(L"%-7.7s", buf); + (void)wcsftime(buf, sizeof(buf), fmt, &tp); + len = wcslen(buf); + width = wcswidth(buf, len); + if (len == width) + (void)wprintf(L"%-7.7ls", buf); + else if (width < 7) + (void)wprintf(L"%ls%.*s", buf, 7 - width, " "); + else { + (void)wprintf(L"%ls", buf); + offset = width - 7; + } + return (offset); } /* Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Sun Aug 30 10:47:00 2009 (r196651) +++ head/usr.bin/w/w.c Sun Aug 30 11:17:42 2009 (r196652) @@ -137,7 +137,7 @@ main(int argc, char *argv[]) struct stat *stp; FILE *ut; time_t touched; - int ch, i, nentries, nusers, wcmd, longidle, dropgid; + int ch, i, nentries, nusers, wcmd, longidle, longattime, dropgid; const char *memf, *nlistf, *p; char *x_suffix; char buf[MAXHOSTNAMELEN], errbuf[_POSIX2_LINE_MAX]; @@ -406,9 +406,10 @@ main(int argc, char *argv[]) ep->utmp.ut_line : ep->utmp.ut_line + 3, W_DISPHOSTSIZE, W_DISPHOSTSIZE, *p ? p : "-"); t = _time_to_time32(ep->utmp.ut_time); - pr_attime(&t, &now); + longattime = pr_attime(&t, &now); longidle = pr_idle(ep->idle); - (void)printf("%.*s\n", argwidth - longidle, ep->args); + (void)printf("%.*s\n", argwidth - longidle - longattime, + ep->args); } (void)kvm_close(kd); exit(0); From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 13:56:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 080CA1065679; Sun, 30 Aug 2009 13:56:02 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id AE8DB8FC1C; Sun, 30 Aug 2009 13:56:01 +0000 (UTC) Received: from a91-153-125-115.elisa-laajakaista.fi (a91-153-125-115.elisa-laajakaista.fi [91.153.125.115]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id 28C1A1515F8; Sun, 30 Aug 2009 16:55:56 +0300 (EEST) Date: Sun, 30 Aug 2009 16:55:56 +0300 From: Jaakko Heinonen To: Jonathan Chen Message-ID: <20090830135555.GA824@a91-153-125-115.elisa-laajakaista.fi> References: <200908300512.n7U5Cbg2084038@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200908300512.n7U5Cbg2084038@svn.freebsd.org> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196650 - head/lib/libpam/modules/pam_lastlog X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 13:56:02 -0000 On 2009-08-30, Jonathan Chen wrote: > New Revision: 196650 > > Prevents pam_lastlog from segfaulting on session close when tty is null. Thanks! This is PR bin/112694. -- Jaakko From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 14:38:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFA88106566B; Sun, 30 Aug 2009 14:38:18 +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 BD5048FC16; Sun, 30 Aug 2009 14:38: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 n7UEcHDf097594; Sun, 30 Aug 2009 14:38:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UEcHY0097588; Sun, 30 Aug 2009 14:38:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908301438.n7UEcHY0097588@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 30 Aug 2009 14:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196653 - in head/sys: amd64/amd64 compat/ia32 i386/i386 kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 14:38:18 -0000 Author: bz Date: Sun Aug 30 14:38:17 2009 New Revision: 196653 URL: http://svn.freebsd.org/changeset/base/196653 Log: 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 MFC after: 3 days Modified: head/sys/amd64/amd64/elf_machdep.c head/sys/compat/ia32/ia32_sysvec.c head/sys/i386/i386/elf_machdep.c head/sys/kern/imgact_elf.c head/sys/sys/imgact_elf.h Modified: head/sys/amd64/amd64/elf_machdep.c ============================================================================== --- head/sys/amd64/amd64/elf_machdep.c Sun Aug 30 11:17:42 2009 (r196652) +++ head/sys/amd64/amd64/elf_machdep.c Sun Aug 30 14:38:17 2009 (r196653) @@ -118,7 +118,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: head/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- head/sys/compat/ia32/ia32_sysvec.c Sun Aug 30 11:17:42 2009 (r196652) +++ head/sys/compat/ia32/ia32_sysvec.c Sun Aug 30 14:38:17 2009 (r196653) @@ -180,7 +180,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: head/sys/i386/i386/elf_machdep.c ============================================================================== --- head/sys/i386/i386/elf_machdep.c Sun Aug 30 11:17:42 2009 (r196652) +++ head/sys/i386/i386/elf_machdep.c Sun Aug 30 14:38:17 2009 (r196653) @@ -117,7 +117,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: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Aug 30 11:17:42 2009 (r196652) +++ head/sys/kern/imgact_elf.c Sun Aug 30 14:38:17 2009 (r196653) @@ -238,8 +238,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); @@ -249,7 +251,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)) @@ -260,7 +264,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); } @@ -269,7 +275,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: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Sun Aug 30 11:17:42 2009 (r196652) +++ head/sys/sys/imgact_elf.h Sun Aug 30 14:38:17 2009 (r196653) @@ -74,8 +74,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-head@FreeBSD.ORG Sun Aug 30 14:45:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB33A10656D6; Sun, 30 Aug 2009 14:45:09 +0000 (UTC) (envelope-from motoyuki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9DA88FC0C; Sun, 30 Aug 2009 14:45: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 n7UEj9HN097780; Sun, 30 Aug 2009 14:45:09 GMT (envelope-from motoyuki@svn.freebsd.org) Received: (from motoyuki@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UEj961097778; Sun, 30 Aug 2009 14:45:09 GMT (envelope-from motoyuki@svn.freebsd.org) Message-Id: <200908301445.n7UEj961097778@svn.freebsd.org> From: Motoyuki Konno Date: Sun, 30 Aug 2009 14:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196654 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 14:45:09 -0000 Author: motoyuki Date: Sun Aug 30 14:45:09 2009 New Revision: 196654 URL: http://svn.freebsd.org/changeset/base/196654 Log: Fix the reference for the IPV6_V6ONLY option. This option is described in RFC 3493, not 3542. PR: docs/134127 Submitted by: Kenji Rikitake MFC after: 2 weeks Modified: head/share/man/man4/ip6.4 Modified: head/share/man/man4/ip6.4 ============================================================================== --- head/share/man/man4/ip6.4 Sun Aug 30 14:38:17 2009 (r196653) +++ head/share/man/man4/ip6.4 Sun Aug 30 14:45:09 2009 (r196654) @@ -692,7 +692,7 @@ An ancillary data object was improperly Most of the socket options are defined in RFC 2292 or RFC 2553. The .Dv IPV6_V6ONLY -socket option is defined in RFC 3542. +socket option is defined in RFC 3493 Section 5.3. The .Dv IPV6_PORTRANGE socket option and the conflict resolution rule are not defined in the From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 15:06:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D6321065672; Sun, 30 Aug 2009 15:06:03 +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 72E5C8FC0A; Sun, 30 Aug 2009 15:06: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 n7UF63x1098222; Sun, 30 Aug 2009 15:06:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UF63mp098220; Sun, 30 Aug 2009 15:06:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200908301506.n7UF63mp098220@svn.freebsd.org> From: Alexander Motin Date: Sun, 30 Aug 2009 15:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196655 - head/sys/dev/siis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 15:06:03 -0000 Author: mav Date: Sun Aug 30 15:06:03 2009 New Revision: 196655 URL: http://svn.freebsd.org/changeset/base/196655 Log: MFp4: - Add SNTF support. - Do not report meaningless transport/protocol versions. Modified: head/sys/dev/siis/siis.c Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Sun Aug 30 14:45:09 2009 (r196654) +++ head/sys/dev/siis/siis.c Sun Aug 30 15:06:03 2009 (r196655) @@ -647,6 +647,30 @@ siis_slotsfree(device_t dev) } static void +siis_notify_events(device_t dev) +{ + struct siis_channel *ch = device_get_softc(dev); + struct cam_path *dpath; + u_int32_t status; + int i; + + status = ATA_INL(ch->r_mem, SIIS_P_SNTF); + ATA_OUTL(ch->r_mem, SIIS_P_SNTF, status); + if (bootverbose) + device_printf(dev, "SNTF 0x%04x\n", status); + for (i = 0; i < 16; i++) { + if ((status & (1 << i)) == 0) + continue; + if (xpt_create_path(&dpath, NULL, + xpt_path_path_id(ch->path), i, 0) == CAM_REQ_CMP) { + xpt_async(AC_SCSI_AEN, dpath, NULL); + xpt_free_path(dpath); + } + } + +} + +static void siis_phy_check_events(device_t dev) { struct siis_channel *ch = device_get_softc(dev); @@ -707,6 +731,9 @@ siis_ch_intr(void *data) /* Process PHY events */ if (istatus & SIIS_P_IX_PHYRDYCHG) siis_phy_check_events(dev); + /* Process NOTIFY events */ + if (istatus & SIIS_P_IX_SDBN) + siis_notify_events(dev); /* Process command errors */ if (istatus & SIIS_P_IX_COMMERR) { estatus = ATA_INL(ch->r_mem, SIIS_P_CMDERR); @@ -1267,7 +1294,6 @@ siis_reset(device_t dev) /* XXX; Commands in loading state. */ siis_end_transaction(&ch->slot[i], SIIS_ERR_INNOCENT); } - ATA_OUTL(ch->r_mem, SIIS_P_CTLCLR, SIIS_P_CTL_PME); /* Reset and reconnect PHY, */ if (!siis_sata_phy_reset(dev)) { ch->devices = 0; @@ -1461,9 +1487,9 @@ siisaction(struct cam_sim *sim, union cc uint32_t status; cts->protocol = PROTO_ATA; - cts->protocol_version = SCSI_REV_2; + cts->protocol_version = PROTO_VERSION_UNSPECIFIED; cts->transport = XPORT_SATA; - cts->transport_version = 2; + cts->transport_version = XPORT_VERSION_UNSPECIFIED; cts->proto_specific.valid = 0; cts->xport_specific.sata.valid = 0; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) @@ -1548,9 +1574,9 @@ siisaction(struct cam_sim *sim, union cc strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SATA; - cpi->transport_version = 2; + cpi->transport_version = XPORT_VERSION_UNSPECIFIED; cpi->protocol = PROTO_ATA; - cpi->protocol_version = SCSI_REV_2; + cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->ccb_h.status = CAM_REQ_CMP; cpi->maxio = MAXPHYS; xpt_done(ccb); From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 15:20:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62AB510656C4; Sun, 30 Aug 2009 15:20:13 +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 506618FC1C; Sun, 30 Aug 2009 15:20: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 n7UFKDcd098525; Sun, 30 Aug 2009 15:20:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UFKDuY098521; Sun, 30 Aug 2009 15:20:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200908301520.n7UFKDuY098521@svn.freebsd.org> From: Alexander Motin Date: Sun, 30 Aug 2009 15:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196656 - in head: share/man/man4 sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 15:20:13 -0000 Author: mav Date: Sun Aug 30 15:20:13 2009 New Revision: 196656 URL: http://svn.freebsd.org/changeset/base/196656 Log: MFp4: - Add Command Completion Coalescing support. - Add SNTF support. - Add two more power management modes (4, 5), implemented on driver level. - Fix interface mode setting. - Reduce interface reset time. - Do not report meaningless protocol/transport versions. - Report CAP2 register content. - Some performance optimizations. Modified: head/share/man/man4/ahci.4 head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Sun Aug 30 15:06:03 2009 (r196655) +++ head/share/man/man4/ahci.4 Sun Aug 30 15:20:13 2009 (r196656) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 26, 2009 +.Dd August 24, 2009 .Dt AHCI 4 .Os .Sh NAME @@ -60,6 +60,13 @@ single MSI vector used, if supported (de .It 2 multiple MSI vectors used, if supported; .El +.It Va hint.ahci.X.ccc +controls Command Completion Coalescing (CCC) usage by the specified controller. +Non-zero value enables CCC and defines maximum time (in ms), request can wait +for interrupt, if there are some more requests present on controller queue. +CCC reduces number of context switches on systems with many parallel requests, +but it can decrease disk performance on some workloads due to additional +command latency. .It Va hint.ahcich.X.pm_level controls SATA interface Power Management for specified channel, allowing some power to be saved at the cost of additional command @@ -74,7 +81,15 @@ device is allowed to initiate PM state c host initiates PARTIAL PM state transition every time port becomes idle; .It 3 host initiates SLUMBER PM state transition every time port becomes idle. +.It 4 +driver initiates PARTIAL PM state transition 1ms after port becomes idle; +.It 5 +driver initiates SLUMBER PM state transition 125ms after port becomes idle. .El +Some controllers, such as ICH8, do not implement modes 2 and 3 with NCQ used. +Because of artificial entering latency, performance degradation in modes +4 and 5 is much smaller then in modes 2 and 3. +.Pp Note that interface Power Management is not compatible with device presence detection. You will have to reset bus manually on device hot-plug. Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Aug 30 15:06:03 2009 (r196655) +++ head/sys/dev/ahci/ahci.c Sun Aug 30 15:20:13 2009 (r196656) @@ -63,6 +63,7 @@ static int ahci_suspend(device_t dev); static int ahci_resume(device_t dev); static int ahci_ch_suspend(device_t dev); static int ahci_ch_resume(device_t dev); +static void ahci_ch_pm(void *arg); static void ahci_ch_intr_locked(void *data); static void ahci_ch_intr(void *data); static int ahci_ctlr_reset(device_t dev); @@ -121,9 +122,11 @@ ahci_attach(device_t dev) struct ahci_controller *ctlr = device_get_softc(dev); device_t child; int error, unit, speed; - u_int32_t version, caps; + u_int32_t version; ctlr->dev = dev; + resource_int_value(device_get_name(dev), + device_get_unit(dev), "ccc", &ctlr->ccc); /* if we have a memory BAR(5) we are likely on an AHCI part */ ctlr->r_rid = PCIR_BAR(5); if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -160,41 +163,49 @@ ahci_attach(device_t dev) } /* Announce HW capabilities. */ version = ATA_INL(ctlr->r_mem, AHCI_VS); - caps = ATA_INL(ctlr->r_mem, AHCI_CAP); - speed = (caps & AHCI_CAP_ISS) >> AHCI_CAP_ISS_SHIFT; + ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); + if (version >= 0x00010020) + ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); + speed = (ctlr->caps & AHCI_CAP_ISS) >> AHCI_CAP_ISS_SHIFT; device_printf(dev, "AHCI v%x.%02x with %d %sGbps ports, Port Multiplier %s\n", ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f), ((version >> 4) & 0xf0) + (version & 0x0f), - (caps & AHCI_CAP_NPMASK) + 1, + (ctlr->caps & AHCI_CAP_NPMASK) + 1, ((speed == 1) ? "1.5":((speed == 2) ? "3": ((speed == 3) ? "6":"?"))), - (caps & AHCI_CAP_SPM) ? + (ctlr->caps & AHCI_CAP_SPM) ? "supported" : "not supported"); if (bootverbose) { device_printf(dev, "Caps:%s%s%s%s%s%s%s%s %sGbps", - (caps & AHCI_CAP_64BIT) ? " 64bit":"", - (caps & AHCI_CAP_SNCQ) ? " NCQ":"", - (caps & AHCI_CAP_SSNTF) ? " SNTF":"", - (caps & AHCI_CAP_SMPS) ? " MPS":"", - (caps & AHCI_CAP_SSS) ? " SS":"", - (caps & AHCI_CAP_SALP) ? " ALP":"", - (caps & AHCI_CAP_SAL) ? " AL":"", - (caps & AHCI_CAP_SCLO) ? " CLO":"", + (ctlr->caps & AHCI_CAP_64BIT) ? " 64bit":"", + (ctlr->caps & AHCI_CAP_SNCQ) ? " NCQ":"", + (ctlr->caps & AHCI_CAP_SSNTF) ? " SNTF":"", + (ctlr->caps & AHCI_CAP_SMPS) ? " MPS":"", + (ctlr->caps & AHCI_CAP_SSS) ? " SS":"", + (ctlr->caps & AHCI_CAP_SALP) ? " ALP":"", + (ctlr->caps & AHCI_CAP_SAL) ? " AL":"", + (ctlr->caps & AHCI_CAP_SCLO) ? " CLO":"", ((speed == 1) ? "1.5":((speed == 2) ? "3": ((speed == 3) ? "6":"?")))); printf("%s%s%s%s%s%s %dcmd%s%s%s %dports\n", - (caps & AHCI_CAP_SAM) ? " AM":"", - (caps & AHCI_CAP_SPM) ? " PM":"", - (caps & AHCI_CAP_FBSS) ? " FBS":"", - (caps & AHCI_CAP_PMD) ? " PMD":"", - (caps & AHCI_CAP_SSC) ? " SSC":"", - (caps & AHCI_CAP_PSC) ? " PSC":"", - ((caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, - (caps & AHCI_CAP_CCCS) ? " CCC":"", - (caps & AHCI_CAP_EMS) ? " EM":"", - (caps & AHCI_CAP_SXS) ? " eSATA":"", - (caps & AHCI_CAP_NPMASK) + 1); + (ctlr->caps & AHCI_CAP_SAM) ? " AM":"", + (ctlr->caps & AHCI_CAP_SPM) ? " PM":"", + (ctlr->caps & AHCI_CAP_FBSS) ? " FBS":"", + (ctlr->caps & AHCI_CAP_PMD) ? " PMD":"", + (ctlr->caps & AHCI_CAP_SSC) ? " SSC":"", + (ctlr->caps & AHCI_CAP_PSC) ? " PSC":"", + ((ctlr->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, + (ctlr->caps & AHCI_CAP_CCCS) ? " CCC":"", + (ctlr->caps & AHCI_CAP_EMS) ? " EM":"", + (ctlr->caps & AHCI_CAP_SXS) ? " eSATA":"", + (ctlr->caps & AHCI_CAP_NPMASK) + 1); + } + if (bootverbose && version >= 0x00010020) { + device_printf(dev, "Caps2:%s%s%s\n", + (ctlr->caps2 & AHCI_CAP2_APST) ? " APST":"", + (ctlr->caps2 & AHCI_CAP2_NVMP) ? " NVMP":"", + (ctlr->caps2 & AHCI_CAP2_BOH) ? " BOH":""); } /* Attach all channels on this controller */ for (unit = 0; unit < ctlr->channels; unit++) { @@ -266,6 +277,21 @@ ahci_ctlr_reset(device_t dev) ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); /* Clear interrupts */ ATA_OUTL(ctlr->r_mem, AHCI_IS, ATA_INL(ctlr->r_mem, AHCI_IS)); + /* Configure CCC */ + if (ctlr->ccc) { + ATA_OUTL(ctlr->r_mem, AHCI_CCCP, ATA_INL(ctlr->r_mem, AHCI_PI)); + ATA_OUTL(ctlr->r_mem, AHCI_CCCC, + (ctlr->ccc << AHCI_CCCC_TV_SHIFT) | + (4 << AHCI_CCCC_CC_SHIFT) | + AHCI_CCCC_EN); + ctlr->cccv = (ATA_INL(ctlr->r_mem, AHCI_CCCC) & + AHCI_CCCC_INT_MASK) >> AHCI_CCCC_INT_SHIFT; + if (bootverbose) { + device_printf(dev, + "CCC with %dms/4cmd enabled on vector %d\n", + ctlr->ccc, ctlr->cccv); + } + } /* Enable AHCI interrupts */ ATA_OUTL(ctlr->r_mem, AHCI_GHC, ATA_INL(ctlr->r_mem, AHCI_GHC) | AHCI_GHC_IE); @@ -326,7 +352,8 @@ ahci_setup_interrupt(device_t dev) for (i = 0; i < ctlr->numirqs; i++) { ctlr->irqs[i].ctlr = ctlr; ctlr->irqs[i].r_irq_rid = i + (msi ? 1 : 0); - if (ctlr->numirqs == 1 || i >= ctlr->channels) + if (ctlr->numirqs == 1 || i >= ctlr->channels || + (ctlr->ccc && i == ctlr->cccv)) ctlr->irqs[i].mode = AHCI_IRQ_MODE_ALL; else if (i == ctlr->numirqs - 1) ctlr->irqs[i].mode = AHCI_IRQ_MODE_AFTER; @@ -360,11 +387,16 @@ ahci_intr(void *data) void *arg; int unit; - is = ATA_INL(ctlr->r_mem, AHCI_IS); - if (irq->mode == AHCI_IRQ_MODE_ALL) + if (irq->mode == AHCI_IRQ_MODE_ALL) { unit = 0; - else /* AHCI_IRQ_MODE_AFTER */ + if (ctlr->ccc) + is = ctlr->ichannels; + else + is = ATA_INL(ctlr->r_mem, AHCI_IS); + } else { /* AHCI_IRQ_MODE_AFTER */ unit = irq->r_irq_rid - 1; + is = ATA_INL(ctlr->r_mem, AHCI_IS); + } for (; unit < ctlr->channels; unit++) { if ((is & (1 << unit)) != 0 && (arg = ctlr->interrupt[unit].argument)) { @@ -523,10 +555,14 @@ ahci_ch_attach(device_t dev) ch->dev = dev; ch->unit = (intptr_t)device_get_ivars(dev); - ch->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); + ch->caps = ctlr->caps; + ch->caps2 = ctlr->caps2; ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, + mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); + if (ch->pm_level > 3) + callout_init_mtx(&ch->pm_timer, &ch->mtx, 0); /* Limit speed for my onboard JMicron external port. * It is not eSATA really. */ if (pci_get_devid(ctlr->dev) == 0x2363197b && @@ -536,7 +572,6 @@ ahci_ch_attach(device_t dev) ch->sata_rev = 1; resource_int_value(device_get_name(dev), device_get_unit(dev), "sata_rev", &ch->sata_rev); - mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); rid = ch->unit; if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE))) @@ -584,6 +619,11 @@ ahci_ch_attach(device_t dev) error = ENXIO; goto err3; } + if (ch->pm_level > 3) { + callout_reset(&ch->pm_timer, + (ch->pm_level == 4) ? hz / 1000 : hz / 8, + ahci_ch_pm, dev); + } mtx_unlock(&ch->mtx); return (0); @@ -610,6 +650,8 @@ ahci_ch_detach(device_t dev) cam_sim_free(ch->sim, /*free_devq*/TRUE); mtx_unlock(&ch->mtx); + if (ch->pm_level > 3) + callout_drain(&ch->pm_timer); bus_teardown_intr(dev, ch->r_irq, ch->ih); bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); @@ -661,7 +703,7 @@ ahci_ch_resume(device_t dev) /* Activate the channel and power/spin up device */ ATA_OUTL(ch->r_mem, AHCI_P_CMD, (AHCI_P_CMD_ACTIVE | AHCI_P_CMD_POD | AHCI_P_CMD_SUD | - ((ch->pm_level > 1) ? AHCI_P_CMD_ALPE : 0) | + ((ch->pm_level == 2 || ch->pm_level == 3) ? AHCI_P_CMD_ALPE : 0) | ((ch->pm_level > 2) ? AHCI_P_CMD_ASP : 0 ))); ahci_start_fr(dev); ahci_start(dev); @@ -815,6 +857,7 @@ ahci_slotsfree(device_t dev) for (i = 0; i < ch->numslots; i++) { struct ahci_slot *slot = &ch->slot[i]; + callout_drain(&slot->timeout); if (slot->dma.data_map) { bus_dmamap_destroy(ch->dma.data_tag, slot->dma.data_map); slot->dma.data_map = NULL; @@ -848,6 +891,31 @@ ahci_phy_check_events(device_t dev) } static void +ahci_notify_events(device_t dev) +{ + struct ahci_channel *ch = device_get_softc(dev); + struct cam_path *dpath; + u_int32_t status; + int i; + + status = ATA_INL(ch->r_mem, AHCI_P_SNTF); + if (status == 0) + return; + ATA_OUTL(ch->r_mem, AHCI_P_SNTF, status); + if (bootverbose) + device_printf(dev, "SNTF 0x%04x\n", status); + for (i = 0; i < 16; i++) { + if ((status & (1 << i)) == 0) + continue; + if (xpt_create_path(&dpath, NULL, + xpt_path_path_id(ch->path), i, 0) == CAM_REQ_CMP) { + xpt_async(AC_SCSI_AEN, dpath, NULL); + xpt_free_path(dpath); + } + } +} + +static void ahci_ch_intr_locked(void *data) { device_t dev = (device_t)data; @@ -859,6 +927,23 @@ ahci_ch_intr_locked(void *data) } static void +ahci_ch_pm(void *arg) +{ + device_t dev = (device_t)arg; + struct ahci_channel *ch = device_get_softc(dev); + uint32_t work; + + if (ch->numrslots != 0) + return; + work = ATA_INL(ch->r_mem, AHCI_P_CMD); + if (ch->pm_level == 4) + work |= AHCI_P_CMD_PARTIAL; + else + work |= AHCI_P_CMD_SLUMBER; + ATA_OUTL(ch->r_mem, AHCI_P_CMD, work); +} + +static void ahci_ch_intr(void *data) { device_t dev = (device_t)data; @@ -869,6 +954,8 @@ ahci_ch_intr(void *data) /* Read and clear interrupt statuses. */ istatus = ATA_INL(ch->r_mem, AHCI_P_IS); + if (istatus == 0) + return; ATA_OUTL(ch->r_mem, AHCI_P_IS, istatus); /* Read command statuses. */ cstatus = ATA_INL(ch->r_mem, AHCI_P_CI); @@ -884,17 +971,16 @@ ahci_ch_intr(void *data) // ATA_INL(ch->r_mem, AHCI_P_SERR)); ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK) >> AHCI_P_CMD_CCS_SHIFT; + err = ch->rslots & (cstatus | sstatus); /* Kick controller into sane state */ ahci_stop(dev); ahci_start(dev); - ok = ch->rslots & ~(cstatus | sstatus); - err = ch->rslots & (cstatus | sstatus); } else { ccs = 0; - ok = ch->rslots & ~(cstatus | sstatus); err = 0; } /* Complete all successfull commands. */ + ok = ch->rslots & ~(cstatus | sstatus); for (i = 0; i < ch->numslots; i++) { if ((ok >> i) & 1) ahci_end_transaction(&ch->slot[i], AHCI_ERR_NONE); @@ -936,6 +1022,9 @@ ahci_ch_intr(void *data) if (ncq_err) ahci_issue_read_log(dev); } + /* Process NOTIFY events */ + if ((istatus & AHCI_P_IX_SDB) && (ch->caps & AHCI_CAP_SSNTF)) + ahci_notify_events(dev); } /* Must be called with channel locked. */ @@ -980,19 +1069,18 @@ ahci_begin_transaction(device_t dev, uni /* Choose empty slot. */ tag = ch->lastslot; - do { - tag++; - if (tag >= ch->numslots) + while (ch->slot[tag].state != AHCI_SLOT_EMPTY) { + if (++tag >= ch->numslots) tag = 0; - if (ch->slot[tag].state == AHCI_SLOT_EMPTY) - break; - } while (tag != ch->lastslot); - if (ch->slot[tag].state != AHCI_SLOT_EMPTY) - device_printf(ch->dev, "ALL SLOTS BUSY!\n"); + KASSERT(tag != ch->lastslot, "ahci: ALL SLOTS BUSY!"); + } ch->lastslot = tag; /* Occupy chosen slot. */ slot = &ch->slot[tag]; slot->ccb = ccb; + /* Stop PM timer. */ + if (ch->numrslots == 0 && ch->pm_level > 3) + callout_stop(&ch->pm_timer); /* Update channel stats. */ ch->numrslots++; if ((ccb->ccb_h.func_code == XPT_ATA_IO) && @@ -1162,6 +1250,10 @@ ahci_timeout(struct ahci_slot *slot) struct ahci_channel *ch = device_get_softc(dev); int i; + /* Check for stale timeout. */ + if (slot->state != AHCI_SLOT_RUNNING) + return; + device_printf(dev, "Timeout on slot %d\n", slot->slot); /* Kick controller into sane state. */ ahci_stop(ch->dev); @@ -1194,8 +1286,6 @@ ahci_end_transaction(struct ahci_slot *s struct ahci_channel *ch = device_get_softc(dev); union ccb *ccb = slot->ccb; - /* Cancel command execution timeout */ - callout_stop(&slot->timeout); bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTWRITE); /* Read result registers to the result struct @@ -1302,6 +1392,11 @@ ahci_end_transaction(struct ahci_slot *s ahci_begin_transaction(dev, fccb); xpt_release_simq(ch->sim, TRUE); } + /* Start PM timer. */ + if (ch->numrslots == 0 && ch->pm_level > 3) { + callout_schedule(&ch->pm_timer, + (ch->pm_level == 4) ? hz / 1000 : hz / 8); + } } static void @@ -1516,6 +1611,7 @@ static void ahci_reset(device_t dev) { struct ahci_channel *ch = device_get_softc(dev); + struct ahci_controller *ctlr = device_get_softc(device_get_parent(dev)); int i; if (bootverbose) @@ -1562,10 +1658,10 @@ ahci_reset(device_t dev) (AHCI_P_IX_CPD | AHCI_P_IX_TFE | AHCI_P_IX_HBF | AHCI_P_IX_HBD | AHCI_P_IX_IF | AHCI_P_IX_OF | ((ch->pm_level == 0) ? AHCI_P_IX_PRC | AHCI_P_IX_PC : 0) | - AHCI_P_IX_DP | AHCI_P_IX_UF | AHCI_P_IX_SDB | - AHCI_P_IX_DS | AHCI_P_IX_PS | AHCI_P_IX_DHR)); + AHCI_P_IX_DP | AHCI_P_IX_UF | (ctlr->ccc ? 0 : AHCI_P_IX_SDB) | + AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); if (bootverbose) - device_printf(dev, "AHCI reset done: devices=%08x\n", ch->devices); + device_printf(dev, "AHCI reset done: device found\n"); /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); } @@ -1632,6 +1728,13 @@ ahci_sata_connect(struct ahci_channel *c ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) break; + if ((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_OFFLINE) { + if (bootverbose) { + device_printf(ch->dev, "SATA offline status=%08x\n", + status); + } + return (0); + } DELAY(1000); } if (timeout >= 100) { @@ -1664,9 +1767,6 @@ ahci_sata_phy_reset(device_t dev, int qu if (bootverbose) device_printf(dev, "hardware reset ...\n"); - ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_IPM_DIS_PARTIAL | - ATA_SC_IPM_DIS_SLUMBER | ATA_SC_DET_RESET); - DELAY(50000); if (ch->sata_rev == 1) val = ATA_SC_SPD_SPEED_GEN1; else if (ch->sata_rev == 2) @@ -1676,9 +1776,13 @@ ahci_sata_phy_reset(device_t dev, int qu else val = 0; ATA_OUTL(ch->r_mem, AHCI_P_SCTL, + ATA_SC_DET_RESET | val | + ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER); + DELAY(5000); + ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); - DELAY(50000); + DELAY(5000); return (ahci_sata_connect(ch)); } @@ -1739,9 +1843,9 @@ ahciaction(struct cam_sim *sim, union cc uint32_t status; cts->protocol = PROTO_ATA; - cts->protocol_version = SCSI_REV_2; + cts->protocol_version = PROTO_VERSION_UNSPECIFIED; cts->transport = XPORT_SATA; - cts->transport_version = 2; + cts->transport_version = XPORT_VERSION_UNSPECIFIED; cts->proto_specific.valid = 0; cts->xport_specific.sata.valid = 0; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) @@ -1834,9 +1938,9 @@ ahciaction(struct cam_sim *sim, union cc strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_SATA; - cpi->transport_version = 2; + cpi->transport_version = XPORT_VERSION_UNSPECIFIED; cpi->protocol = PROTO_ATA; - cpi->protocol_version = SCSI_REV_2; + cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Sun Aug 30 15:06:03 2009 (r196655) +++ head/sys/dev/ahci/ahci.h Sun Aug 30 15:20:13 2009 (r196656) @@ -176,6 +176,21 @@ #define AHCI_PI 0x0c #define AHCI_VS 0x10 +#define AHCI_CCCC 0x14 +#define AHCI_CCCC_TV_MASK 0xffff0000 +#define AHCI_CCCC_TV_SHIFT 16 +#define AHCI_CCCC_CC_MASK 0x0000ff00 +#define AHCI_CCCC_CC_SHIFT 8 +#define AHCI_CCCC_INT_MASK 0x000000f8 +#define AHCI_CCCC_INT_SHIFT 3 +#define AHCI_CCCC_EN 0x00000001 +#define AHCI_CCCP 0x18 + +#define AHCI_CAP2 0x24 +#define AHCI_CAP2_BOH 0x00000001 +#define AHCI_CAP2_NVMP 0x00000002 +#define AHCI_CAP2_APST 0x00000004 + #define AHCI_OFFSET 0x100 #define AHCI_STEP 0x80 @@ -336,6 +351,7 @@ struct ahci_channel { struct cam_sim *sim; struct cam_path *path; uint32_t caps; /* Controller capabilities */ + uint32_t caps2; /* Controller capabilities */ int numslots; /* Number of present slots */ int pm_level; /* power management level */ int sata_rev; /* Maximum allowed SATA generation */ @@ -353,6 +369,7 @@ struct ahci_channel { int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ union ccb *frozen; /* Frozen command */ + struct callout pm_timer; /* Power management events */ }; /* structure describing a AHCI controller */ @@ -371,9 +388,13 @@ struct ahci_controller { #define AHCI_IRQ_MODE_AFTER 1 #define AHCI_IRQ_MODE_ONE 2 } irqs[16]; + uint32_t caps; /* Controller capabilities */ + uint32_t caps2; /* Controller capabilities */ int numirqs; int channels; int ichannels; + int ccc; /* CCC timeout */ + int cccv; /* CCC vector */ struct { void (*function)(void *); void *argument; From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 15:36:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECE0B106566B; Sun, 30 Aug 2009 15:36:56 +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 A76538FC18; Sun, 30 Aug 2009 15:36:56 +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 n7UFauYu098853; Sun, 30 Aug 2009 15:36:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UFauht098851; Sun, 30 Aug 2009 15:36:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200908301536.n7UFauht098851@svn.freebsd.org> From: Alexander Motin Date: Sun, 30 Aug 2009 15:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196657 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 15:36:57 -0000 Author: mav Date: Sun Aug 30 15:36:56 2009 New Revision: 196657 URL: http://svn.freebsd.org/changeset/base/196657 Log: ATA_FLUSHCACHE is a 36bit format command, not 48. Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Aug 30 15:20:13 2009 (r196656) +++ head/sys/cam/ata/ata_da.c Sun Aug 30 15:36:56 2009 (r196657) @@ -287,7 +287,7 @@ adaclose(struct disk *dp) if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_36bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0, /*sense_flags*/SF_RETRY_UA, softc->disk->d_devstat); @@ -441,7 +441,7 @@ adadump(void *arg, void *virtual, vm_off if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); xpt_polled_action(&ccb); if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) @@ -878,7 +878,7 @@ adastart(struct cam_periph *periph, unio if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_48bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_36bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); break; } start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO; @@ -1126,7 +1126,7 @@ adashutdown(void * arg, int howto) if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); xpt_polled_action(&ccb); if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 16:08:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85497106566B; Sun, 30 Aug 2009 16:08:25 +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 740D78FC16; Sun, 30 Aug 2009 16:08: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 n7UG8Pkk099460; Sun, 30 Aug 2009 16:08:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UG8PtQ099458; Sun, 30 Aug 2009 16:08:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200908301608.n7UG8PtQ099458@svn.freebsd.org> From: Alexander Motin Date: Sun, 30 Aug 2009 16:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196658 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 16:08:25 -0000 Author: mav Date: Sun Aug 30 16:08:25 2009 New Revision: 196658 URL: http://svn.freebsd.org/changeset/base/196658 Log: MFp4: - Tune protocol version reporting, - Add supported DMA/PIO modes reporting. - Fix IDENTIFY for ATAPI devices. - Remove confusing "-" for NCQ status. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun Aug 30 15:36:56 2009 (r196657) +++ head/sbin/camcontrol/camcontrol.c Sun Aug 30 16:08:25 2009 (r196658) @@ -206,6 +206,7 @@ static void cts_print(struct cam_device struct ccb_trans_settings *cts); static void cpi_print(struct ccb_pathinq *cpi); static int get_cpi(struct cam_device *device, struct ccb_pathinq *cpi); +static int get_cgd(struct cam_device *device, struct ccb_getdev *cgd); static int get_print_cts(struct cam_device *device, int user_settings, int quiet, struct ccb_trans_settings *cts); static int ratecontrol(struct cam_device *device, int retry_count, @@ -1015,17 +1016,18 @@ atacapprint(struct ata_params *parm) ((u_int64_t)parm->lba_size48_4 << 48); printf("\n"); - printf("Protocol "); + printf("protocol "); + printf("ATA/ATAPI-%d", ata_version(parm->version_major)); if (parm->satacapabilities && parm->satacapabilities != 0xffff) { if (parm->satacapabilities & ATA_SATA_GEN2) - printf("SATA revision 2.x\n"); + printf(" SATA 2.x\n"); else if (parm->satacapabilities & ATA_SATA_GEN1) - printf("SATA revision 1.x\n"); + printf(" SATA 1.x\n"); else - printf("Unknown SATA revision\n"); + printf(" SATA x.x\n"); } else - printf("ATA/ATAPI revision %d\n", ata_version(parm->version_major)); + printf("\n"); printf("device model %.40s\n", parm->model); printf("serial number %.20s\n", parm->serial); printf("firmware revision %.8s\n", parm->revision); @@ -1038,22 +1040,74 @@ atacapprint(struct ata_params *parm) (parm->support.command2 & ATA_SUPPORT_CFA)) printf("CFA supported\n"); - printf("lba%ssupported ", + printf("LBA%ssupported ", parm->capabilities1 & ATA_SUPPORT_LBA ? " " : " not "); if (lbasize) printf("%d sectors\n", lbasize); else printf("\n"); - printf("lba48%ssupported ", + printf("LBA48%ssupported ", parm->support.command2 & ATA_SUPPORT_ADDRESS48 ? " " : " not "); if (lbasize48) printf("%ju sectors\n", (uintmax_t)lbasize48); else printf("\n"); - printf("dma%ssupported\n", + printf("PIO supported PIO"); + if (parm->atavalid & ATA_FLAG_64_70) { + if (parm->apiomodes & 0x02) + printf("4"); + else if (parm->apiomodes & 0x01) + printf("3"); + } else if (parm->mwdmamodes & 0x04) + printf("4"); + else if (parm->mwdmamodes & 0x02) + printf("3"); + else if (parm->mwdmamodes & 0x01) + printf("2"); + else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x200) + printf("2"); + else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x100) + printf("1"); + else + printf("0"); + printf("\n"); + + printf("DMA%ssupported ", parm->capabilities1 & ATA_SUPPORT_DMA ? " " : " not "); + if (parm->capabilities1 & ATA_SUPPORT_DMA) { + if (parm->mwdmamodes & 0xff) { + printf("WDMA"); + if (parm->mwdmamodes & 0x04) + printf("2"); + else if (parm->mwdmamodes & 0x02) + printf("1"); + else if (parm->mwdmamodes & 0x01) + printf("0"); + printf(" "); + } + if ((parm->atavalid & ATA_FLAG_88) && + (parm->udmamodes & 0xff)) { + printf("UDMA"); + if (parm->udmamodes & 0x40) + printf("6"); + else if (parm->udmamodes & 0x20) + printf("5"); + else if (parm->udmamodes & 0x10) + printf("4"); + else if (parm->udmamodes & 0x08) + printf("3"); + else if (parm->udmamodes & 0x04) + printf("2"); + else if (parm->udmamodes & 0x02) + printf("1"); + else if (parm->udmamodes & 0x01) + printf("0"); + printf(" "); + } + } + printf("\n"); printf("overlap%ssupported\n", parm->capabilities1 & ATA_SUPPORT_OVERLAP ? " " : " not "); @@ -1070,10 +1124,10 @@ atacapprint(struct ata_params *parm) parm->enabled.command1 & ATA_SUPPORT_LOOKAHEAD ? "yes" : "no"); if (parm->satacapabilities && parm->satacapabilities != 0xffff) { - printf("Native Command Queuing (NCQ) %s %s" + printf("Native Command Queuing (NCQ) %s " " %d/0x%02X\n", parm->satacapabilities & ATA_SUPPORT_NCQ ? - "yes" : "no", " -", + "yes" : "no", (parm->satacapabilities & ATA_SUPPORT_NCQ) ? ATA_QUEUE_LEN(parm->queue) : 0, (parm->satacapabilities & ATA_SUPPORT_NCQ) ? @@ -1121,9 +1175,14 @@ ataidentify(struct cam_device *device, i { union ccb *ccb; struct ata_params *ident_buf; + struct ccb_getdev cgd; u_int i, error = 0; int16_t *ptr; - + + if (get_cgd(device, &cgd) != 0) { + warnx("couldn't get CGD"); + return(1); + } ccb = cam_getccb(device); if (ccb == NULL) { @@ -1152,10 +1211,10 @@ ataidentify(struct cam_device *device, i /*data_ptr*/(u_int8_t *)ptr, /*dxfer_len*/sizeof(struct ata_params), timeout ? timeout : 30 * 1000); -// if (periph->path->device->protocol == PROTO_ATA) + if (cgd.protocol == PROTO_ATA) ata_36bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0); -// else -// ata_36bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); + else + ata_36bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); /* Disable freezing the device queue */ ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; @@ -2588,46 +2647,71 @@ get_cpi(struct cam_device *device, struc int retval = 0; ccb = cam_getccb(device); - if (ccb == NULL) { warnx("get_cpi: couldn't allocate CCB"); return(1); } - bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_pathinq) - sizeof(struct ccb_hdr)); - ccb->ccb_h.func_code = XPT_PATH_INQ; - if (cam_send_ccb(device, ccb) < 0) { warn("get_cpi: error sending Path Inquiry CCB"); - if (arglist & CAM_ARG_VERBOSE) cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - retval = 1; - goto get_cpi_bailout; } - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if (arglist & CAM_ARG_VERBOSE) cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - retval = 1; - goto get_cpi_bailout; } - bcopy(&ccb->cpi, cpi, sizeof(struct ccb_pathinq)); get_cpi_bailout: - cam_freeccb(ccb); + return(retval); +} +/* + * Get a get device CCB for the specified device. + */ +static int +get_cgd(struct cam_device *device, struct ccb_getdev *cgd) +{ + union ccb *ccb; + int retval = 0; + + ccb = cam_getccb(device); + if (ccb == NULL) { + warnx("get_cgd: couldn't allocate CCB"); + return(1); + } + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_pathinq) - sizeof(struct ccb_hdr)); + ccb->ccb_h.func_code = XPT_GDEV_TYPE; + if (cam_send_ccb(device, ccb) < 0) { + warn("get_cgd: error sending Path Inquiry CCB"); + if (arglist & CAM_ARG_VERBOSE) + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + retval = 1; + goto get_cgd_bailout; + } + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if (arglist & CAM_ARG_VERBOSE) + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + retval = 1; + goto get_cgd_bailout; + } + bcopy(&ccb->cgd, cgd, sizeof(struct ccb_getdev)); + +get_cgd_bailout: + cam_freeccb(ccb); return(retval); } @@ -2673,6 +2757,9 @@ cpi_print(struct ccb_pathinq *cpi) case PI_SOFT_RST: str = "soft reset alternative"; break; + case PI_SATAPM: + str = "SATA Port Multiplier"; + break; default: str = "unknown PI bit set"; break; @@ -2702,6 +2789,12 @@ cpi_print(struct ccb_pathinq *cpi) str = "user has disabled initial BUS RESET or" " controller is in target/mixed mode"; break; + case PIM_NO_6_BYTE: + str = "do not send 6-byte commands"; + break; + case PIM_SEQSCAN: + str = "scan bus sequentially"; + break; default: str = "unknown PIM bit set"; break; From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 16:31:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A578D106566C; Sun, 30 Aug 2009 16:31:25 +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 93D638FC0C; Sun, 30 Aug 2009 16:31: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 n7UGVPlN099996; Sun, 30 Aug 2009 16:31:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UGVPHr099990; Sun, 30 Aug 2009 16:31:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200908301631.n7UGVPHr099990@svn.freebsd.org> From: Alexander Motin Date: Sun, 30 Aug 2009 16:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196659 - in head: sbin/camcontrol sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 16:31:25 -0000 Author: mav Date: Sun Aug 30 16:31:25 2009 New Revision: 196659 URL: http://svn.freebsd.org/changeset/base/196659 Log: Short ATA command format has 28bit address, not 36bit. Rename ata_36bit_cmd() into ata_28bit_cmd(), while it didn't become legacy. MFC after: 2 days Modified: head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_all.c head/sys/cam/ata/ata_all.h head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_xpt.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sbin/camcontrol/camcontrol.c Sun Aug 30 16:31:25 2009 (r196659) @@ -1212,9 +1212,9 @@ ataidentify(struct cam_device *device, i /*dxfer_len*/sizeof(struct ata_params), timeout ? timeout : 30 * 1000); if (cgd.protocol == PROTO_ATA) - ata_36bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0); else - ata_36bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); /* Disable freezing the device queue */ ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_all.c Sun Aug 30 16:31:25 2009 (r196659) @@ -91,7 +91,7 @@ ata_print_ident(struct ata_params *ident } void -ata_36bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, +ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, uint32_t lba, uint8_t sector_count) { bzero(&ataio->cmd, sizeof(ataio->cmd)); Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_all.h Sun Aug 30 16:31:25 2009 (r196659) @@ -83,7 +83,7 @@ struct ata_res { int ata_version(int ver); void ata_print_ident(struct ata_params *ident_data); -void ata_36bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, +void ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features, uint32_t lba, uint8_t sector_count); void ata_48bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint16_t features, uint64_t lba, uint16_t sector_count); Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_da.c Sun Aug 30 16:31:25 2009 (r196659) @@ -287,7 +287,7 @@ adaclose(struct disk *dp) if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0, /*sense_flags*/SF_RETRY_UA, softc->disk->d_devstat); @@ -411,7 +411,7 @@ adadump(void *arg, void *virtual, vm_off ata_48bit_cmd(&ccb.ataio, ATA_WRITE_DMA48, 0, lba, count); } else { - ata_36bit_cmd(&ccb.ataio, ATA_WRITE_DMA, + ata_28bit_cmd(&ccb.ataio, ATA_WRITE_DMA, 0, lba, count); } xpt_polled_action(&ccb); @@ -441,7 +441,7 @@ adadump(void *arg, void *virtual, vm_off if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); xpt_polled_action(&ccb); if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) @@ -856,10 +856,10 @@ adastart(struct cam_periph *periph, unio } } else { if (bp->bio_cmd == BIO_READ) { - ata_36bit_cmd(ataio, ATA_READ_DMA, + ata_28bit_cmd(ataio, ATA_READ_DMA, 0, lba, count); } else { - ata_36bit_cmd(ataio, ATA_WRITE_DMA, + ata_28bit_cmd(ataio, ATA_WRITE_DMA, 0, lba, count); } } @@ -878,7 +878,7 @@ adastart(struct cam_periph *periph, unio if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); break; } start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO; @@ -1126,7 +1126,7 @@ adashutdown(void * arg, int howto) if (softc->flags & ADA_FLAG_CAN_48BIT) ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); else - ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); + ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); xpt_polled_action(&ccb); if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Sun Aug 30 16:08:25 2009 (r196658) +++ head/sys/cam/ata/ata_xpt.c Sun Aug 30 16:31:25 2009 (r196659) @@ -357,9 +357,9 @@ probestart(struct cam_periph *periph, un /*dxfer_len*/sizeof(struct ata_params), 30 * 1000); if (periph->path->device->protocol == PROTO_ATA) - ata_36bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); else - ata_36bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); + ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); break; } case PROBE_SETMODE: @@ -375,7 +375,7 @@ probestart(struct cam_periph *periph, un /*data_ptr*/NULL, /*dxfer_len*/0, 30 * 1000); - ata_36bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0, + ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0, ata_max_mode(ident_buf, ATA_UDMA6, ATA_UDMA6)); break; } From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 19:40:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2643106568B; Sun, 30 Aug 2009 19:40:09 +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 C20E98FC0A; Sun, 30 Aug 2009 19:40: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 n7UJe9LC003815; Sun, 30 Aug 2009 19:40:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UJe9w0003813; Sun, 30 Aug 2009 19:40:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200908301940.n7UJe9w0003813@svn.freebsd.org> From: Alexander Motin Date: Sun, 30 Aug 2009 19:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196660 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 19:40:09 -0000 Author: mav Date: Sun Aug 30 19:40:09 2009 New Revision: 196660 URL: http://svn.freebsd.org/changeset/base/196660 Log: Fix build with INVARIANTS. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Aug 30 16:31:25 2009 (r196659) +++ head/sys/dev/ahci/ahci.c Sun Aug 30 19:40:09 2009 (r196660) @@ -1072,7 +1072,7 @@ ahci_begin_transaction(device_t dev, uni while (ch->slot[tag].state != AHCI_SLOT_EMPTY) { if (++tag >= ch->numslots) tag = 0; - KASSERT(tag != ch->lastslot, "ahci: ALL SLOTS BUSY!"); + KASSERT(tag != ch->lastslot, ("ahci: ALL SLOTS BUSY!")); } ch->lastslot = tag; /* Occupy chosen slot. */ From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 20:45:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CF13106566C; Sun, 30 Aug 2009 20:45:24 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BB4D8FC12; Sun, 30 Aug 2009 20:45:24 +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 n7UKjOwh005039; Sun, 30 Aug 2009 20:45:24 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UKjO0Y005037; Sun, 30 Aug 2009 20:45:24 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200908302045.n7UKjO0Y005037@svn.freebsd.org> From: Kip Macy Date: Sun, 30 Aug 2009 20:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196661 - head/sys/dev/xen/blkfront X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 20:45:24 -0000 Author: kmacy Date: Sun Aug 30 20:45:24 2009 New Revision: 196661 URL: http://svn.freebsd.org/changeset/base/196661 Log: add core dump support to blkfront Obtained from: Frank Suchomel Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Sun Aug 30 19:40:09 2009 (r196660) +++ head/sys/dev/xen/blkfront/blkfront.c Sun Aug 30 20:45:24 2009 (r196661) @@ -16,7 +16,9 @@ */ /* - * XenoBSD block device driver + * XenBSD block device driver + * + * Copyright (c) 2009 Frank Suchomel, Citrix */ #include @@ -122,6 +124,10 @@ static int blkif_ioctl(struct disk *dp, static int blkif_queue_request(struct bio *bp); static void xb_strategy(struct bio *bp); +// In order to quiesce the device during kernel dumps, outstanding requests to +// DOM0 for disk reads/writes need to be accounted for. +static int blkif_queued_requests; +static int xb_dump(void *, void *, vm_offset_t, off_t, size_t); /* XXX move to xb_vbd.c when VBD update support is added */ @@ -231,6 +237,7 @@ xlvbd_add(device_t dev, blkif_sector_t c sc->xb_disk->d_close = blkif_close; sc->xb_disk->d_ioctl = blkif_ioctl; sc->xb_disk->d_strategy = xb_strategy; + sc->xb_disk->d_dump = xb_dump; sc->xb_disk->d_name = name; sc->xb_disk->d_drv1 = sc; sc->xb_disk->d_sectorsize = sector_size; @@ -286,9 +293,10 @@ xb_strategy(struct bio *bp) * Place it in the queue of disk activities for this disk */ mtx_lock(&blkif_io_lock); - bioq_disksort(&sc->xb_bioq, bp); + bioq_disksort(&sc->xb_bioq, bp); xb_startio(sc); + mtx_unlock(&blkif_io_lock); return; @@ -301,6 +309,81 @@ xb_strategy(struct bio *bp) return; } +static void xb_quiesce(struct blkfront_info *info); +// Quiesce the disk writes for a dump file before allowing the next buffer. +static void +xb_quiesce(struct blkfront_info *info) +{ + int mtd; + + // While there are outstanding requests + while (blkif_queued_requests) { + RING_FINAL_CHECK_FOR_RESPONSES(&info->ring, mtd); + if (mtd) { + // Recieved request completions, update queue. + blkif_int(info); + } + if (blkif_queued_requests) { + // Still pending requests, wait for the disk i/o to complete + HYPERVISOR_block(); + } + } +} + +// Some bio structures for dumping core +#define DUMP_BIO_NO 16 // 16 * 4KB = 64KB dump block +static struct bio xb_dump_bp[DUMP_BIO_NO]; + +// Kernel dump function for a paravirtualized disk device +static int +xb_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, + size_t length) +{ + int sbp; + int mbp; + size_t chunk; + struct disk *dp = arg; + struct xb_softc *sc = (struct xb_softc *) dp->d_drv1; + int rc = 0; + + xb_quiesce(sc->xb_info); // All quiet on the western front. + if (length > 0) { + // If this lock is held, then this module is failing, and a successful + // kernel dump is highly unlikely anyway. + mtx_lock(&blkif_io_lock); + // Split the 64KB block into 16 4KB blocks + for (sbp=0; length>0 && sbp PAGE_SIZE ? PAGE_SIZE : length; + xb_dump_bp[sbp].bio_disk = dp; + xb_dump_bp[sbp].bio_pblkno = offset / dp->d_sectorsize; + xb_dump_bp[sbp].bio_bcount = chunk; + xb_dump_bp[sbp].bio_resid = chunk; + xb_dump_bp[sbp].bio_data = virtual; + xb_dump_bp[sbp].bio_cmd = BIO_WRITE; + xb_dump_bp[sbp].bio_done = NULL; + + bioq_disksort(&sc->xb_bioq, &xb_dump_bp[sbp]); + + length -= chunk; + offset += chunk; + virtual = (char *) virtual + chunk; + } + // Tell DOM0 to do the I/O + xb_startio(sc); + mtx_unlock(&blkif_io_lock); + + // Must wait for the completion: the dump routine reuses the same + // 16 x 4KB buffer space. + xb_quiesce(sc->xb_info); // All quite on the eastern front + // If there were any errors, bail out... + for (mbp=0; mbp RING_SIZE", nfree)); info->shadow_free = info->shadow[nfree].req.id; info->shadow[nfree].req.id = 0x0fffffee; /* debug */ + atomic_add_int(&blkif_queued_requests, 1); return nfree; } @@ -655,6 +739,7 @@ ADD_ID_TO_FREELIST(struct blkfront_info info->shadow[id].req.id = info->shadow_free; info->shadow[id].request = 0; info->shadow_free = id; + atomic_subtract_int(&blkif_queued_requests, 1); } static inline void From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 20:58:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAF481065672; Sun, 30 Aug 2009 20:58:28 +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 A95A98FC19; Sun, 30 Aug 2009 20:58:28 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B4BB56D449; Sun, 30 Aug 2009 20:58:27 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 90BBC844A4; Sun, 30 Aug 2009 22:58:27 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jonathan Chen References: <200908300512.n7U5Cbg2084038@svn.freebsd.org> Date: Sun, 30 Aug 2009 22:58:27 +0200 In-Reply-To: <200908300512.n7U5Cbg2084038@svn.freebsd.org> (Jonathan Chen's message of "Sun, 30 Aug 2009 05:12:37 +0000 (UTC)") Message-ID: <86my5hdnnw.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 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196650 - head/lib/libpam/modules/pam_lastlog X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 20:58:29 -0000 Jonathan Chen writes: > Log: > Prevents pam_lastlog from segfaulting on session close when tty is null. >=20=20=20 > MFC after: 1 month Reviewed by: nobody Approved by: nobody Please consult MAINTAINERS next time. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Sun Aug 30 21:03:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D429106566B; Sun, 30 Aug 2009 21:03:41 +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 3BC598FC1C; Sun, 30 Aug 2009 21:03:41 +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 n7UL3f0v005465; Sun, 30 Aug 2009 21:03:41 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7UL3fja005463; Sun, 30 Aug 2009 21:03:41 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200908302103.n7UL3fja005463@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 30 Aug 2009 21:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196662 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 21:03:41 -0000 Author: pjd Date: Sun Aug 30 21:03:40 2009 New Revision: 196662 URL: http://svn.freebsd.org/changeset/base/196662 Log: Add missing mountpoint vnode locking. This fixes panic on assertion with DEBUG_VFS_LOCKS and vfs.usermount=1 when regular user tries to mount dataset owned by him. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Aug 30 20:45:24 2009 (r196661) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Aug 30 21:03:40 2009 (r196662) @@ -729,7 +729,9 @@ zfs_mount(vfs_t *vfsp) vattr.va_mask = AT_UID; + vn_lock(mvp, LK_SHARED | LK_RETRY); if (error = VOP_GETATTR(mvp, &vattr, cr)) { + VOP_UNLOCK(mvp, 0); goto out; } @@ -741,12 +743,15 @@ zfs_mount(vfs_t *vfsp) } #else if (error = secpolicy_vnode_owner(mvp, cr, vattr.va_uid)) { + VOP_UNLOCK(mvp, 0); goto out; } if (error = VOP_ACCESS(mvp, VWRITE, cr, td)) { + VOP_UNLOCK(mvp, 0); goto out; } + VOP_UNLOCK(mvp, 0); #endif secpolicy_fs_mount_clearopts(cr, vfsp); From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 00:14:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C1E31065670; Mon, 31 Aug 2009 00:14:37 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5E18FC13; Mon, 31 Aug 2009 00:14:37 +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 n7V0Ebwd010524; Mon, 31 Aug 2009 00:14:37 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7V0EbHE010522; Mon, 31 Aug 2009 00:14:37 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908310014.n7V0EbHE010522@svn.freebsd.org> From: Qing Li Date: Mon, 31 Aug 2009 00:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196678 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 00:14:37 -0000 Author: qingli Date: Mon Aug 31 00:14:37 2009 New Revision: 196678 URL: http://svn.freebsd.org/changeset/base/196678 Log: As part of r196609, a call to "rtalloc" did not take the fib into account. So call the appropriate "rtalloc_ign_fib()" instead of calling "rtalloc_ign()". Reviewed by:i pointed out by bz MFC after: immediately Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Aug 30 23:16:52 2009 (r196677) +++ head/sys/net/rtsock.c Mon Aug 31 00:14:37 2009 (r196678) @@ -527,7 +527,7 @@ route_output(struct mbuf *m, struct sock bzero(&gw_ro, sizeof(gw_ro)); gw_ro.ro_dst = *info.rti_info[RTAX_GATEWAY]; - rtalloc_ign(&gw_ro, 0); + rtalloc_ign_fib(&gw_ro, 0, so->so_fibnum); /* * A host route through the loopback interface is * installed for each interface adddress. In pre 8.0 From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 09:26:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FC221065670; Mon, 31 Aug 2009 09:26:05 +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 0EEDE8FC08; Mon, 31 Aug 2009 09:26: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 n7V9Q4gD022242; Mon, 31 Aug 2009 09:26:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7V9Q4qB022240; Mon, 31 Aug 2009 09:26:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908310926.n7V9Q4qB022240@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 31 Aug 2009 09:26:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196689 - head/sys/fs/pseudofs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 09:26:05 -0000 Author: kib Date: Mon Aug 31 09:26:04 2009 New Revision: 196689 URL: http://svn.freebsd.org/changeset/base/196689 Log: Remove spurious pfs_unlock(). PR: kern/137310 Reviewed by: des MFC after: 3 days Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Mon Aug 31 09:20:37 2009 (r196688) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Mon Aug 31 09:26:04 2009 (r196689) @@ -339,7 +339,6 @@ pfs_getextattr(struct vop_getextattr_arg if (proc != NULL) PROC_UNLOCK(proc); - pfs_unlock(pn); PFS_RETURN (error); } From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 10:20:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B87DF106566B; Mon, 31 Aug 2009 10:20:52 +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 A7CC38FC21; Mon, 31 Aug 2009 10:20:52 +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 n7VAKqgx023587; Mon, 31 Aug 2009 10:20:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VAKqrG023585; Mon, 31 Aug 2009 10:20:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908311020.n7VAKqrG023585@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 31 Aug 2009 10:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196692 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 10:20:52 -0000 Author: kib Date: Mon Aug 31 10:20:52 2009 New Revision: 196692 URL: http://svn.freebsd.org/changeset/base/196692 Log: Make the mnt_writeopcount and mnt_secondary_writes counters, used by the suspension code, not greater then mnt_ref reference counter value. Increment mnt_ref together with write counter in vn_start_write()/ vn_start_secondary_write(), releasing in vn_finished_write/vn_finished_secondary_write(). Since r186197, unmount code requires that no writers occured after all references are expired. We still could get write counter incremented for freed or reused struct mount, but it seems to be innocent, since corresponding vnode should be referenced and reclaimed then. Reported by: pho (last half a year), erwin Reviewed by: attilio Tested by: pho, erwin MFC after: 1 week Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Mon Aug 31 09:46:09 2009 (r196691) +++ head/sys/kern/vfs_vnops.c Mon Aug 31 10:20:52 2009 (r196692) @@ -999,7 +999,8 @@ vn_start_write(vp, mpp, flags) goto unlock; mp->mnt_writeopcount++; unlock: - MNT_REL(mp); + if (error != 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-head@FreeBSD.ORG Mon Aug 31 12:25:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E73B1065692; Mon, 31 Aug 2009 12:25: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 D2C718FC18; Mon, 31 Aug 2009 12:25: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 8303746B29; Mon, 31 Aug 2009 08:25:49 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id DC3D78A02E; Mon, 31 Aug 2009 08:25:48 -0400 (EDT) From: John Baldwin To: Alan Cox Date: Mon, 31 Aug 2009 08:25:13 -0400 User-Agent: KMail/1.9.7 References: <200908260330.n7Q3U61l047845@svn.freebsd.org> <200908260734.12893.jhb@freebsd.org> <4A999104.9030809@cs.rice.edu> In-Reply-To: <4A999104.9030809@cs.rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908310825.14372.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 31 Aug 2009 08:25:48 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.3 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-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival Subject: Re: svn commit: r196558 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 12:25:50 -0000 On Saturday 29 August 2009 4:35:16 pm Alan Cox wrote: > John Baldwin wrote: > > On Tuesday 25 August 2009 11:30:06 pm Colin Percival wrote: > > > >> Author: cperciva > >> Date: Wed Aug 26 03:30:06 2009 > >> New Revision: 196558 > >> URL: http://svn.freebsd.org/changeset/base/196558 > >> > >> Log: > >> Don't try to mmap the contents of empty files. This behaviour was harmless > >> prior to r195693, since historical behaviour of mmap(2) was to silently > >> ignore length-zero mmap requests; but mmap now returns EINVAL, which caused > >> look(1) to emit an error message and fail. > >> > > > > FWIW, it did not silently ignore the request. Instead it rounded the size up > > to a page and mapped a page of data. However, if you then passed that pointer > > with a length of 0 to munmap() munmap() would fail. > > > > > > I don't believe that your claim is correct; round_page(0) == 0. Thus, > the value of "size" that would be passed to vm_mmap() would be 0, which > would cause it to immediately return "0", indicating success. In this > case, I believe that the virtual address that would be returned by > mmap(2) would always be the "hint address" for where it should start > looking for free space, which would be the end of the heap/data segment, > unless the application specified its own hint. > > In short, and the reason why I'm correcting you here, is to make clear > that we needn't worry about earlier versions of FreeBSD that don't > implement this change "leaking" or wasting memory from misuse of mmap(2) > in this way. Yes, I think you are correct. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 13:23:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 400681065672; Mon, 31 Aug 2009 13:23:56 +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 2DEEC8FC1C; Mon, 31 Aug 2009 13:23:56 +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 n7VDNuOc028799; Mon, 31 Aug 2009 13:23:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VDNuRP028798; Mon, 31 Aug 2009 13:23:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908311323.n7VDNuRP028798@svn.freebsd.org> From: John Baldwin Date: Mon, 31 Aug 2009 13:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196696 - in head: lib/libusb tools/regression/lib/msun tools/tools/ath/common usr.sbin/makefs usr.sbin/makefs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 13:23:56 -0000 Author: jhb Date: Mon Aug 31 13:23:55 2009 New Revision: 196696 URL: http://svn.freebsd.org/changeset/base/196696 Log: Delete some empty mergeinfo. Modified: head/lib/libusb/ (props changed) head/lib/libusb/libusb20.3 (props changed) head/tools/regression/lib/msun/test-conj.t (props changed) head/tools/tools/ath/common/dumpregs.h (props changed) head/tools/tools/ath/common/dumpregs_5210.c (props changed) head/tools/tools/ath/common/dumpregs_5211.c (props changed) head/tools/tools/ath/common/dumpregs_5212.c (props changed) head/tools/tools/ath/common/dumpregs_5416.c (props changed) head/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) head/usr.sbin/makefs/ffs/ffs_subr.c (props changed) head/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) head/usr.sbin/makefs/getid.c (props changed) From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 14:06:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D44F61065672; Mon, 31 Aug 2009 14:06: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 A9A4C8FC1C; Mon, 31 Aug 2009 14:06: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 n7VE6xDw029819; Mon, 31 Aug 2009 14:06:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VE6xRg029818; Mon, 31 Aug 2009 14:06:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908311406.n7VE6xRg029818@svn.freebsd.org> From: John Baldwin Date: Mon, 31 Aug 2009 14:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196698 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 14:06:59 -0000 Author: jhb Date: Mon Aug 31 14:06:59 2009 New Revision: 196698 URL: http://svn.freebsd.org/changeset/base/196698 Log: Purge some non-useful mergeinfo that is a relic from a temporary USB2 name for this file. Modified: head/lib/libusb/usb.h (props changed) From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 16:19:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE921065670; Mon, 31 Aug 2009 16:19:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5F98FC1F; Mon, 31 Aug 2009 16:19: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 n7VGJ7nf032512; Mon, 31 Aug 2009 16:19:07 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VGJ7iG032511; Mon, 31 Aug 2009 16:19:07 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908311619.n7VGJ7iG032511@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 31 Aug 2009 16:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196700 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 16:19:07 -0000 Author: trasz Date: Mon Aug 31 16:19:06 2009 New Revision: 196700 URL: http://svn.freebsd.org/changeset/base/196700 Log: Manual page for mfiutil(8) is in section 8 now. Modified: head/share/man/man4/mfi.4 Modified: head/share/man/man4/mfi.4 ============================================================================== --- head/share/man/man4/mfi.4 Mon Aug 31 14:13:45 2009 (r196699) +++ head/share/man/man4/mfi.4 Mon Aug 31 16:19:06 2009 (r196700) @@ -102,9 +102,9 @@ management interface An attempt was made to remove a mounted volume. .El .Sh SEE ALSO -.Xr mfiutil 1 , .Xr amr 4 , -.Xr pci 4 +.Xr pci 4 , +.Xr mfiutil 8 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 16:20:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6B7D10656A6; Mon, 31 Aug 2009 16:20:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 954418FC18; Mon, 31 Aug 2009 16:20:06 +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 n7VGK6Qb032577; Mon, 31 Aug 2009 16:20:06 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VGK65V032575; Mon, 31 Aug 2009 16:20:06 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908311620.n7VGK65V032575@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 31 Aug 2009 16:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196701 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 16:20:06 -0000 Author: trasz Date: Mon Aug 31 16:20:06 2009 New Revision: 196701 URL: http://svn.freebsd.org/changeset/base/196701 Log: Make it easier to find proper manual page for newer ServeRAID controllers. Modified: head/share/man/man4/ips.4 Modified: head/share/man/man4/ips.4 ============================================================================== --- head/share/man/man4/ips.4 Mon Aug 31 16:19:06 2009 (r196700) +++ head/share/man/man4/ips.4 Mon Aug 31 16:20:06 2009 (r196701) @@ -92,6 +92,10 @@ ServeRAID 6i/6M .It ServeRAID 7t/7k/7M .El +.Pp +Newer ServeRAID controllers are supported by the +.Xr aac 4 +driver. .Sh DIAGNOSTICS Several error codes may be shown when the card initializes the .Tn IBM @@ -180,6 +184,7 @@ driver does not use the .Tn SCSI subsystem. .Sh SEE ALSO +.Xr aac 4 , .Xr ch 4 , .Xr da 4 , .Xr sysctl 8 From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 16:25:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDD66106568B; Mon, 31 Aug 2009 16:25:55 +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 A2DE78FC1B; Mon, 31 Aug 2009 16:25: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 n7VGPtUY032744; Mon, 31 Aug 2009 16:25:55 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VGPtl3032743; Mon, 31 Aug 2009 16:25:55 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200908311625.n7VGPtl3032743@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 31 Aug 2009 16:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196702 - head/sys/cddl/contrib/opensolaris/uts/common/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 16:25:55 -0000 Author: pjd Date: Mon Aug 31 16:25:55 2009 New Revision: 196702 URL: http://svn.freebsd.org/changeset/base/196702 Log: Remove empty directory. Deleted: head/sys/cddl/contrib/opensolaris/uts/common/rpc/ From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 16:27:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 458BA106568F; Mon, 31 Aug 2009 16:27:01 +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 32BB68FC1D; Mon, 31 Aug 2009 16:27: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 n7VGR17E032801; Mon, 31 Aug 2009 16:27:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VGR15P032796; Mon, 31 Aug 2009 16:27:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200908311627.n7VGR15P032796@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 31 Aug 2009 16:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196703 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 16:27:01 -0000 Author: pjd Date: Mon Aug 31 16:27:00 2009 New Revision: 196703 URL: http://svn.freebsd.org/changeset/base/196703 Log: Backport the 'dirtying dbuf' panic fix from newer ZFS version. Reported by: Thomas Backman MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Mon Aug 31 16:25:55 2009 (r196702) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Mon Aug 31 16:27:00 2009 (r196703) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -864,10 +864,11 @@ restore_object(struct restorearg *ra, ob /* currently allocated, want to be allocated */ dmu_tx_hold_bonus(tx, drro->drr_object); /* - * We may change blocksize, so need to - * hold_write + * We may change blocksize and delete old content, + * so need to hold_write and hold_free. */ dmu_tx_hold_write(tx, drro->drr_object, 0, 1); + dmu_tx_hold_free(tx, drro->drr_object, 0, DMU_OBJECT_END); err = dmu_tx_assign(tx, TXG_WAIT); if (err) { dmu_tx_abort(tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Aug 31 16:25:55 2009 (r196702) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Aug 31 16:27:00 2009 (r196703) @@ -415,7 +415,7 @@ void dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { - int i, old_nblkptr; + int i, nblkptr; dmu_buf_impl_t *db = NULL; ASSERT3U(blocksize, >=, SPA_MINBLOCKSIZE); @@ -445,6 +445,8 @@ dnode_reallocate(dnode_t *dn, dmu_object dnode_free_range(dn, 0, -1ULL, tx); } + nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT); + /* change blocksize */ rw_enter(&dn->dn_struct_rwlock, RW_WRITER); if (blocksize != dn->dn_datablksz && @@ -457,6 +459,8 @@ dnode_reallocate(dnode_t *dn, dmu_object dnode_setdirty(dn, tx); dn->dn_next_bonuslen[tx->tx_txg&TXG_MASK] = bonuslen; dn->dn_next_blksz[tx->tx_txg&TXG_MASK] = blocksize; + if (dn->dn_nblkptr != nblkptr) + dn->dn_next_nblkptr[tx->tx_txg&TXG_MASK] = nblkptr; rw_exit(&dn->dn_struct_rwlock); if (db) dbuf_rele(db, FTAG); @@ -466,19 +470,15 @@ dnode_reallocate(dnode_t *dn, dmu_object /* change bonus size and type */ mutex_enter(&dn->dn_mtx); - old_nblkptr = dn->dn_nblkptr; dn->dn_bonustype = bonustype; dn->dn_bonuslen = bonuslen; - dn->dn_nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT); + dn->dn_nblkptr = nblkptr; dn->dn_checksum = ZIO_CHECKSUM_INHERIT; dn->dn_compress = ZIO_COMPRESS_INHERIT; ASSERT3U(dn->dn_nblkptr, <=, DN_MAX_NBLKPTR); - /* XXX - for now, we can't make nblkptr smaller */ - ASSERT3U(dn->dn_nblkptr, >=, old_nblkptr); - - /* fix up the bonus db_size if dn_nblkptr has changed */ - if (dn->dn_bonus && dn->dn_bonuslen != old_nblkptr) { + /* fix up the bonus db_size */ + if (dn->dn_bonus) { dn->dn_bonus->db.db_size = DN_MAX_BONUSLEN - (dn->dn_nblkptr-1) * sizeof (blkptr_t); ASSERT(dn->dn_bonuslen <= dn->dn_bonus->db.db_size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Aug 31 16:25:55 2009 (r196702) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Aug 31 16:27:00 2009 (r196703) @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -534,18 +532,12 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) /* XXX shouldn't the phys already be zeroed? */ bzero(dnp, DNODE_CORE_SIZE); dnp->dn_nlevels = 1; + dnp->dn_nblkptr = dn->dn_nblkptr; } - if (dn->dn_nblkptr > dnp->dn_nblkptr) { - /* zero the new blkptrs we are gaining */ - bzero(dnp->dn_blkptr + dnp->dn_nblkptr, - sizeof (blkptr_t) * - (dn->dn_nblkptr - dnp->dn_nblkptr)); - } dnp->dn_type = dn->dn_type; dnp->dn_bonustype = dn->dn_bonustype; dnp->dn_bonuslen = dn->dn_bonuslen; - dnp->dn_nblkptr = dn->dn_nblkptr; } ASSERT(dnp->dn_nlevels > 1 || @@ -605,6 +597,30 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) return; } + if (dn->dn_next_nblkptr[txgoff]) { + /* this should only happen on a realloc */ + ASSERT(dn->dn_allocated_txg == tx->tx_txg); + if (dn->dn_next_nblkptr[txgoff] > dnp->dn_nblkptr) { + /* zero the new blkptrs we are gaining */ + bzero(dnp->dn_blkptr + dnp->dn_nblkptr, + sizeof (blkptr_t) * + (dn->dn_next_nblkptr[txgoff] - dnp->dn_nblkptr)); +#ifdef ZFS_DEBUG + } else { + int i; + ASSERT(dn->dn_next_nblkptr[txgoff] < dnp->dn_nblkptr); + /* the blkptrs we are losing better be unallocated */ + for (i = dn->dn_next_nblkptr[txgoff]; + i < dnp->dn_nblkptr; i++) + ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[i])); +#endif + } + mutex_enter(&dn->dn_mtx); + dnp->dn_nblkptr = dn->dn_next_nblkptr[txgoff]; + dn->dn_next_nblkptr[txgoff] = 0; + mutex_exit(&dn->dn_mtx); + } + if (dn->dn_next_nlevels[txgoff]) { dnode_increase_indirection(dn, tx); dn->dn_next_nlevels[txgoff] = 0; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Mon Aug 31 16:25:55 2009 (r196702) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Mon Aug 31 16:27:00 2009 (r196703) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -160,6 +160,7 @@ typedef struct dnode { uint16_t dn_datablkszsec; /* in 512b sectors */ uint32_t dn_datablksz; /* in bytes */ uint64_t dn_maxblkid; + uint8_t dn_next_nblkptr[TXG_SIZE]; uint8_t dn_next_nlevels[TXG_SIZE]; uint8_t dn_next_indblkshift[TXG_SIZE]; uint16_t dn_next_bonuslen[TXG_SIZE]; From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 16:58:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CA091065676; Mon, 31 Aug 2009 16:58:34 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id 876D48FC0C; Mon, 31 Aug 2009 16:58:33 +0000 (UTC) Received: by bwz2 with SMTP id 2so2737608bwz.43 for ; Mon, 31 Aug 2009 09:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZgOrBUcelQHG5U8mte8IzxD0RB2/NIKB3Rcwks1ReFE=; b=W9AaluSZOlCVduwPlh2nisKcxTDXTS9I6ZgtbFDwk0Ud3MK62hS4K6aVWJLDEu1TvO 61izqtPIwFWjq8uYDWsEet28clweZJtslx7yrGN4P4VzhwjqZWY2Z+sqlf8xcu3HVkEA qdMzzUms6uSgp0iP0PgnKQB+tm3H34Bu0fFWU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ai5HoGBrOebNo3DyZQA+3HHP7nu66fZsm9NYj91BlLv5oHhUGxkeJ4KQuhHLt3rzJl bctU0BQWTH+TNXRI/Kc+UTQlgTu41AsbdPnOwTtA5IbU+8LKSOiHzagWs3xmADFuqbAS RK0l9SUDfxBtFvK5W4HRLRKlfJ1nvfwQYhBqM= MIME-Version: 1.0 Received: by 10.204.162.210 with SMTP id w18mr4499643bkx.174.1251737912537; Mon, 31 Aug 2009 09:58:32 -0700 (PDT) In-Reply-To: <200908311620.n7VGK65V032575@svn.freebsd.org> References: <200908311620.n7VGK65V032575@svn.freebsd.org> Date: Mon, 31 Aug 2009 20:58:32 +0400 Message-ID: From: pluknet To: Edward Tomasz Napierala Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196701 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 16:58:34 -0000 2009/8/31 Edward Tomasz Napierala : > Author: trasz > Date: Mon Aug 31 16:20:06 2009 > New Revision: 196701 > URL: http://svn.freebsd.org/changeset/base/196701 > > Log: > =A0Make it easier to find proper manual page for newer ServeRAID controll= ers. > > Modified: > =A0head/share/man/man4/ips.4 > > Modified: head/share/man/man4/ips.4 > =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 > --- head/share/man/man4/ips.4 =A0 Mon Aug 31 16:19:06 2009 =A0 =A0 =A0 = =A0(r196700) > +++ head/share/man/man4/ips.4 =A0 Mon Aug 31 16:20:06 2009 =A0 =A0 =A0 = =A0(r196701) > @@ -92,6 +92,10 @@ ServeRAID 6i/6M > =A0.It > =A0ServeRAID 7t/7k/7M > =A0.El > +.Pp > +Newer ServeRAID controllers are supported by the > +.Xr aac 4 > +driver. [...] Please, note also that the latest ServeRAID found on x3650 m2 appears to be LSI based mfi(4). mfi0: port 0x1000-0x10ff mem 0x97900000-0x9793ffff,0x979= 40000 -0x9797ffff irq 16 at device 0.0 on pci1 mfi0: Reserved 0x40000 bytes for rid 0x10 type 3 at 0x97900000 mfi0: Megaraid SAS driver Ver 3.00 mfi0: Max fw cmds=3D 1008, sizing driver pool to 128 See also http://archive.netbsd.se/?ml=3Dsunhelp-geeks&a=3D2009-06&t=3D10857= 150. --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 17:34:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B57B106566B; Mon, 31 Aug 2009 17:34:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F2D38FC1B; Mon, 31 Aug 2009 17:34: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 n7VHYBWc034204; Mon, 31 Aug 2009 17:34:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VHYB3X034202; Mon, 31 Aug 2009 17:34:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200908311734.n7VHYB3X034202@svn.freebsd.org> From: Xin LI Date: Mon, 31 Aug 2009 17:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196704 - head/sys/i386/isa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 17:34:11 -0000 Author: delphij Date: Mon Aug 31 17:34:11 2009 New Revision: 196704 URL: http://svn.freebsd.org/changeset/base/196704 Log: Partially revert 196524: this part of change should not be committed as part of the changeset - it's an unrelated one. Reported by: danfe Modified: head/sys/i386/isa/vesa.c Modified: head/sys/i386/isa/vesa.c ============================================================================== --- head/sys/i386/isa/vesa.c Mon Aug 31 16:27:00 2009 (r196703) +++ head/sys/i386/isa/vesa.c Mon Aug 31 17:34:11 2009 (r196704) @@ -1074,11 +1074,6 @@ vesa_set_mode(video_adapter_t *adp, int (info.vi_flags & V_INFO_COLOR) ? V_ADP_COLOR : 0; vesa_adp->va_crtc_addr = (vesa_adp->va_flags & V_ADP_COLOR) ? COLOR_CRTC : MONO_CRTC; - - vesa_adp->va_window = BIOS_PADDRTOVADDR(info.vi_window); - vesa_adp->va_window_size = info.vi_window_size; - vesa_adp->va_window_gran = info.vi_window_gran; - if (info.vi_flags & V_INFO_LINEAR) { #if VESA_DEBUG > 1 printf("VESA: setting up LFB\n"); @@ -1088,31 +1083,41 @@ vesa_set_mode(video_adapter_t *adp, int vesa_adp_info->v_memsize*64*1024); vesa_adp->va_buffer_size = info.vi_buffer_size; vesa_adp->va_window = vesa_adp->va_buffer; + vesa_adp->va_window_size = info.vi_buffer_size/info.vi_planes; + vesa_adp->va_window_gran = info.vi_buffer_size/info.vi_planes; } else { vesa_adp->va_buffer = 0; - vesa_adp->va_buffer_size = 0; + vesa_adp->va_buffer_size = info.vi_buffer_size; + vesa_adp->va_window = BIOS_PADDRTOVADDR(info.vi_window); + vesa_adp->va_window_size = info.vi_window_size; + vesa_adp->va_window_gran = info.vi_window_gran; } -#if VESA_DEBUG > 1 - printf("VESA: buffer %x, buffer_size %d, window %x, window_size %d\n", - vesa_adp->va_buffer, - vesa_adp->va_buffer_size, - vesa_adp->va_window, - vesa_adp->va_window_size); -#endif vesa_adp->va_window_orig = 0; len = vesa_bios_get_line_length(); - if (info.vi_flags & V_INFO_GRAPHICS) { - switch (info.vi_depth) { + if (len > 0) { + vesa_adp->va_line_width = len; + } else if (info.vi_flags & V_INFO_GRAPHICS) { + switch (info.vi_depth/info.vi_planes) { + case 1: + vesa_adp->va_line_width = info.vi_width/8; + break; + case 2: + vesa_adp->va_line_width = info.vi_width/4; + break; case 4: - vesa_adp->va_line_width = info.vi_width; + vesa_adp->va_line_width = info.vi_width/2; break; case 8: + default: /* shouldn't happen */ + vesa_adp->va_line_width = info.vi_width; + break; case 15: case 16: + vesa_adp->va_line_width = info.vi_width*2; + break; case 24: case 32: - default: - vesa_adp->va_line_width = info.vi_width * (info.vi_depth / 8); + vesa_adp->va_line_width = info.vi_width*4; break; } } else { @@ -1121,8 +1126,8 @@ vesa_set_mode(video_adapter_t *adp, int vesa_adp->va_disp_start.x = 0; vesa_adp->va_disp_start.y = 0; #if VESA_DEBUG > 0 - printf("vesa_set_mode(): vi_width:%d, len:%d, line_width:%d vi_mem_model:%d\n", - info.vi_width, len, vesa_adp->va_line_width, info.vi_mem_model); + printf("vesa_set_mode(): vi_width:%d, len:%d, line_width:%d\n", + info.vi_width, len, vesa_adp->va_line_width); #endif bcopy(&info, &vesa_adp->va_info, sizeof(vesa_adp->va_info)); From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 17:42:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C5F9106566B; Mon, 31 Aug 2009 17:42:53 +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 101958FC23; Mon, 31 Aug 2009 17:42:53 +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 n7VHgqel034397; Mon, 31 Aug 2009 17:42:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VHgq15034394; Mon, 31 Aug 2009 17:42:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908311742.n7VHgq15034394@svn.freebsd.org> From: John Baldwin Date: Mon, 31 Aug 2009 17:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196705 - in head/sys/i386: i386 include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 17:42:53 -0000 Author: jhb Date: Mon Aug 31 17:42:52 2009 New Revision: 196705 URL: http://svn.freebsd.org/changeset/base/196705 Log: Improve pmap_change_attr() so that it is able to demote a large (2/4MB) page into 4KB pages as needed. This should be fairly rare in practice on i386. This includes merging the following changes from the amd64 pmap: 180430, 180485, 180845, 181043, 181077, and 196318. - Add basic support for changing attributes on PDEs to pmap_change_attr() similar to the support in the initial version of pmap_change_attr() on amd64 including inlines for pmap_pde_attr() and pmap_pte_attr(). - Extend pmap_demote_pde() to include the ability to instantiate a new page table page where none existed before. - Enhance pmap_change_attr(). Use pmap_demote_pde() to demote a 2/4MB page mapping to 4KB page mappings when the specified attribute change only applies to a portion of the 2/4MB page. Previously, in such cases, pmap_change_attr() gave up and returned an error. - Correct a critical accounting error in pmap_demote_pde(). Reviewed by: alc MFC after: 3 days Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Aug 31 17:34:11 2009 (r196704) +++ head/sys/i386/i386/pmap.c Mon Aug 31 17:42:52 2009 (r196705) @@ -288,12 +288,15 @@ static boolean_t pmap_enter_pde(pmap_t p static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); +static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, vm_prot_t prot); +static void pmap_pte_attr(pt_entry_t *pte, int cache_bits); static void pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, vm_page_t *free); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, @@ -2289,32 +2292,62 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse } /* - * Tries to demote a 2- or 4MB page mapping. + * Fills a page table page with mappings to consecutive physical pages. + */ +static void +pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte) +{ + pt_entry_t *pte; + + for (pte = firstpte; pte < firstpte + NPTEPG; pte++) { + *pte = newpte; + newpte += PAGE_SIZE; + } +} + +/* + * Tries to demote a 2- or 4MB page mapping. If demotion fails, the + * 2- or 4MB page mapping is invalidated. */ static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) { pd_entry_t newpde, oldpde; pmap_t allpmaps_entry; - pt_entry_t *firstpte, newpte, *pte; + pt_entry_t *firstpte, newpte; vm_paddr_t mptepa; vm_page_t free, mpte; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + oldpde = *pde; + KASSERT((oldpde & (PG_PS | PG_V)) == (PG_PS | PG_V), + ("pmap_demote_pde: oldpde is missing PG_PS and/or PG_V")); mpte = pmap_lookup_pt_page(pmap, va); if (mpte != NULL) pmap_remove_pt_page(pmap, mpte); else { - KASSERT((*pde & PG_W) == 0, + KASSERT((oldpde & PG_W) == 0, ("pmap_demote_pde: page table page for a wired mapping" " is missing")); - free = NULL; - pmap_remove_pde(pmap, pde, trunc_4mpage(va), &free); - pmap_invalidate_page(pmap, trunc_4mpage(va)); - pmap_free_zero_pages(free); - CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" - " in pmap %p", va, pmap); - return (FALSE); + + /* + * Invalidate the 2- or 4MB page mapping and return + * "failure" if the mapping was never accessed or the + * allocation of the new page table page fails. + */ + if ((oldpde & PG_A) == 0 || (mpte = vm_page_alloc(NULL, + va >> PDRSHIFT, VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | + VM_ALLOC_WIRED)) == NULL) { + free = NULL; + pmap_remove_pde(pmap, pde, trunc_4mpage(va), &free); + pmap_invalidate_page(pmap, trunc_4mpage(va)); + pmap_free_zero_pages(free); + CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" + " in pmap %p", va, pmap); + return (FALSE); + } + if (va < VM_MAXUSER_ADDRESS) + pmap->pm_stats.resident_count++; } mptepa = VM_PAGE_TO_PHYS(mpte); @@ -2348,30 +2381,32 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t } firstpte = PADDR2; } - oldpde = *pde; newpde = mptepa | PG_M | PG_A | (oldpde & PG_U) | PG_RW | PG_V; - KASSERT((oldpde & (PG_A | PG_V)) == (PG_A | PG_V), - ("pmap_demote_pde: oldpde is missing PG_A and/or PG_V")); + KASSERT((oldpde & PG_A) != 0, + ("pmap_demote_pde: oldpde is missing PG_A")); KASSERT((oldpde & (PG_M | PG_RW)) != PG_RW, ("pmap_demote_pde: oldpde is missing PG_M")); - KASSERT((oldpde & PG_PS) != 0, - ("pmap_demote_pde: oldpde is missing PG_PS")); newpte = oldpde & ~PG_PS; if ((newpte & PG_PDE_PAT) != 0) newpte ^= PG_PDE_PAT | PG_PTE_PAT; /* - * If the mapping has changed attributes, update the page table - * entries. - */ + * If the page table page is new, initialize it. + */ + if (mpte->wire_count == 1) { + mpte->wire_count = NPTEPG; + pmap_fill_ptp(firstpte, newpte); + } KASSERT((*firstpte & PG_FRAME) == (newpte & PG_FRAME), ("pmap_demote_pde: firstpte and newpte map different physical" " addresses")); + + /* + * If the mapping has changed attributes, update the page table + * entries. + */ if ((*firstpte & PG_PTE_PROMOTE) != (newpte & PG_PTE_PROMOTE)) - for (pte = firstpte; pte < firstpte + NPTEPG; pte++) { - *pte = newpte; - newpte += PAGE_SIZE; - } + pmap_fill_ptp(firstpte, newpte); /* * Demote the mapping. This pmap is locked. The old PDE has @@ -4426,6 +4461,40 @@ pmap_clear_reference(vm_page_t m) * Miscellaneous support routines follow */ +/* Adjust the cache mode for a 4KB page mapped via a PTE. */ +static __inline void +pmap_pte_attr(pt_entry_t *pte, int cache_bits) +{ + u_int opte, npte; + + /* + * The cache mode bits are all in the low 32-bits of the + * PTE, so we can just spin on updating the low 32-bits. + */ + do { + opte = *(u_int *)pte; + npte = opte & ~PG_PTE_CACHE; + npte |= cache_bits; + } while (npte != opte && !atomic_cmpset_int((u_int *)pte, opte, npte)); +} + +/* Adjust the cache mode for a 2/4MB page mapped via a PDE. */ +static __inline void +pmap_pde_attr(pd_entry_t *pde, int cache_bits) +{ + u_int opde, npde; + + /* + * The cache mode bits are all in the low 32-bits of the + * PDE, so we can just spin on updating the low 32-bits. + */ + do { + opde = *(u_int *)pde; + npde = opde & ~PG_PDE_CACHE; + npde |= cache_bits; + } while (npde != opde && !atomic_cmpset_int((u_int *)pde, opde, npde)); +} + /* * Map a set of physical memory pages into the kernel virtual * address space. Return a pointer to where it is mapped. This @@ -4537,13 +4606,23 @@ pmap_page_set_memattr(vm_page_t m, vm_me } } +/* + * Changes the specified virtual address range's memory type to that given by + * the parameter "mode". The specified virtual address range must be + * completely contained within either the kernel map. + * + * Returns zero if the change completed successfully, and either EINVAL or + * ENOMEM if the change failed. Specifically, EINVAL is returned if some part + * of the virtual address range was not mapped, and ENOMEM is returned if + * there was insufficient memory available to complete the change. + */ int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { vm_offset_t base, offset, tmpva; - pt_entry_t *pte; - u_int opte, npte; pd_entry_t *pde; + pt_entry_t *pte; + int cache_bits_pte, cache_bits_pde; boolean_t changed; base = trunc_page(va); @@ -4556,47 +4635,93 @@ pmap_change_attr(vm_offset_t va, vm_size if (base < VM_MIN_KERNEL_ADDRESS) return (EINVAL); - /* 4MB pages and pages that aren't mapped aren't supported. */ - for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE) { + cache_bits_pde = cache_bits_pte = -1; + changed = FALSE; + + /* + * Pages that aren't mapped aren't supported. Also break down + * 2/4MB pages into 4KB pages if required. + */ + PMAP_LOCK(kernel_pmap); + for (tmpva = base; tmpva < base + size; ) { pde = pmap_pde(kernel_pmap, tmpva); - if (*pde & PG_PS) - return (EINVAL); - if (*pde == 0) + if (*pde == 0) { + PMAP_UNLOCK(kernel_pmap); return (EINVAL); + } + if (*pde & PG_PS) { + /* + * If the current 2/4MB page already has + * the required memory type, then we need not + * demote this page. Just increment tmpva to + * the next 2/4MB page frame. + */ + if (cache_bits_pde < 0) + cache_bits_pde = pmap_cache_bits(mode, 1); + if ((*pde & PG_PDE_CACHE) == cache_bits_pde) { + tmpva = trunc_4mpage(tmpva) + NBPDR; + continue; + } + + /* + * If the current offset aligns with a 2/4MB + * page frame and there is at least 2/4MB left + * within the range, then we need not break + * down this page into 4KB pages. + */ + if ((tmpva & PDRMASK) == 0 && + tmpva + PDRMASK < base + size) { + tmpva += NBPDR; + continue; + } + if (!pmap_demote_pde(kernel_pmap, pde, tmpva)) { + PMAP_UNLOCK(kernel_pmap); + return (ENOMEM); + } + } pte = vtopte(tmpva); - if (*pte == 0) + if (*pte == 0) { + PMAP_UNLOCK(kernel_pmap); return (EINVAL); + } + tmpva += PAGE_SIZE; } + PMAP_UNLOCK(kernel_pmap); changed = FALSE; /* - * Ok, all the pages exist and are 4k, so run through them updating - * their cache mode. + * Ok, all the pages exist, so run through them updating their + * cache mode if required. */ - for (tmpva = base; size > 0; ) { - pte = vtopte(tmpva); - - /* - * The cache mode bits are all in the low 32-bits of the - * PTE, so we can just spin on updating the low 32-bits. - */ - do { - opte = *(u_int *)pte; - npte = opte & ~(PG_PTE_PAT | PG_NC_PCD | PG_NC_PWT); - npte |= pmap_cache_bits(mode, 0); - } while (npte != opte && - !atomic_cmpset_int((u_int *)pte, opte, npte)); - if (npte != opte) - changed = TRUE; - tmpva += PAGE_SIZE; - size -= PAGE_SIZE; + for (tmpva = base; tmpva < base + size; ) { + pde = pmap_pde(kernel_pmap, tmpva); + if (*pde & PG_PS) { + if (cache_bits_pde < 0) + cache_bits_pde = pmap_cache_bits(mode, 1); + if ((*pde & PG_PDE_CACHE) != cache_bits_pde) { + pmap_pde_attr(pde, cache_bits_pde); + if (!changed) + changed = TRUE; + } + tmpva = trunc_4mpage(tmpva) + NBPDR; + } else { + if (cache_bits_pte < 0) + cache_bits_pte = pmap_cache_bits(mode, 0); + pte = vtopte(tmpva); + if ((*pte & PG_PTE_CACHE) != cache_bits_pte) { + pmap_pte_attr(pte, cache_bits_pte); + if (!changed) + changed = TRUE; + } + tmpva += PAGE_SIZE; + } } /* - * Flush CPU caches to make sure any data isn't cached that shouldn't - * be, etc. - */ + * Flush CPU caches to make sure any data isn't cached that + * shouldn't be, etc. + */ if (changed) { pmap_invalidate_range(kernel_pmap, base, tmpva); pmap_invalidate_cache_range(base, tmpva); Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Mon Aug 31 17:34:11 2009 (r196704) +++ head/sys/i386/include/pmap.h Mon Aug 31 17:42:52 2009 (r196705) @@ -81,6 +81,10 @@ #define PG_PROT (PG_RW|PG_U) /* all protection bits . */ #define PG_N (PG_NC_PWT|PG_NC_PCD) /* Non-cacheable */ +/* Page level cache control fields used to determine the PAT type */ +#define PG_PDE_CACHE (PG_PDE_PAT | PG_NC_PWT | PG_NC_PCD) +#define PG_PTE_CACHE (PG_PTE_PAT | PG_NC_PWT | PG_NC_PCD) + /* * Promotion to a 2 or 4MB (PDE) page mapping requires that the corresponding * 4KB (PTE) page mappings have identical settings for the following fields: From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 17:50:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D88D6106566C; Mon, 31 Aug 2009 17:50:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C78838FC15; Mon, 31 Aug 2009 17:50:33 +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 n7VHoXpj034603; Mon, 31 Aug 2009 17:50:33 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VHoXp0034601; Mon, 31 Aug 2009 17:50:33 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200908311750.n7VHoXp0034601@svn.freebsd.org> From: Doug Barton Date: Mon, 31 Aug 2009 17:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196706 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 17:50:33 -0000 Author: dougb Date: Mon Aug 31 17:50:33 2009 New Revision: 196706 URL: http://svn.freebsd.org/changeset/base/196706 Log: Add support for INDEX-9 [1] While I'm here, strip off support for FreeBSD 5.x. Submitted by: Alexey Shuvaev [1] Modified: head/usr.sbin/pkg_install/lib/lib.h Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Mon Aug 31 17:42:52 2009 (r196705) +++ head/usr.sbin/pkg_install/lib/lib.h Mon Aug 31 17:50:33 2009 (r196706) @@ -84,14 +84,14 @@ #define DISPLAY_FNAME "+DISPLAY" #define MTREE_FNAME "+MTREE_DIRS" -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 +#if defined(__FreeBSD_version) && __FreeBSD_version >= 900000 +#define INDEX_FNAME "INDEX-9" +#elif defined(__FreeBSD_version) && __FreeBSD_version >= 800000 #define INDEX_FNAME "INDEX-8" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 700000 #define INDEX_FNAME "INDEX-7" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 600000 #define INDEX_FNAME "INDEX-6" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 500036 -#define INDEX_FNAME "INDEX-5" #else #define INDEX_FNAME "INDEX" #endif From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 18:41:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2C3B106566C; Mon, 31 Aug 2009 18:41:13 +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 E15268FC14; Mon, 31 Aug 2009 18:41: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 n7VIfDJt035693; Mon, 31 Aug 2009 18:41:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VIfD58035690; Mon, 31 Aug 2009 18:41:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908311841.n7VIfD58035690@svn.freebsd.org> From: John Baldwin Date: Mon, 31 Aug 2009 18:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196707 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 18:41:14 -0000 Author: jhb Date: Mon Aug 31 18:41:13 2009 New Revision: 196707 URL: http://svn.freebsd.org/changeset/base/196707 Log: Simplify pmap_change_attr() a bit: - Always calculate the cache bits instead of doing it on-demand. - Always set changed to TRUE rather than only doing it if it is false. Discussed with: alc MFC after: 3 days Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Aug 31 17:50:33 2009 (r196706) +++ head/sys/amd64/amd64/pmap.c Mon Aug 31 18:41:13 2009 (r196707) @@ -4476,7 +4476,8 @@ pmap_change_attr_locked(vm_offset_t va, if (base < DMAP_MIN_ADDRESS) return (EINVAL); - cache_bits_pde = cache_bits_pte = -1; + cache_bits_pde = pmap_cache_bits(mode, 1); + cache_bits_pte = pmap_cache_bits(mode, 0); changed = FALSE; /* @@ -4493,8 +4494,6 @@ pmap_change_attr_locked(vm_offset_t va, * memory type, then we need not demote this page. Just * increment tmpva to the next 1GB page frame. */ - if (cache_bits_pde < 0) - cache_bits_pde = pmap_cache_bits(mode, 1); if ((*pdpe & PG_PDE_CACHE) == cache_bits_pde) { tmpva = trunc_1gpage(tmpva) + NBPDP; continue; @@ -4522,8 +4521,6 @@ pmap_change_attr_locked(vm_offset_t va, * memory type, then we need not demote this page. Just * increment tmpva to the next 2MB page frame. */ - if (cache_bits_pde < 0) - cache_bits_pde = pmap_cache_bits(mode, 1); if ((*pde & PG_PDE_CACHE) == cache_bits_pde) { tmpva = trunc_2mpage(tmpva) + NBPDR; continue; @@ -4557,12 +4554,9 @@ pmap_change_attr_locked(vm_offset_t va, for (tmpva = base; tmpva < base + size; ) { pdpe = pmap_pdpe(kernel_pmap, tmpva); if (*pdpe & PG_PS) { - if (cache_bits_pde < 0) - cache_bits_pde = pmap_cache_bits(mode, 1); if ((*pdpe & PG_PDE_CACHE) != cache_bits_pde) { pmap_pde_attr(pdpe, cache_bits_pde); - if (!changed) - changed = TRUE; + changed = TRUE; } if (tmpva >= VM_MIN_KERNEL_ADDRESS) { if (pa_start == pa_end) { @@ -4588,12 +4582,9 @@ pmap_change_attr_locked(vm_offset_t va, } pde = pmap_pdpe_to_pde(pdpe, tmpva); if (*pde & PG_PS) { - if (cache_bits_pde < 0) - cache_bits_pde = pmap_cache_bits(mode, 1); if ((*pde & PG_PDE_CACHE) != cache_bits_pde) { pmap_pde_attr(pde, cache_bits_pde); - if (!changed) - changed = TRUE; + changed = TRUE; } if (tmpva >= VM_MIN_KERNEL_ADDRESS) { if (pa_start == pa_end) { @@ -4616,13 +4607,10 @@ pmap_change_attr_locked(vm_offset_t va, } tmpva = trunc_2mpage(tmpva) + NBPDR; } else { - if (cache_bits_pte < 0) - cache_bits_pte = pmap_cache_bits(mode, 0); pte = pmap_pde_to_pte(pde, tmpva); if ((*pte & PG_PTE_CACHE) != cache_bits_pte) { pmap_pte_attr(pte, cache_bits_pte); - if (!changed) - changed = TRUE; + changed = TRUE; } if (tmpva >= VM_MIN_KERNEL_ADDRESS) { if (pa_start == pa_end) { Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Aug 31 17:50:33 2009 (r196706) +++ head/sys/i386/i386/pmap.c Mon Aug 31 18:41:13 2009 (r196707) @@ -4635,7 +4635,8 @@ pmap_change_attr(vm_offset_t va, vm_size if (base < VM_MIN_KERNEL_ADDRESS) return (EINVAL); - cache_bits_pde = cache_bits_pte = -1; + cache_bits_pde = pmap_cache_bits(mode, 1); + cache_bits_pte = pmap_cache_bits(mode, 0); changed = FALSE; /* @@ -4656,8 +4657,6 @@ pmap_change_attr(vm_offset_t va, vm_size * demote this page. Just increment tmpva to * the next 2/4MB page frame. */ - if (cache_bits_pde < 0) - cache_bits_pde = pmap_cache_bits(mode, 1); if ((*pde & PG_PDE_CACHE) == cache_bits_pde) { tmpva = trunc_4mpage(tmpva) + NBPDR; continue; @@ -4688,8 +4687,6 @@ pmap_change_attr(vm_offset_t va, vm_size } PMAP_UNLOCK(kernel_pmap); - changed = FALSE; - /* * Ok, all the pages exist, so run through them updating their * cache mode if required. @@ -4697,22 +4694,16 @@ pmap_change_attr(vm_offset_t va, vm_size for (tmpva = base; tmpva < base + size; ) { pde = pmap_pde(kernel_pmap, tmpva); if (*pde & PG_PS) { - if (cache_bits_pde < 0) - cache_bits_pde = pmap_cache_bits(mode, 1); if ((*pde & PG_PDE_CACHE) != cache_bits_pde) { pmap_pde_attr(pde, cache_bits_pde); - if (!changed) - changed = TRUE; + changed = TRUE; } tmpva = trunc_4mpage(tmpva) + NBPDR; } else { - if (cache_bits_pte < 0) - cache_bits_pte = pmap_cache_bits(mode, 0); pte = vtopte(tmpva); if ((*pte & PG_PTE_CACHE) != cache_bits_pte) { pmap_pte_attr(pte, cache_bits_pte); - if (!changed) - changed = TRUE; + changed = TRUE; } tmpva += PAGE_SIZE; } From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 20:11:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E2231065676; Mon, 31 Aug 2009 20:11:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D7F58FC0C; Mon, 31 Aug 2009 20:11: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 n7VKBa2j037830; Mon, 31 Aug 2009 20:11:36 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VKBaft037828; Mon, 31 Aug 2009 20:11:36 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908312011.n7VKBaft037828@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 31 Aug 2009 20:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196710 - head/tools/regression/acltools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 20:11:36 -0000 Author: trasz Date: Mon Aug 31 20:11:35 2009 New Revision: 196710 URL: http://svn.freebsd.org/changeset/base/196710 Log: Add regression test for ACLs on device files - mostly to make sure we don't crash on attempt to set ACL on them. Modified: head/tools/regression/acltools/tools-posix.test Modified: head/tools/regression/acltools/tools-posix.test ============================================================================== --- head/tools/regression/acltools/tools-posix.test Mon Aug 31 19:16:58 2009 (r196709) +++ head/tools/regression/acltools/tools-posix.test Mon Aug 31 20:11:35 2009 (r196710) @@ -387,3 +387,19 @@ $ ls -l fff | cut -d' ' -f1 $ rm fff +# Test if we deal properly with device files. +$ mknod bbb b 1 1 +$ setfacl -m u:42:r,g:43:w bbb +> setfacl: acl_get_file() failed: Operation not supported +$ ls -l bbb | cut -d' ' -f1 +> brw-r--r-- + +$ rm bbb + +$ mknod ccc c 1 1 +$ setfacl -m u:42:r,g:43:w ccc +> setfacl: acl_get_file() failed: Operation not supported +$ ls -l ccc | cut -d' ' -f1 +> crw-r--r-- + +$ rm ccc From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 20:42:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 449361065670; Mon, 31 Aug 2009 20:42:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7F28FC1C; Mon, 31 Aug 2009 20:42: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 n7VKg7Nh038432; Mon, 31 Aug 2009 20:42:07 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VKg7eV038430; Mon, 31 Aug 2009 20:42:07 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908312042.n7VKg7eV038430@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 31 Aug 2009 20:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196711 - head/bin/chmod X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 20:42:08 -0000 Author: trasz Date: Mon Aug 31 20:42:07 2009 New Revision: 196711 URL: http://svn.freebsd.org/changeset/base/196711 Log: Make the code more readable and fix chmod(1) on symlinks with NFSv4 enabled. Modified: head/bin/chmod/chmod.c Modified: head/bin/chmod/chmod.c ============================================================================== --- head/bin/chmod/chmod.c Mon Aug 31 20:11:35 2009 (r196710) +++ head/bin/chmod/chmod.c Mon Aug 31 20:42:07 2009 (r196711) @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)chmod.c 8.8 __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -54,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include static void usage(void); -static int may_have_nfs4acl(const FTSENT *ent); +static int may_have_nfs4acl(const FTSENT *ent, int hflag); int main(int argc, char *argv[]) @@ -62,11 +63,10 @@ main(int argc, char *argv[]) FTS *ftsp; FTSENT *p; mode_t *set; - int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval; + int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, error; int vflag; char *mode; mode_t newmode; - int (*change_mode)(const char *, mode_t); set = NULL; Hflag = Lflag = Rflag = fflag = hflag = vflag = 0; @@ -140,11 +140,6 @@ done: argv += optind; } else fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; - if (hflag) - change_mode = lchmod; - else - change_mode = chmod; - mode = *argv; if ((set = setmode(mode)) == NULL) errx(1, "invalid file mode: %s", mode); @@ -186,10 +181,14 @@ done: argv += optind; * identical to the one computed from an ACL will change * that ACL. */ - if (may_have_nfs4acl(p) == 0 && + if (may_have_nfs4acl(p, hflag) == 0 && (newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS)) continue; - if ((*change_mode)(p->fts_accpath, newmode) && !fflag) { + if (hflag) + error = lchmod(p->fts_accpath, newmode); + else + error = chmod(p->fts_accpath, newmode); + if (error && !fflag) { warn("%s", p->fts_path); rval = 1; } else { @@ -228,17 +227,20 @@ usage(void) } static int -may_have_nfs4acl(const FTSENT *ent) +may_have_nfs4acl(const FTSENT *ent, int hflag) { int ret; - static dev_t previous_dev = (dev_t)-1; + static dev_t previous_dev = NODEV; static int supports_acls = -1; if (previous_dev != ent->fts_statp->st_dev) { previous_dev = ent->fts_statp->st_dev; supports_acls = 0; - ret = pathconf(ent->fts_accpath, _PC_ACL_NFS4); + if (hflag) + ret = lpathconf(ent->fts_accpath, _PC_ACL_NFS4); + else + ret = pathconf(ent->fts_accpath, _PC_ACL_NFS4); if (ret > 0) supports_acls = 1; else if (ret < 0 && errno != EINVAL) From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 20:53:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1522106566C; Mon, 31 Aug 2009 20:53:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B08668FC18; Mon, 31 Aug 2009 20:53: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 n7VKr1cq038656; Mon, 31 Aug 2009 20:53:01 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VKr12R038654; Mon, 31 Aug 2009 20:53:01 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908312053.n7VKr12R038654@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 31 Aug 2009 20:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196712 - head/bin/ls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 20:53:01 -0000 Author: trasz Date: Mon Aug 31 20:53:01 2009 New Revision: 196712 URL: http://svn.freebsd.org/changeset/base/196712 Log: Add NFSv4 ACL support to ls(1). Modified: head/bin/ls/print.c Modified: head/bin/ls/print.c ============================================================================== --- head/bin/ls/print.c Mon Aug 31 20:42:07 2009 (r196711) +++ head/bin/ls/print.c Mon Aug 31 20:53:01 2009 (r196712) @@ -70,7 +70,7 @@ static void printsize(size_t, off_t); static void endcolor(int); static int colortype(mode_t); #endif -static void aclmode(char *, const FTSENT *, int *); +static void aclmode(char *, const FTSENT *); #define IS_NOPRINT(p) ((p)->fts_number == NO_PRINT) @@ -139,16 +139,12 @@ printlong(const DISPLAY *dp) #ifdef COLORLS int color_printed = 0; #endif - int haveacls; - dev_t prevdev; if ((dp->list == NULL || dp->list->fts_level != FTS_ROOTLEVEL) && (f_longform || f_size)) { (void)printf("total %lu\n", howmany(dp->btotal, blocksize)); } - haveacls = 1; - prevdev = (dev_t)-1; for (p = dp->list; p; p = p->fts_link) { if (IS_NOPRINT(p)) continue; @@ -159,14 +155,7 @@ printlong(const DISPLAY *dp) (void)printf("%*jd ", dp->s_block, howmany(sp->st_blocks, blocksize)); strmode(sp->st_mode, buf); - /* - * Cache whether or not the filesystem supports ACL's to - * avoid expensive syscalls. Try again when we change devices. - */ - if (haveacls || sp->st_dev != prevdev) { - aclmode(buf, p, &haveacls); - prevdev = sp->st_dev; - } + aclmode(buf, p); np = p->fts_pointer; (void)printf("%s %*u %-*s %-*s ", buf, dp->s_nlink, sp->st_nlink, dp->s_user, np->user, dp->s_group, @@ -612,56 +601,69 @@ printsize(size_t width, off_t bytes) (void)printf("%*jd ", (u_int)width, bytes); } +/* + * Add a + after the standard rwxrwxrwx mode if the file has an + * ACL. strmode() reserves space at the end of the string. + */ static void -aclmode(char *buf, const FTSENT *p, int *haveacls) +aclmode(char *buf, const FTSENT *p) { char name[MAXPATHLEN + 1]; - int entries, ret; + int ret, trivial; + static dev_t previous_dev = NODEV; + static int supports_acls = -1; + static int type = ACL_TYPE_ACCESS; acl_t facl; - acl_entry_t ae; /* - * Add a + after the standard rwxrwxrwx mode if the file has an - * extended ACL. strmode() reserves space at the end of the string. - */ - if (p->fts_level == FTS_ROOTLEVEL) - snprintf(name, sizeof(name), "%s", p->fts_name); - else - snprintf(name, sizeof(name), "%s/%s", - p->fts_parent->fts_accpath, p->fts_name); - /* - * We have no way to tell whether a symbolic link has an ACL since - * pathconf() and acl_get_file() both follow them. They also don't - * support whiteouts. + * XXX: ACLs are not supported on whiteouts and device files + * residing on UFS. */ - if (S_ISLNK(p->fts_statp->st_mode) || S_ISWHT(p->fts_statp->st_mode)) { - *haveacls = 1; + if (S_ISCHR(p->fts_statp->st_mode) || S_ISBLK(p->fts_statp->st_mode) || + S_ISWHT(p->fts_statp->st_mode)) return; - } - if ((ret = pathconf(name, _PC_ACL_EXTENDED)) <= 0) { - if (ret < 0 && errno != EINVAL) - warn("%s", name); + + if (previous_dev != p->fts_statp->st_dev) { + previous_dev = p->fts_statp->st_dev; + supports_acls = 0; + + if (p->fts_level == FTS_ROOTLEVEL) + snprintf(name, sizeof(name), "%s", p->fts_name); else - *haveacls = 0; + snprintf(name, sizeof(name), "%s/%s", + p->fts_parent->fts_accpath, p->fts_name); + ret = lpathconf(name, _PC_ACL_NFS4); + if (ret > 0) { + type = ACL_TYPE_NFS4; + supports_acls = 1; + } else if (ret < 0 && errno != EINVAL) { + warn("%s", name); + return; + } + if (supports_acls == 0) { + ret = lpathconf(name, _PC_ACL_EXTENDED); + if (ret > 0) { + type = ACL_TYPE_ACCESS; + supports_acls = 1; + } else if (ret < 0 && errno != EINVAL) { + warn("%s", name); + return; + } + } + } + if (supports_acls == 0) + return; + facl = acl_get_link_np(name, type); + if (facl == NULL) { + warn("%s", name); return; } - *haveacls = 1; - if ((facl = acl_get_file(name, ACL_TYPE_ACCESS)) != NULL) { - if (acl_get_entry(facl, ACL_FIRST_ENTRY, &ae) == 1) { - entries = 1; - while (acl_get_entry(facl, ACL_NEXT_ENTRY, &ae) == 1) - if (++entries > 3) - break; - /* - * POSIX.1e requires that ACLs of type ACL_TYPE_ACCESS - * must have at least three entries (owner, group, - * and other). So anything with more than 3 ACLs looks - * interesting to us. - */ - if (entries > 3) - buf[10] = '+'; - } + if (acl_is_trivial_np(facl, &trivial)) { acl_free(facl); - } else warn("%s", name); + return; + } + if (!trivial) + buf[10] = '+'; + acl_free(facl); } From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 21:02:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73C77106566B; Mon, 31 Aug 2009 21:02:48 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6365F8FC16; Mon, 31 Aug 2009 21:02: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 n7VL2mET038921; Mon, 31 Aug 2009 21:02:48 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VL2mlR038919; Mon, 31 Aug 2009 21:02:48 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908312102.n7VL2mlR038919@svn.freebsd.org> From: Qing Li Date: Mon, 31 Aug 2009 21:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196714 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 21:02:48 -0000 Author: qingli Date: Mon Aug 31 21:02:48 2009 New Revision: 196714 URL: http://svn.freebsd.org/changeset/base/196714 Log: This patch fixes the following issues: - Routing messages are not generated when adding and removing interface address aliases. - Loopback route installed for an interface address alias is not deleted from the routing table when that address alias is removed from the associated interface. - Function in_ifscrub() is called extraneously. Reviewed by: gnn, kmacy, sam MFC after: 3 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Mon Aug 31 20:59:23 2009 (r196713) +++ head/sys/netinet/in.c Mon Aug 31 21:02:48 2009 (r196714) @@ -536,7 +536,6 @@ in_control(struct socket *so, u_long cmd hostIsNew = 0; } if (ifra->ifra_mask.sin_len) { - in_ifscrub(ifp, ia); ia->ia_sockmask = ifra->ifra_mask; ia->ia_sockmask.sin_family = AF_INET; ia->ia_subnetmask = @@ -545,7 +544,6 @@ in_control(struct socket *so, u_long cmd } if ((ifp->if_flags & IFF_POINTOPOINT) && (ifra->ifra_dstaddr.sin_family == AF_INET)) { - in_ifscrub(ifp, ia); ia->ia_dstaddr = ifra->ifra_dstaddr; maskIsNew = 1; /* We lie; but the effect's the same */ } @@ -991,6 +989,40 @@ in_addprefix(struct in_ifaddr *target, i IN_IFADDR_RUNLOCK(); return (EEXIST); } else { + struct route pfx_ro; + struct sockaddr_in *pfx_addr; + struct rtentry msg_rt; + + /* QL: XXX + * This is a bit questionable because there is no + * additional route entry added for an address alias. + * Therefore this route report is inaccurate. Perhaps + * it's better to supply a empty rtentry as how it + * is done in in_scrubprefix(). + */ + bzero(&pfx_ro, sizeof(pfx_ro)); + pfx_addr = (struct sockaddr_in *)(&pfx_ro.ro_dst); + pfx_addr->sin_len = sizeof(*pfx_addr); + pfx_addr->sin_family = AF_INET; + pfx_addr->sin_addr = prefix; + rtalloc_ign_fib(&pfx_ro, 0, 0); + if (pfx_ro.ro_rt != NULL) { + msg_rt = *pfx_ro.ro_rt; + /* QL: XXX + * Point the gateway to the given interface + * address as if a new prefix route entry has + * been added through the new address alias. + * All other parts of the rtentry is accurate, + * e.g., rt_key, rt_mask, rt_ifp etc. + */ + msg_rt.rt_gateway = + (struct sockaddr *)&ia->ia_addr; + rt_newaddrmsg(RTM_ADD, + (struct ifaddr *)target, + 0, &msg_rt); + RTFREE(pfx_ro.ro_rt); + } + IN_IFADDR_RUNLOCK(); return (0); } @@ -1024,9 +1056,6 @@ in_scrubprefix(struct in_ifaddr *target) struct rt_addrinfo info; struct sockaddr_dl null_sdl; - if ((target->ia_flags & IFA_ROUTE) == 0) - return (0); - /* * Remove the loopback route to the interface address. * The "useloopback" setting is not consulted because if the @@ -1054,6 +1083,20 @@ in_scrubprefix(struct in_ifaddr *target) log(LOG_INFO, "in_scrubprefix: deletion failed\n"); } + if ((target->ia_flags & IFA_ROUTE) == 0) { + struct rtentry rt; + + /* QL: XXX + * Report a blank rtentry when a route has not been + * installed for the given interface address. + */ + bzero(&rt, sizeof(rt)); + rt_newaddrmsg(RTM_DELETE, + (struct ifaddr *)target, + 0, &rt); + return (0); + } + if (rtinitflags(target)) prefix = target->ia_dstaddr.sin_addr; else { From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 21:25:49 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4A231065670; Mon, 31 Aug 2009 21:25:49 +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 C4A088FC12; Mon, 31 Aug 2009 21:25: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 n7VLPnq2039504; Mon, 31 Aug 2009 21:25:49 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VLPnQL039502; Mon, 31 Aug 2009 21:25:49 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908312125.n7VLPnQL039502@svn.freebsd.org> From: Sam Leffler Date: Mon, 31 Aug 2009 21:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196717 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 21:25:49 -0000 Author: sam Date: Mon Aug 31 21:25:49 2009 New Revision: 196717 URL: http://svn.freebsd.org/changeset/base/196717 Log: On resume in sta mode program the beacon timers so when roaming (and the previous ap is no longer in range) the device will deliver bmiss interrupts and trigger the state machine. Also arrange to sync the beacon timers on the next received beacon frame so that when we don't roam we re-synchronize with the ap. Tested by: trasz MFC after: 1 week Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Aug 31 21:07:05 2009 (r196716) +++ head/sys/dev/ath/if_ath.c Mon Aug 31 21:25:49 2009 (r196717) @@ -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-head@FreeBSD.ORG Mon Aug 31 22:09:49 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B030106566B; Mon, 31 Aug 2009 22:09:49 +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 0A3D78FC21; Mon, 31 Aug 2009 22:09: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 n7VM9mFE040526; Mon, 31 Aug 2009 22:09:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VM9mNO040524; Mon, 31 Aug 2009 22:09:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200908312209.n7VM9mNO040524@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 31 Aug 2009 22:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196721 - head/sys/dev/txp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 22:09:49 -0000 Author: yongari Date: Mon Aug 31 22:09:48 2009 New Revision: 196721 URL: http://svn.freebsd.org/changeset/base/196721 Log: 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) MFC after: 3 days Modified: head/sys/dev/txp/if_txp.c Modified: head/sys/dev/txp/if_txp.c ============================================================================== --- head/sys/dev/txp/if_txp.c Mon Aug 31 21:36:19 2009 (r196720) +++ head/sys/dev/txp/if_txp.c Mon Aug 31 22:09:48 2009 (r196721) @@ -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-head@FreeBSD.ORG Mon Aug 31 23:30:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997CF1065670; Mon, 31 Aug 2009 23:30:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80D978FC1C; Mon, 31 Aug 2009 23:30: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 n7VNUdJa042455; Mon, 31 Aug 2009 23:30:39 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VNUdZP042452; Mon, 31 Aug 2009 23:30:39 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200908312330.n7VNUdZP042452@svn.freebsd.org> From: Adrian Chadd Date: Mon, 31 Aug 2009 23:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196723 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 23:30:39 -0000 Author: adrian Date: Mon Aug 31 23:30:39 2009 New Revision: 196723 URL: http://svn.freebsd.org/changeset/base/196723 Log: Shuffle pagezero() into the same location as in sys/i386/i386/pmap.c. Modified: head/sys/i386/xen/locore.s head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/locore.s ============================================================================== --- head/sys/i386/xen/locore.s Mon Aug 31 22:58:29 2009 (r196722) +++ head/sys/i386/xen/locore.s Mon Aug 31 23:30:39 2009 (r196723) @@ -148,9 +148,7 @@ IdlePDPT: .long 0 /* phys addr of kerne .globl KPTphys #endif KPTphys: .long 0 /* phys addr of kernel page tables */ -#ifdef SMP .globl gdtset -#endif gdtset: .long 0 /* GDT is valid */ .globl proc0kstack Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Mon Aug 31 22:58:29 2009 (r196722) +++ head/sys/i386/xen/pmap.c Mon Aug 31 23:30:39 2009 (r196723) @@ -328,22 +328,6 @@ CTASSERT(KERNBASE % (1 << 24) == 0); -static __inline void -pagezero(void *page) -{ -#if defined(I686_CPU) - if (cpu_class == CPUCLASS_686) { -#if defined(CPU_ENABLE_SSE) - if (cpu_feature & CPUID_SSE2) - sse2_pagezero(page); - else -#endif - i686_pagezero(page); - } else -#endif - bzero(page, PAGE_SIZE); -} - void pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type) { @@ -3343,6 +3327,22 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm PMAP_UNLOCK(dst_pmap); } +static __inline void +pagezero(void *page) +{ +#if defined(I686_CPU) + if (cpu_class == CPUCLASS_686) { +#if defined(CPU_ENABLE_SSE) + if (cpu_feature & CPUID_SSE2) + sse2_pagezero(page); + else +#endif + i686_pagezero(page); + } else +#endif + bzero(page, PAGE_SIZE); +} + /* * pmap_zero_page zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. From owner-svn-src-head@FreeBSD.ORG Mon Aug 31 23:35:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 721A3106568B; Mon, 31 Aug 2009 23:35:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E758FC19; Mon, 31 Aug 2009 23:35: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 n7VNZxZH042624; Mon, 31 Aug 2009 23:35:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7VNZxBE042622; Mon, 31 Aug 2009 23:35:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200908312335.n7VNZxBE042622@svn.freebsd.org> From: Adrian Chadd Date: Mon, 31 Aug 2009 23:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196724 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 23:35:59 -0000 Author: adrian Date: Mon Aug 31 23:35:59 2009 New Revision: 196724 URL: http://svn.freebsd.org/changeset/base/196724 Log: Revert previous commit; that was left-over junk in the tree. Modified: head/sys/i386/xen/locore.s Modified: head/sys/i386/xen/locore.s ============================================================================== --- head/sys/i386/xen/locore.s Mon Aug 31 23:30:39 2009 (r196723) +++ head/sys/i386/xen/locore.s Mon Aug 31 23:35:59 2009 (r196724) @@ -148,7 +148,9 @@ IdlePDPT: .long 0 /* phys addr of kerne .globl KPTphys #endif KPTphys: .long 0 /* phys addr of kernel page tables */ +#ifdef SMP .globl gdtset +#endif gdtset: .long 0 /* GDT is valid */ .globl proc0kstack From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 02:33:31 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44426106566C; Tue, 1 Sep 2009 02:33:31 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id F0ADE8FC1E; Tue, 1 Sep 2009 02:33:30 +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 n812WeU0070198; Mon, 31 Aug 2009 21:32:40 -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 n812Wec2070197; Mon, 31 Aug 2009 21:32:40 -0500 (CDT) (envelope-from brooks) Date: Mon, 31 Aug 2009 21:32:40 -0500 From: Brooks Davis To: Doug Barton Message-ID: <20090901023240.GF65882@lor.one-eyed-alien.net> References: <200908311750.n7VHoXp0034601@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Il7n/DHsA0sMLmDu" Content-Disposition: inline In-Reply-To: <200908311750.n7VHoXp0034601@svn.freebsd.org> 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]); Mon, 31 Aug 2009 21:32:40 -0500 (CDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196706 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 02:33:31 -0000 --Il7n/DHsA0sMLmDu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 31, 2009 at 05:50:33PM +0000, Doug Barton wrote: > Author: dougb > Date: Mon Aug 31 17:50:33 2009 > New Revision: 196706 > URL: http://svn.freebsd.org/changeset/base/196706 >=20 > Log: > Add support for INDEX-9 [1] > =20 > While I'm here, strip off support for FreeBSD 5.x. I'm rather baffled as to why you'd bother removing 5.x support and keep <=3D4.x support. It seems vanishingly unlikely we'll ever support plain INDEX files again. -- Brooks --Il7n/DHsA0sMLmDu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFKnIfHXY6L6fI4GtQRArALAJ9tiQ+9asNwFyObrmHV0AxbdlOZTQCfVjPv 3uRlMBQJgtjgNtfDHThQ36M= =HvXR -----END PGP SIGNATURE----- --Il7n/DHsA0sMLmDu-- From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 03:44:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3FF71065672; Tue, 1 Sep 2009 03:44:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 938D98FC13; Tue, 1 Sep 2009 03:44: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 n813iPjl047580; Tue, 1 Sep 2009 03:44:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n813iPcH047578; Tue, 1 Sep 2009 03:44:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200909010344.n813iPcH047578@svn.freebsd.org> From: Adrian Chadd Date: Tue, 1 Sep 2009 03:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196725 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 03:44:25 -0000 Author: adrian Date: Tue Sep 1 03:44:25 2009 New Revision: 196725 URL: http://svn.freebsd.org/changeset/base/196725 Log: Fix broken build. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Mon Aug 31 23:35:59 2009 (r196724) +++ head/sys/i386/xen/pmap.c Tue Sep 1 03:44:25 2009 (r196725) @@ -311,6 +311,7 @@ static vm_offset_t pmap_kmem_choose(vm_o static boolean_t pmap_is_prefaultable_locked(pmap_t pmap, vm_offset_t addr); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); +static __inline void pagezero(void *page); #if defined(PAE) && !defined(XEN) static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 05:15:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2706910657C9; Tue, 1 Sep 2009 05:15:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 122868FC0A; Tue, 1 Sep 2009 05:15: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 n815FjtW049313; Tue, 1 Sep 2009 05:15:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n815FjLJ049311; Tue, 1 Sep 2009 05:15:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200909010515.n815FjLJ049311@svn.freebsd.org> From: Adrian Chadd Date: Tue, 1 Sep 2009 05:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196726 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 05:15:46 -0000 Author: adrian Date: Tue Sep 1 05:15:45 2009 New Revision: 196726 URL: http://svn.freebsd.org/changeset/base/196726 Log: Merge in the pat_works work from sys/i386/i386/pmap.c - primarily to reduce diff size. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Sep 1 03:44:25 2009 (r196725) +++ head/sys/i386/xen/pmap.c Tue Sep 1 05:15:45 2009 (r196726) @@ -223,6 +223,8 @@ static uma_zone_t pdptzone; #endif #endif +static int pat_works; /* Is page attribute table sane? */ + /* * Data for the pv entry allocation mechanism */ @@ -514,33 +516,36 @@ pmap_init_pat(void) if (!(cpu_feature & CPUID_PAT)) return; -#ifdef PAT_WORKS - /* - * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. - * Program 4 and 5 as WP and WC. - * Leave 6 and 7 as UC and UC-. - */ - pat_msr = rdmsr(MSR_PAT); - pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); - pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | - PAT_VALUE(5, PAT_WRITE_COMBINING); -#else - /* - * Due to some Intel errata, we can only safely use the lower 4 - * PAT entries. Thus, just replace PAT Index 2 with WC instead - * of UC-. - * - * Intel Pentium III Processor Specification Update - * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B - * or Mode C Paging) - * - * Intel Pentium IV Processor Specification Update - * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) - */ - pat_msr = rdmsr(MSR_PAT); - pat_msr &= ~PAT_MASK(2); - pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); -#endif + if (cpu_vendor_id != CPU_VENDOR_INTEL || + (I386_CPU_FAMILY(cpu_id) == 6 && I386_CPU_MODEL(cpu_id) >= 0xe)) { + /* + * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. + * Program 4 and 5 as WP and WC. + * Leave 6 and 7 as UC and UC-. + */ + pat_msr = rdmsr(MSR_PAT); + pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); + pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | + PAT_VALUE(5, PAT_WRITE_COMBINING); + pat_works = 1; + } else { + /* + * Due to some Intel errata, we can only safely use the lower 4 + * PAT entries. Thus, just replace PAT Index 2 with WC instead + * of UC-. + * + * Intel Pentium III Processor Specification Update + * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B + * or Mode C Paging) + * + * Intel Pentium IV Processor Specification Update + * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) + */ + pat_msr = rdmsr(MSR_PAT); + pat_msr &= ~PAT_MASK(2); + pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); + pat_works = 0; + } wrmsr(MSR_PAT, pat_msr); } @@ -769,44 +774,48 @@ pmap_cache_bits(int mode, boolean_t is_p } /* Map the caching mode to a PAT index. */ - switch (mode) { -#ifdef PAT_WORKS - case PAT_UNCACHEABLE: - pat_index = 3; - break; - case PAT_WRITE_THROUGH: - pat_index = 1; - break; - case PAT_WRITE_BACK: - pat_index = 0; - break; - case PAT_UNCACHED: - pat_index = 2; - break; - case PAT_WRITE_COMBINING: - pat_index = 5; - break; - case PAT_WRITE_PROTECTED: - pat_index = 4; - break; -#else - case PAT_UNCACHED: - case PAT_UNCACHEABLE: - case PAT_WRITE_PROTECTED: - pat_index = 3; - break; - case PAT_WRITE_THROUGH: - pat_index = 1; - break; - case PAT_WRITE_BACK: - pat_index = 0; - break; - case PAT_WRITE_COMBINING: - pat_index = 2; - break; -#endif - default: - panic("Unknown caching mode %d\n", mode); + if (pat_works) { + switch (mode) { + case PAT_UNCACHEABLE: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_UNCACHED: + pat_index = 2; + break; + case PAT_WRITE_COMBINING: + pat_index = 5; + break; + case PAT_WRITE_PROTECTED: + pat_index = 4; + break; + default: + panic("Unknown caching mode %d\n", mode); + } + } else { + switch (mode) { + case PAT_UNCACHED: + case PAT_UNCACHEABLE: + case PAT_WRITE_PROTECTED: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_WRITE_COMBINING: + pat_index = 2; + break; + default: + panic("Unknown caching mode %d\n", mode); + } } /* Map the 3-bit index value into the PAT, PCD, and PWT bits. */ From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 05:55:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03B73106566C; Tue, 1 Sep 2009 05:55:11 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E797C8FC08; Tue, 1 Sep 2009 05:55: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 n815tA4k050142; Tue, 1 Sep 2009 05:55:10 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n815tAkx050140; Tue, 1 Sep 2009 05:55:10 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200909010555.n815tAkx050140@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 1 Sep 2009 05:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 05:55:11 -0000 Author: maxim Date: Tue Sep 1 05:55:10 2009 New Revision: 196727 URL: http://svn.freebsd.org/changeset/base/196727 Log: o Document MALLOC_PRODUCTION knob. PR: docs/136029 Submitted by: anonymous MFC after: 2 weeks Modified: head/share/man/man5/make.conf.5 Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Tue Sep 1 05:15:45 2009 (r196726) +++ head/share/man/man5/make.conf.5 Tue Sep 1 05:55:10 2009 (r196727) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 5, 2006 +.Dd September 1, 2009 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -466,6 +466,12 @@ console driver to and allow access over FireWire(IEEE1394) using .Xr dconschat 8 . Currently, only i386 and amd64 are supported. +.It Va MALLOC_PRODUCTION +.Pq Vt bool +Set this to disable assertions and statistics gathering in +.Xr malloc 3 . +It also defaults the A and J runtime options to off. +Disabled by default on -CURRENT. .It Va MODULES_WITH_WORLD .Pq Vt bool Set to build modules with the system instead of the kernel. From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 06:15:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64710106566B; Tue, 1 Sep 2009 06:15:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53FCC8FC16; Tue, 1 Sep 2009 06:15:52 +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 n816FoV6050609; Tue, 1 Sep 2009 06:15:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n816Fo0Z050607; Tue, 1 Sep 2009 06:15:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200909010615.n816Fo0Z050607@svn.freebsd.org> From: Adrian Chadd Date: Tue, 1 Sep 2009 06:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196728 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 06:15:52 -0000 Author: adrian Date: Tue Sep 1 06:15:50 2009 New Revision: 196728 URL: http://svn.freebsd.org/changeset/base/196728 Log: Migrate to use cpuset_t. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Sep 1 05:55:10 2009 (r196727) +++ head/sys/i386/xen/pmap.c Tue Sep 1 06:15:50 2009 (r196728) @@ -1729,7 +1729,7 @@ retry: * Deal with a SMP shootdown of other users of the pmap that we are * trying to dispose of. This can be a bit hairy. */ -static u_int *lazymask; +static cpumask_t *lazymask; static u_int lazyptd; static volatile u_int lazywait; @@ -1738,7 +1738,7 @@ void pmap_lazyfix_action(void); void pmap_lazyfix_action(void) { - u_int mymask = PCPU_GET(cpumask); + cpumask_t mymask = PCPU_GET(cpumask); #ifdef COUNT_IPIS (*ipi_lazypmap_counts[PCPU_GET(cpuid)])++; @@ -1750,7 +1750,7 @@ pmap_lazyfix_action(void) } static void -pmap_lazyfix_self(u_int mymask) +pmap_lazyfix_self(cpumask_t mymask) { if (rcr3() == lazyptd) @@ -1762,8 +1762,7 @@ pmap_lazyfix_self(u_int mymask) static void pmap_lazyfix(pmap_t pmap) { - u_int mymask; - u_int mask; + cpumask_t mymask, mask; u_int spins; while ((mask = pmap->pm_active) != 0) { From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 11:41:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F17E106566C; Tue, 1 Sep 2009 11:41:51 +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 8CC078FC1D; Tue, 1 Sep 2009 11:41: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 n81BfpcK060078; Tue, 1 Sep 2009 11:41:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n81BfpGE060068; Tue, 1 Sep 2009 11:41:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909011141.n81BfpGE060068@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 1 Sep 2009 11:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196730 - in head/sys: arm/arm kern sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 11:41:51 -0000 Author: kib Date: Tue Sep 1 11:41:51 2009 New Revision: 196730 URL: http://svn.freebsd.org/changeset/base/196730 Log: Reintroduce the r196640, after fixing the problem with my testing. 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 [1]. This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size. Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks. Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho (and retested according to new test scenarious) MFC after: 1 week Modified: head/sys/arm/arm/vm_machdep.c head/sys/kern/kern_fork.c head/sys/kern/kern_kthread.c head/sys/kern/kern_proc.c head/sys/kern/kern_thr.c head/sys/kern/kern_thread.c head/sys/sys/proc.h head/sys/vm/vm_extern.h head/sys/vm/vm_glue.c Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/arm/arm/vm_machdep.c Tue Sep 1 11:41:51 2009 (r196730) @@ -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: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/kern/kern_fork.c Tue Sep 1 11:41:51 2009 (r196730) @@ -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: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/kern/kern_kthread.c Tue Sep 1 11:41:51 2009 (r196730) @@ -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: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/kern/kern_proc.c Tue Sep 1 11:41:51 2009 (r196730) @@ -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: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/kern/kern_thr.c Tue Sep 1 11:41:51 2009 (r196730) @@ -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: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/kern/kern_thread.c Tue Sep 1 11:41:51 2009 (r196730) @@ -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: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/sys/proc.h Tue Sep 1 11:41:51 2009 (r196730) @@ -267,9 +267,6 @@ 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. */ 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 +847,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: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/vm/vm_extern.h Tue Sep 1 11:41:51 2009 (r196730) @@ -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: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Tue Sep 1 11:13:31 2009 (r196729) +++ head/sys/vm/vm_glue.c Tue Sep 1 11:41:51 2009 (r196730) @@ -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-head@FreeBSD.ORG Tue Sep 1 12:05:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 998C5106566C; Tue, 1 Sep 2009 12:05:39 +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 891B48FC0C; Tue, 1 Sep 2009 12:05: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 n81C5dU6060833; Tue, 1 Sep 2009 12:05:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n81C5dSV060831; Tue, 1 Sep 2009 12:05:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909011205.n81C5dSV060831@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 1 Sep 2009 12:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196733 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 12:05:39 -0000 Author: kib Date: Tue Sep 1 12:05:39 2009 New Revision: 196733 URL: http://svn.freebsd.org/changeset/base/196733 Log: Fix mount reference leak when V_XSLEEP is specified to vn_start_write(). Submitted by: tegge Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Tue Sep 1 12:04:43 2009 (r196732) +++ head/sys/kern/vfs_vnops.c Tue Sep 1 12:05:39 2009 (r196733) @@ -999,7 +999,7 @@ vn_start_write(vp, mpp, flags) goto unlock; mp->mnt_writeopcount++; unlock: - if (error != 0) + if (error != 0 || (flags & V_XSLEEP) != 0) MNT_REL(mp); MNT_IUNLOCK(mp); return (error); From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 12:17:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 287BF106568D; Tue, 1 Sep 2009 12:17:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2A7F8FC14; Tue, 1 Sep 2009 12:17:47 +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 n81CHlxK061116; Tue, 1 Sep 2009 12:17:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n81CHlZR061114; Tue, 1 Sep 2009 12:17:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200909011217.n81CHlZR061114@svn.freebsd.org> From: Adrian Chadd Date: Tue, 1 Sep 2009 12:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196734 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 12:17:48 -0000 Author: adrian Date: Tue Sep 1 12:17:47 2009 New Revision: 196734 URL: http://svn.freebsd.org/changeset/base/196734 Log: Delete whitespace not in i386/pmap.c Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Sep 1 12:05:39 2009 (r196733) +++ head/sys/i386/xen/pmap.c Tue Sep 1 12:17:47 2009 (r196734) @@ -4171,7 +4171,6 @@ pmap_activate(struct thread *td) td->td_pcb->pcb_cr3 = cr3; PT_UPDATES_FLUSH(); load_cr3(cr3); - PCPU_SET(curpmap, pmap); critical_exit(); } From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 15:51:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D25E310656A4; Tue, 1 Sep 2009 15:51:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C16448FC12; Tue, 1 Sep 2009 15:51: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 n81FpasQ065636; Tue, 1 Sep 2009 15:51:36 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n81FpaIg065634; Tue, 1 Sep 2009 15:51:36 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909011551.n81FpaIg065634@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 1 Sep 2009 15:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196736 - head/tools/regression/acltools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 15:51:36 -0000 Author: trasz Date: Tue Sep 1 15:51:36 2009 New Revision: 196736 URL: http://svn.freebsd.org/changeset/base/196736 Log: Adapt to the fact that ls(1) correctly prints '+' for symlinks with ACLs now. Modified: head/tools/regression/acltools/tools-posix.test Modified: head/tools/regression/acltools/tools-posix.test ============================================================================== --- head/tools/regression/acltools/tools-posix.test Tue Sep 1 15:50:07 2009 (r196735) +++ head/tools/regression/acltools/tools-posix.test Tue Sep 1 15:51:36 2009 (r196736) @@ -77,9 +77,8 @@ $ getfacl -h lll > mask::rwx > other::r-x -# XXX: Why doesn't ls(1) print '+' for symbolic links with ACL set? $ ls -l lll | cut -d' ' -f1 -> lrwxrwxr-x +> lrwxrwxr-x+ # Check whether the original file is left untouched. $ ls -l xxx | cut -d' ' -f1 From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 16:21:10 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0D6B1065676 for ; Tue, 1 Sep 2009 16:21:10 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 51F1C8FC0C for ; Tue, 1 Sep 2009 16:21:10 +0000 (UTC) Received: (qmail 27075 invoked by uid 399); 1 Sep 2009 16:21:04 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Sep 2009 16:21:04 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A9D49EA.1070601@FreeBSD.org> Date: Tue, 01 Sep 2009 09:20:58 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Brooks Davis References: <200908311750.n7VHoXp0034601@svn.freebsd.org> <20090901023240.GF65882@lor.one-eyed-alien.net> In-Reply-To: <20090901023240.GF65882@lor.one-eyed-alien.net> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196706 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 16:21:10 -0000 Brooks Davis wrote: > On Mon, Aug 31, 2009 at 05:50:33PM +0000, Doug Barton wrote: >> Author: dougb >> Date: Mon Aug 31 17:50:33 2009 >> New Revision: 196706 >> URL: http://svn.freebsd.org/changeset/base/196706 >> >> Log: >> Add support for INDEX-9 [1] >> >> While I'm here, strip off support for FreeBSD 5.x. > > I'm rather baffled as to why you'd bother removing 5.x support and keep > <=4.x support. It seems vanishingly unlikely we'll ever support plain > INDEX files again. Feel free to remove it if you think that's the right decision. I wasn't sure, so I left it alone. Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 16:23:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37E181065670 for ; Tue, 1 Sep 2009 16:23:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id BFE4E8FC13 for ; Tue, 1 Sep 2009 16:23:54 +0000 (UTC) Received: (qmail 31080 invoked by uid 399); 1 Sep 2009 16:23:50 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Sep 2009 16:23:50 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A9D4A90.30700@FreeBSD.org> Date: Tue, 01 Sep 2009 09:23:44 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Maxim Konovalov References: <200909010555.n815tAkx050140@svn.freebsd.org> In-Reply-To: <200909010555.n815tAkx050140@svn.freebsd.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 16:23:55 -0000 Maxim Konovalov wrote: > Author: maxim > Date: Tue Sep 1 05:55:10 2009 > New Revision: 196727 > URL: http://svn.freebsd.org/changeset/base/196727 > > Log: > o Document MALLOC_PRODUCTION knob. > > PR: docs/136029 > Submitted by: anonymous > MFC after: 2 weeks > > Modified: > head/share/man/man5/make.conf.5 Unless I'm missing something this should be in the src.conf man page instead of make.conf. Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 16:28:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id BC0DD1065672; Tue, 1 Sep 2009 16:28:56 +0000 (UTC) Date: Tue, 1 Sep 2009 16:28:56 +0000 From: Alexey Dokuchaev To: Doug Barton Message-ID: <20090901162856.GA54192@FreeBSD.org> References: <200909010555.n815tAkx050140@svn.freebsd.org> <4A9D4A90.30700@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4A9D4A90.30700@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: Maxim Konovalov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 16:28:56 -0000 On Tue, Sep 01, 2009 at 09:23:44AM -0700, Doug Barton wrote: > Maxim Konovalov wrote: > > Author: maxim > > Date: Tue Sep 1 05:55:10 2009 > > New Revision: 196727 > > URL: http://svn.freebsd.org/changeset/base/196727 > > > > Log: > > o Document MALLOC_PRODUCTION knob. > > > > PR: docs/136029 > > Submitted by: anonymous > > MFC after: 2 weeks > > > > Modified: > > head/share/man/man5/make.conf.5 > > Unless I'm missing something this should be in the src.conf man page > instead of make.conf. However, I'm used to make.conf since 4.x days, so at least cross-reference of some sort is in order (I'm not sure, there might be one already now that I write this). ./danfe From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 17:40:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 797EB1065679 for ; Tue, 1 Sep 2009 17:40:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 096118FC1D for ; Tue, 1 Sep 2009 17:40:55 +0000 (UTC) Received: (qmail 19352 invoked by uid 399); 1 Sep 2009 17:40:50 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Sep 2009 17:40:50 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A9D5C9C.3060002@FreeBSD.org> Date: Tue, 01 Sep 2009 10:40:44 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Alexey Dokuchaev References: <200909010555.n815tAkx050140@svn.freebsd.org> <4A9D4A90.30700@FreeBSD.org> <20090901162856.GA54192@FreeBSD.org> In-Reply-To: <20090901162856.GA54192@FreeBSD.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Maxim Konovalov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 17:40:56 -0000 Alexey Dokuchaev wrote: > However, I'm used to make.conf since 4.x days, so at least > cross-reference of some sort is in order (I'm not sure, there might be > one already now that I write this). SEE ALSO gcc(1), install(1), make(1), src.conf(5) ... :) Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 17:53:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8913106566B; Tue, 1 Sep 2009 17:53:01 +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 C790A8FC17; Tue, 1 Sep 2009 17:53: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 n81Hr1TO068298; Tue, 1 Sep 2009 17:53:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n81Hr1AV068295; Tue, 1 Sep 2009 17:53:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200909011753.n81Hr1AV068295@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 1 Sep 2009 17:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196738 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 17:53:02 -0000 Author: bz Date: Tue Sep 1 17:53:01 2009 New Revision: 196738 URL: http://svn.freebsd.org/changeset/base/196738 Log: In case an upper layer protocol tries to send a packet but the L2 code does not have the ethernet address for the destination within the broadcast domain in the table, we remember the original mbuf in `la_hold' in arpresolve() and send out a different packet with an arp request. In case there will be more upper layer packets to send we will free an earlier one held in `la_hold' and queue the new one. Once we get a packet in, with which we can perfect our arp table entry we send out the original 'on hold' packet, should there be any. Rather than continuing to process the packet that we received, we returned without freeing the packet that came in, which basically means that we leaked an mbuf for every arp request we sent. Rather than freeing the received packet and returning, continue to process the incoming arp packet as well. This should (a) improve some setups, also proxy-arp, in case it was an incoming arp request and (b) resembles the behaviour FreeBSD had from day 1, which alignes with RFC826 "Packet reception" (merge case). Rename 'm0' to 'hold' to make the code more understandable as well as diffable to earlier versions more easily. Handle the link-layer entry 'la' lock comepletely in the block where needed and release it as early as possible, rather than holding it longer, down to the end of the function. Found by: pointyhat, ns1 Bug hunting session with: erwin, simon, rwatson Tested by: simon on cluster machines Reviewed by: ratson, kmacy, julian MFC after: 3 days Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Sep 1 16:41:28 2009 (r196737) +++ head/sys/netinet/if_ether.c Tue Sep 1 17:53:01 2009 (r196738) @@ -462,11 +462,11 @@ in_arpinput(struct mbuf *m) struct rtentry *rt; struct ifaddr *ifa; struct in_ifaddr *ia; + struct mbuf *hold; struct sockaddr sa; struct in_addr isaddr, itaddr, myaddr; u_int8_t *enaddr = NULL; int op, flags; - struct mbuf *m0; int req_len; int bridged = 0, is_bridge = 0; #ifdef DEV_CARP @@ -631,11 +631,13 @@ match: la->lle_tbl->llt_ifp->if_xname, ifp->if_addrlen, (u_char *)ar_sha(ah), ":", ifp->if_xname); + LLE_WUNLOCK(la); goto reply; } if ((la->la_flags & LLE_VALID) && bcmp(ar_sha(ah), &la->ll_addr, ifp->if_addrlen)) { if (la->la_flags & LLE_STATIC) { + LLE_WUNLOCK(la); log(LOG_ERR, "arp: %*D attempts to modify permanent " "entry for %s on %s\n", @@ -655,6 +657,7 @@ match: } if (ifp->if_addrlen != ah->ar_hln) { + LLE_WUNLOCK(la); log(LOG_WARNING, "arp from %*D: addr len: new %d, i/f %d (ignored)", ifp->if_addrlen, (u_char *) ar_sha(ah), ":", @@ -671,15 +674,14 @@ match: } la->la_asked = 0; la->la_preempt = V_arp_maxtries; - if (la->la_hold != NULL) { - m0 = la->la_hold; - la->la_hold = 0; + hold = la->la_hold; + if (hold != NULL) { + la->la_hold = NULL; memcpy(&sa, L3_ADDR(la), sizeof(sa)); - LLE_WUNLOCK(la); - - (*ifp->if_output)(ifp, m0, &sa, NULL); - return; } + LLE_WUNLOCK(la); + if (hold != NULL) + (*ifp->if_output)(ifp, hold, &sa, NULL); } reply: if (op != ARPOP_REQUEST) @@ -750,8 +752,6 @@ reply: #endif } - if (la != NULL) - LLE_WUNLOCK(la); if (itaddr.s_addr == myaddr.s_addr && IN_LINKLOCAL(ntohl(itaddr.s_addr))) { /* RFC 3927 link-local IPv4; always reply by broadcast. */ @@ -777,8 +777,6 @@ reply: return; drop: - if (la != NULL) - LLE_WUNLOCK(la); m_freem(m); } #endif From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 17:55:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B7D6106568D; Tue, 1 Sep 2009 17:55:37 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69AFF8FC15; Tue, 1 Sep 2009 17:55:37 +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 n81HtbXI068401; Tue, 1 Sep 2009 17:55:37 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n81HtbaJ068398; Tue, 1 Sep 2009 17:55:37 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200909011755.n81HtbaJ068398@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 1 Sep 2009 17:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196739 - head/sys/dev/hwpmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 17:55:37 -0000 Author: gnn Date: Tue Sep 1 17:55:37 2009 New Revision: 196739 URL: http://svn.freebsd.org/changeset/base/196739 Log: Add counters for the i7 architecture which were accidentally left out of the original commit of i7 support. These are all the counters on pages A-32 and A-33 of the _Intel(R) 64 and IA32 Architectures Software Developer's Manual Vol 3B_, June 2009. Almost all of these counters relate to operations on the L2 cache. Reviewed by: jkoshy MFC after: 1 month Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue Sep 1 17:53:01 2009 (r196738) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Sep 1 17:55:37 2009 (r196739) @@ -1182,6 +1182,29 @@ static struct iap_event_descr iap_events IAPDESCR(DBH_01H, 0xDB, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(E4H_01H, 0xE4, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(E5H_01H, 0xE5, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(E8H_01H, 0xE8, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(E8H_02H, 0xE8, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(E8H_03H, 0xE8, 0x03, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_01H, 0xF0, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_02H, 0xF0, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_04H, 0xF0, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_08H, 0xF0, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_10H, 0xF0, 0x10, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_20H, 0xF0, 0x20, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_40H, 0xF0, 0x40, IAP_F_FM | IAP_F_I7), + IAPDESCR(F0H_80H, 0xF0, 0x80, IAP_F_FM | IAP_F_I7), + IAPDESCR(F1H_02H, 0xF1, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(F1H_04H, 0xF1, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(F1H_07H, 0xF1, 0x07, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_01H, 0xF2, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_02H, 0xF2, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_04H, 0xF2, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_08H, 0xF2, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(F2H_0FH, 0xF2, 0x0F, IAP_F_FM | IAP_F_I7), + IAPDESCR(F3H_01H, 0xF3, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(F3H_02H, 0xF3, 0x02, IAP_F_FM | IAP_F_I7), IAPDESCR(F3H_04H, 0xF3, 0x04, IAP_F_FM | IAP_F_I7), IAPDESCR(F3H_08H, 0xF3, 0x08, IAP_F_FM | IAP_F_I7), IAPDESCR(F3H_10H, 0xF3, 0x10, IAP_F_FM | IAP_F_I7), Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Tue Sep 1 17:53:01 2009 (r196738) +++ head/sys/dev/hwpmc/pmc_events.h Tue Sep 1 17:55:37 2009 (r196739) @@ -29,8 +29,18 @@ #ifndef _DEV_HWPMC_PMC_EVENTS_H_ #define _DEV_HWPMC_PMC_EVENTS_H_ -/* - * PMC event codes. +/* + * Note: Documentation on adding events can be found both in + * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms + * as well as on-line at: + * + * http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo + * + * Please refer to those resources before you attempt to modify + * this file or the hwpmc driver/subsystem. + */ + +/* * PMC event codes. * * __PMC_EV(CLASS, SYMBOLIC-NAME) * @@ -973,7 +983,30 @@ __PMC_EV(IAP, EVENT_FDH_04H) \ __PMC_EV(IAP, EVENT_FDH_08H) \ __PMC_EV(IAP, EVENT_FDH_10H) \ __PMC_EV(IAP, EVENT_FDH_20H) \ -__PMC_EV(IAP, EVENT_FDH_40H) +__PMC_EV(IAP, EVENT_FDH_40H) \ +__PMC_EV(IAP, EVENT_E6H_02H) \ +__PMC_EV(IAP, EVENT_E8H_01H) \ +__PMC_EV(IAP, EVENT_E8H_02H) \ +__PMC_EV(IAP, EVENT_E8H_03H) \ +__PMC_EV(IAP, EVENT_F0H_01H) \ +__PMC_EV(IAP, EVENT_F0H_02H) \ +__PMC_EV(IAP, EVENT_F0H_04H) \ +__PMC_EV(IAP, EVENT_F0H_08H) \ +__PMC_EV(IAP, EVENT_F0H_10H) \ +__PMC_EV(IAP, EVENT_F0H_20H) \ +__PMC_EV(IAP, EVENT_F0H_40H) \ +__PMC_EV(IAP, EVENT_F0H_80H) \ +__PMC_EV(IAP, EVENT_F1H_02H) \ +__PMC_EV(IAP, EVENT_F1H_04H) \ +__PMC_EV(IAP, EVENT_F1H_07H) \ +__PMC_EV(IAP, EVENT_F2H_01H) \ +__PMC_EV(IAP, EVENT_F2H_02H) \ +__PMC_EV(IAP, EVENT_F2H_04H) \ +__PMC_EV(IAP, EVENT_F2H_08H) \ +__PMC_EV(IAP, EVENT_F2H_0FH) \ +__PMC_EV(IAP, EVENT_F3H_01H) \ +__PMC_EV(IAP, EVENT_F3H_02H) + #define PMC_EV_IAP_FIRST PMC_EV_IAP_EVENT_02H_81H #define PMC_EV_IAP_LAST PMC_EV_IAP_EVENT_FDH_40H @@ -1894,6 +1927,29 @@ __PMC_EV_ALIAS("UOP_UNFUSION", IAP_EV __PMC_EV_ALIAS("BR_INST_DECODED", IAP_EVENT_E0H_01H) \ __PMC_EV_ALIAS("BOGUS_BR", IAP_EVENT_E4H_01H) \ __PMC_EV_ALIAS("BPU_MISSED_CALL_RET", IAP_EVENT_E5H_01H) \ +__PMC_EV_ALIAS("BACLEAR.CLEAR", IAP_EVENT_E6H_01H) \ +__PMC_EV_ALIAS("BACLEAR.BAD_TARGET", IAP_EVENT_E6H_02H) \ +__PMC_EV_ALIAS("BPU_CLEARS.EARLY", IAP_EVENT_E8H_01H) \ +__PMC_EV_ALIAS("BPU_CLEARS.LATE", IAP_EVENT_E8H_02H) \ +__PMC_EV_ALIAS("BPU_CLEARS.ANY", IAP_EVENT_E8H_03H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.LOAD", IAP_EVENT_F0H_01H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.RFO", IAP_EVENT_F0H_02H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.IFETCH", IAP_EVENT_F0H_04H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.PREFETCH", IAP_EVENT_F0H_08H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.L1D_WB", IAP_EVENT_F0H_10H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.FILL", IAP_EVENT_F0H_20H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.WB", IAP_EVENT_F0H_40H) \ +__PMC_EV_ALIAS("L2_TRANSACTIONS.ANY", IAP_EVENT_F0H_80H) \ +__PMC_EV_ALIAS("L2_LINES_IN.S_STATE", IAP_EVENT_F1H_02H) \ +__PMC_EV_ALIAS("L2_LINES_IN.E_STATE", IAP_EVENT_F1H_04H) \ +__PMC_EV_ALIAS("L2_LINES_IN.ANY", IAP_EVENT_F1H_07H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_CLEAN", IAP_EVENT_F2H_01H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_F2H_02H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.PREFETCH_CLEAN", IAP_EVENT_F2H_04H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.PREFETCH_DIRTY", IAP_EVENT_F2H_08H) \ +__PMC_EV_ALIAS("L2_LINES_OUT.ANY", IAP_EVENT_F2H_0FH) \ +__PMC_EV_ALIAS("L2_HW_PREFETCH.HIT", IAP_EVENT_F3H_01H) \ +__PMC_EV_ALIAS("L2_HW_PREFETCH.ALLOC", IAP_EVENT_F3H_02H) \ __PMC_EV_ALIAS("L2_HW_PREFETCH.DATA_TRIGGER", IAP_EVENT_F3H_04H) \ __PMC_EV_ALIAS("L2_HW_PREFETCH.CODE_TRIGGER", IAP_EVENT_F3H_08H) \ __PMC_EV_ALIAS("L2_HW_PREFETCH.DCA_TRIGGER", IAP_EVENT_F3H_10H) \ From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 18:30:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF5671065676; Tue, 1 Sep 2009 18:30:17 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C49528FC12; Tue, 1 Sep 2009 18:30:17 +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 n81IUHot069088; Tue, 1 Sep 2009 18:30:17 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n81IUHAu069085; Tue, 1 Sep 2009 18:30:17 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909011830.n81IUHAu069085@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 1 Sep 2009 18:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196740 - head/lib/libc/posix1e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 18:30:18 -0000 Author: trasz Date: Tue Sep 1 18:30:17 2009 New Revision: 196740 URL: http://svn.freebsd.org/changeset/base/196740 Log: Fix regression introduced with NFSv4 ACL support - make acl_to_text(3) and acl_calc_mask(3) return error instead of crashing when acl passed to them is NULL. Submitted by: markus Reviewed by: rwatson MFC after: 3 days Modified: head/lib/libc/posix1e/acl_calc_mask.c head/lib/libc/posix1e/acl_to_text.c Modified: head/lib/libc/posix1e/acl_calc_mask.c ============================================================================== --- head/lib/libc/posix1e/acl_calc_mask.c Tue Sep 1 17:55:37 2009 (r196739) +++ head/lib/libc/posix1e/acl_calc_mask.c Tue Sep 1 18:30:17 2009 (r196740) @@ -50,12 +50,6 @@ acl_calc_mask(acl_t *acl_p) acl_t acl_new; int i, mask_mode, mask_num; - if (!_acl_brand_may_be(*acl_p, ACL_BRAND_POSIX)) { - errno = EINVAL; - return (-1); - } - _acl_brand_as(*acl_p, ACL_BRAND_POSIX); - /* * (23.4.2.4) requires acl_p to point to a pointer to a valid ACL. * Since one of the primary reasons to use this function would be @@ -67,6 +61,13 @@ acl_calc_mask(acl_t *acl_p) errno = EINVAL; return (-1); } + + if (!_acl_brand_may_be(*acl_p, ACL_BRAND_POSIX)) { + errno = EINVAL; + return (-1); + } + _acl_brand_as(*acl_p, ACL_BRAND_POSIX); + acl_int = &(*acl_p)->ats_acl; if ((acl_int->acl_cnt < 3) || (acl_int->acl_cnt > ACL_MAX_ENTRIES)) { errno = EINVAL; Modified: head/lib/libc/posix1e/acl_to_text.c ============================================================================== --- head/lib/libc/posix1e/acl_to_text.c Tue Sep 1 17:55:37 2009 (r196739) +++ head/lib/libc/posix1e/acl_to_text.c Tue Sep 1 18:30:17 2009 (r196740) @@ -70,11 +70,6 @@ _posix1e_acl_to_text(acl_t acl, ssize_t if (buf == NULL) return(NULL); - if (acl == NULL) { - errno = EINVAL; - return(NULL); - } - acl_int = &acl->ats_acl; mask_perm = ACL_PERM_BITS; /* effective is regular if no mask */ @@ -243,6 +238,11 @@ char * acl_to_text_np(acl_t acl, ssize_t *len_p, int flags) { + if (acl == NULL) { + errno = EINVAL; + return(NULL); + } + switch (_acl_brand(acl)) { case ACL_BRAND_POSIX: return (_posix1e_acl_to_text(acl, len_p, flags)); From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 20:27:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F991106568D; Tue, 1 Sep 2009 20:27:02 +0000 (UTC) (envelope-from simon@nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id 11BAC8FC0C; Tue, 1 Sep 2009 20:27:02 +0000 (UTC) Received: from arthur.nitro.dk (arthur.bofh [192.168.2.3]) by mx.nitro.dk (Postfix) with ESMTP id 6EEBA2D485F; Tue, 1 Sep 2009 20:27:00 +0000 (UTC) Received: by arthur.nitro.dk (Postfix, from userid 1000) id 3CF125C0A; Tue, 1 Sep 2009 22:27:00 +0200 (CEST) Date: Tue, 1 Sep 2009 22:26:59 +0200 From: "Simon L. Nielsen" To: "Bjoern A. Zeeb" Message-ID: <20090901202659.GA1495@arthur.nitro.dk> References: <200909011753.n81Hr1AV068295@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909011753.n81Hr1AV068295@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196738 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 20:27:02 -0000 On 2009.09.01 17:53:01 +0000, Bjoern A. Zeeb wrote: > Author: bz > Date: Tue Sep 1 17:53:01 2009 > New Revision: 196738 > URL: http://svn.freebsd.org/changeset/base/196738 > > Log: > In case an upper layer protocol tries to send a packet but the > L2 code does not have the ethernet address for the destination > within the broadcast domain in the table, we remember the > original mbuf in `la_hold' in arpresolve() and send out a > different packet with an arp request. [...] Thanks! In case anybody is interested, this was the issue which indirectly killed the FreeBSD mail system for some hours recently. It was caused by ns1.FreeBSD.org stopped responding to network traffic due to it running out of mbuf's. Feel free to guess when bz's patch was applied ;-) : http://people.freebsd.org/~simon/misc/mbuf_leak_ns1_200908.png . The final spike on the graph is me running 'arp -da' a bunch of times. -- Simon L. Nielsen From owner-svn-src-head@FreeBSD.ORG Tue Sep 1 21:50:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52DC7106568B; Tue, 1 Sep 2009 21:50:41 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 668868FC16; Tue, 1 Sep 2009 21:50:39 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 4so123777eyf.9 for ; Tue, 01 Sep 2009 14:50:39 -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=1GzrWZFii7U33PcHKbtIzu41/LkGzOF6AfMPxVxyGJQ=; b=RlDtTGxJTlosWWZNuj2gXU8gAhz6sq6ZZNRnHrP+oVnyK0f+Gt/9lxd+l8Xolnyimj KdYwtUFXddZlunSILBhxJuLVi9jTbFcdc+0WxeDFKc8Rno1W86t+bT+He3xZaC7zssKP NI9+uXfM/bvdzrOxQUlKufnr1ZdJTMsS66X50= 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=BMTEgEeke+pEbdqn4ECqPKpTgyndfg8PIL6bXlxtgMnh6er9C0tnPe4HiN10aCz3H5 3OyHtzUojSFH3z1I9BnZqQspGFuE93DAJhe6sjVYxIeSGsG2wtycRhHOe2NGl88Q5Vn3 2LPlA8oEeQ+xG/aFF7Ik6HYM8EoljSEtVVddU= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.210.35.10 with SMTP id i10mr6818730ebi.92.1251841839160; Tue, 01 Sep 2009 14:50:39 -0700 (PDT) In-Reply-To: <20090901202659.GA1495@arthur.nitro.dk> References: <200909011753.n81Hr1AV068295@svn.freebsd.org> <20090901202659.GA1495@arthur.nitro.dk> From: Ivan Voras Date: Tue, 1 Sep 2009 23:50:19 +0200 X-Google-Sender-Auth: 6797f404b8f25607 Message-ID: <9bbcef730909011450t37582b50pecf87bb9927faf18@mail.gmail.com> To: "Simon L. Nielsen" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196738 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 21:50:41 -0000 2009/9/1 Simon L. Nielsen : > On 2009.09.01 17:53:01 +0000, Bjoern A. Zeeb wrote: >> Author: bz >> Date: Tue Sep =C2=A01 17:53:01 2009 >> New Revision: 196738 >> URL: http://svn.freebsd.org/changeset/base/196738 >> >> Log: >> =C2=A0 In case an upper layer protocol tries to send a packet but the >> =C2=A0 L2 code does not have the ethernet address for the destination >> =C2=A0 within the broadcast domain in the table, we remember the >> =C2=A0 original mbuf in `la_hold' in arpresolve() and send out a >> =C2=A0 different packet with an arp request. > > [...] > > Thanks! > > In case anybody is interested, this was the issue which indirectly > killed the FreeBSD mail system for some hours recently. =C2=A0It was caus= ed > by ns1.FreeBSD.org stopped responding to network traffic due to it > running out of mbuf's. > > Feel free to guess when bz's patch was applied ;-) : > http://people.freebsd.org/~simon/misc/mbuf_leak_ns1_200908.png . =C2=A0Th= e > final spike on the graph is me running 'arp -da' a bunch of times. Interesting :) I assume this is 8 / HEAD -specific due to work done in ARP code? From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 00:39:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B64541065670; Wed, 2 Sep 2009 00:39: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 8B58C8FC14; Wed, 2 Sep 2009 00:39: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 n820dxOt076653; Wed, 2 Sep 2009 00:39:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n820dx8T076650; Wed, 2 Sep 2009 00:39:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200909020039.n820dx8T076650@svn.freebsd.org> From: John Baldwin Date: Wed, 2 Sep 2009 00:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196745 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 00:39:59 -0000 Author: jhb Date: Wed Sep 2 00:39:59 2009 New Revision: 196745 URL: http://svn.freebsd.org/changeset/base/196745 Log: 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. MFC after: 3 days Modified: head/sys/amd64/amd64/local_apic.c head/sys/i386/i386/local_apic.c Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Tue Sep 1 22:24:27 2009 (r196744) +++ head/sys/amd64/amd64/local_apic.c Wed Sep 2 00:39:59 2009 (r196745) @@ -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: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Tue Sep 1 22:24:27 2009 (r196744) +++ head/sys/i386/i386/local_apic.c Wed Sep 2 00:39:59 2009 (r196745) @@ -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-head@FreeBSD.ORG Wed Sep 2 04:26:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC8C8106566B; Wed, 2 Sep 2009 04:26:34 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 822778FC17; Wed, 2 Sep 2009 04:26:34 +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 n824QYsM081389; Wed, 2 Sep 2009 04:26:34 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n824QY98081387; Wed, 2 Sep 2009 04:26:34 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909020426.n824QY98081387@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 2 Sep 2009 04:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196750 - head/contrib/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 04:26:34 -0000 Author: ache Date: Wed Sep 2 04:26:34 2009 New Revision: 196750 URL: http://svn.freebsd.org/changeset/base/196750 Log: 1) Use isprint() instead of hardcoded values to detect non-printable. 2) Use (unsigned char) cast in waddch() calls. It fix highlighting bug: sign extension of 8bit to the attributes area. 3) Use setlocale() in any case. Modified: head/contrib/ee/ee.c Modified: head/contrib/ee/ee.c ============================================================================== --- head/contrib/ee/ee.c Wed Sep 2 03:03:53 2009 (r196749) +++ head/contrib/ee/ee.c Wed Sep 2 04:26:34 2009 (r196750) @@ -726,7 +726,7 @@ int character; /* new character */ } *point = character; /* insert new character */ wclrtoeol(text_win); - if (((character >= 0) && (character < ' ')) || (character >= 127)) /* check for TAB character*/ + if (!isprint((unsigned char)character)) /* check for TAB character*/ { scr_pos = scr_horz += out_char(text_win, character, scr_horz); point++; @@ -734,7 +734,7 @@ int character; /* new character */ } else { - waddch(text_win, character); + waddch(text_win, (unsigned char)character); scr_pos = ++scr_horz; point++; position ++; @@ -969,17 +969,17 @@ int column; } else { - waddch(window, (char)character ); + waddch(window, (unsigned char)character ); return(1); } } else { - waddch(window, (char)character); + waddch(window, (unsigned char)character); return(1); } for (i2 = 0; (string[i2] != '\0') && (((column+i2+1)-horiz_offset) < last_col); i2++) - waddch(window, string[i2]); + waddch(window, (unsigned char)string[i2]); return(strlen(string)); } @@ -1044,7 +1044,7 @@ int length; /* length (in bytes) of line wclrtoeol(text_win); while ((posit < length) && (column <= last_col)) { - if ((*temp < 32) || (*temp >= 127)) + if (!isprint(*temp)) { column += len_char(*temp, abs_column); abs_column += out_char(text_win, *temp, abs_column); @@ -1923,13 +1923,13 @@ int advance; /* if true, skip leading s } *nam_str = in; g_pos++; - if (((in < ' ') || (in > 126)) && (g_horz < (last_col - 1))) + if (!isprint((unsigned char)in) && (g_horz < (last_col - 1))) g_horz += out_char(com_win, in, g_horz); else { g_horz++; if (g_horz < (last_col - 1)) - waddch(com_win, in); + waddch(com_win, (unsigned char)in); } nam_str++; } @@ -5085,8 +5085,8 @@ strings_init() { int counter; -#ifndef NO_CATGETS setlocale(LC_ALL, ""); +#ifndef NO_CATGETS catalog = catopen("ee", NL_CAT_LOCALE); #endif /* NO_CATGETS */ From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 04:43:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47E3D10656C9; Wed, 2 Sep 2009 04:43:47 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 376918FC20; Wed, 2 Sep 2009 04:43:47 +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 n824hlo2081735; Wed, 2 Sep 2009 04:43:47 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n824hl88081733; Wed, 2 Sep 2009 04:43:47 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909020443.n824hl88081733@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 2 Sep 2009 04:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196751 - head/contrib/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 04:43:47 -0000 Author: ache Date: Wed Sep 2 04:43:46 2009 New Revision: 196751 URL: http://svn.freebsd.org/changeset/base/196751 Log: Move out of NO_CATGETS define too (as setlocale() in prev. commit) Modified: head/contrib/ee/ee.c Modified: head/contrib/ee/ee.c ============================================================================== --- head/contrib/ee/ee.c Wed Sep 2 04:26:34 2009 (r196750) +++ head/contrib/ee/ee.c Wed Sep 2 04:43:46 2009 (r196751) @@ -83,6 +83,7 @@ char *version = "@(#) ee, version " EE_ #include #include #include +#include #ifdef HAS_SYS_WAIT #include @@ -100,9 +101,7 @@ char *version = "@(#) ee, version " EE_ #include #endif - #ifndef NO_CATGETS -#include #include nl_catd catalog; From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 04:56:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D69721065672; Wed, 2 Sep 2009 04:56:30 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C604F8FC25; Wed, 2 Sep 2009 04:56:30 +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 n824uU1D082138; Wed, 2 Sep 2009 04:56:30 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n824uUqQ082136; Wed, 2 Sep 2009 04:56:30 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909020456.n824uUqQ082136@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 2 Sep 2009 04:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 04:56:30 -0000 Author: ache Date: Wed Sep 2 04:56:30 2009 New Revision: 196752 URL: http://svn.freebsd.org/changeset/base/196752 Log: Use (unsigned char) cast for ctype macro Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Wed Sep 2 04:43:46 2009 (r196751) +++ head/lib/libc/stdtime/strptime.c Wed Sep 2 04:56:30 2009 (r196752) @@ -529,7 +529,7 @@ label: buf++; i = 0; for (len = 4; len > 0; len--) { - if (isdigit((int)*buf)) { + if (isdigit((unsigned char)*buf)) { i *= 10; i += *buf - '0'; buf++; From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 05:21:06 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C55CC1065670; Wed, 2 Sep 2009 05:21:06 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (cl-2958.ham-01.de.sixxs.net [IPv6:2001:6f8:900:b8d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4BCA08FC18; Wed, 2 Sep 2009 05:21:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.14.3/8.14.3) with ESMTP id n825L41q085161; Wed, 2 Sep 2009 09:21:04 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Wed, 2 Sep 2009 09:21:04 +0400 (MSD) From: Maxim Konovalov To: Doug Barton In-Reply-To: <4A9D4A90.30700@FreeBSD.org> Message-ID: <20090902092054.Q27429@mp2.macomnet.net> References: <200909010555.n815tAkx050140@svn.freebsd.org> <4A9D4A90.30700@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 05:21:06 -0000 On Tue, 1 Sep 2009, 09:23-0700, Doug Barton wrote: > Maxim Konovalov wrote: > > Author: maxim > > Date: Tue Sep 1 05:55:10 2009 > > New Revision: 196727 > > URL: http://svn.freebsd.org/changeset/base/196727 > > > > Log: > > o Document MALLOC_PRODUCTION knob. > > > > PR: docs/136029 > > Submitted by: anonymous > > MFC after: 2 weeks > > > > Modified: > > head/share/man/man5/make.conf.5 > > Unless I'm missing something this should be in the src.conf man page > instead of make.conf. > Please explain why. -- Maxim Konovalov From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 05:27:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A103106568F; Wed, 2 Sep 2009 05:27:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1DC8FC0A; Wed, 2 Sep 2009 05:27:00 +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 n825Qxnt082836; Wed, 2 Sep 2009 05:26:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n825QxaP082834; Wed, 2 Sep 2009 05:26:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909020526.n825QxaP082834@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 2 Sep 2009 05:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196753 - head/bin/chmod X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 05:27:00 -0000 Author: trasz Date: Wed Sep 2 05:26:59 2009 New Revision: 196753 URL: http://svn.freebsd.org/changeset/base/196753 Log: - Don't include both and - Keep variables sorted - Fix logic error with -f and -v options - don't print the usual -v output if there was an error, whether or not we were passed -f - Don't call free(3) just before exit(2) - Whitespace fixes Submitted by: bde Modified: head/bin/chmod/chmod.c Modified: head/bin/chmod/chmod.c ============================================================================== --- head/bin/chmod/chmod.c Wed Sep 2 04:56:30 2009 (r196752) +++ head/bin/chmod/chmod.c Wed Sep 2 05:26:59 2009 (r196753) @@ -41,7 +41,6 @@ static char sccsid[] = "@(#)chmod.c 8.8 #include __FBSDID("$FreeBSD$"); -#include #include #include @@ -63,7 +62,7 @@ main(int argc, char *argv[]) FTS *ftsp; FTSENT *p; mode_t *set; - int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, error; + int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval; int vflag; char *mode; mode_t newmode; @@ -170,7 +169,6 @@ done: argv += optind; */ if (!hflag) continue; - /* else */ /* FALLTHROUGH */ default: break; @@ -188,9 +186,11 @@ done: argv += optind; error = lchmod(p->fts_accpath, newmode); else error = chmod(p->fts_accpath, newmode); - if (error && !fflag) { - warn("%s", p->fts_path); - rval = 1; + if (error) { + if (!fflag) { + warn("%s", p->fts_path); + rval = 1; + } } else { if (vflag) { (void)printf("%s", p->fts_path); @@ -201,7 +201,6 @@ done: argv += optind; strmode(p->fts_statp->st_mode, m1); strmode((p->fts_statp->st_mode & S_IFMT) | newmode, m2); - (void)printf(": 0%o [%s] -> 0%o [%s]", p->fts_statp->st_mode, m1, (p->fts_statp->st_mode & S_IFMT) | @@ -209,12 +208,10 @@ done: argv += optind; } (void)printf("\n"); } - } } if (errno) err(1, "fts_read"); - free(set); exit(rval); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 07:08:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18156106566C; Wed, 2 Sep 2009 07:08:11 +0000 (UTC) (envelope-from simon@nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id CC6FF8FC12; Wed, 2 Sep 2009 07:08:10 +0000 (UTC) Received: from arthur.nitro.dk (arthur.bofh [192.168.2.3]) by mx.nitro.dk (Postfix) with ESMTP id 9D5D02D4860; Wed, 2 Sep 2009 07:08:09 +0000 (UTC) Received: by arthur.nitro.dk (Postfix, from userid 1000) id 701885C08; Wed, 2 Sep 2009 09:08:09 +0200 (CEST) Date: Wed, 2 Sep 2009 09:08:09 +0200 From: "Simon L. Nielsen" To: "Andrey A. Chernov" Message-ID: <20090902070808.GA1290@arthur.nitro.dk> References: <200909020456.n824uUqQ082136@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909020456.n824uUqQ082136@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 07:08:11 -0000 On 2009.09.02 04:56:30 +0000, Andrey A. Chernov wrote: > Author: ache > Date: Wed Sep 2 04:56:30 2009 > New Revision: 196752 > URL: http://svn.freebsd.org/changeset/base/196752 > > Log: > Use (unsigned char) cast for ctype macro Acording to the manual page and the C standard book I have, isdigit() takes an int for an argument, so why change this? Is passing it as an int instead of char causing problems? -- Simon L. Nielsen From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 08:08:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFCB3106566C; Wed, 2 Sep 2009 08:08:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE5F98FC13; Wed, 2 Sep 2009 08:08: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 n8288viJ086083; Wed, 2 Sep 2009 08:08:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8288vJK086081; Wed, 2 Sep 2009 08:08:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909020808.n8288vJK086081@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 2 Sep 2009 08:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196754 - head/bin/cp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 08:08:57 -0000 Author: trasz Date: Wed Sep 2 08:08:57 2009 New Revision: 196754 URL: http://svn.freebsd.org/changeset/base/196754 Log: Add NFSv4 ACL support to cp(1) and fix a few memory leaks. Note that this changes error reporting behaviour somewhat - before, no error was reported if ACL couldn't be copied because the target filesystem doesn't support ACLs. Now, it will be reported - of course, only if there actually is an ACL to copy. Reviewed by: rwatson Modified: head/bin/cp/utils.c Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Wed Sep 2 05:26:59 2009 (r196753) +++ head/bin/cp/utils.c Wed Sep 2 08:08:57 2009 (r196754) @@ -377,24 +377,52 @@ setfile(struct stat *fs, int fd) int preserve_fd_acls(int source_fd, int dest_fd) { - struct acl *aclp; acl_t acl; + acl_type_t acl_type; + int acl_supported = 0, ret, trivial; - if (fpathconf(source_fd, _PC_ACL_EXTENDED) != 1 || - fpathconf(dest_fd, _PC_ACL_EXTENDED) != 1) + ret = fpathconf(source_fd, _PC_ACL_NFS4); + if (ret > 0 ) { + acl_supported = 1; + acl_type = ACL_TYPE_NFS4; + } else if (ret < 0 && errno != EINVAL) { + warn("fpathconf(..., _PC_ACL_NFS4) failed for %s", to.p_path); + return (1); + } + if (acl_supported == 0) { + ret = fpathconf(source_fd, _PC_ACL_EXTENDED); + if (ret > 0 ) { + acl_supported = 1; + acl_type = ACL_TYPE_ACCESS; + } else if (ret < 0 && errno != EINVAL) { + warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s", + to.p_path); + return (1); + } + } + if (acl_supported == 0) return (0); - acl = acl_get_fd(source_fd); + + acl = acl_get_fd_np(source_fd, acl_type); if (acl == NULL) { warn("failed to get acl entries while setting %s", to.p_path); return (1); } - aclp = &acl->ats_acl; - if (aclp->acl_cnt == 3) + if (acl_is_trivial_np(acl, &trivial)) { + warn("acl_is_trivial() failed for %s", to.p_path); + acl_free(acl); + return (1); + } + if (trivial) { + acl_free(acl); return (0); - if (acl_set_fd(dest_fd, acl) < 0) { + } + if (acl_set_fd_np(dest_fd, acl, acl_type) < 0) { warn("failed to set acl entries for %s", to.p_path); + acl_free(acl); return (1); } + acl_free(acl); return (0); } @@ -405,10 +433,31 @@ preserve_dir_acls(struct stat *fs, char int (*aclsetf)(const char *, acl_type_t, acl_t); struct acl *aclp; acl_t acl; + acl_type_t acl_type; + int acl_supported = 0, ret, trivial; - if (pathconf(source_dir, _PC_ACL_EXTENDED) != 1 || - pathconf(dest_dir, _PC_ACL_EXTENDED) != 1) + ret = pathconf(source_dir, _PC_ACL_NFS4); + if (ret > 0) { + acl_supported = 1; + acl_type = ACL_TYPE_NFS4; + } else if (ret < 0 && errno != EINVAL) { + warn("fpathconf(..., _PC_ACL_NFS4) failed for %s", source_dir); + return (1); + } + if (acl_supported == 0) { + ret = pathconf(source_dir, _PC_ACL_EXTENDED); + if (ret > 0) { + acl_supported = 1; + acl_type = ACL_TYPE_ACCESS; + } else if (ret < 0 && errno != EINVAL) { + warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s", + source_dir); + return (1); + } + } + if (acl_supported == 0) return (0); + /* * If the file is a link we will not follow it */ @@ -419,34 +468,48 @@ preserve_dir_acls(struct stat *fs, char aclgetf = acl_get_file; aclsetf = acl_set_file; } - /* - * Even if there is no ACL_TYPE_DEFAULT entry here, a zero - * size ACL will be returned. So it is not safe to simply - * check the pointer to see if the default ACL is present. - */ - acl = aclgetf(source_dir, ACL_TYPE_DEFAULT); + if (acl_type == ACL_TYPE_ACCESS) { + /* + * Even if there is no ACL_TYPE_DEFAULT entry here, a zero + * size ACL will be returned. So it is not safe to simply + * check the pointer to see if the default ACL is present. + */ + acl = aclgetf(source_dir, ACL_TYPE_DEFAULT); + if (acl == NULL) { + warn("failed to get default acl entries on %s", + source_dir); + return (1); + } + aclp = &acl->ats_acl; + if (aclp->acl_cnt != 0 && aclsetf(dest_dir, + ACL_TYPE_DEFAULT, acl) < 0) { + warn("failed to set default acl entries on %s", + dest_dir); + acl_free(acl); + return (1); + } + acl_free(acl); + } + acl = aclgetf(source_dir, acl_type); if (acl == NULL) { - warn("failed to get default acl entries on %s", - source_dir); + warn("failed to get acl entries on %s", source_dir); return (1); } - aclp = &acl->ats_acl; - if (aclp->acl_cnt != 0 && aclsetf(dest_dir, - ACL_TYPE_DEFAULT, acl) < 0) { - warn("failed to set default acl entries on %s", - dest_dir); + if (acl_is_trivial_np(acl, &trivial)) { + warn("acl_is_trivial() failed on %s", source_dir); + acl_free(acl); return (1); } - acl = aclgetf(source_dir, ACL_TYPE_ACCESS); - if (acl == NULL) { - warn("failed to get acl entries on %s", source_dir); - return (1); + if (trivial) { + acl_free(acl); + return (0); } - aclp = &acl->ats_acl; - if (aclsetf(dest_dir, ACL_TYPE_ACCESS, acl) < 0) { + if (aclsetf(dest_dir, acl_type, acl) < 0) { warn("failed to set acl entries on %s", dest_dir); + acl_free(acl); return (1); } + acl_free(acl); return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 08:51:08 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB4DD1065670; Wed, 2 Sep 2009 08:51:08 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 45BFF8FC0C; Wed, 2 Sep 2009 08:51:07 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n828e5nO017493; Wed, 2 Sep 2009 12:40:05 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1251880805; bh=w/+vFpBXsBWUC4DDcWE/qU/xnS9dfUShgvb0jOu2yfc=; l=724; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=j9spOs+/nv66HyD9adr1S+K1Ef/i+Umw1vVLfa8mxZNFz6Y2a+YHshnoPtCu1QtjC uBsxbAK8xB9cj0PTnqJZ+n7RdyIWo83PpUWLZdknGDPcEuA/cHwacS/UC1HCvBJREU NDGjR5vu+KeOHvNmgwv9e3z9lJ2v2sMcvAZIseEE= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n828e3Do017492; Wed, 2 Sep 2009 12:40:04 +0400 (MSD) (envelope-from ache) Date: Wed, 2 Sep 2009 12:40:03 +0400 From: Andrey Chernov To: "Simon L. Nielsen" Message-ID: <20090902084002.GA17325@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , "Simon L. Nielsen" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090902070808.GA1290@arthur.nitro.dk> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 08:51:09 -0000 On Wed, Sep 02, 2009 at 09:08:09AM +0200, Simon L. Nielsen wrote: > > Log: > > Use (unsigned char) cast for ctype macro > > Acording to the manual page and the C standard book I have, isdigit() > takes an int for an argument, so why change this? Not exactly that. From our manual page: "The value of the argument must be representable as an unsigned char or the value of EOF." Signed char (automatically casted to int in expression even without direct (int) cast) passed to any ctype macro potentically may cause a lot of problems, such as: incorrect char class detection or even core dump in some systems. This is due to automatic sign extension of 8bit (if present). -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 11:39:20 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB581065676; Wed, 2 Sep 2009 11:39:20 +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 C45938FC15; Wed, 2 Sep 2009 11:39:20 +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 n82BdKFh094795; Wed, 2 Sep 2009 11:39:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82BdKEX094794; Wed, 2 Sep 2009 11:39:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200909021139.n82BdKEX094794@svn.freebsd.org> From: Alexander Motin Date: Wed, 2 Sep 2009 11:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196762 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 11:39:21 -0000 Author: mav Date: Wed Sep 2 11:39:19 2009 New Revision: 196762 URL: http://svn.freebsd.org/changeset/base/196762 Log: Improve HDA controller capabilities logging. Modified: head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hda/hdac_private.h head/sys/dev/sound/pci/hda/hdac_reg.h Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Wed Sep 2 10:39:46 2009 (r196761) +++ head/sys/dev/sound/pci/hda/hdac.c Wed Sep 2 11:39:19 2009 (r196762) @@ -1520,7 +1520,7 @@ hdac_get_capabilities(struct hdac_softc sc->num_iss = HDAC_GCAP_ISS(gcap); sc->num_oss = HDAC_GCAP_OSS(gcap); sc->num_bss = HDAC_GCAP_BSS(gcap); - + sc->num_sdo = HDAC_GCAP_NSDO(gcap); sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK); corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE); @@ -1555,11 +1555,12 @@ hdac_get_capabilities(struct hdac_softc return (ENXIO); } - HDA_BOOTHVERBOSE( - device_printf(sc->dev, " CORB size: %d\n", sc->corb_size); - device_printf(sc->dev, " RIRB size: %d\n", sc->rirb_size); - device_printf(sc->dev, " Streams: ISS=%d OSS=%d BSS=%d\n", - sc->num_iss, sc->num_oss, sc->num_bss); + HDA_BOOTVERBOSE( + device_printf(sc->dev, "Caps: OSS %d, ISS %d, BSS %d, " + "NSDO %d%s, CORB %d, RIRB %d\n", + sc->num_oss, sc->num_iss, sc->num_bss, 1 << sc->num_sdo, + sc->support_64bit ? ", 64bit" : "", + sc->corb_size, sc->rirb_size); ); return (0); Modified: head/sys/dev/sound/pci/hda/hdac_private.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac_private.h Wed Sep 2 10:39:46 2009 (r196761) +++ head/sys/dev/sound/pci/hda/hdac_private.h Wed Sep 2 11:39:19 2009 (r196762) @@ -339,6 +339,7 @@ struct hdac_softc { int num_iss; int num_oss; int num_bss; + int num_sdo; int support_64bit; int streamcnt; Modified: head/sys/dev/sound/pci/hda/hdac_reg.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac_reg.h Wed Sep 2 10:39:46 2009 (r196761) +++ head/sys/dev/sound/pci/hda/hdac_reg.h Wed Sep 2 11:39:19 2009 (r196762) @@ -136,6 +136,8 @@ (((gcap) & HDAC_GCAP_ISS_MASK) >> HDAC_GCAP_ISS_SHIFT) #define HDAC_GCAP_OSS(gcap) \ (((gcap) & HDAC_GCAP_OSS_MASK) >> HDAC_GCAP_OSS_SHIFT) +#define HDAC_GCAP_NSDO(gcap) \ + (((gcap) & HDAC_GCAP_NSDO_MASK) >> HDAC_GCAP_NSDO_SHIFT) /* GCTL - Global Control */ #define HDAC_GCTL_CRST 0x00000001 From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 13:46:00 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CE16106566B; Wed, 2 Sep 2009 13:46:00 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id C2D368FC14; Wed, 2 Sep 2009 13:45:59 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:e817:f690:b95a:3ed2] (unknown [IPv6:2001:7b8:3a7:0:e817:f690:b95a:3ed2]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E8CA85C59; Wed, 2 Sep 2009 15:45:57 +0200 (CEST) Message-ID: <4A9E7718.1080503@andric.com> Date: Wed, 02 Sep 2009 15:46:00 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.4pre) Gecko/20090901 Shredder/3.0b4pre MIME-Version: 1.0 To: Maxim Konovalov References: <200909010555.n815tAkx050140@svn.freebsd.org> <4A9D4A90.30700@FreeBSD.org> <20090902092054.Q27429@mp2.macomnet.net> In-Reply-To: <20090902092054.Q27429@mp2.macomnet.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, Doug Barton , src-committers@FreeBSD.ORG Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 13:46:00 -0000 On 2009-09-02 07:21, Maxim Konovalov wrote: >> Unless I'm missing something this should be in the src.conf man page >> instead of make.conf. > Please explain why. make.conf(5): The file make.conf contains system-wide settings that will apply to every build using make(1) and the standard sys.mk file. src.conf(5): The src.conf file contains settings that will apply to every build involving the FreeBSD source tree; see build(7). The MALLOC_PRODUCTION define is used inside the FreeBSD source tree (actually only in jemalloc, it seems). You most likely don't want it to apply 'globally', since third-party programs (e.g. ports) might give a totally different meaning to this define -- or most likely: no meaning at all. :) From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 13:58:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 599971065692; Wed, 2 Sep 2009 13:58:16 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47C308FC16; Wed, 2 Sep 2009 13:58:16 +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 n82DwFLs097782; Wed, 2 Sep 2009 13:58:15 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82DwF2f097781; Wed, 2 Sep 2009 13:58:15 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200909021358.n82DwF2f097781@svn.freebsd.org> From: Florent Thoumie Date: Wed, 2 Sep 2009 13:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196766 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 13:58:16 -0000 Author: flz Date: Wed Sep 2 13:58:15 2009 New Revision: 196766 URL: http://svn.freebsd.org/changeset/base/196766 Log: - Bump PKG_INSTALL_VERSION to 20090902 after dougb's changes. - Change the comment to say that version must be changed when a non-cosmetic change is made. Modified: head/usr.sbin/pkg_install/lib/lib.h Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Wed Sep 2 12:51:57 2009 (r196765) +++ head/usr.sbin/pkg_install/lib/lib.h Wed Sep 2 13:58:15 2009 (r196766) @@ -102,10 +102,10 @@ #define PKG_PREFIX_VNAME "PKG_PREFIX" /* - * Version of the package tools - increase only when some - * functionality used by bsd.port.mk is changed, added or removed + * Version of the package tools - increase whenever you make a change + * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20090519 +#define PKG_INSTALL_VERSION 20090902 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 14:54:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D93E1065697; Wed, 2 Sep 2009 14:54:47 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB5F8FC40; Wed, 2 Sep 2009 14:54:47 +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 n82EslEl099256; Wed, 2 Sep 2009 14:54:47 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82EslhJ099254; Wed, 2 Sep 2009 14:54:47 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200909021454.n82EslhJ099254@svn.freebsd.org> From: Florent Thoumie Date: Wed, 2 Sep 2009 14:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196767 - in head/etc: . mtree X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 14:54:47 -0000 Author: flz Date: Wed Sep 2 14:54:47 2009 New Revision: 196767 URL: http://svn.freebsd.org/changeset/base/196767 Log: - Remove BSD.{x11,x11-4}.dist as we merged prefixes a while ago and those files aren't used anymore. - Remove BSD.local.dist as the file moved to ports/Templates when we merged prefixes. Deleted: head/etc/mtree/BSD.local.dist head/etc/mtree/BSD.x11-4.dist head/etc/mtree/BSD.x11.dist Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed Sep 2 13:58:15 2009 (r196766) +++ head/etc/Makefile Wed Sep 2 14:54:47 2009 (r196767) @@ -99,8 +99,7 @@ BIN1+= regdomain.xml # -rwxr-xr-x root:wheel, for the new cron root:wheel BIN2= netstart pccard_ether rc.suspend rc.resume -MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \ - BSD.var.dist BSD.x11.dist BSD.x11-4.dist +MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist .if ${MK_SENDMAIL} != "no" MTREE+= BSD.sendmail.dist .endif From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 14:56:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B11B41065694; Wed, 2 Sep 2009 14:56:23 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A05B88FC27; Wed, 2 Sep 2009 14:56: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 n82EuN8h099353; Wed, 2 Sep 2009 14:56:23 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82EuNcx099351; Wed, 2 Sep 2009 14:56:23 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200909021456.n82EuNcx099351@svn.freebsd.org> From: Florent Thoumie Date: Wed, 2 Sep 2009 14:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196768 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 14:56:23 -0000 Author: flz Date: Wed Sep 2 14:56:23 2009 New Revision: 196768 URL: http://svn.freebsd.org/changeset/base/196768 Log: Remove BSD.{local,x11,x11-4}.dist mtree files as they're either obsolete or they've moved to ports. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Sep 2 14:54:47 2009 (r196767) +++ head/ObsoleteFiles.inc Wed Sep 2 14:56:23 2009 (r196768) @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090902: BSD.{x11,x11-4}.dist are dead and BSD.local.dist lives in ports/ +OLD_FILES+=etc/mtree/BSD.local.dist +OLD_FILES+=etc/mtree/BSD.x11.dist +OLD_FILES+=etc/mtree/BSD.x11-4.dist # 20090801: vimage.h removed in favour of vnet.h OLD_FILES+=usr/include/sys/vimage.h # 20090719: library version bump for 8.0 From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 15:06:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D87B11065670 for ; Wed, 2 Sep 2009 15:06:28 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 6CC9B8FC21 for ; Wed, 2 Sep 2009 15:06:28 +0000 (UTC) Received: (qmail 5964 invoked by uid 399); 2 Sep 2009 15:06:23 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Sep 2009 15:06:23 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A9E89E9.50300@FreeBSD.org> Date: Wed, 02 Sep 2009 08:06:17 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Florent Thoumie References: <200909021358.n82DwF2f097781@svn.freebsd.org> In-Reply-To: <200909021358.n82DwF2f097781@svn.freebsd.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196766 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 15:06:28 -0000 Florent Thoumie wrote: > Author: flz > Date: Wed Sep 2 13:58:15 2009 > New Revision: 196766 > URL: http://svn.freebsd.org/changeset/base/196766 > > Log: > - Bump PKG_INSTALL_VERSION to 20090902 after dougb's changes. > - Change the comment to say that version must be changed when a > non-cosmetic change is made. Thanks! (For the change, and for the education.) Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 15:16:43 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1114F1065672 for ; Wed, 2 Sep 2009 15:16:43 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 96D1F8FC16 for ; Wed, 2 Sep 2009 15:16:42 +0000 (UTC) Received: (qmail 26038 invoked by uid 399); 2 Sep 2009 15:16:38 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Sep 2009 15:16:38 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A9E8C50.5010402@FreeBSD.org> Date: Wed, 02 Sep 2009 08:16:32 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Dimitry Andric References: <200909010555.n815tAkx050140@svn.freebsd.org> <4A9D4A90.30700@FreeBSD.org> <20090902092054.Q27429@mp2.macomnet.net> <4A9E7718.1080503@andric.com> In-Reply-To: <4A9E7718.1080503@andric.com> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, Maxim Konovalov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 15:16:43 -0000 Dimitry Andric wrote: > On 2009-09-02 07:21, Maxim Konovalov wrote: >>> Unless I'm missing something this should be in the src.conf man page >>> instead of make.conf. >> Please explain why. > > make.conf(5): > The file make.conf contains system-wide settings that will apply to every > build using make(1) and the standard sys.mk file. > > src.conf(5): > The src.conf file contains settings that will apply to every build > involving the FreeBSD source tree; see build(7). > > The MALLOC_PRODUCTION define is used inside the FreeBSD source tree > (actually only in jemalloc, it seems). > > You most likely don't want it to apply 'globally', since third-party > programs (e.g. ports) might give a totally different meaning to this > define -- or most likely: no meaning at all. :) That's correct. Maxim, I forgot to include the pointer to src/tools/build/options in my previous mail, so there you go. :) Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 16:02:49 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3978C106566C; Wed, 2 Sep 2009 16:02:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 272C58FC14; Wed, 2 Sep 2009 16:02: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 n82G2mpe000815; Wed, 2 Sep 2009 16:02:48 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82G2mpE000812; Wed, 2 Sep 2009 16:02:48 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200909021602.n82G2mpE000812@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 2 Sep 2009 16:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196769 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 16:02:49 -0000 Author: jkim Date: Wed Sep 2 16:02:48 2009 New Revision: 196769 URL: http://svn.freebsd.org/changeset/base/196769 Log: - Work around ACPI mode transition problem for recent NVIDIA 9400M chipset based Intel Macs. Since r189055, these platforms started freezing when ACPI is being initialized for unknown reason. For these platforms, we just use the old PAT layout. Note this change is not enough to boot fully on these platforms because of other problems but it makes debugging possible. Note MacBook5,2 may be affected as well but it was not added here because of lack of hardware to test. - Initialize PAT MSR fully instead of reading and modifying it for safety. Reported by: rpaulo, hps, Eygene Ryabinkin (rea-fbsd at codelabs dot ru) Reviewed by: jhb Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 2 14:56:23 2009 (r196768) +++ head/sys/amd64/amd64/pmap.c Wed Sep 2 16:02:48 2009 (r196769) @@ -178,6 +178,8 @@ static vm_paddr_t dmaplimit; vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS; pt_entry_t pg_nx; +static int pat_works = 0; /* Is page attribute table sane? */ + SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); static int pg_ps_enabled = 1; @@ -590,20 +592,56 @@ void pmap_init_pat(void) { uint64_t pat_msr; + char *sysenv; + static int pat_tested = 0; /* Bail if this CPU doesn't implement PAT. */ if (!(cpu_feature & CPUID_PAT)) panic("no PAT??"); /* - * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. - * Program 4 and 5 as WP and WC. - * Leave 6 and 7 as UC and UC-. - */ - pat_msr = rdmsr(MSR_PAT); - pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); - pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | - PAT_VALUE(5, PAT_WRITE_COMBINING); + * Some Apple Macs based on nVidia chipsets cannot enter ACPI mode + * via SMI# when we use upper 4 PAT entries for unknown reason. + */ + if (!pat_tested) { + pat_works = 1; + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strncmp(sysenv, "MacBook5,1", 10) == 0 || + strncmp(sysenv, "MacBookPro5,5", 13) == 0 || + strncmp(sysenv, "Macmini3,1", 10) == 0) + pat_works = 0; + freeenv(sysenv); + } + pat_tested = 1; + } + + /* Initialize default PAT entries. */ + pat_msr = PAT_VALUE(0, PAT_WRITE_BACK) | + PAT_VALUE(1, PAT_WRITE_THROUGH) | + PAT_VALUE(2, PAT_UNCACHED) | + PAT_VALUE(3, PAT_UNCACHEABLE) | + PAT_VALUE(4, PAT_WRITE_BACK) | + PAT_VALUE(5, PAT_WRITE_THROUGH) | + PAT_VALUE(6, PAT_UNCACHED) | + PAT_VALUE(7, PAT_UNCACHEABLE); + + if (pat_works) { + /* + * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. + * Program 4 and 5 as WP and WC. + * Leave 6 and 7 as UC and UC-. + */ + pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); + pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | + PAT_VALUE(5, PAT_WRITE_COMBINING); + } else { + /* + * Just replace PAT Index 2 with WC instead of UC-. + */ + pat_msr &= ~PAT_MASK(2); + pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); + } wrmsr(MSR_PAT, pat_msr); } @@ -754,27 +792,48 @@ pmap_cache_bits(int mode, boolean_t is_p pat_flag = is_pde ? PG_PDE_PAT : PG_PTE_PAT; /* Map the caching mode to a PAT index. */ - switch (mode) { - case PAT_UNCACHEABLE: - pat_index = 3; - break; - case PAT_WRITE_THROUGH: - pat_index = 1; - break; - case PAT_WRITE_BACK: - pat_index = 0; - break; - case PAT_UNCACHED: - pat_index = 2; - break; - case PAT_WRITE_COMBINING: - pat_index = 5; - break; - case PAT_WRITE_PROTECTED: - pat_index = 4; - break; - default: - panic("Unknown caching mode %d\n", mode); + if (pat_works) { + switch (mode) { + case PAT_UNCACHEABLE: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_UNCACHED: + pat_index = 2; + break; + case PAT_WRITE_COMBINING: + pat_index = 5; + break; + case PAT_WRITE_PROTECTED: + pat_index = 4; + break; + default: + panic("Unknown caching mode %d\n", mode); + } + } else { + switch (mode) { + case PAT_UNCACHED: + case PAT_UNCACHEABLE: + case PAT_WRITE_PROTECTED: + pat_index = 3; + break; + case PAT_WRITE_THROUGH: + pat_index = 1; + break; + case PAT_WRITE_BACK: + pat_index = 0; + break; + case PAT_WRITE_COMBINING: + pat_index = 2; + break; + default: + panic("Unknown caching mode %d\n", mode); + } } /* Map the 3-bit index value into the PAT, PCD, and PWT bits. */ Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Sep 2 14:56:23 2009 (r196768) +++ head/sys/i386/i386/pmap.c Wed Sep 2 16:02:48 2009 (r196769) @@ -212,7 +212,7 @@ pt_entry_t pg_nx; static uma_zone_t pdptzone; #endif -static int pat_works; /* Is page attribute table sane? */ +static int pat_works = 0; /* Is page attribute table sane? */ SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); @@ -478,40 +478,69 @@ void pmap_init_pat(void) { uint64_t pat_msr; + char *sysenv; + static int pat_tested = 0; /* Bail if this CPU doesn't implement PAT. */ if (!(cpu_feature & CPUID_PAT)) return; - if (cpu_vendor_id != CPU_VENDOR_INTEL || - (I386_CPU_FAMILY(cpu_id) == 6 && I386_CPU_MODEL(cpu_id) >= 0xe)) { + /* + * Due to some Intel errata, we can only safely use the lower 4 + * PAT entries. + * + * Intel Pentium III Processor Specification Update + * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B + * or Mode C Paging) + * + * Intel Pentium IV Processor Specification Update + * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) + * + * Some Apple Macs based on nVidia chipsets cannot enter ACPI mode + * via SMI# when we use upper 4 PAT entries for unknown reason. + */ + if (!pat_tested) { + if (cpu_vendor_id != CPU_VENDOR_INTEL || + (I386_CPU_FAMILY(cpu_id) == 6 && + I386_CPU_MODEL(cpu_id) >= 0xe)) { + pat_works = 1; + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strncmp(sysenv, "MacBook5,1", 10) == 0 || + strncmp(sysenv, "MacBookPro5,5", 13) == 0 || + strncmp(sysenv, "Macmini3,1", 10) == 0) + pat_works = 0; + freeenv(sysenv); + } + } + pat_tested = 1; + } + + /* Initialize default PAT entries. */ + pat_msr = PAT_VALUE(0, PAT_WRITE_BACK) | + PAT_VALUE(1, PAT_WRITE_THROUGH) | + PAT_VALUE(2, PAT_UNCACHED) | + PAT_VALUE(3, PAT_UNCACHEABLE) | + PAT_VALUE(4, PAT_WRITE_BACK) | + PAT_VALUE(5, PAT_WRITE_THROUGH) | + PAT_VALUE(6, PAT_UNCACHED) | + PAT_VALUE(7, PAT_UNCACHEABLE); + + if (pat_works) { /* * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. * Program 4 and 5 as WP and WC. * Leave 6 and 7 as UC and UC-. */ - pat_msr = rdmsr(MSR_PAT); pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | PAT_VALUE(5, PAT_WRITE_COMBINING); - pat_works = 1; } else { /* - * Due to some Intel errata, we can only safely use the lower 4 - * PAT entries. Thus, just replace PAT Index 2 with WC instead - * of UC-. - * - * Intel Pentium III Processor Specification Update - * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B - * or Mode C Paging) - * - * Intel Pentium IV Processor Specification Update - * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) + * Just replace PAT Index 2 with WC instead of UC-. */ - pat_msr = rdmsr(MSR_PAT); pat_msr &= ~PAT_MASK(2); pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); - pat_works = 0; } wrmsr(MSR_PAT, pat_msr); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 16:47:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29529106568D; Wed, 2 Sep 2009 16:47:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17F498FC1C; Wed, 2 Sep 2009 16:47: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 n82GlA9S001797; Wed, 2 Sep 2009 16:47:10 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82GlAeA001794; Wed, 2 Sep 2009 16:47:10 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200909021647.n82GlAeA001794@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 2 Sep 2009 16:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196771 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 16:47:11 -0000 Author: jkim Date: Wed Sep 2 16:47:10 2009 New Revision: 196771 URL: http://svn.freebsd.org/changeset/base/196771 Log: Fix confusing comments about default PAT entries. Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 2 16:35:57 2009 (r196770) +++ head/sys/amd64/amd64/pmap.c Wed Sep 2 16:47:10 2009 (r196771) @@ -628,9 +628,9 @@ pmap_init_pat(void) if (pat_works) { /* - * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. + * Leave the indices 0-3 at the default of WB, WT, UC-, and UC. * Program 4 and 5 as WP and WC. - * Leave 6 and 7 as UC and UC-. + * Leave 6 and 7 as UC- and UC. */ pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Sep 2 16:35:57 2009 (r196770) +++ head/sys/i386/i386/pmap.c Wed Sep 2 16:47:10 2009 (r196771) @@ -528,9 +528,9 @@ pmap_init_pat(void) if (pat_works) { /* - * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. + * Leave the indices 0-3 at the default of WB, WT, UC-, and UC. * Program 4 and 5 as WP and WC. - * Leave 6 and 7 as UC and UC-. + * Leave 6 and 7 as UC- and UC. */ pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 16:57:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49B2A106566B; Wed, 2 Sep 2009 16:57:28 +0000 (UTC) (envelope-from swell.k@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 5B2858FC2B; Wed, 2 Sep 2009 16:57:27 +0000 (UTC) Received: by ewy4 with SMTP id 4so1014961ewy.36 for ; Wed, 02 Sep 2009 09:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=xBBFnuy5H3Bb6uZJl4CaCk//7h/9IEgVza5oxVL3wFg=; b=P8lluiBZv9TFJys8bVQHB2g7Xfb9B4jwe0zElVZtx4zZBJZNkUkGkyWRLnl5xviFXH xrCCeXncAQmJjffYhevRMyUjn4rFdKLXEwyABO1WrSZNqMg5Z0KkdqHbI0VTdVSttKVF sSJUcgMJM9I5XQEoxyD1RdgJLHJrtgtly3cg4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=B1QcRZNRBAWz2RNQwomQqRGRR6nt+0fNJZ+Xg0hkjjG6VF9ykYUCpqGzQw2YH51ZNG yzqU0K0Y8GHBogeu8wYTTvxJKexwLVvyfh4iosYQDXbwkTECdXlBkgh5u7KgJZkMCzP6 +BBVtM2fyNd05LS28Wvvddf5rVT7g4Yt9gGDI= Received: by 10.211.132.28 with SMTP id j28mr664037ebn.95.1251909329485; Wed, 02 Sep 2009 09:35:29 -0700 (PDT) Received: from localhost (95-24-167-0.broadband.corbina.ru [95.24.167.0]) by mx.google.com with ESMTPS id 28sm47660eyg.41.2009.09.02.09.35.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 02 Sep 2009 09:35:28 -0700 (PDT) From: Anonymous To: Dimitry Andric References: <200909010555.n815tAkx050140@svn.freebsd.org> <4A9D4A90.30700@FreeBSD.org> <20090902092054.Q27429@mp2.macomnet.net> <4A9E7718.1080503@andric.com> Date: Wed, 02 Sep 2009 20:35:23 +0400 In-Reply-To: <4A9E7718.1080503@andric.com> (Dimitry Andric's message of "Wed, 02 Sep 2009 15:46:00 +0200") Message-ID: <86hbvli9tg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.ORG, Maxim Konovalov , Doug Barton , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 16:57:28 -0000 Dimitry Andric writes: > On 2009-09-02 07:21, Maxim Konovalov wrote: >>> Unless I'm missing something this should be in the src.conf man page >>> instead of make.conf. >> Please explain why. > > make.conf(5): > The file make.conf contains system-wide settings that will apply to every > build using make(1) and the standard sys.mk file. > > src.conf(5): > The src.conf file contains settings that will apply to every build > involving the FreeBSD source tree; see build(7). > > The MALLOC_PRODUCTION define is used inside the FreeBSD source tree > (actually only in jemalloc, it seems). > > You most likely don't want it to apply 'globally', since third-party > programs (e.g. ports) might give a totally different meaning to this > define -- or most likely: no meaning at all. :) Don't you think this affects not only MALLOC_PRODUCTION but all defines under sections "BUILDING THE KERNEL" and "BUILDING THE WORLD"? For example, WITHOUT_MODULES conflicts with one in archivers/p7zip. From owner-svn-src-head@FreeBSD.ORG Wed Sep 2 17:33:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14BDB10656A7; Wed, 2 Sep 2009 17:33:52 +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 038338FC14; Wed, 2 Sep 2009 17:33:52 +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 n82HXpxK002873; Wed, 2 Sep 2009 17:33:51 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82HXpV6002870; Wed, 2 Sep 2009 17:33:51 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909021733.n82HXpV6002870@svn.freebsd.org> From: Attilio Rao Date: Wed, 2 Sep 2009 17:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196772 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 17:33:52 -0000 Author: attilio Date: Wed Sep 2 17:33:51 2009 New Revision: 196772 URL: http://svn.freebsd.org/changeset/base/196772 Log: Fix some bugs related to adaptive spinning: In the lockmgr support: - GIANT_RESTORE() is just called when the sleep finishes, so the current code can ends up into a giant unlock problem. Fix it by appropriately call GIANT_RESTORE() when needed. Note that this is not exactly ideal because for any interation of the adaptive spinning we drop and restore Giant, but the overhead should be not a factor. - In the lock held in exclusive mode case, after the adaptive spinning is brought to completition, we should just retry to acquire the lock instead to fallthrough. Fix that. - Fix a style nit In the sx support: - Call GIANT_SAVE() before than looping. This saves some overhead because in the current code GIANT_SAVE() is called several times. Tested by: Giovanni Trematerra Modified: head/sys/kern/kern_lock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Wed Sep 2 16:47:10 2009 (r196771) +++ head/sys/kern/kern_lock.c Wed Sep 2 17:33:51 2009 (r196772) @@ -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: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Wed Sep 2 16:47:10 2009 (r196771) +++ head/sys/kern/kern_sx.c Wed Sep 2 17:33:51 2009 (r196772) @@ -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-head@FreeBSD.ORG Wed Sep 2 20:50:40 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00C1110656CA; Wed, 2 Sep 2009 20:50:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4B0C8FC12; Wed, 2 Sep 2009 20:50: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 n82KodmW006770; Wed, 2 Sep 2009 20:50:39 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n82KodmI006768; Wed, 2 Sep 2009 20:50:39 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909022050.n82KodmI006768@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 2 Sep 2009 20:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196773 - head/bin/ls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 20:50:40 -0000 Author: trasz Date: Wed Sep 2 20:50:39 2009 New Revision: 196773 URL: http://svn.freebsd.org/changeset/base/196773 Log: Fix regression introduced in r196712 - the 'name' string needs to be rewritten for each file we want to check ACL on. Without this change, ls(1) would check only the ACL on the first file to list. Modified: head/bin/ls/print.c Modified: head/bin/ls/print.c ============================================================================== --- head/bin/ls/print.c Wed Sep 2 17:33:51 2009 (r196772) +++ head/bin/ls/print.c Wed Sep 2 20:50:39 2009 (r196773) @@ -623,15 +623,19 @@ aclmode(char *buf, const FTSENT *p) S_ISWHT(p->fts_statp->st_mode)) return; + if (previous_dev == p->fts_statp->st_dev && supports_acls == 0) + return; + + if (p->fts_level == FTS_ROOTLEVEL) + snprintf(name, sizeof(name), "%s", p->fts_name); + else + snprintf(name, sizeof(name), "%s/%s", + p->fts_parent->fts_accpath, p->fts_name); + if (previous_dev != p->fts_statp->st_dev) { previous_dev = p->fts_statp->st_dev; supports_acls = 0; - if (p->fts_level == FTS_ROOTLEVEL) - snprintf(name, sizeof(name), "%s", p->fts_name); - else - snprintf(name, sizeof(name), "%s/%s", - p->fts_parent->fts_accpath, p->fts_name); ret = lpathconf(name, _PC_ACL_NFS4); if (ret > 0) { type = ACL_TYPE_NFS4; From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 07:26:04 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB191106566B; Thu, 3 Sep 2009 07:26:04 +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 969A38FC18; Thu, 3 Sep 2009 07:26:04 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 46F6E6D41B; Thu, 3 Sep 2009 07:26:03 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 1E57B844B4; Thu, 3 Sep 2009 09:26:03 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Andrey Chernov References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> Date: Thu, 03 Sep 2009 09:26:03 +0200 In-Reply-To: <20090902084002.GA17325@nagual.pp.ru> (Andrey Chernov's message of "Wed, 2 Sep 2009 12:40:03 +0400") Message-ID: <867hwgcwvo.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 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "Simon L. Nielsen" Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 07:26:04 -0000 Andrey Chernov writes: > "Simon L. Nielsen" writes: > > Acording to the manual page and the C standard book I have, > > isdigit() takes an int for an argument, so why change this? > "The value of the argument must be representable as an unsigned char or > the value of EOF." > > Signed char (automatically casted to int in expression even without direc= t=20 > (int) cast) passed to any ctype macro potentically may cause a lot of=20 > problems, such as: incorrect char class detection or even core dump in=20 > some systems. > > This is due to automatic sign extension of 8bit (if present). To put it more clearly: - The is*() functions expect an int for the same reason fgetc() returns one: a char alone can't represent all possible char values *plus* EOF. - In most 8-bit locales, there are valid characters outside the 0-127 range. When stored in a signed char, such characters are represented as negative values. When that signed char is promoted to a signed int, the negative values remain negative instead of being converted to the correct positive value. - This would not be a problem if C distinguished between a character (unsigned) and a "short short int" (signed). - The core dump ache refers to can occur with a na=C3=AFve implementation that uses a lookup table and checks for EOF, but not for other negative values. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 08:43:31 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5F38106566B; Thu, 3 Sep 2009 08:43:31 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 25C068FC0A; Thu, 3 Sep 2009 08:43:30 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n838hRQD065289; Thu, 3 Sep 2009 12:43:27 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1251967408; bh=r3tFUjJuCIeu4V/6AZUuhE27I4lJx6zsde6nXXU+FZc=; l=474; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=hTqi2HdHeNVpFlDFKE9A5/PZtinGVl6Tbie9p3J/w3Huwp0bu5YdXpTccj721PRbc Xy0Qz5l2HzTm4GtbaAw2YilXYz035+jS39M0CgoHR2HEuw467xrF55gU6RUu82oL6d hc9iLRe+SHRBTzhAFpejuwQVWSscTPQnMD0ybJnY= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n838hQ6H065288; Thu, 3 Sep 2009 12:43:27 +0400 (MSD) (envelope-from ache) Date: Thu, 3 Sep 2009 12:43:25 +0400 From: Andrey Chernov To: Dag-Erling Sm??rgrav Message-ID: <20090903084325.GA65192@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Dag-Erling Sm??rgrav , "Simon L. Nielsen" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <867hwgcwvo.fsf@ds4.des.no> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "Simon L. Nielsen" Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 08:43:31 -0000 On Thu, Sep 03, 2009 at 09:26:03AM +0200, Dag-Erling Sm??rgrav wrote: > > - The core dump ache refers to can occur with a na??ve implementation > that uses a lookup table and checks for EOF, but not for other > negative values. Thanx for detailed explanation. Just to note: even such naive implemetations still live inside POSIX, since POSIX says that behaviour outside of "unsigned char" range + exact EOF value is undefined. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 09:08:28 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7E69106566C; Thu, 3 Sep 2009 09:08:28 +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 0EC628FC17; Thu, 3 Sep 2009 09:08:27 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id F1FEC6D418; Thu, 3 Sep 2009 09:08:26 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C8DF5844A4; Thu, 3 Sep 2009 11:08:26 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Andrey Chernov References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> Date: Thu, 03 Sep 2009 11:08:26 +0200 In-Reply-To: <20090903084325.GA65192@nagual.pp.ru> (Andrey Chernov's message of "Thu, 3 Sep 2009 12:43:25 +0400") Message-ID: <86zl9c9z05.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "Simon L. Nielsen" Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 09:08:28 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Andrey Chernov writes: > Thanx for detailed explanation. np; I've made that mistake many times myself. What do you think of the attached patch? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=ctype-man.diff Index: lib/libc/locale/iscntrl.3 =================================================================== --- lib/libc/locale/iscntrl.3 (revision 196695) +++ lib/libc/locale/iscntrl.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)iscntrl.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISCNTRL 3 .Os .Sh NAME @@ -65,6 +65,15 @@ .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS" .It "\&036\ RS \t037\ US \t177\ DEL" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn iscntrl +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn iscntrl Index: lib/libc/locale/islower.3 =================================================================== --- lib/libc/locale/islower.3 (revision 196695) +++ lib/libc/locale/islower.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)islower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISLOWER 3 .Os .Sh NAME @@ -64,6 +64,15 @@ .It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" .It "\&172\ ``z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn islower +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn islower Index: lib/libc/locale/ispunct.3 =================================================================== --- lib/libc/locale/ispunct.3 (revision 196695) +++ lib/libc/locale/ispunct.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)ispunct.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISPUNCT 3 .Os .Sh NAME @@ -70,6 +70,15 @@ .It "\&136\ ``^'' \t137\ ``_'' \t140\ ```'' \t173\ ``{'' \t174\ ``|''" .It "\&175\ ``}'' \t176\ ``~''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn ispunct +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn ispunct Index: lib/libc/locale/tolower.3 =================================================================== --- lib/libc/locale/tolower.3 (revision 196695) +++ lib/libc/locale/tolower.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt TOLOWER 3 .Os .Sh NAME @@ -53,6 +53,15 @@ .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn tolower +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES If the argument is an upper-case letter, the .Fn tolower Index: lib/libc/locale/isrune.3 =================================================================== --- lib/libc/locale/isrune.3 (revision 196695) +++ lib/libc/locale/isrune.3 (working copy) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISRUNE 3 .Os .Sh NAME @@ -46,6 +46,15 @@ .Tn ASCII character set, this is equivalent to .Fn isascii . +.Pp +.Em NOTE : +if the value passed to the +.Fn isrune +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isrune Index: lib/libc/locale/isalnum.3 =================================================================== --- lib/libc/locale/isalnum.3 (revision 196695) +++ lib/libc/locale/isalnum.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isalnum.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISALNUM 3 .Os .Sh NAME @@ -75,6 +75,15 @@ .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isalnum +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isalnum Index: lib/libc/locale/digittoint.3 =================================================================== --- lib/libc/locale/digittoint.3 (revision 196695) +++ lib/libc/locale/digittoint.3 (working copy) @@ -28,7 +28,7 @@ .\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 6, 2001 +.Dd September 3, 2009 .Dt DIGITTOINT 3 .Os .Sh NAME @@ -46,6 +46,15 @@ function converts a numeric character to its corresponding integer value. The character can be any decimal digit or hexadecimal digit. With hexadecimal characters, the case of the values does not matter. +.Pp +.Em NOTE : +if the value passed to the +.Fn digittoint +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn digittoint Index: lib/libc/locale/isalpha.3 =================================================================== --- lib/libc/locale/isalpha.3 (revision 196695) +++ lib/libc/locale/isalpha.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isalpha.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISALPHA 3 .Os .Sh NAME @@ -73,6 +73,15 @@ .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isalpha +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isalpha Index: lib/libc/locale/isideogram.3 =================================================================== --- lib/libc/locale/isideogram.3 (revision 196695) +++ lib/libc/locale/isideogram.3 (working copy) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISIDEOGRAM 3 .Os .Sh NAME @@ -41,6 +41,15 @@ The .Fn isideogram function tests for an ideographic character. +.Pp +.Em NOTE : +if the value passed to the +.Fn isideogram +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isideogram Index: lib/libc/locale/isblank.3 =================================================================== --- lib/libc/locale/isblank.3 (revision 196695) +++ lib/libc/locale/isblank.3 (working copy) @@ -28,7 +28,7 @@ .\" @(#)isblank.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISBLANK 3 .Os .Sh NAME @@ -57,6 +57,15 @@ .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isblank +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isblank Index: lib/libc/locale/isxdigit.3 =================================================================== --- lib/libc/locale/isxdigit.3 (revision 196695) +++ lib/libc/locale/isxdigit.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISXDIGIT 3 .Os .Sh NAME @@ -71,6 +71,15 @@ .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isxdigit +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isxdigit Index: lib/libc/locale/isdigit.3 =================================================================== --- lib/libc/locale/isdigit.3 (revision 196695) +++ lib/libc/locale/isdigit.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 4, 2007 +.Dd September 3, 2009 .Dt ISDIGIT 3 .Os .Sh NAME @@ -68,6 +68,15 @@ .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isdigit +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isdigit Index: lib/libc/locale/isgraph.3 =================================================================== --- lib/libc/locale/isgraph.3 (revision 196695) +++ lib/libc/locale/isgraph.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISGRAPH 3 .Os .Sh NAME @@ -80,6 +80,15 @@ .It "\&166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y'' \t172\ ``z''" .It "\&173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isgraph +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isgraph Index: lib/libc/locale/ctype.3 =================================================================== --- lib/libc/locale/ctype.3 (revision 196695) +++ lib/libc/locale/ctype.3 (working copy) @@ -28,7 +28,7 @@ .\" @(#)ctype.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt CTYPE 3 .Os .Sh NAME @@ -111,6 +111,13 @@ .In ctype.h , or as true functions in the C library. See the specific manual pages for more information. +.Pp +.Em NOTE : +if the value passed to one of these functions is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh SEE ALSO .Xr digittoint 3 , .Xr isalnum 3 , Index: lib/libc/locale/isspace.3 =================================================================== --- lib/libc/locale/isspace.3 (revision 196695) +++ lib/libc/locale/isspace.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isspace.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISSPACE 3 .Os .Sh NAME @@ -61,6 +61,15 @@ .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isspace +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isspace Index: lib/libc/locale/isprint.3 =================================================================== --- lib/libc/locale/isprint.3 (revision 196695) +++ lib/libc/locale/isprint.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isprint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISPRINT 3 .Os .Sh NAME @@ -78,6 +78,15 @@ .It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" .It "\&172\ ``z'' \t173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isprint +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isprint Index: lib/libc/locale/isascii.3 =================================================================== --- lib/libc/locale/isascii.3 (revision 196695) +++ lib/libc/locale/isascii.3 (working copy) @@ -28,7 +28,7 @@ .\" @(#)isascii.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd October 6, 2002 +.Dd September 3, 2009 .Dt ISASCII 3 .Os .Sh NAME @@ -47,6 +47,15 @@ .Tn ASCII character, which is any character between 0 and octal 0177 inclusive. +.Pp +.Em NOTE : +if the value passed to the +.Fn isascii +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh SEE ALSO .Xr ctype 3 , .Xr iswascii 3 , Index: lib/libc/locale/isphonogram.3 =================================================================== --- lib/libc/locale/isphonogram.3 (revision 196695) +++ lib/libc/locale/isphonogram.3 (working copy) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISPHONOGRAM 3 .Os .Sh NAME @@ -41,6 +41,15 @@ The .Fn isphonogram function tests for a phonographic character. +.Pp +.Em NOTE : +if the value passed to the +.Fn isphonogram +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isphonogram Index: lib/libc/locale/isupper.3 =================================================================== --- lib/libc/locale/isupper.3 (revision 196695) +++ lib/libc/locale/isupper.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)isupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISUPPER 3 .Os .Sh NAME @@ -64,6 +64,15 @@ .It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" .It "\&132\ ``Z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isupper +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isupper Index: lib/libc/locale/toascii.3 =================================================================== --- lib/libc/locale/toascii.3 (revision 196695) +++ lib/libc/locale/toascii.3 (working copy) @@ -28,7 +28,7 @@ .\" @(#)toascii.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 3, 2009 .Dt TOASCII 3 .Os .Sh NAME @@ -45,6 +45,15 @@ .Fn toascii function strips all but the low 7 bits from a letter, including parity or other marker bits. +.Pp +.Em NOTE : +if the value passed to the +.Fn toascii +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn toascii Index: lib/libc/locale/toupper.3 =================================================================== --- lib/libc/locale/toupper.3 (revision 196695) +++ lib/libc/locale/toupper.3 (working copy) @@ -32,7 +32,7 @@ .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt TOUPPER 3 .Os .Sh NAME @@ -53,6 +53,15 @@ .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn toupper +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES If the argument is a lower-case letter, the .Fn toupper Index: lib/libc/locale/isspecial.3 =================================================================== --- lib/libc/locale/isspecial.3 (revision 196695) +++ lib/libc/locale/isspecial.3 (working copy) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISSPECIAL 3 .Os .Sh NAME @@ -41,6 +41,15 @@ The .Fn isspecial function tests for a special character. +.Pp +.Em NOTE : +if the value passed to the +.Fn isspecial +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isspecial --=-=-=-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 09:20:17 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AECB1065679; Thu, 3 Sep 2009 09:20:17 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 9F7FB8FC16; Thu, 3 Sep 2009 09:20:16 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n839KEYF065731; Thu, 3 Sep 2009 13:20:14 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1251969614; bh=r1xioaqGjB20BR82wVYGu9zlu/N1SNg3xxkk+XbWL7M=; l=161; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=hfiVwB2oXFcfDDrsJUhj7JfsmvhCzCmtbKd4y2eOqYd0S/q46o8CjypIcKmqlJ+2s 8cO4oW9JzM47LISjQjHqRr8ldy1QQ5qDeo6WRFIt8C81lKcrSaRooqzAyEfiIc8YKo /sGdYGJhzBAKijBJ96NsenH0BlcNiUQqkUCg/G5U= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n839KEGR065730; Thu, 3 Sep 2009 13:20:14 +0400 (MSD) (envelope-from ache) Date: Thu, 3 Sep 2009 13:20:13 +0400 From: Andrey Chernov To: Dag-Erling Sm??rgrav Message-ID: <20090903092012.GA65660@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Dag-Erling Sm??rgrav , "Simon L. Nielsen" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> <86zl9c9z05.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86zl9c9z05.fsf@ds4.des.no> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "Simon L. Nielsen" Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 09:20:17 -0000 On Thu, Sep 03, 2009 at 11:08:26AM +0200, Dag-Erling Sm??rgrav wrote: > > What do you think of the attached patch? Looks nice. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 09:32:06 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F0731065670; Thu, 3 Sep 2009 09:32:06 +0000 (UTC) (envelope-from simon@benji.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0D78FC17; Thu, 3 Sep 2009 09:32:06 +0000 (UTC) Received: from benji.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 91DE82D484A; Thu, 3 Sep 2009 09:32:05 +0000 (UTC) Received: by benji.nitro.dk (Postfix, from userid 2000) id 7452654C3; Thu, 3 Sep 2009 11:32:05 +0200 (CEST) Date: Thu, 3 Sep 2009 11:32:05 +0200 From: "Simon L. Nielsen" To: Andrey Chernov , Dag-Erling Sm??rgrav , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-ID: <20090903093205.GB1304@zaphod.nitro.dk> References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090903084325.GA65192@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 09:32:06 -0000 On 2009.09.03 12:43:25 +0400, Andrey Chernov wrote: > On Thu, Sep 03, 2009 at 09:26:03AM +0200, Dag-Erling Sm??rgrav wrote: > > > > - The core dump ache refers to can occur with a na??ve implementation > > that uses a lookup table and checks for EOF, but not for other > > negative values. > > Thanx for detailed explanation. Just to note: even such naive > implemetations still live inside POSIX, since POSIX says that behaviour > outside of "unsigned char" range + exact EOF value is undefined. Thanks to both of you for the detailed explanation. Always good to learn something new :-). I haven't had time to review des's patch (I can tonight if "needed"), but I certainly welcome documenting this case more clearly :-). -- Simon L. Nielsen From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 09:33:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62446106566B; Thu, 3 Sep 2009 09:33:58 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5038D8FC0A; Thu, 3 Sep 2009 09:33: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 n839XwQd022039; Thu, 3 Sep 2009 09:33:58 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n839XwxV022031; Thu, 3 Sep 2009 09:33:58 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200909030933.n839XwxV022031@svn.freebsd.org> From: Ed Schouten Date: Thu, 3 Sep 2009 09:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196775 - in head/sys: conf dev/syscons dev/syscons/teken teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 09:33:58 -0000 Author: ed Date: Thu Sep 3 09:33:57 2009 New Revision: 196775 URL: http://svn.freebsd.org/changeset/base/196775 Log: Move libteken out of the syscons directory. I initially committed libteken to sys/dev/syscons/teken, but now that I'm working on a console driver myself, I noticed this was not a good decision. Move it to sys/teken to make it easier for other drivers to use a terminal emulator. Also list teken.c in sys/conf/files, instead of listing it in all the files.arch files separately. Added: head/sys/teken/ - copied from r196552, head/sys/dev/syscons/teken/ Deleted: head/sys/dev/syscons/teken/ Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.ia64 head/sys/conf/files.powerpc head/sys/conf/files.sparc64 head/sys/dev/syscons/scterm-teken.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Sep 2 22:12:31 2009 (r196774) +++ head/sys/conf/files Thu Sep 3 09:33:57 2009 (r196775) @@ -91,8 +91,8 @@ pccarddevs.h standard \ no-obj no-implicit-rule before-depend \ clean "pccarddevs.h" teken_state.h optional sc \ - dependency "$S/dev/syscons/teken/gensequences $S/dev/syscons/teken/sequences" \ - compile-with "${AWK} -f $S/dev/syscons/teken/gensequences $S/dev/syscons/teken/sequences > teken_state.h" \ + dependency "$S/teken/gensequences $S/teken/sequences" \ + compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ clean "teken_state.h" usbdevs.h optional usb \ @@ -2616,6 +2616,7 @@ security/mac_portacl/mac_portacl.c optio security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids security/mac_stub/mac_stub.c optional mac_stub security/mac_test/mac_test.c optional mac_test +teken/teken.c optional sc ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 2 22:12:31 2009 (r196774) +++ head/sys/conf/files.amd64 Thu Sep 3 09:33:57 2009 (r196775) @@ -219,7 +219,6 @@ dev/syscons/apm/apm_saver.c optional apm dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc -dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_amd64.c optional uart dev/wpi/if_wpi.c optional wpi isa/atrtc.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Sep 2 22:12:31 2009 (r196774) +++ head/sys/conf/files.i386 Thu Sep 3 09:33:57 2009 (r196775) @@ -220,7 +220,6 @@ dev/syscons/scterm-teken.c optional sc dev/syscons/scvesactl.c optional sc vga vesa dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc -dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_i386.c optional uart dev/acpica/acpi_if.m standard dev/acpi_support/acpi_wmi_if.m standard Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Wed Sep 2 22:12:31 2009 (r196774) +++ head/sys/conf/files.ia64 Thu Sep 3 09:33:57 2009 (r196775) @@ -60,7 +60,6 @@ dev/kbd/kbd.c optional atkbd | sc | uk dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc -dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_ia64.c optional uart dev/acpica/acpi_if.m standard ia64/acpica/OsdEnvironment.c optional acpi Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Sep 2 22:12:31 2009 (r196774) +++ head/sys/conf/files.powerpc Thu Sep 3 09:33:57 2009 (r196775) @@ -48,7 +48,6 @@ dev/sound/macio/tumbler.c optional snd_a dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc -dev/syscons/teken/teken.c optional sc dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_ocp.c optional tsec mpc85xx dev/uart/uart_bus_ocp.c optional uart mpc85xx Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Wed Sep 2 22:12:31 2009 (r196774) +++ head/sys/conf/files.sparc64 Thu Sep 3 09:33:57 2009 (r196775) @@ -57,7 +57,6 @@ dev/sound/sbus/cs4231.c optional snd_au dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc -dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_sparc64.c optional uart dev/uart/uart_kbd_sun.c optional uart sc kern/syscalls.c optional ktr Modified: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- head/sys/dev/syscons/scterm-teken.c Wed Sep 2 22:12:31 2009 (r196774) +++ head/sys/dev/syscons/scterm-teken.c Thu Sep 3 09:33:57 2009 (r196775) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include static void scteken_revattr(unsigned char, teken_attr_t *); static unsigned int scteken_attr(const teken_attr_t *); From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 10:06:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D05B1065676; Thu, 3 Sep 2009 10:06:38 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00FAB8FC08; Thu, 3 Sep 2009 10:06:38 +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 n83A6bGl022812; Thu, 3 Sep 2009 10:06:37 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83A6bMZ022789; Thu, 3 Sep 2009 10:06:37 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200909031006.n83A6bMZ022789@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 3 Sep 2009 10:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196776 - head/lib/libc/locale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 10:06:38 -0000 Author: des Date: Thu Sep 3 10:06:37 2009 New Revision: 196776 URL: http://svn.freebsd.org/changeset/base/196776 Log: Document the need for a cast when passing a char to a ctype function. MFC after: 2 weeks Modified: head/lib/libc/locale/ctype.3 head/lib/libc/locale/digittoint.3 head/lib/libc/locale/isalnum.3 head/lib/libc/locale/isalpha.3 head/lib/libc/locale/isascii.3 head/lib/libc/locale/isblank.3 head/lib/libc/locale/iscntrl.3 head/lib/libc/locale/isdigit.3 head/lib/libc/locale/isgraph.3 head/lib/libc/locale/isideogram.3 head/lib/libc/locale/islower.3 head/lib/libc/locale/isphonogram.3 head/lib/libc/locale/isprint.3 head/lib/libc/locale/ispunct.3 head/lib/libc/locale/isrune.3 head/lib/libc/locale/isspace.3 head/lib/libc/locale/isspecial.3 head/lib/libc/locale/isupper.3 head/lib/libc/locale/isxdigit.3 head/lib/libc/locale/toascii.3 head/lib/libc/locale/tolower.3 head/lib/libc/locale/toupper.3 Modified: head/lib/libc/locale/ctype.3 ============================================================================== --- head/lib/libc/locale/ctype.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/ctype.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -28,7 +28,7 @@ .\" @(#)ctype.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt CTYPE 3 .Os .Sh NAME @@ -111,6 +111,13 @@ They are available as macros, defined in .In ctype.h , or as true functions in the C library. See the specific manual pages for more information. +.Pp +.Em NOTE : +if the value passed to one of these functions is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh SEE ALSO .Xr digittoint 3 , .Xr isalnum 3 , Modified: head/lib/libc/locale/digittoint.3 ============================================================================== --- head/lib/libc/locale/digittoint.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/digittoint.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -28,7 +28,7 @@ .\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 6, 2001 +.Dd September 3, 2009 .Dt DIGITTOINT 3 .Os .Sh NAME @@ -46,6 +46,15 @@ The function converts a numeric character to its corresponding integer value. The character can be any decimal digit or hexadecimal digit. With hexadecimal characters, the case of the values does not matter. +.Pp +.Em NOTE : +if the value passed to the +.Fn digittoint +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn digittoint Modified: head/lib/libc/locale/isalnum.3 ============================================================================== --- head/lib/libc/locale/isalnum.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isalnum.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isalnum.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISALNUM 3 .Os .Sh NAME @@ -75,6 +75,15 @@ In the ASCII character set, this include .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isalnum +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isalnum Modified: head/lib/libc/locale/isalpha.3 ============================================================================== --- head/lib/libc/locale/isalpha.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isalpha.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isalpha.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISALPHA 3 .Os .Sh NAME @@ -73,6 +73,15 @@ In the ASCII character set, this include .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isalpha +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isalpha Modified: head/lib/libc/locale/isascii.3 ============================================================================== --- head/lib/libc/locale/isascii.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isascii.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -28,7 +28,7 @@ .\" @(#)isascii.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd October 6, 2002 +.Dd September 3, 2009 .Dt ISASCII 3 .Os .Sh NAME @@ -47,6 +47,15 @@ function tests for an .Tn ASCII character, which is any character between 0 and octal 0177 inclusive. +.Pp +.Em NOTE : +if the value passed to the +.Fn isascii +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh SEE ALSO .Xr ctype 3 , .Xr iswascii 3 , Modified: head/lib/libc/locale/isblank.3 ============================================================================== --- head/lib/libc/locale/isblank.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isblank.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -28,7 +28,7 @@ .\" @(#)isblank.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISBLANK 3 .Os .Sh NAME @@ -57,6 +57,15 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isblank +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isblank Modified: head/lib/libc/locale/iscntrl.3 ============================================================================== --- head/lib/libc/locale/iscntrl.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/iscntrl.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)iscntrl.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISCNTRL 3 .Os .Sh NAME @@ -65,6 +65,15 @@ In the ASCII character set, this include .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS" .It "\&036\ RS \t037\ US \t177\ DEL" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn iscntrl +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn iscntrl Modified: head/lib/libc/locale/isdigit.3 ============================================================================== --- head/lib/libc/locale/isdigit.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isdigit.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 4, 2007 +.Dd September 3, 2009 .Dt ISDIGIT 3 .Os .Sh NAME @@ -68,6 +68,15 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isdigit +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isdigit Modified: head/lib/libc/locale/isgraph.3 ============================================================================== --- head/lib/libc/locale/isgraph.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isgraph.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISGRAPH 3 .Os .Sh NAME @@ -80,6 +80,15 @@ In the ASCII character set, this include .It "\&166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y'' \t172\ ``z''" .It "\&173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isgraph +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isgraph Modified: head/lib/libc/locale/isideogram.3 ============================================================================== --- head/lib/libc/locale/isideogram.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isideogram.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISIDEOGRAM 3 .Os .Sh NAME @@ -41,6 +41,15 @@ The .Fn isideogram function tests for an ideographic character. +.Pp +.Em NOTE : +if the value passed to the +.Fn isideogram +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isideogram Modified: head/lib/libc/locale/islower.3 ============================================================================== --- head/lib/libc/locale/islower.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/islower.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)islower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISLOWER 3 .Os .Sh NAME @@ -64,6 +64,15 @@ In the ASCII character set, this include .It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" .It "\&172\ ``z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn islower +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn islower Modified: head/lib/libc/locale/isphonogram.3 ============================================================================== --- head/lib/libc/locale/isphonogram.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isphonogram.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISPHONOGRAM 3 .Os .Sh NAME @@ -41,6 +41,15 @@ The .Fn isphonogram function tests for a phonographic character. +.Pp +.Em NOTE : +if the value passed to the +.Fn isphonogram +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isphonogram Modified: head/lib/libc/locale/isprint.3 ============================================================================== --- head/lib/libc/locale/isprint.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isprint.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isprint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISPRINT 3 .Os .Sh NAME @@ -78,6 +78,15 @@ In the ASCII character set, this include .It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" .It "\&172\ ``z'' \t173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isprint +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isprint Modified: head/lib/libc/locale/ispunct.3 ============================================================================== --- head/lib/libc/locale/ispunct.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/ispunct.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)ispunct.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISPUNCT 3 .Os .Sh NAME @@ -70,6 +70,15 @@ In the ASCII character set, this include .It "\&136\ ``^'' \t137\ ``_'' \t140\ ```'' \t173\ ``{'' \t174\ ``|''" .It "\&175\ ``}'' \t176\ ``~''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn ispunct +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn ispunct Modified: head/lib/libc/locale/isrune.3 ============================================================================== --- head/lib/libc/locale/isrune.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isrune.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISRUNE 3 .Os .Sh NAME @@ -46,6 +46,15 @@ In the .Tn ASCII character set, this is equivalent to .Fn isascii . +.Pp +.Em NOTE : +if the value passed to the +.Fn isrune +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isrune Modified: head/lib/libc/locale/isspace.3 ============================================================================== --- head/lib/libc/locale/isspace.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isspace.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isspace.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISSPACE 3 .Os .Sh NAME @@ -61,6 +61,15 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isspace +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isspace Modified: head/lib/libc/locale/isspecial.3 ============================================================================== --- head/lib/libc/locale/isspecial.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isspecial.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2004 +.Dd September 3, 2009 .Dt ISSPECIAL 3 .Os .Sh NAME @@ -41,6 +41,15 @@ The .Fn isspecial function tests for a special character. +.Pp +.Em NOTE : +if the value passed to the +.Fn isspecial +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isspecial Modified: head/lib/libc/locale/isupper.3 ============================================================================== --- head/lib/libc/locale/isupper.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isupper.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISUPPER 3 .Os .Sh NAME @@ -64,6 +64,15 @@ In the ASCII character set, this include .It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" .It "\&132\ ``Z''" .El +.Pp +.Em NOTE : +if the value passed to the +.Fn isupper +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isupper Modified: head/lib/libc/locale/isxdigit.3 ============================================================================== --- head/lib/libc/locale/isxdigit.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/isxdigit.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt ISXDIGIT 3 .Os .Sh NAME @@ -71,6 +71,15 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn isxdigit +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isxdigit Modified: head/lib/libc/locale/toascii.3 ============================================================================== --- head/lib/libc/locale/toascii.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/toascii.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -28,7 +28,7 @@ .\" @(#)toascii.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 3, 2009 .Dt TOASCII 3 .Os .Sh NAME @@ -45,6 +45,15 @@ The .Fn toascii function strips all but the low 7 bits from a letter, including parity or other marker bits. +.Pp +.Em NOTE : +if the value passed to the +.Fn toascii +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES The .Fn toascii Modified: head/lib/libc/locale/tolower.3 ============================================================================== --- head/lib/libc/locale/tolower.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/tolower.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt TOLOWER 3 .Os .Sh NAME @@ -53,6 +53,15 @@ The argument must be representable as an .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn tolower +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES If the argument is an upper-case letter, the .Fn tolower Modified: head/lib/libc/locale/toupper.3 ============================================================================== --- head/lib/libc/locale/toupper.3 Thu Sep 3 09:33:57 2009 (r196775) +++ head/lib/libc/locale/toupper.3 Thu Sep 3 10:06:37 2009 (r196776) @@ -32,7 +32,7 @@ .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd September 3, 2009 .Dt TOUPPER 3 .Os .Sh NAME @@ -53,6 +53,15 @@ The argument must be representable as an .Vt "unsigned char" or the value of .Dv EOF . +.Pp +.Em NOTE : +if the value passed to the +.Fn toupper +function is a +.Vt signed char , +as is usually the case, it must be cast to an +.Vt unsigned char +to avoid sign-extension errors. .Sh RETURN VALUES If the argument is a lower-case letter, the .Fn toupper From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 12:37:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56117106566C; Thu, 3 Sep 2009 12:37:18 +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 45C128FC0C; Thu, 3 Sep 2009 12:37: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 n83CbIL1032553; Thu, 3 Sep 2009 12:37:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83CbIgk032551; Thu, 3 Sep 2009 12:37:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200909031237.n83CbIgk032551@svn.freebsd.org> From: Alexander Motin Date: Thu, 3 Sep 2009 12:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 12:37:18 -0000 Author: mav Date: Thu Sep 3 12:37:17 2009 New Revision: 196777 URL: http://svn.freebsd.org/changeset/base/196777 Log: ATI SB600 can't handle 256 sectors transfers with FPDMA (NCQ). MFC after: 3 days Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu Sep 3 10:06:37 2009 (r196776) +++ head/sys/dev/ahci/ahci.c Thu Sep 3 12:37:17 2009 (r196777) @@ -1942,6 +1942,9 @@ ahciaction(struct cam_sim *sim, union cc cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; + /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ + if (pci_get_devid(device_get_parent(dev)) == 0x43801002) + cpi->maxio = min(cpi->maxio, 255 * 512); cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 13:40:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E60A106566B; Thu, 3 Sep 2009 13:40:41 +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 54BB78FC1D; Thu, 3 Sep 2009 13:40:41 +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 n83DefH6034016; Thu, 3 Sep 2009 13:40:41 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83Defkv034013; Thu, 3 Sep 2009 13:40:41 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200909031340.n83Defkv034013@svn.freebsd.org> From: Attilio Rao Date: Thu, 3 Sep 2009 13:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196779 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 13:40:41 -0000 Author: attilio Date: Thu Sep 3 13:40:41 2009 New Revision: 196779 URL: http://svn.freebsd.org/changeset/base/196779 Log: Add intermediate states for attaching and detaching that will be reused by the enhached newbus locking once it is checked in. This change can be easilly MFCed to STABLE_8 at the appropriate moment. Reviewed by: jhb, scottl Tested by: Giovanni Trematerra Modified: head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Thu Sep 3 12:41:00 2009 (r196778) +++ head/sys/kern/subr_bus.c Thu Sep 3 13:40:41 2009 (r196779) @@ -2625,10 +2625,16 @@ device_attach(device_t dev) { int error; + if (dev->state >= DS_ATTACHING) + return (0); device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); + dev->state = DS_ATTACHING; if ((error = DEVICE_ATTACH(dev)) != 0) { + KASSERT(dev->state == DS_ATTACHING, + ("%s: %p device state must not been changing", __func__, + dev)); printf("device_attach: %s%d attach returned %d\n", dev->driver->name, dev->unit, error); /* Unset the class; set in device_probe_child */ @@ -2639,6 +2645,8 @@ device_attach(device_t dev) dev->state = DS_NOTPRESENT; return (error); } + KASSERT(dev->state == DS_ATTACHING, + ("%s: %p device state must not been changing", __func__, dev)); device_sysctl_update(dev); dev->state = DS_ATTACHED; devadded(dev); @@ -2674,8 +2682,16 @@ device_detach(device_t dev) if (dev->state != DS_ATTACHED) return (0); - if ((error = DEVICE_DETACH(dev)) != 0) + dev->state = DS_DETACHING; + if ((error = DEVICE_DETACH(dev)) != 0) { + KASSERT(dev->state == DS_DETACHING, + ("%s: %p device state must not been changing", __func__, + dev)); + dev->state = DS_ATTACHED; return (error); + } + KASSERT(dev->state == DS_DETACHING, + ("%s: %p device state must not been changing", __func__, dev)); devremoved(dev); if (!device_is_quiet(dev)) device_printf(dev, "detached\n"); @@ -2730,7 +2746,7 @@ device_quiesce(device_t dev) int device_shutdown(device_t dev) { - if (dev->state < DS_ATTACHED) + if (dev->state < DS_ATTACHED || dev->state == DS_DETACHING) return (0); return (DEVICE_SHUTDOWN(dev)); } Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Thu Sep 3 12:41:00 2009 (r196778) +++ head/sys/sys/bus.h Thu Sep 3 13:40:41 2009 (r196779) @@ -52,8 +52,11 @@ struct u_businfo { typedef enum device_state { DS_NOTPRESENT, /**< @brief not probed or probe failed */ DS_ALIVE, /**< @brief probe succeeded */ + DS_ATTACHING, /**< @brief attaching is in progress */ DS_ATTACHED, /**< @brief attach method called */ - DS_BUSY /**< @brief device is open */ + DS_BUSY, /**< @brief device is open */ + DS_DETACHING /**< @brief detaching is in progress */ + } device_state_t; /** From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 13:46:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 918AC1065676; Thu, 3 Sep 2009 13:46:43 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id BC4828FC34; Thu, 3 Sep 2009 13:46:42 +0000 (UTC) Received: by bwz2 with SMTP id 2so1475552bwz.43 for ; Thu, 03 Sep 2009 06:46:41 -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:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=YeJ/IoyUwhlb9bOwjwMiZ5PPvCrwykPSYsvapkBZLbc=; b=njojjo9XZUdtXO+UJofUkJJxVQxuyTxm5Zg1YGt9nrXK4rjdlklti6uJsFSGBS8jAr DLjhItAx1OPFQsLSwwuBdAQLdLgb7vH5T3JtK69AtVj/u/J+crUhgS/z9V3Rv7UPRqjZ 6bswzDkq2AgSnhfuvKRPoUo03P60BE7lL91Xo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=HynY4BqrO9c9Gvnj5/6miPtHc2qMS4MgnxOuYgSa0XcsMMf6l9CxzYxIqgWwbo5/Oq U2IxuD7d6zDDONqq4k95Dny5rp+BkjWxYgqXBeePILymX3ne4K2E0O2u1iQlZNUh8Wpc Wr4C7pdBbSGhvSZtX2y+PEdF1KJWEf1639gWA= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.58.139 with SMTP id g11mr4110290fah.43.1251985601616; Thu, 03 Sep 2009 06:46:41 -0700 (PDT) In-Reply-To: <200909031340.n83Defkv034013@svn.freebsd.org> References: <200909031340.n83Defkv034013@svn.freebsd.org> Date: Thu, 3 Sep 2009 15:46:41 +0200 X-Google-Sender-Auth: 5214872fbe78e966 Message-ID: <3bbf2fe10909030646o2dc30166r303ee646572c741b@mail.gmail.com> From: Attilio Rao To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: Re: svn commit: r196779 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 13:46:43 -0000 2009/9/3 Attilio Rao : > Author: attilio > Date: Thu Sep 3 13:40:41 2009 > New Revision: 196779 > URL: http://svn.freebsd.org/changeset/base/196779 > > Log: > Add intermediate states for attaching and detaching that will be > reused by the enhached newbus locking once it is checked in. > This change can be easilly MFCed to STABLE_8 at the appropriate moment. About this commit, there are a few of things which worths nothing: - This has been committed separately from the new-bus locking because it is planned to be MFCed before 8.0 goes out in order to offer the correct ABI compatibility for merging, while 8.1-REL, the newbus locking - Probabilly what we really wanted here is just a transitioning state instead than both DS_ATTACHING and DS_DETACHING. Some consumers would eventually understand what of the 2 is that and one of these consumers is device_is_attached(). That function is used improperly by many detach handlers in a construct like: int foo_attach(device_t dev) { ... if (error != 0) foo_detach(dev); ... } int foo_detach(device_dev) { ... if (device_is_attached(dev)) { /* do some handover */ } ... } That is an incorrect behaviour which needs to be discouraged and that will be fixed during 9.0. In the while this semantic (used by many drivers) makes the single-transition state impraticable and so we will need to stick with that device states also in 9.0. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 14:22:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48829106566B; Thu, 3 Sep 2009 14:22:14 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id EF7958FC12; Thu, 3 Sep 2009 14:22:13 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n83EMAOV088445; Thu, 3 Sep 2009 08:22:10 -0600 (MDT) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1075.2) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: <200909031237.n83CbIgk032551@svn.freebsd.org> Date: Thu, 3 Sep 2009 08:22:10 -0600 Content-Transfer-Encoding: 7bit Message-Id: <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> References: <200909031237.n83CbIgk032551@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1075.2) X-Spam-Status: No, score=-3.3 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 14:22:14 -0000 In this case, set maxio to 64k, not 127.5k. You'll typically get much better i/o performance out of two 64k transfers than you will out of one 127.k transfer and one 512 bytes transfer, which is what the block layer will give you if you try to send 128k. Scott On Sep 3, 2009, at 6:37 AM, Alexander Motin wrote: > Author: mav > Date: Thu Sep 3 12:37:17 2009 > New Revision: 196777 > URL: http://svn.freebsd.org/changeset/base/196777 > > Log: > ATI SB600 can't handle 256 sectors transfers with FPDMA (NCQ). > > MFC after: 3 days > > Modified: > head/sys/dev/ahci/ahci.c > > Modified: head/sys/dev/ahci/ahci.c > = > = > = > = > = > = > = > = > ====================================================================== > --- head/sys/dev/ahci/ahci.c Thu Sep 3 10:06:37 2009 (r196776) > +++ head/sys/dev/ahci/ahci.c Thu Sep 3 12:37:17 2009 (r196777) > @@ -1942,6 +1942,9 @@ ahciaction(struct cam_sim *sim, union cc > cpi->protocol = PROTO_ATA; > cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; > cpi->maxio = MAXPHYS; > + /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ > + if (pci_get_devid(device_get_parent(dev)) == 0x43801002) > + cpi->maxio = min(cpi->maxio, 255 * 512); > cpi->ccb_h.status = CAM_REQ_CMP; > xpt_done(ccb); > break; From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 14:54:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D2B106568B; Thu, 3 Sep 2009 14:54:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id A02968FC1D; Thu, 3 Sep 2009 14:54:55 +0000 (UTC) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 253366095; Thu, 03 Sep 2009 17:54:51 +0300 Message-ID: <4A9FD8B4.2080605@FreeBSD.org> Date: Thu, 03 Sep 2009 17:54:44 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Scott Long References: <200909031237.n83CbIgk032551@svn.freebsd.org> <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> In-Reply-To: <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 14:54:56 -0000 Scott Long wrote: > In this case, set maxio to 64k, not 127.5k. You'll typically get much > better i/o performance out of two 64k transfers > than you will out of one 127.k transfer and one 512 bytes transfer, > which is what the block layer will give you if > you try to send 128k. Couldn't it be somehow handled on that level? Limiting maxio from 127.5K to 64K is also a penalty for requests with length in that range. It would be nice if every level would do it's own job. > On Sep 3, 2009, at 6:37 AM, Alexander Motin wrote: >> Author: mav >> Date: Thu Sep 3 12:37:17 2009 >> New Revision: 196777 >> URL: http://svn.freebsd.org/changeset/base/196777 >> >> Log: >> ATI SB600 can't handle 256 sectors transfers with FPDMA (NCQ). >> >> MFC after: 3 days >> >> Modified: >> head/sys/dev/ahci/ahci.c >> >> Modified: head/sys/dev/ahci/ahci.c >> ============================================================================== >> >> --- head/sys/dev/ahci/ahci.c Thu Sep 3 10:06:37 2009 (r196776) >> +++ head/sys/dev/ahci/ahci.c Thu Sep 3 12:37:17 2009 (r196777) >> @@ -1942,6 +1942,9 @@ ahciaction(struct cam_sim *sim, union cc >> cpi->protocol = PROTO_ATA; >> cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; >> cpi->maxio = MAXPHYS; >> + /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ >> + if (pci_get_devid(device_get_parent(dev)) == 0x43801002) >> + cpi->maxio = min(cpi->maxio, 255 * 512); >> cpi->ccb_h.status = CAM_REQ_CMP; >> xpt_done(ccb); >> break; > -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 15:59:45 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1E321065670; Thu, 3 Sep 2009 15:59:45 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6268FC0C; Thu, 3 Sep 2009 15:59:45 +0000 (UTC) Received: from pooker.samsco.home (pooker.samsco.home [192.168.254.1]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n83FxfE3088881; Thu, 3 Sep 2009 09:59:41 -0600 (MDT) (envelope-from scottl@samsco.org) Date: Thu, 3 Sep 2009 09:59:41 -0600 (MDT) From: Scott Long To: Alexander Motin In-Reply-To: <4A9FD8B4.2080605@FreeBSD.org> Message-ID: <20090903095224.N20031@pooker.samsco.org> References: <200909031237.n83CbIgk032551@svn.freebsd.org> <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> <4A9FD8B4.2080605@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 15:59:46 -0000 On Thu, 3 Sep 2009, Alexander Motin wrote: > Scott Long wrote: >> In this case, set maxio to 64k, not 127.5k. You'll typically get much >> better i/o performance out of two 64k transfers >> than you will out of one 127.k transfer and one 512 bytes transfer, which >> is what the block layer will give you if >> you try to send 128k. > > Couldn't it be somehow handled on that level? It's a limitation of the paticular hardware, not the OS. Plain disks will behave like this, but RAID controllers might now. But if you want to add this feature to the upper layers, be my guest. > Limiting maxio from 127.5K to > 64K is also a penalty for requests with length in that range. Most I/O that goes to a disk comes from one of the VM pagers, and is thus page aligned and multi-of-page sized. Breaking one of these requests up into sub-page sized requests costs a whole lot more than what you are assuming. We analyzed exactly this situation a few years ago at Yahoo and came to this conclusion. > It would be > nice if every level would do it's own job. It's the job of the driver to handle the limitations of the hardware, yes. Again, if you want to experiment with pushing this functionality into GEOM, be my guest. But until then, consider following my advice. Scott > >> On Sep 3, 2009, at 6:37 AM, Alexander Motin wrote: >>> Author: mav >>> Date: Thu Sep 3 12:37:17 2009 >>> New Revision: 196777 >>> URL: http://svn.freebsd.org/changeset/base/196777 >>> >>> Log: >>> ATI SB600 can't handle 256 sectors transfers with FPDMA (NCQ). >>> >>> MFC after: 3 days >>> >>> Modified: >>> head/sys/dev/ahci/ahci.c >>> >>> Modified: head/sys/dev/ahci/ahci.c >>> ============================================================================== >>> --- head/sys/dev/ahci/ahci.c Thu Sep 3 10:06:37 2009 (r196776) >>> +++ head/sys/dev/ahci/ahci.c Thu Sep 3 12:37:17 2009 (r196777) >>> @@ -1942,6 +1942,9 @@ ahciaction(struct cam_sim *sim, union cc >>> cpi->protocol = PROTO_ATA; >>> cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; >>> cpi->maxio = MAXPHYS; >>> + /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ >>> + if (pci_get_devid(device_get_parent(dev)) == 0x43801002) >>> + cpi->maxio = min(cpi->maxio, 255 * 512); >>> cpi->ccb_h.status = CAM_REQ_CMP; >>> xpt_done(ccb); >>> break; >> > > > -- > Alexander Motin > From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:08:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 761D11065670; Thu, 3 Sep 2009 16:08:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 91A248FC22; Thu, 3 Sep 2009 16:08:12 +0000 (UTC) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 253373209; Thu, 03 Sep 2009 19:08:09 +0300 Message-ID: <4A9FE9E2.1060205@FreeBSD.org> Date: Thu, 03 Sep 2009 19:08:02 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Scott Long References: <200909031237.n83CbIgk032551@svn.freebsd.org> <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> <4A9FD8B4.2080605@FreeBSD.org> <20090903095224.N20031@pooker.samsco.org> In-Reply-To: <20090903095224.N20031@pooker.samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:08:13 -0000 Scott Long wrote: > On Thu, 3 Sep 2009, Alexander Motin wrote: >> Scott Long wrote: >>> In this case, set maxio to 64k, not 127.5k. You'll typically get >>> much better i/o performance out of two 64k transfers >>> than you will out of one 127.k transfer and one 512 bytes transfer, >>> which is what the block layer will give you if >>> you try to send 128k. >> >> Couldn't it be somehow handled on that level? > > It's a limitation of the paticular hardware, not the OS. Plain disks > will behave like this, but RAID controllers might now. But if you want > to add this feature to the upper layers, be my guest. Huh. May be sometimes later. >> Limiting maxio from 127.5K to 64K is also a penalty for requests with >> length in that range. > > Most I/O that goes to a disk comes from one of the VM pagers, and is > thus page aligned and multi-of-page sized. Breaking one of these > requests up into sub-page sized requests costs a whole lot more than > what you are assuming. We analyzed exactly this situation a few years > ago at Yahoo and came to this conclusion. Sure, 127.5K is ugly, but what's about 96K or 112K? Is there benefits having it strictly in power of 2? -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:17:53 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6BA106566C; Thu, 3 Sep 2009 16:17:53 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 0E42F8FC19; Thu, 3 Sep 2009 16:17:52 +0000 (UTC) Received: from pooker.samsco.home (pooker.samsco.home [192.168.254.1]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n83GHkg1088977; Thu, 3 Sep 2009 10:17:46 -0600 (MDT) (envelope-from scottl@samsco.org) Date: Thu, 3 Sep 2009 10:17:46 -0600 (MDT) From: Scott Long To: Alexander Motin In-Reply-To: <4A9FE9E2.1060205@FreeBSD.org> Message-ID: <20090903101015.P20031@pooker.samsco.org> References: <200909031237.n83CbIgk032551@svn.freebsd.org> <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> <4A9FD8B4.2080605@FreeBSD.org> <20090903095224.N20031@pooker.samsco.org> <4A9FE9E2.1060205@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:17:53 -0000 On Thu, 3 Sep 2009, Alexander Motin wrote: > Scott Long wrote: >> On Thu, 3 Sep 2009, Alexander Motin wrote: >>> Scott Long wrote: >>>> In this case, set maxio to 64k, not 127.5k. You'll typically get much >>>> better i/o performance out of two 64k transfers >>>> than you will out of one 127.k transfer and one 512 bytes transfer, which >>>> is what the block layer will give you if >>>> you try to send 128k. >>> >>> Couldn't it be somehow handled on that level? >> >> It's a limitation of the paticular hardware, not the OS. Plain disks will >> behave like this, but RAID controllers might now. But if you want to add >> this feature to the upper layers, be my guest. > > Huh. May be sometimes later. > >>> Limiting maxio from 127.5K to 64K is also a penalty for requests with >>> length in that range. >> >> Most I/O that goes to a disk comes from one of the VM pagers, and is thus >> page aligned and multi-of-page sized. Breaking one of these requests up >> into sub-page sized requests costs a whole lot more than what you are >> assuming. We analyzed exactly this situation a few years ago at Yahoo and >> came to this conclusion. > > Sure, 127.5K is ugly, but what's about 96K or 112K? Is there benefits > it strictly in power of 2? It's convenient. We've analyzed the combinations. I'm just trying to offer some advice from experience. I'm going to drop the conversation now. Scott From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:24:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA51E106566B; Thu, 3 Sep 2009 16:24:21 +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 99C3A8FC1D; Thu, 3 Sep 2009 16:24:21 +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 n83GOL3f038060; Thu, 3 Sep 2009 16:24:21 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83GOLhp038059; Thu, 3 Sep 2009 16:24:21 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200909031624.n83GOLhp038059@svn.freebsd.org> From: Sam Leffler Date: Thu, 3 Sep 2009 16:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196783 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:24:21 -0000 Author: sam Date: Thu Sep 3 16:24:21 2009 New Revision: 196783 URL: http://svn.freebsd.org/changeset/base/196783 Log: on transition to SLEEP state mark the station in power save, not awake MFC after: 3 days Modified: head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Sep 3 14:23:50 2009 (r196782) +++ head/sys/net80211/ieee80211_sta.c Thu Sep 3 16:24:21 2009 (r196783) @@ -431,7 +431,7 @@ sta_newstate(struct ieee80211vap *vap, e goto invalid; break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 0); + ieee80211_sta_pwrsave(vap, 1); break; default: invalid: From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:25:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 684BE106568F; Thu, 3 Sep 2009 16:25:25 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57B088FC19; Thu, 3 Sep 2009 16: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 n83GPPxn038136; Thu, 3 Sep 2009 16:25:25 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83GPPSK038134; Thu, 3 Sep 2009 16:25:25 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909031625.n83GPPSK038134@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 3 Sep 2009 16:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196784 - head/etc/mtree X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:25:25 -0000 Author: ache Date: Thu Sep 3 16:25:25 2009 New Revision: 196784 URL: http://svn.freebsd.org/changeset/base/196784 Log: Add la_LN.ISO8859-13 and lv_LV Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Sep 3 16:24:21 2009 (r196783) +++ head/etc/mtree/BSD.usr.dist Thu Sep 3 16:25:25 2009 (r196784) @@ -553,6 +553,8 @@ .. la_LN.ISO8859-1 .. + la_LN.ISO8859-13 + .. la_LN.ISO8859-15 .. la_LN.ISO8859-2 @@ -567,6 +569,10 @@ .. lt_LT.UTF-8 .. + lv_LV.ISO8859-13 + .. + lv_LV.UTF-8 + .. mn_MN.UTF-8 .. nb_NO.ISO8859-1 @@ -1077,6 +1083,8 @@ .. la_LN.ISO8859-1 .. + la_LN.ISO8859-13 + .. la_LN.ISO8859-15 .. la_LN.ISO8859-2 @@ -1091,6 +1099,10 @@ .. lt_LT.UTF-8 .. + lv_LV.ISO8859-13 + .. + lv_LV.UTF-8 + .. mn_MN.UTF-8 .. nl_BE.ISO8859-1 From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:29:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48F0C1065672; Thu, 3 Sep 2009 16:29:03 +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 385C48FC0C; Thu, 3 Sep 2009 16:29: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 n83GT37s038236; Thu, 3 Sep 2009 16:29:03 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83GT3Sp038234; Thu, 3 Sep 2009 16:29:03 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200909031629.n83GT3Sp038234@svn.freebsd.org> From: Sam Leffler Date: Thu, 3 Sep 2009 16:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196785 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:29:03 -0000 Author: sam Date: Thu Sep 3 16:29:02 2009 New Revision: 196785 URL: http://svn.freebsd.org/changeset/base/196785 Log: correct timeout for doing NOL processing; need a ticks-relative value Obtained from: Marvell MFC after: 3 days Modified: head/sys/net80211/ieee80211_dfs.c Modified: head/sys/net80211/ieee80211_dfs.c ============================================================================== --- head/sys/net80211/ieee80211_dfs.c Thu Sep 3 16:25:25 2009 (r196784) +++ head/sys/net80211/ieee80211_dfs.c Thu Sep 3 16:29:02 2009 (r196785) @@ -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-head@FreeBSD.ORG Thu Sep 3 16:30:33 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49C951065672; Thu, 3 Sep 2009 16:30:33 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5BB8FC12; Thu, 3 Sep 2009 16:30:32 +0000 (UTC) Received: from ice.local ([10.0.0.115]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n83GUWwh034115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Sep 2009 09:30:32 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4A9FEF28.2070703@errno.com> Date: Thu, 03 Sep 2009 09:30:32 -0700 From: Sam Leffler User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: src-committers@FreeBSD.org References: <200909031629.n83GT3Sp038234@svn.freebsd.org> In-Reply-To: <200909031629.n83GT3Sp038234@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r196785 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:30:33 -0000 Sam Leffler wrote: > Author: sam > Date: Thu Sep 3 16:29:02 2009 > New Revision: 196785 > URL: http://svn.freebsd.org/changeset/base/196785 > > Log: > correct timeout for doing NOL processing; need a ticks-relative value Reviewed by: rpaulo From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:31:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4232E106566C; Thu, 3 Sep 2009 16:31:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30FCF8FC0A; Thu, 3 Sep 2009 16:31: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 n83GVCYl038338; Thu, 3 Sep 2009 16:31:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83GVCp9038333; Thu, 3 Sep 2009 16:31:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200909031631.n83GVCp9038333@svn.freebsd.org> From: Ed Schouten Date: Thu, 3 Sep 2009 16:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196786 - in head/sys: dev/syscons teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:31:12 -0000 Author: ed Date: Thu Sep 3 16:31:11 2009 New Revision: 196786 URL: http://svn.freebsd.org/changeset/base/196786 Log: Expose the TF_REVERSE flag to the console driver. Right now libteken processes TF_REVERSE internally and returns the toggled colors to the console driver. This isn't entirely correct. This means that the bold flag is always processed by the foreground color, while reversing should be done after the foreground color has been set to a brighter version by the bold flag. This is no problem with the syscons driver, because with VGA it only supports 16 foreground and 8 background colors. My WIP console driver reconfigures the graphics hardware to disable the blink functionality and uses 16 foreground and 16 background colors. This means that this driver will handle the TF_REVERSE flag a little different from what syscons does right now. Modified: head/sys/dev/syscons/scterm-teken.c head/sys/teken/teken.c head/sys/teken/teken.h head/sys/teken/teken_demo.c Modified: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- head/sys/dev/syscons/scterm-teken.c Thu Sep 3 16:29:02 2009 (r196785) +++ head/sys/dev/syscons/scterm-teken.c Thu Sep 3 16:31:11 2009 (r196786) @@ -300,12 +300,20 @@ static unsigned int scteken_attr(const teken_attr_t *a) { unsigned int attr = 0; + teken_color_t fg, bg; + if (a->ta_format & TF_REVERSE) { + fg = a->ta_bgcolor; + bg = a->ta_fgcolor; + } else { + fg = a->ta_fgcolor; + bg = a->ta_bgcolor; + } if (a->ta_format & TF_BOLD) - attr |= fgcolors_bold[a->ta_fgcolor]; + attr |= fgcolors_bold[fg]; else - attr |= fgcolors_normal[a->ta_fgcolor]; - attr |= bgcolors[a->ta_bgcolor]; + attr |= fgcolors_normal[fg]; + attr |= bgcolors[bg]; #ifdef FG_UNDERLINE if (a->ta_format & TF_UNDERLINE) Modified: head/sys/teken/teken.c ============================================================================== --- head/sys/teken/teken.c Thu Sep 3 16:29:02 2009 (r196785) +++ head/sys/teken/teken.c Thu Sep 3 16:31:11 2009 (r196786) @@ -70,9 +70,6 @@ static FILE *df; #define teken_scs_switch(t, g) #endif /* TEKEN_XTERM && TEKEN_UTF8 */ -/* Private flags for teken_format_t. */ -#define TF_REVERSE 0x08 - /* Private flags for t_stateflags. */ #define TS_FIRSTDIGIT 0x01 /* First numeric digit in escape sequence. */ #define TS_INSERT 0x02 /* Insert mode. */ @@ -114,19 +111,10 @@ static inline void teken_funcs_putchar(teken_t *t, const teken_pos_t *p, teken_char_t c, const teken_attr_t *a) { - teken_attr_t ta; teken_assert(p->tp_row < t->t_winsize.tp_row); teken_assert(p->tp_col < t->t_winsize.tp_col); - /* Apply inversion. */ - if (a->ta_format & TF_REVERSE) { - ta.ta_format = a->ta_format; - ta.ta_fgcolor = a->ta_bgcolor; - ta.ta_bgcolor = a->ta_fgcolor; - a = &ta; - } - t->t_funcs->tf_putchar(t->t_softc, p, c, a); } @@ -134,21 +122,12 @@ static inline void teken_funcs_fill(teken_t *t, const teken_rect_t *r, const teken_char_t c, const teken_attr_t *a) { - teken_attr_t ta; teken_assert(r->tr_end.tp_row > r->tr_begin.tp_row); teken_assert(r->tr_end.tp_row <= t->t_winsize.tp_row); teken_assert(r->tr_end.tp_col > r->tr_begin.tp_col); teken_assert(r->tr_end.tp_col <= t->t_winsize.tp_col); - /* Apply inversion. */ - if (a->ta_format & TF_REVERSE) { - ta.ta_format = a->ta_format; - ta.ta_fgcolor = a->ta_bgcolor; - ta.ta_bgcolor = a->ta_fgcolor; - a = &ta; - } - t->t_funcs->tf_fill(t->t_softc, r, c, a); } Modified: head/sys/teken/teken.h ============================================================================== --- head/sys/teken/teken.h Thu Sep 3 16:29:02 2009 (r196785) +++ head/sys/teken/teken.h Thu Sep 3 16:31:11 2009 (r196786) @@ -54,6 +54,7 @@ typedef unsigned char teken_format_t; #define TF_BOLD 0x01 #define TF_UNDERLINE 0x02 #define TF_BLINK 0x04 +#define TF_REVERSE 0x08 typedef unsigned char teken_color_t; #define TC_BLACK 0 #define TC_RED 1 Modified: head/sys/teken/teken_demo.c ============================================================================== --- head/sys/teken/teken_demo.c Thu Sep 3 16:29:02 2009 (r196785) +++ head/sys/teken/teken_demo.c Thu Sep 3 16:31:11 2009 (r196786) @@ -121,6 +121,8 @@ printchar(const teken_pos_t *p) attr |= A_UNDERLINE; if (px->a.ta_format & TF_BLINK) attr |= A_BLINK; + if (px->a.ta_format & TF_REVERSE) + attr |= A_REVERSE; bkgdset(attr | COLOR_PAIR(px->a.ta_fgcolor + 8 * px->a.ta_bgcolor)); mvaddstr(p->tp_row, p->tp_col, str); From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:34:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A8D2106566C; Thu, 3 Sep 2009 16:34:21 +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 2FE258FC18; Thu, 3 Sep 2009 16:34:21 +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 n83GYLUK038524; Thu, 3 Sep 2009 16:34:21 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83GYLkL038520; Thu, 3 Sep 2009 16:34:21 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200909031634.n83GYLkL038520@svn.freebsd.org> From: Remko Lodder Date: Thu, 3 Sep 2009 16:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196787 - in head: . etc libexec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:34:21 -0000 Author: remko Date: Thu Sep 3 16:34:20 2009 New Revision: 196787 URL: http://svn.freebsd.org/changeset/base/196787 Log: 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 Modified: head/ObsoleteFiles.inc head/etc/inetd.conf head/libexec/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Sep 3 16:31:11 2009 (r196786) +++ head/ObsoleteFiles.inc Thu Sep 3 16:34:20 2009 (r196787) @@ -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 # 20090902: BSD.{x11,x11-4}.dist are dead and BSD.local.dist lives in ports/ OLD_FILES+=etc/mtree/BSD.local.dist OLD_FILES+=etc/mtree/BSD.x11.dist Modified: head/etc/inetd.conf ============================================================================== --- head/etc/inetd.conf Thu Sep 3 16:31:11 2009 (r196786) +++ head/etc/inetd.conf Thu Sep 3 16:34:20 2009 (r196787) @@ -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: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Thu Sep 3 16:31:11 2009 (r196786) +++ head/libexec/Makefile Thu Sep 3 16:34:20 2009 (r196787) @@ -9,7 +9,6 @@ SUBDIR= ${_atrun} \ fingerd \ ftpd \ getty \ - lukemftpd \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:37:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC053106568D; Thu, 3 Sep 2009 16:37:33 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5B98FC0C; Thu, 3 Sep 2009 16:37:33 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8C2BC1CCCB; Thu, 3 Sep 2009 18:37:32 +0200 (CEST) Date: Thu, 3 Sep 2009 18:37:32 +0200 From: Ed Schouten To: Remko Lodder Message-ID: <20090903163732.GQ2829@hoeg.nl> References: <200909031634.n83GYLkL038520@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="asVK9fW/mNnnZXE9" Content-Disposition: inline In-Reply-To: <200909031634.n83GYLkL038520@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196787 - in head: . etc libexec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:37:34 -0000 --asVK9fW/mNnnZXE9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Remko Lodder wrote: > Log: > Do the first step in removing lukemftpd from the base system. Disconnect > it from the build. > =20 > > =20 > MFC after: 3 days Is there a reason why we should MFC this? Wouldn't it be better to leave it in 8.0 for now? --=20 Ed Schouten WWW: http://80386.nl/ --asVK9fW/mNnnZXE9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqf8MwACgkQ52SDGA2eCwVvZwCePc3wyUKFLY3w110Ch6WFX3wr 0iUAn2PB8JLloZvnKykLN+x2ikXbs4b3 =5Jtq -----END PGP SIGNATURE----- --asVK9fW/mNnnZXE9-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:39:15 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D8DB1065672; Thu, 3 Sep 2009 16:39:15 +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 BF6838FC1D; Thu, 3 Sep 2009 16:39:14 +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 1MjFL7-000Fbu-Il; Thu, 03 Sep 2009 18:39:13 +0200 Message-Id: From: Remko Lodder To: Ed Schouten In-Reply-To: <20090903163732.GQ2829@hoeg.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 3 Sep 2009 18:39:12 +0200 References: <200909031634.n83GYLkL038520@svn.freebsd.org> <20090903163732.GQ2829@hoeg.nl> X-Mailer: Apple Mail (2.936) Cc: svn-src-head@freebsd.org, Remko Lodder , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r196787 - in head: . etc libexec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:39:15 -0000 On Sep 3, 2009, at 6:37 PM, Ed Schouten wrote: > * Remko Lodder wrote: >> Log: >> Do the first step in removing lukemftpd from the base system. >> Disconnect >> it from the build. >> >> >> >> MFC after: 3 days > > Is there a reason why we should MFC this? Wouldn't it be better to > leave > it in 8.0 for now? > > It will not automatically appear in 8.0. You can still build it if you connect it locally to the build again. Steps are under way to remove the rest of the code, but that might happen after 8.0 had happened. -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:42:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7573C106566B; Thu, 3 Sep 2009 16:42:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 3AEE18FC0A; Thu, 3 Sep 2009 16:42:09 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 396E51CCCB; Thu, 3 Sep 2009 18:42:08 +0200 (CEST) Date: Thu, 3 Sep 2009 18:42:08 +0200 From: Ed Schouten To: Remko Lodder Message-ID: <20090903164208.GR2829@hoeg.nl> References: <200909031634.n83GYLkL038520@svn.freebsd.org> <20090903163732.GQ2829@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DHnhIMemoiGGMQp1" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, Remko Lodder , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r196787 - in head: . etc libexec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:42:09 -0000 --DHnhIMemoiGGMQp1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Remko Lodder wrote: > It will not automatically appear in 8.0. You can still build it if > you connect it locally to the build again. > Steps are under way to remove the rest of the code, but that might > happen after 8.0 had happened. Hmhm... In my opinion it would have been better if we had a WITH_LUKEMFTPD instead of requiring users to manually rebuild it. I have to confess I don't use lukemftpd, so I'll stop complaining now. ;-) --=20 Ed Schouten WWW: http://80386.nl/ --DHnhIMemoiGGMQp1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqf8eAACgkQ52SDGA2eCwUoxQCdHz2AXROGZ7PsAbZSKB5rQ19h CNwAn1gXZCICc6Phga+YMSOQxvM3AblN =0VFi -----END PGP SIGNATURE----- --DHnhIMemoiGGMQp1-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 16:53:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED3C106568F; Thu, 3 Sep 2009 16:53:11 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD7588FC1D; Thu, 3 Sep 2009 16:53: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 n83GrBsg038938; Thu, 3 Sep 2009 16:53:11 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83GrBVn038935; Thu, 3 Sep 2009 16:53:11 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909031653.n83GrBVn038935@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 3 Sep 2009 16:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196788 - head/share/colldef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 16:53:12 -0000 Author: ache Date: Thu Sep 3 16:53:11 2009 New Revision: 196788 URL: http://svn.freebsd.org/changeset/base/196788 Log: Add lv_LV, move lt_LT to common part Added: head/share/colldef/la_LN.ISO8859-13.src - copied, changed from r196787, head/share/colldef/lt_LT.ISO8859-13.src Deleted: head/share/colldef/lt_LT.ISO8859-13.src Modified: head/share/colldef/Makefile Modified: head/share/colldef/Makefile ============================================================================== --- head/share/colldef/Makefile Thu Sep 3 16:34:20 2009 (r196787) +++ head/share/colldef/Makefile Thu Sep 3 16:53:11 2009 (r196788) @@ -20,6 +20,7 @@ LOCALES= bg_BG.CP1251 \ is_IS.ISO8859-15 \ kk_KZ.PT154 \ la_LN.ISO8859-1 \ + la_LN.ISO8859-13 \ la_LN.ISO8859-15 \ la_LN.ISO8859-2 \ la_LN.ISO8859-4 \ @@ -27,7 +28,6 @@ LOCALES= bg_BG.CP1251 \ no_NO.ISO8859-1 \ no_NO.ISO8859-15 \ lt_LT.ISO8859-4 \ - lt_LT.ISO8859-13 \ pl_PL.ISO8859-2 \ ru_RU.CP1251 \ ru_RU.CP866 \ @@ -62,7 +62,7 @@ ${locale}.out: map.${locale:E} CLEANFILES= ${FILES} ENCODINGS= Big5 Big5HKSCS CP949 eucCN eucJP eucKR GB18030 GB2312 GBK \ - ISO8859-1 ISO8859-2 ISO8859-15 SJIS US-ASCII UTF-8 + ISO8859-1 ISO8859-2 ISO8859-13 ISO8859-15 SJIS US-ASCII UTF-8 ISO8859-1_Big5= is_IS:zh_TW ISO8859-1_ISO8859-1= ${ISO8859-15_ISO8859-15} pt_PT:pt_BR @@ -78,6 +78,9 @@ ISO8859-15_ISO8859-15= \ LATIN2LINKS= hu_HU ro_RO sr_YU ISO8859-2_ISO8859-2= ${LATIN2LINKS:C/^/la_LN:/} cs_CZ:sk_SK +LATIN13LINKS= lt_LT lv_LV +ISO8859-13_ISO8859-13= ${LATIN13LINKS:C/^/la_LN:/} + US-ASCII_Big5HKSCS= la_LN:zh_HK US-ASCII_CP949= la_LN:ko_KR US-ASCII_eucCN= la_LN:zh_CN @@ -95,7 +98,7 @@ UTF8LINKS= af_ZA am_ET be_BY bg_BG ca_AD da_DK de_AT de_CH de_DE \ el_GR en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE eu_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM \ - is_IS it_CH it_IT ja_JP kk_KZ ko_KR lt_LT mn_MN \ + is_IS it_CH it_IT ja_JP kk_KZ ko_KR lt_LT lv_LV mn_MN \ nb_NO nl_BE nl_NL nn_NO no_NO pl_PL pt_BR pt_PT \ ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR uk_UA zh_CN zh_HK \ zh_TW Copied and modified: head/share/colldef/la_LN.ISO8859-13.src (from r196787, head/share/colldef/lt_LT.ISO8859-13.src) ============================================================================== --- head/share/colldef/lt_LT.ISO8859-13.src Thu Sep 3 16:34:20 2009 (r196787, copy source) +++ head/share/colldef/la_LN.ISO8859-13.src Thu Sep 3 16:53:11 2009 (r196788) @@ -1,4 +1,4 @@ -# Lithuanian (backward compatible with ASCII) +# Latin-7 / Baltic Rim (backward compatible with ASCII) # # $FreeBSD$ # From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 17:04:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DB441065679; Thu, 3 Sep 2009 17:04:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A52B8FC1B; Thu, 3 Sep 2009 17:04: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 n83H4gLo039222; Thu, 3 Sep 2009 17:04:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83H4gCM039220; Thu, 3 Sep 2009 17:04:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200909031704.n83H4gCM039220@svn.freebsd.org> From: Warner Losh Date: Thu, 3 Sep 2009 17:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196789 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 17:04:42 -0000 Author: imp Date: Thu Sep 3 17:04:42 2009 New Revision: 196789 URL: http://svn.freebsd.org/changeset/base/196789 Log: Time for house-cleaning: o remove all entries before RELENG_7 was branched, as is tradition[*]. o Update examples... nobody cares about 5.x upgrades. o minor format tweaking in a few places. o update copyright (although at best I hold an editors copyright these days). o Remove giving people permission to buy me beer. I don't do enough for this document for that anymore... Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Sep 3 16:53:11 2009 (r196788) +++ head/UPDATING Thu Sep 3 17:04:42 2009 (r196789) @@ -1,51 +1,53 @@ Updating Information for FreeBSD current users -This file is maintained and copyrighted by M. Warner Losh -. See end of file for further details. For commonly -done items, please see the COMMON ITEMS: section later in the file. +This file is maintained and copyrighted by M. Warner Losh . +See end of file for further details. For commonly done items, please see the +COMMON ITEMS: section later in the file. These instructions assume that you +basically know what you are doing. If not, then please consult the FreeBSD +handbook. Items affecting the ports and packages system can be found in -/usr/ports/UPDATING. Please read that file before running -portupgrade. +/usr/ports/UPDATING. Please read that file before running portupgrade. NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW: - FreeBSD 9.x has many debugging features turned on, in - both the kernel and userland. These features attempt to detect - incorrect use of system primitives, and encourage loud failure - through extra sanity checking and fail stop semantics. They - also substantially impact system performance. If you want to - do performance measurement, benchmarking, and optimization, - you'll want to turn them off. This includes various WITNESS- - related kernel options, INVARIANTS, malloc debugging flags - in userland, and various verbose features in the kernel. Many - developers choose to disable these features on build machines - to maximize performance. (To disable malloc debugging, run + FreeBSD 9.x has many debugging features turned on, in both the kernel + and userland. These features attempt to detect incorrect use of + system primitives, and encourage loud failure through extra sanity + checking and fail stop semantics. They also substantially impact + system performance. If you want to do performance measurement, + benchmarking, and optimization, you'll want to turn them off. This + includes various WITNESS- related kernel options, INVARIANTS, malloc + debugging flags in userland, and various verbose features in the + kernel. Many developers choose to disable these features on build + machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) 20090813: - Remove the option STOP_NMI. The default action is now to use NMI - only for KDB via the newly introduced function stop_cpus_hard() - and maintain stop_cpus() to just use a normal IPI_STOP on ia32 - and amd64. + Remove the option STOP_NMI. The default action is now to use NMI only + for KDB via the newly introduced function stop_cpus_hard() and + maintain stop_cpus() to just use a normal IPI_STOP on ia32 and amd64. + +20090803: + RELENG_8 branched. 20090719: - Bump the shared library version numbers for all libraries that - do not use symbol versioning as part of the 8.0-RELEASE cycle. - Bump __FreeBSD_version to 800105. + Bump the shared library version numbers for all libraries that do not + use symbol versioning as part of the 8.0-RELEASE cycle. Bump + __FreeBSD_version to 800105. 20090714: - Due to changes in the implementation of virtual network stack - support, all network-related kernel modules must be recompiled. - As this change breaks the ABI, bump __FreeBSD_version to 800104. + Due to changes in the implementation of virtual network stack support, + all network-related kernel modules must be recompiled. As this change + breaks the ABI, bump __FreeBSD_version to 800104. 20090713: - The TOE interface to the TCP syncache has been modified to remove struct - tcpopt () from the ABI of the network stack. The - cxgb driver is the only TOE consumer affected by this change, and needs - to be recompiled along with the kernel. As this change breaks the ABI, - bump __FreeBSD_version to 800103. + The TOE interface to the TCP syncache has been modified to remove + struct tcpopt () from the ABI of the network stack. + The cxgb driver is the only TOE consumer affected by this change, and + needs to be recompiled along with the kernel. As this change breaks + the ABI, bump __FreeBSD_version to 800103. -20090712: +20090712: Padding has been added to struct tcpcb, sackhint and tcpstat in to facilitate future MFCs and bug fixes whilst maintainig the ABI. However, this change breaks the ABI, so bump @@ -53,79 +55,75 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. any of these structs (e.g. sockstat) need to be recompiled. 20090630: - The NFS_LEGACYRPC option has been removed along with the old - kernel RPC implementation that this option selected. Kernel - configurations may need to be adjusted. + The NFS_LEGACYRPC option has been removed along with the old kernel + RPC implementation that this option selected. Kernel configurations + may need to be adjusted. 20090629: - The network interface device nodes at /dev/net/ have - been removed. All ioctl operations can be performed the normal - way using routing sockets. The kqueue functionality can - generally be replaced with routing sockets. + The network interface device nodes at /dev/net/ have been + removed. All ioctl operations can be performed the normal way using + routing sockets. The kqueue functionality can generally be replaced + with routing sockets. 20090628: - The documentation from the FreeBSD Documentation Project - (Handbook, FAQ, etc.) is now installed via packages by - sysinstall(8) and under the /usr/local/share/doc/freebsd - directory instead of /usr/share/doc. + The documentation from the FreeBSD Documentation Project (Handbook, + FAQ, etc.) is now installed via packages by sysinstall(8) and under + the /usr/local/share/doc/freebsd directory instead of /usr/share/doc. 20090624: - The ABI of various structures related to the SYSV IPC API have - been changed. As a result, the COMPAT_FREEBSD[456] and COMPAT_43 - kernel options now all require COMPAT_FREEBSD7. - Bump __FreeBSD_version to 800100. + The ABI of various structures related to the SYSV IPC API have been + changed. As a result, the COMPAT_FREEBSD[456] and COMPAT_43 kernel + options now all require COMPAT_FREEBSD7. Bump __FreeBSD_version to + 800100. 20090622: - Layout of struct vnet has changed as routing related variables - were moved to their own Vimage module. Modules need to be - recompiled. Bump __FreeBSD_version to 800099. + Layout of struct vnet has changed as routing related variables were + moved to their own Vimage module. Modules need to be recompiled. Bump + __FreeBSD_version to 800099. 20090619: - NGROUPS_MAX and NGROUPS have been increased from 16 to 1023 - and 1024 respectively. As long as no more than 16 groups per - process are used, no changes should be visible. When more - than 16 groups are used, old binaries may fail if they call - getgroups() or getgrouplist() with statically sized storage. - Recompiling will work around this, but applications should be - modified to use dynamically allocated storage for group arrays - as POSIX.1-2008 does not cap an implementation's number of - supported groups at NGROUPS_MAX+1 as previous versions did. - - NFS and portalfs mounts may also be affected as the list of - groups is truncated to 16. Users of NFS who use more than 16 - groups, should take care that negative group permissions are not - used on the exported file systems as they will not be reliable - unless a GSSAPI based authentication method is used. - -20090616: - The compiling option ADAPTIVE_LOCKMGRS has been introduced. - This option compiles in the support for adaptive spinning for lockmgrs - which want to enable it. The lockinit() function now accepts the - flag LK_ADAPTIVE in order to make the lock object subject to - adaptive spinning when both held in write and read mode. + NGROUPS_MAX and NGROUPS have been increased from 16 to 1023 and 1024 + respectively. As long as no more than 16 groups per process are used, + no changes should be visible. When more than 16 groups are used, old + binaries may fail if they call getgroups() or getgrouplist() with + statically sized storage. Recompiling will work around this, but + applications should be modified to use dynamically allocated storage + for group arrays as POSIX.1-2008 does not cap an implementation's + number of supported groups at NGROUPS_MAX+1 as previous versions did. + + NFS and portalfs mounts may also be affected as the list of groups is + truncated to 16. Users of NFS who use more than 16 groups, should + take care that negative group permissions are not used on the exported + file systems as they will not be reliable unless a GSSAPI based + authentication method is used. + +20090616: + The compiling option ADAPTIVE_LOCKMGRS has been introduced. This + option compiles in the support for adaptive spinning for lockmgrs + which want to enable it. The lockinit() function now accepts the flag + LK_ADAPTIVE in order to make the lock object subject to adaptive + spinning when both held in write and read mode. 20090613: - The layout of the structure returned by IEEE80211_IOC_STA_INFO - has changed. User applications that use this ioctl need to be - rebuilt. + The layout of the structure returned by IEEE80211_IOC_STA_INFO has + changed. User applications that use this ioctl need to be rebuilt. 20090611: - The layout of struct thread has changed. Kernel and modules - need to be rebuilt. + The layout of struct thread has changed. Kernel and modules need to + be rebuilt. 20090608: - The layout of structs ifnet, domain, protosw and vnet_net has - changed. Kernel modules need to be rebuilt. - Bump __FreeBSD_version to 800097. + The layout of structs ifnet, domain, protosw and vnet_net has changed. + Kernel modules need to be rebuilt. Bump __FreeBSD_version to 800097. 20090602: window(1) has been removed from the base system. It can now be installed from ports. The port is called misc/window. 20090601: - The way we are storing and accessing `routing table' entries - has changed. Programs reading the FIB, like netstat, need to - be re-compiled. + The way we are storing and accessing `routing table' entries has + changed. Programs reading the FIB, like netstat, need to be + re-compiled. 20090601: A new netisr implementation has been added for FreeBSD 8. Network @@ -134,24 +132,24 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. Bump __FreeBSD_version to 800096. 20090530: - Remove the tunable/sysctl debug.mpsafevfs as its initial purpose - is no more valid. + Remove the tunable/sysctl debug.mpsafevfs as its initial purpose is no + more valid. 20090530: Add VOP_ACCESSX(9). File system modules need to be rebuilt. Bump __FreeBSD_version to 800094. 20090529: - Add mnt_xflag field to 'struct mount'. File system modules - need to be rebuilt. + Add mnt_xflag field to 'struct mount'. File system modules need to be + rebuilt. Bump __FreeBSD_version to 800093. 20090528: The compiling option ADAPTIVE_SX has been retired while it has been introduced the option NO_ADAPTIVE_SX which handles the reversed logic. The KPI for sx_init_flags() changes as accepting flags: - SX_ADAPTIVESPIN flag has been retired while the SX_NOADAPTIVE flag - has been introduced in order to handle the reversed logic. + SX_ADAPTIVESPIN flag has been retired while the SX_NOADAPTIVE flag has + been introduced in order to handle the reversed logic. Bump __FreeBSD_version to 800092. 20090527: @@ -164,20 +162,18 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. Bump __FreeBSD_version to 800090. 20090523: - The newly imported zic(8) produces a new format in the - output. Please run tzsetup(8) to install the newly created - data to /etc/localtime. + The newly imported zic(8) produces a new format in the output. Please + run tzsetup(8) to install the newly created data to /etc/localtime. 20090520: The sysctl tree for the usb stack has renamed from hw.usb2.* to hw.usb.* and is now consistent again with previous releases. 20090520: - 802.11 monitor mode support was revised and driver api's - were changed. Drivers dependent on net80211 now support - DLT_IEEE802_11_RADIO instead of DLT_IEEE802_11. No - user-visible data structures were changed but applications - that use DLT_IEEE802_11 may require changes. + 802.11 monitor mode support was revised and driver api's were changed. + Drivers dependent on net80211 now support DLT_IEEE802_11_RADIO instead + of DLT_IEEE802_11. No user-visible data structures were changed but + applications that use DLT_IEEE802_11 may require changes. Bump __FreeBSD_version to 800088. 20090430: @@ -768,730 +764,29 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. 20071010: RELENG_7 branched. -20071009: - Setting WITHOUT_LIBPTHREAD now means WITHOUT_LIBKSE and - WITHOUT_LIBTHR are set. - -20070930: - The PCI code has been made aware of PCI domains. This means that - the location strings as used by pciconf(8) etc are now in the - following format: pci::[:]. It - also means that consumers of potentially need to - be recompiled; this includes the hal and xorg-server ports. - -20070928: - The caching daemon (cached) was renamed to nscd. nscd.conf - configuration file should be used instead of cached.conf and - nscd_enable, nscd_pidfile and nscd_flags options should be used - instead of cached_enable, cached_pidfile and cached_flags in - rc.conf. - -20070921: - The getfacl(1) utility now prints owning user and group name - instead of owning uid and gid in the three line comment header. - This is the same behavior as getfacl(1) on Solaris and Linux. - -20070704: - The new IPsec code is now compiled in using the IPSEC option. The - IPSEC option now requires "device crypto" be defined in your kernel - configuration. The FAST_IPSEC kernel option is now deprecated. - -20070702: - The packet filter (pf) code has been updated to OpenBSD 4.1 Please - note the changed syntax - keep state is now on by default. Also - note the fact that ftp-proxy(8) has been changed from bottom up and - has been moved from libexec to usr/sbin. Changes in the ALTQ - handling also affect users of IPFW's ALTQ capabilities. - -20070701: - Remove KAME IPsec in favor of FAST_IPSEC, which is now the - only IPsec supported by FreeBSD. The new IPsec stack - supports both IPv4 and IPv6. The kernel option will change - after the code changes have settled in. For now the kernel - option IPSEC is deprecated and FAST_IPSEC is the only option, that - will change after some settling time. - -20070701: - The wicontrol(8) utility has been removed from the base system. wi(4) - cards should be configured using ifconfig(8), see the man page for more - information. - -20070612: - The i386/amd64 GENERIC kernel now defaults to the nfe(4) driver - instead of the nve(4) driver. Please update your configuration - accordingly. - -20070612: - By default, /etc/rc.d/sendmail no longer rebuilds the aliases - database if it is missing or older than the aliases file. If - desired, set the new rc.conf option sendmail_rebuild_aliases - to "YES" to restore that functionality. - -20070612: - The IPv4 multicast socket code has been considerably modified, and - moved to the file sys/netinet/in_mcast.c. Initial support for the - RFC 3678 Source-Specific Multicast Socket API has been added to - the IPv4 network stack. - - Strict multicast and broadcast reception is now the default for - UDP/IPv4 sockets; the net.inet.udp.strict_mcast_mship sysctl variable - has now been removed. - - The RFC 1724 hack for interface selection has been removed; the use - of the Linux-derived ip_mreqn structure with IP_MULTICAST_IF has - been added to replace it. Consumers such as routed will soon be - updated to reflect this. - - These changes affect users who are running routed(8) or rdisc(8) - from the FreeBSD base system on point-to-point or unnumbered - interfaces. - -20070610: - The net80211 layer has changed significantly and all wireless - drivers that depend on it need to be recompiled. Further these - changes require that any program that interacts with the wireless - support in the kernel be recompiled; this includes: ifconfig, - wpa_supplicant, hostapd, and wlanstats. Users must also, for - the moment, kldload the wlan_scan_sta and/or wlan_scan_ap modules - if they use modules for wireless support. These modules implement - scanning support for station and ap modes, respectively. Failure - to load the appropriate module before marking a wireless interface - up will result in a message to the console and the device not - operating properly. - -20070610: - The pam_nologin(8) module ceases to provide an authentication - function and starts providing an account management function. - Consequent changes to /etc/pam.d should be brought in using - mergemaster(8). Third-party files in /usr/local/etc/pam.d may - need manual editing as follows. Locate this line (or similar): - - auth required pam_nologin.so no_warn - - and change it according to this example: - - account required pam_nologin.so no_warn - - That is, the first word needs to be changed from "auth" to - "account". The new line can be moved to the account section - within the file for clarity. Not updating pam.conf(5) files - will result in nologin(5) ignored by the respective services. - -20070529: - The ether_ioctl() function has been synchronized with ioctl(2) - and ifnet.if_ioctl. Due to that, the size of one of its arguments - has changed on 64-bit architectures. All kernel modules using - ether_ioctl() need to be rebuilt on such architectures. - -20070516: - Improved INCLUDE_CONFIG_FILE support has been introduced to the - config(8) utility. In order to take advantage of this new - functionality, you are expected to recompile and install - src/usr.sbin/config. If you don't rebuild config(8), and your - kernel configuration depends on INCLUDE_CONFIG_FILE, the kernel - build will be broken because of a missing "kernconfstring" - symbol. - -20070513: - Symbol versioning is enabled by default. To disable it, use - option WITHOUT_SYMVER. It is not advisable to attempt to - disable symbol versioning once it is enabled; your installworld - will break because a symbol version-less libc will get installed - before the install tools. As a result, the old install tools, - which previously had symbol dependencies to FBSD_1.0, will fail - because the freshly installed libc will not have them. - - The default threading library (providing "libpthread") has been - changed to libthr. If you wish to have libkse as your default, - use option DEFAULT_THREAD_LIB=libkse for the buildworld. - -20070423: - The ABI breakage in sendmail(8)'s libmilter has been repaired - so it is no longer necessary to recompile mail filters (aka, - milters). If you recompiled mail filters after the 20070408 - note, it is not necessary to recompile them again. - -20070417: - The new trunk(4) driver has been renamed to lagg(4) as it better - reflects its purpose. ifconfig will need to be recompiled. - -20070408: - sendmail(8) has been updated to version 8.14.1. Mail filters - (aka, milters) compiled against the libmilter included in the - base operating system should be recompiled. - -20070302: - Firmwares for ipw(4) and iwi(4) are now included in the base tree. - In order to use them one must agree to the respective LICENSE in - share/doc/legal and define legal.intel_.license_ack=1 via - loader.conf(5) or kenv(1). Make sure to deinstall the now - deprecated modules from the respective firmware ports. - -20070228: - The name resolution/mapping functions addr2ascii(3) and ascii2addr(3) - were removed from FreeBSD's libc. These originally came from INRIA - IPv6. Nothing in FreeBSD ever used them. They may be regarded as - deprecated in previous releases. - The AF_LINK support for getnameinfo(3) was merged from NetBSD to - replace it as a more portable (and re-entrant) API. - -20070224: - To support interrupt filtering a modification to the newbus API - has occurred, ABI was broken and __FreeBSD_version was bumped - to 700031. Please make sure that your kernel and modules are in - sync. For more info: - http://docs.freebsd.org/cgi/mid.cgi?20070221233124.GA13941 - -20070224: - The IPv6 multicast forwarding code may now be loaded into GENERIC - kernels by loading the ip_mroute.ko module. This is built into the - module unless WITHOUT_INET6 or WITHOUT_INET6_SUPPORT options are - set; see src.conf(5) for more information. - -20070214: - The output of netstat -r has changed. Without -n, we now only - print a "network name" without the prefix length if the network - address and mask exactly match a Class A/B/C network, and an entry - exists in the nsswitch "networks" map. - With -n, we print the full unabbreviated CIDR network prefix in - the form "a.b.c.d/p". 0.0.0.0/0 is always printed as "default". - This change is in preparation for changes such as equal-cost - multipath, and to more generally assist operational deployment - of FreeBSD as a modern IPv4 router. - -20070210: - PIM has been turned on by default in the IPv4 multicast - routing code. The kernel option 'PIM' has now been removed. - PIM is now built by default if option 'MROUTING' is specified. - It may now be loaded into GENERIC kernels by loading the - ip_mroute.ko module. - -20070207: - Support for IPIP tunnels (VIFF_TUNNEL) in IPv4 multicast routing - has been removed. Its functionality may be achieved by explicitly - configuring gif(4) interfaces and using the 'phyint' keyword in - mrouted.conf. - XORP does not support source-routed IPv4 multicast tunnels nor the - integrated IPIP tunneling, therefore it is not affected by this - change. The __FreeBSD_version macro has been bumped to 700030. - -20061221: - Support for PCI Message Signalled Interrupts has been - re-enabled in the bge driver, only for those chips which are - believed to support it properly. If there are any problems, - MSI can be disabled completely by setting the - 'hw.pci.enable_msi' and 'hw.pci.enable_msix' tunables to 0 - in the loader. - -20061214: - Support for PCI Message Signalled Interrupts has been - disabled again in the bge driver. Many revisions of the - hardware fail to support it properly. Support can be - re-enabled by removing the #define of BGE_DISABLE_MSI in - "src/sys/dev/bge/if_bge.c". - -20061214: - Support for PCI Message Signalled Interrupts has been added - to the bge driver. If there are any problems, MSI can be - disabled completely by setting the 'hw.pci.enable_msi' and - 'hw.pci.enable_msix' tunables to 0 in the loader. - -20061205: - The removal of several facets of the experimental Threading - system from the kernel means that the proc and thread structures - have changed quite a bit. I suggest all kernel modules that might - reference these structures be recompiled.. Especially the - linux module. - -20061126: - Sound infrastructure has been updated with various fixes and - improvements. Most of the changes are pretty much transparent, - with exceptions of followings: - 1) All sound driver specific sysctls (hw.snd.pcm%d.*) have been - moved to their own dev sysctl nodes, for example: - hw.snd.pcm0.vchans -> dev.pcm.0.vchans - 2) /dev/dspr%d.%d has been deprecated. Each channel now has its - own chardev in the form of "dsp%d.%d", where - is p = playback, r = record and v = virtual, respectively. Users - are encouraged to use these devs instead of (old) "/dev/dsp%d.%d". - This does not affect those who are using "/dev/dsp". - -20061122: - geom(4)'s gmirror(8) class metadata structure has been - rev'd from v3 to v4. If you update across this point and - your metadata is converted for you, you will not be easily - able to downgrade since the /boot/kernel.old/geom_mirror.ko - kernel module will be unable to read the v4 metadata. You - can resolve this by doing from the loader(8) prompt: - - set vfs.root.mountfrom="ufs:/dev/XXX" - - where XXX is the root slice of one of the disks that composed - the mirror (i.e.: /dev/ad0s1a). You can then rebuild - the array the same way you built it originally. - -20061122: - The following binaries have been disconnected from the build: - mount_devfs, mount_ext2fs, mount_fdescfs, mount_procfs, mount_linprocfs, - and mount_std. The functionality of these programs has been - moved into the mount program. For example, to mount a devfs - filesystem, instead of using mount_devfs, use: "mount -t devfs". - This does not affect entries in /etc/fstab, since entries in - /etc/fstab are always processed with "mount -t fstype". - -20061113: - Support for PCI Message Signalled Interrupts on i386 and amd64 - has been added to the kernel and various drivers will soon be - updated to use MSI when it is available. If there are any problems, - MSI can be disabled completely by setting the 'hw.pci.enable_msi' - and 'hw.pci.enable_msix' tunables to 0 in the loader. - -20061110: - The MUTEX_PROFILING option has been renamed to LOCK_PROFILING. - The lockmgr object layout has been changed as a result of having - a lock_object embedded in it. As a consequence all file system - kernel modules must be re-compiled. The mutex profiling man page - has not yet been updated to reflect this change. - -20061026: - KSE in the kernel has now been made optional and turned on by - default. Use 'nooption KSE' in your kernel config to turn it - off. All kernel modules *must* be recompiled after this change. - There-after, modules from a KSE kernel should be compatible with - modules from a NOKSE kernel due to the temporary padding fields - added to 'struct proc'. - -20060929: - mrouted and its utilities have been removed from the base system. - -20060927: - Some ioctl(2) command codes have changed. Full backward ABI - compatibility is provided if the "options COMPAT_FREEBSD6" is - present in the kernel configuration file. Make sure to add - this option to your kernel config file, or recompile X.Org - and the rest of ports; otherwise they may refuse to work. - -20060924: - tcpslice has been removed from the base system. - -20060913: - The sizes of struct tcpcb (and struct xtcpcb) have changed due to - the rewrite of TCP syncookies. Tools like netstat, sockstat, and - systat needs to be rebuilt. - -20060903: - libpcap updated to v0.9.4 and tcpdump to v3.9.4 - -20060816: - The IPFIREWALL_FORWARD_EXTENDED option is gone and the behaviour - for IPFIREWALL_FORWARD is now as it was before when it was first - committed and for years after. The behaviour is now ON. - -20060725: - enigma(1)/crypt(1) utility has been changed on 64 bit architectures. - Now it can decrypt files created from different architectures. - Unfortunately, it is no longer able to decrypt a cipher text - generated with an older version on 64 bit architectures. - If you have such a file, you need old utility to decrypt it. - -20060709: - The interface version of the i4b kernel part has changed. So - after updating the kernel sources and compiling a new kernel, - the i4b user space tools in "/usr/src/usr.sbin/i4b" must also - be rebuilt, and vice versa. - -20060627: - The XBOX kernel now defaults to the nfe(4) driver instead of - the nve(4) driver. Please update your configuration - accordingly. - -20060514: - The i386-only lnc(4) driver for the AMD Am7900 LANCE and Am79C9xx - PCnet family of NICs has been removed. The new le(4) driver serves - as an equivalent but cross-platform replacement with the pcn(4) - driver still providing performance-optimized support for the subset - of AMD Am79C971 PCnet-FAST and greater chips as before. - -20060511: - The machdep.* sysctls and the adjkerntz utility have been - modified a bit. The new adjkerntz utility uses the new - sysctl names and sysctlbyname() calls, so it may be impossible - to run an old /sbin/adjkerntz utility in single-user mode - with a new kernel. Replace the `adjkerntz -i' step before - `make installworld' with: - - /usr/obj/usr/src/sbin/adjkerntz/adjkerntz -i - - and proceed as usual with the rest of the installworld-stage - steps. Otherwise, you risk installing binaries with their - timestamp set several hours in the future, especially if - you are running with local time set to GMT+X hours. - -20060412: - The ip6fw utility has been removed. The behavior provided by - ip6fw has been in ipfw2 for a good while and the rc.d scripts - have been updated to deal with it. There are some rules that - might not migrate cleanly. Use rc.firewall6 as a template to - rewrite rules. - -20060428: - The puc(4) driver has been overhauled. The ebus(4) and sbus(4) - attachments have been removed. Make sure to configure scc(4) - on sparc64. Note also that by default puc(4) will use uart(4) - and not sio(4) for serial ports because interrupt handling has - been optimized for multi-port serial cards and only uart(4) - implements the interface to support it. - -20060330: - The scc(4) driver replaces puc(4) for Serial Communications - Controllers (SCCs) like the Siemens SAB82532 and the Zilog - Z8530. On sparc64, it is advised to add scc(4) to the kernel - configuration to make sure that the serial ports remain - functional. - -20060317: - Most world/kernel related NO_* build options changed names. - New knobs have common prefixes WITHOUT_*/WITH_* (modelled - after FreeBSD ports) and should be set in /etc/src.conf - (the src.conf(5) manpage is provided). Full backwards - compatibility is maintained for the time being though it's - highly recommended to start moving old options out of the - system-wide /etc/make.conf file into the new /etc/src.conf - while also properly renaming them. More conversions will - likely follow. Posting to current@: - - http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html - -20060305: - The NETSMBCRYPTO kernel option has been retired because its - functionality is always included in NETSMB and smbfs.ko now. - -20060303: - The TDFX_LINUX kernel option was retired and replaced by the - tdfx_linux device. The latter can be loaded as the 3dfx_linux.ko - kernel module. Loading it alone should suffice to get 3dfx support - for Linux apps because it will pull in 3dfx.ko and linux.ko through - its dependencies. - -20060204: - The 'audit' group was added to support the new auditing functionality - in the base system. Be sure to follow the directions for updating, - including the requirement to run mergemaster -p. - -20060201: - The kernel ABI to file system modules was changed on i386. - Please make sure that your kernel and modules are in sync. - -20060118: - This actually occured some time ago, but installing the kernel - now also installs a bunch of symbol files for the kernel modules. - This increases the size of /boot/kernel to about 67Mbytes. You - will need twice this if you will eventually back this up to kernel.old - on your next install. - If you have a shortage of room in your root partition, you should add - -DINSTALL_NODEBUG to your make arguments or add INSTALL_NODEBUG="yes" - to your /etc/make.conf. - -20060113: - libc's malloc implementation has been replaced. This change has the - potential to uncover application bugs that previously went unnoticed. - See the malloc(3) manual page for more details. - -20060112: - The generic netgraph(4) cookie has been changed. If you upgrade - kernel passing this point, you also need to upgrade userland - and netgraph(4) utilities like ports/net/mpd or ports/net/mpd4. - -20060106: - si(4)'s device files now contain the unit number. - Uses of {cua,tty}A[0-9a-f] should be replaced by {cua,tty}A0[0-9a-f]. - -20060106: - The kernel ABI was mostly destroyed due to a change in the size - of struct lock_object which is nested in other structures such - as mutexes which are nested in all sorts of other structures. - Make sure your kernel and modules are in sync. - -20051231: - The page coloring algorithm in the VM subsystem was converted - from tuning with kernel options to autotuning. Please remove - any PQ_* option except PQ_NOOPT from your kernel config. - -20051211: - The net80211-related tools in the tools/tools/ath directory - have been moved to tools/tools/net80211 and renamed with a - "wlan" prefix. Scripts that use them should be adjusted - accordingly. - -20051202: - Scripts in the local_startup directories (as defined in - /etc/defaults/rc.conf) that have the new rc.d semantics will - now be run as part of the base system rcorder. If there are - errors or problems with one of these local scripts, it could - cause boot problems. If you encounter such problems, boot in - single user mode, remove that script from the */rc.d directory. - Please report the problem to the port's maintainer, and the - freebsd-ports@freebsd.org mailing list. - -20051129: - The nodev mount option was deprecated in RELENG_6 (where it - was a no-op), and is now unsupported. If you have nodev or dev listed - in /etc/fstab, remove it, otherwise it will result in a mount error. - -20051129: - ABI between ipfw(4) and ipfw(8) has been changed. You need - to rebuild ipfw(8) when rebuilding kernel. - -20051108: - rp(4)'s device files now contain the unit number. - Uses of {cua,tty}R[0-9a-f] should be replaced by {cua,tty}R0[0-9a-f]. - -20051029: - /etc/rc.d/ppp-user has been renamed to /etc/rc.d/ppp. - Its /etc/rc.conf.d configuration file has been `ppp' from - the beginning, and hence there is no need to touch it. - -20051014: - Now most modules get their build-time options from the kernel - configuration file. A few modules still have fixed options - due to their non-conformant implementation, but they will be - corrected eventually. You may need to review the options of - the modules in use, explicitly specify the non-default options - in the kernel configuration file, and rebuild the kernel and - modules afterwards. - -20051001: - kern.polling.enable sysctl MIB is now deprecated. Use ifconfig(8) - to turn polling(4) on your interfaces. - -20050927: - The old bridge(4) implementation was retired. The new - if_bridge(4) serves as a full functional replacement. - -20050722: - The ai_addrlen of a struct addrinfo was changed to a socklen_t - to conform to POSIX-2001. This change broke an ABI - compatibility on 64 bit architecture. You have to recompile - userland programs that use getaddrinfo(3) on 64 bit - architecture. - -20050711: - RELENG_6 branched here. - -20050629: - The pccard_ifconfig rc.conf variable has been removed and a new - variable, ifconfig_DEFAULT has been introduced. Unlike - pccard_ifconfig, ifconfig_DEFAULT applies to ALL interfaces that - do not have ifconfig_ifn entries rather than just those in - removable_interfaces. - -20050616: - Some previous versions of PAM have permitted the use of - non-absolute paths in /etc/pam.conf or /etc/pam.d/* when referring - to third party PAM modules in /usr/local/lib. A change has been - made to require the use of absolute paths in order to avoid - ambiguity and dependence on library path configuration, which may - affect existing configurations. - -20050610: - Major changes to network interface API. All drivers must be - recompiled. Drivers not in the base system will need to be - updated to the new APIs. - -20050609: - Changes were made to kinfo_proc in sys/user.h. Please recompile - userland, or commands like `fstat', `pkill', `ps', `top' and `w' - will not behave correctly. - - The API and ABI for hwpmc(4) have changed with the addition - of sampling support. Please recompile lib/libpmc(3) and - usr.sbin/{pmcstat,pmccontrol}. - -20050606: - The OpenBSD dhclient was imported in place of the ISC dhclient - and the network interface configuration scripts were updated - accordingly. If you use DHCP to configure your interfaces, you - must now run devd. Also, DNS updating was lost so you will need - to find a workaround if you use this feature. - - The '_dhcp' user was added to support the OpenBSD dhclient. Be - sure to run mergemaster -p (like you are supposed to do every time - anyway). - -20050605: - if_bridge was added to the tree. This has changed struct ifnet. - Please recompile userland and all network related modules. - -20050603: - The n_net of a struct netent was changed to an uint32_t, and - 1st argument of getnetbyaddr() was changed to an uint32_t, to - conform to POSIX-2001. These changes broke an ABI - compatibility on 64 bit architecture. With these changes, - shlib major of libpcap was bumped. You have to recompile - userland programs that use getnetbyaddr(3), getnetbyname(3), - getnetent(3) and/or libpcap on 64 bit architecture. - -20050528: - Kernel parsing of extra options on '#!' first lines of shell - scripts has changed. Lines with multiple options likely will - fail after this date. For full details, please see - http://people.freebsd.org/~gad/Updating-20050528.txt - -20050503: - The packet filter (pf) code has been updated to OpenBSD 3.7 - Please note the changed anchor syntax and the fact that - authpf(8) now needs a mounted fdescfs(5) to function. - -20050415: - The NO_MIXED_MODE kernel option has been removed from the i386 - amd64 platforms as its use has been superceded by the new local - APIC timer code. Any kernel config files containing this option - should be updated. - -20050227: - The on-disk format of LC_CTYPE files was changed to be machine - independent. Please make sure NOT to use NO_CLEAN buildworld - when crossing this point. Crossing this point also requires - recompile or reinstall of all locale depended packages. - -20050225: - The ifi_epoch member of struct if_data has been changed to - contain the uptime at which the interface was created or the - statistics zeroed rather then the wall clock time because - wallclock time may go backwards. This should have no impact - unless an snmp implementation is using this value (I know of - none at this point.) - -20050224: - The acpi_perf and acpi_throttle drivers are now part of the - acpi(4) main module. They are no longer built separately. - -20050223: - The layout of struct image_params has changed. You have to - recompile all compatibility modules (linux, svr4, etc) for use - with the new kernel. - -20050223: - The p4tcc driver has been merged into cpufreq(4). This makes - "options CPU_ENABLE_TCC" obsolete. Please load cpufreq.ko or - compile in "device cpufreq" to restore this functionality. - -20050220: - The responsibility of recomputing the file system summary of - a SoftUpdates-enabled dirty volume has been transferred to the - background fsck. A rebuild of fsck(8) utility is recommended - if you have updated the kernel. - - To get the old behavior (recompute file system summary at mount - time), you can set vfs.ffs.compute_summary_at_mount=1 before - mounting the new volume. - -20050206: - The cpufreq import is complete. As part of this, the sysctls for - acpi(4) throttling have been removed. The power_profile script - has been updated, so you can use performance/economy_cpu_freq in - rc.conf(5) to set AC on/offline cpu frequencies. - -20050206: - NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko) - requires recompiling libnetgraph and userland netgraph utilities. - -20050114: - Support for abbreviated forms of a number of ipfw options is - now deprecated. Warnings are printed to stderr indicating the - correct full form when a match occurs. Some abbreviations may - be supported at a later date based on user feedback. To be - considered for support, abbreviations must be in use prior to - this commit and unlikely to be confused with current key words. - -20041221: - By a popular demand, a lot of NOFOO options were renamed - to NO_FOO (see bsd.compat.mk for a full list). The old - spellings are still supported, but will cause annoying - warnings on stderr. Make sure you upgrade properly (see - the COMMON ITEMS: section later in this file). - -20041219: - Auto-loading of ancillary wlan modules such as wlan_wep has - been temporarily disabled; you need to statically configure - the modules you need into your kernel or explicitly load them - prior to use. Specifically, if you intend to use WEP encryption - with an 802.11 device load/configure wlan_wep; if you want to - use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp, - and wlan_xauth as required. - -20041213: - The behaviour of ppp(8) has changed slightly. If lqr is enabled - (``enable lqr''), older versions would revert to LCP ECHO mode on - negotiation failure. Now, ``enable echo'' is required for this - behaviour. The ppp version number has been bumped to 3.4.2 to - reflect the change. - -20041201: - The wlan support has been updated to split the crypto support - into separate modules. For static WEP you must configure the - wlan_wep module in your system or build and install the module - in place where it can be loaded (the kernel will auto-load - the module when a wep key is configured). - -20041201: - The ath driver has been updated to split the tx rate control - algorithm into a separate module. You need to include either - ath_rate_onoe or ath_rate_amrr when configuring the kernel. - -20041116: - Support for systems with an 80386 CPU has been removed. Please - use FreeBSD 5.x or earlier on systems with an 80386. - -20041110: - We have had a hack which would mount the root filesystem - R/W if the device were named 'md*'. As part of the vnode - work I'm doing I have had to remove this hack. People - building systems which use preloaded MD root filesystems - may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in - their /etc/rc scripts. - -20041104: - FreeBSD 5.3 shipped here. - -20041102: - The size of struct tcpcb has changed again due to the removal - of RFC1644 T/TCP. You have to recompile userland programs that - read kmem for tcp sockets directly (netstat, sockstat, etc.) - -20041022: - The size of struct tcpcb has changed. You have to recompile - userland programs that read kmem for tcp sockets directly - (netstat, sockstat, etc.) - -20041016: - RELENG_5 branched here. For older entries, please see updating - in the RELENG_5 branch. - COMMON ITEMS: General Notes ------------- - Avoid using make -j when upgrading. From time to time in the - past there have been problems using -j with buildworld and/or - installworld. This is especially true when upgrading between - "distant" versions (eg one that cross a major release boundary - or several minor releases, or when several months have passed - on the -current branch). + Avoid using make -j when upgrading. While generally safe, there are + sometimes problems using -j to upgrade. If your upgrade fails with + -j, please try again wtihout -j. From time to time in the past there + have been problems using -j with buildworld and/or installworld. This + is especially true when upgrading between "distant" versions (eg one + that cross a major release boundary or several minor releases, or when + several months have passed on the -current branch). Sometimes, obscure build problems are the result of environment poisoning. This can happen because the make utility reads its - environment when searching for values for global variables. - To run your build attempts in an "environmental clean room", - prefix all make commands with 'env -i '. See the env(1) manual *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 17:07:19 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED671106568F for ; Thu, 3 Sep 2009 17:07:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 950328FC18 for ; Thu, 3 Sep 2009 17:07:19 +0000 (UTC) Received: (qmail 5810 invoked by uid 399); 3 Sep 2009 17:07:15 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 3 Sep 2009 17:07:15 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A9FF7BD.30104@FreeBSD.org> Date: Thu, 03 Sep 2009 10:07:09 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Anonymous References: <200909010555.n815tAkx050140@svn.freebsd.org> <4A9D4A90.30700@FreeBSD.org> <20090902092054.Q27429@mp2.macomnet.net> <4A9E7718.1080503@andric.com> <86hbvli9tg.fsf@gmail.com> In-Reply-To: <86hbvli9tg.fsf@gmail.com> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, Ruslan Ermilov , svn-src-head@FreeBSD.ORG, Dimitry Andric , Maxim Konovalov Subject: Re: svn commit: r196727 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 17:07:20 -0000 Anonymous wrote: > Dimitry Andric writes: > >> On 2009-09-02 07:21, Maxim Konovalov wrote: >>>> Unless I'm missing something this should be in the src.conf man page >>>> instead of make.conf. >>> Please explain why. >> make.conf(5): >> The file make.conf contains system-wide settings that will apply to every >> build using make(1) and the standard sys.mk file. >> >> src.conf(5): >> The src.conf file contains settings that will apply to every build >> involving the FreeBSD source tree; see build(7). >> >> The MALLOC_PRODUCTION define is used inside the FreeBSD source tree >> (actually only in jemalloc, it seems). >> >> You most likely don't want it to apply 'globally', since third-party >> programs (e.g. ports) might give a totally different meaning to this >> define -- or most likely: no meaning at all. :) > > Don't you think this affects not only MALLOC_PRODUCTION but all defines > under sections "BUILDING THE KERNEL" and "BUILDING THE WORLD"? Yes, those should probably be moved as well. I've cc'ed Ruslan since he's really taken the lead on the src.conf stuff. > For example, WITHOUT_MODULES conflicts with one in archivers/p7zip. Good point. You should probably bring that to the attention of the port's maintainer. Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 17:12:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57E2F106566C; Thu, 3 Sep 2009 17:12:46 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4619E8FC1B; Thu, 3 Sep 2009 17:12: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 n83HCkk3039425; Thu, 3 Sep 2009 17:12:46 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83HCkCT039422; Thu, 3 Sep 2009 17:12:46 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909031712.n83HCkCT039422@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 3 Sep 2009 17:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196790 - head/share/mklocale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 17:12:46 -0000 Author: ache Date: Thu Sep 3 17:12:45 2009 New Revision: 196790 URL: http://svn.freebsd.org/changeset/base/196790 Log: Add lv_LV, move lt_LT to common part Added: head/share/mklocale/la_LN.ISO8859-13.src - copied unchanged from r196789, head/share/mklocale/lt_LT.ISO8859-13.src Deleted: head/share/mklocale/lt_LT.ISO8859-13.src Modified: head/share/mklocale/Makefile Modified: head/share/mklocale/Makefile ============================================================================== --- head/share/mklocale/Makefile Thu Sep 3 17:04:42 2009 (r196789) +++ head/share/mklocale/Makefile Thu Sep 3 17:12:45 2009 (r196790) @@ -13,11 +13,11 @@ LOCALES= UTF-8 \ ko_KR.CP949 \ ko_KR.eucKR \ la_LN.ISO8859-1 \ + la_LN.ISO8859-13 \ la_LN.ISO8859-15 \ la_LN.ISO8859-2 \ la_LN.ISO8859-4 \ la_LN.US-ASCII \ - lt_LT.ISO8859-13 \ ru_RU.CP866 \ ru_RU.ISO8859-5 \ ru_RU.KOI8-R \ @@ -47,7 +47,7 @@ FILESDIR_${locale}.out= ${LOCALEDIR}/${l CLEANFILES= ${FILES} ENCODINGS= CP1251 ISO8859-1 ISO8859-2 ISO8859-4 ISO8859-5 \ - ISO8859-15 US-ASCII UTF-8 + ISO8859-13 ISO8859-15 US-ASCII UTF-8 ASCIILINKS= en_AU en_CA en_GB en_NZ en_US US-ASCII_US-ASCII= ${ASCIILINKS:C/^/la_LN:/} @@ -71,6 +71,9 @@ ISO8859-4_ISO8859-4= ${LATIN4LINKS:C/^/l LATIN5LINKS= sr_YU uk_UA be_BY ISO8859-5_ISO8859-5= ${LATIN5LINKS:C/^/ru_RU:/} +LATIN13LINKS= lt_LT lv_LV +ISO8859-13_ISO8859-13= ${LATIN13LINKS:C/^/la_LN:/} + CP1251LINKS= ru_RU be_BY uk_UA CP1251_CP1251= ${CP1251LINKS:C/^/bg_BG:/} @@ -79,7 +82,7 @@ UTF8LINKS= af_ZA be_BY bg_BG ca_AD ca_ES en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE eu_ES fi_FI \ fr_BE \ fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM is_IS it_CH it_IT \ - ja_JP kk_KZ ko_KR lt_LT mn_MN \ + ja_JP kk_KZ ko_KR lt_LT lv_LV mn_MN \ nb_NO nl_BE nl_NL nn_NO no_NO pl_PL pt_BR pt_PT \ ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR uk_UA zh_CN zh_HK \ zh_TW Copied: head/share/mklocale/la_LN.ISO8859-13.src (from r196789, head/share/mklocale/lt_LT.ISO8859-13.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mklocale/la_LN.ISO8859-13.src Thu Sep 3 17:12:45 2009 (r196790, copy of r196789, head/share/mklocale/lt_LT.ISO8859-13.src) @@ -0,0 +1,49 @@ +/* + * LOCALE_CTYPE for the iso_8859_13 Locale + * + * $FreeBSD$ + */ + +ENCODING "NONE" +VARIABLE ISO 8859-13 Latin-7 character set + +# +# This is a comment +# +ALPHA 'A' - 'Z' 'a' - 'z' +ALPHA 0xaa 0xba 0xc0 - 0xd6 0xd8 - 0xde 0xe0 - 0xf6 0xf8 - 0xfe +CONTROL 0x00 - 0x1f 0x7f - 0x9f +DIGIT '0' - '9' +GRAPH 0x21 - 0x7e 0xa1 - 0xff +LOWER 'a' - 'z' +LOWER 0xba 0xdf - 0xf6 0xf8 - 0xfe +PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e +PUNCT 0xa1 - 0xa9 0xab - 0xb9 0xbb -0xbf 0xd7 0xdf 0xf7 0xff +SPACE 0x09 - 0x0d 0x20 0xa0 +UPPER 'A' - 'Z' +UPPER 0xaa 0xc0 - 0xd6 0xd8 - 0xde +XDIGIT '0' - '9' 'a' - 'f' 'A' - 'F' +BLANK ' ' '\t' 0xa0 +PRINT 0x20 - 0x7e 0xa0 - 0xff + +MAPLOWER <'A' - 'Z' : 'a'> +MAPLOWER <'a' - 'z' : 'a'> +MAPLOWER <0xaa 0xba> +MAPLOWER <0xba 0xba> +MAPLOWER <0xc0 - 0xd6 : 0xe0> +MAPLOWER <0xd8 - 0xde : 0xf8> +MAPLOWER <0xe0 - 0xf6 : 0xe0> +MAPLOWER <0xf8 - 0xfe : 0xf8> + +MAPUPPER <'A' - 'Z' : 'A'> +MAPUPPER <'a' - 'z' : 'A'> +MAPUPPER <0xaa 0xaa> +MAPUPPER <0xba 0xaa> +MAPUPPER <0xc0 - 0xd6 : 0xc0> +MAPUPPER <0xd8 - 0xdf : 0xd8> +MAPUPPER <0xe0 - 0xf6 : 0xc0> +MAPUPPER <0xf8 - 0xfe : 0xd8> + +TODIGIT <'0' - '9' : 0> +TODIGIT <'A' - 'F' : 10> +TODIGIT <'a' - 'f' : 10> From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 17:13:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C49CB1065672; Thu, 3 Sep 2009 17:13:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B39788FC19; Thu, 3 Sep 2009 17:13:54 +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 n83HDs1K039489; Thu, 3 Sep 2009 17:13:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83HDsFc039487; Thu, 3 Sep 2009 17:13:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200909031713.n83HDsFc039487@svn.freebsd.org> From: Warner Losh Date: Thu, 3 Sep 2009 17:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196791 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 17:13:54 -0000 Author: imp Date: Thu Sep 3 17:13:54 2009 New Revision: 196791 URL: http://svn.freebsd.org/changeset/base/196791 Log: Actually, stable/8 is what was created... Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Sep 3 17:12:45 2009 (r196790) +++ head/UPDATING Thu Sep 3 17:13:54 2009 (r196791) @@ -28,7 +28,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. maintain stop_cpus() to just use a normal IPI_STOP on ia32 and amd64. 20090803: - RELENG_8 branched. + stable/8 branch created in subversion. 20090719: Bump the shared library version numbers for all libraries that do not From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 17:37:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B041A106568B; Thu, 3 Sep 2009 17:37:23 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8108FC24; Thu, 3 Sep 2009 17:37: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 n83HbNHS040049; Thu, 3 Sep 2009 17:37:23 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83HbNYr040047; Thu, 3 Sep 2009 17:37:23 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909031737.n83HbNYr040047@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 3 Sep 2009 17:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196792 - head/share/numericdef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 17:37:23 -0000 Author: ache Date: Thu Sep 3 17:37:23 2009 New Revision: 196792 URL: http://svn.freebsd.org/changeset/base/196792 Log: Add lv_LV Modified: head/share/numericdef/Makefile Modified: head/share/numericdef/Makefile ============================================================================== --- head/share/numericdef/Makefile Thu Sep 3 17:13:54 2009 (r196791) +++ head/share/numericdef/Makefile Thu Sep 3 17:37:23 2009 (r196792) @@ -107,7 +107,8 @@ ISO8859-5_CP1251= uk_UA ISO8859-7_UTF-8= el_GR ISO8859-9_UTF-8= tr_TR ISO8859-13_ISO8859-4= lt_LT -ISO8859-13_UTF-8= lt_LT +ISO8859-13_ISO8859-13= lt_LT:lv_LV +ISO8859-13_UTF-8= lt_LT lt_LT:lv_LV ISO8859-15_UTF-8= et_EE KOI8-R_CP1251= ru_RU KOI8-R_CP866= ru_RU From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 17:38:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F2801065693; Thu, 3 Sep 2009 17:38:08 +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 9FD3D8FC2E; Thu, 3 Sep 2009 17:38:07 +0000 (UTC) Received: by ewy4 with SMTP id 4so147605ewy.36 for ; Thu, 03 Sep 2009 10:38:06 -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=AOeaKyZUL6WLPgseCelL2Vung470mrNHW8zMD3l1930=; b=N4qeNc4viqpD4XcZVjGOquqqhMc/qGX8nLyNSlDFGAhtnkwQ/cYp8q5lxD4mrvP75Y Hx/6EnDeJXXqu862Ot/vJts3eeifVCYqH/RNyehJJNAZpT0u5IG7LhXEm2ypAaB3r/pV rxr8wLu5qCBC+vfRzvoTCLdoVALl2/f98m3Tc= 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=CXIHhPgBMpSlMVLVanWSYfok24EY1ZRQkjcc55Ks0b1jqM8uELgCPwX+fe/+PElA9+ IAIKmovMsqbXlewzCMbZhWA9sNPtRiNbs79U28H8bKkPpw3xkS3eozBDRjyZ6bD59cG+ KlqZuFMzllU7sxihdK1xw8hGD1mZJ1tFUCano= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.90.6 with SMTP id d6mr577632wef.95.1251999486092; Thu, 03 Sep 2009 10:38:06 -0700 (PDT) In-Reply-To: <20090903095224.N20031@pooker.samsco.org> References: <200909031237.n83CbIgk032551@svn.freebsd.org> <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> <4A9FD8B4.2080605@FreeBSD.org> <20090903095224.N20031@pooker.samsco.org> From: Ivan Voras Date: Thu, 3 Sep 2009 19:37:46 +0200 X-Google-Sender-Auth: 6ab0e7c9b196fb06 Message-ID: <9bbcef730909031037y4aecd692t4812718b1fd7e78e@mail.gmail.com> To: Scott Long Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 17:38:08 -0000 2009/9/3 Scott Long : > On Thu, 3 Sep 2009, Alexander Motin wrote: >> It would be nice if every level would do it's own job. > > It's the job of the driver to handle the limitations of the hardware, yes= . > Again, if you want to experiment with pushing this functionality into GEO= M, > be my guest. =C2=A0But until then, consider following my advice. Speaking as an user who goes "huh, well" every time he sees a RAID card with a GB of cache talking to the OS in 64 kB chunks, eventually removing this limitation seems a Nice Thing to Have. I don't know how things look at the driver side, but GEOM by itself has no problems passing around requests of at least "long" in length. Specifically, it cares about struct bio, where bio_bcount is a "long" and bio_length and bio_completed are off_t. So, ssize_t looks ok as a high boundary. There was a time (apparently much of it was a bug in reporting and is now fixed :( ) when MAXPHYS could be manually redefined to be 256K or more and iostat would nicely state the higher value. I think the concern raised at the topic was that it doesn't play nice with bufcache, and I think the specific problem was possible out-of-memory situations. Now that kernel limits on AMD64 are much increased (to values not longer fitting in uint32_t) I wonder if the problem is so serious? I also remember BSDCan 2008: http://wiki.freebsd.org/Buf0x :) --=20 f+rEnSIBITAhITAhLR1nM9F4cIs5KJrhbcsVtUIt7K1MhWJy1A=3D=3D From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 17:51:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 554ED106568B; Thu, 3 Sep 2009 17:51:00 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id EEA558FC1A; Thu, 3 Sep 2009 17:50:59 +0000 (UTC) Received: from pooker.samsco.home (pooker.samsco.home [192.168.254.1]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n83HotjS089466; Thu, 3 Sep 2009 11:50:55 -0600 (MDT) (envelope-from scottl@samsco.org) Date: Thu, 3 Sep 2009 11:50:55 -0600 (MDT) From: Scott Long To: Ivan Voras In-Reply-To: <9bbcef730909031037y4aecd692t4812718b1fd7e78e@mail.gmail.com> Message-ID: <20090903114121.C20031@pooker.samsco.org> References: <200909031237.n83CbIgk032551@svn.freebsd.org> <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> <4A9FD8B4.2080605@FreeBSD.org> <20090903095224.N20031@pooker.samsco.org> <9bbcef730909031037y4aecd692t4812718b1fd7e78e@mail.gmail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-282202799-1252000255=:20031" X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 17:51:00 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-282202799-1252000255=:20031 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 3 Sep 2009, Ivan Voras wrote: > 2009/9/3 Scott Long : >> On Thu, 3 Sep 2009, Alexander Motin wrote: > >>> It would be nice if every level would do it's own job. >> >> It's the job of the driver to handle the limitations of the hardware, ye= s. >> Again, if you want to experiment with pushing this functionality into GE= OM, >> be my guest. =C2=A0But until then, consider following my advice. > > Speaking as an user who goes "huh, well" every time he sees a RAID > card with a GB of cache talking to the OS in 64 kB chunks, eventually > removing this limitation seems a Nice Thing to Have. > > I don't know how things look at the driver side, but GEOM by itself > has no problems passing around requests of at least "long" in length. > Specifically, it cares about struct bio, where bio_bcount is a "long" > and bio_length and bio_completed are off_t. So, ssize_t looks ok as a > high boundary. > > There was a time (apparently much of it was a bug in reporting and is > now fixed :( ) when MAXPHYS could be manually redefined to be 256K or > more and iostat would nicely state the higher value. I think the > concern raised at the topic was that it doesn't play nice with > bufcache, and I think the specific problem was possible out-of-memory > situations. Now that kernel limits on AMD64 are much increased (to > values not longer fitting in uint32_t) I wonder if the problem is so > serious? > The problem is lack of kernel address space, not lack of RAM, but that's=20 just semantics in this discussion. I've tested with increasing MAXPHYS in= =20 increments to 1M. Performance increases logrithmically, and effectively=20 hits a max at 512K for the variety of controllers that I tested. The gain= =20 from 64K to 128K is huge, the gain from 128K to 256K is ok, the gain from= =20 256k to 512k is measurable but less significant, and the gain from 512k to= =20 1m is almost not measurable. I have simple patches to increase MAXPHYS. The introduction of the the=20 maxio paramter in the CAM SIM interface is there in preparation for this.= =20 However, a _LOT_LOT_LOT_ of drivers in the tree falsely assume that=20 MAXPHYS and DEFLTPHYS are 128k and 64k respectively, and size their data=20 structures accordingly. Changing these values will cause the drivers to=20 fail in bad ways. So an audit needs to be done. Also, MAXPHYS is abused= =20 by the swapper in the struct-buf, so that needs to be reviewed as well. Even though kernel address space is less restricted on 64bit platforms,=20 it's still not free and limitless. Large I/O's requires more work in the= =20 VM to assign address space, and in turn causes more lock contention. I=20 haven't done any practical measurements of this on common workloads, but I= =20 can anecdotally say that I see increased lock contention from it in=20 locking profiles. If FreeBSD wants to seriously increase MAXPHYS, this=20 needs to be looked at and either proven to not be important, or fixed. Scott --0-282202799-1252000255=:20031-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 18:38:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 510E01065670; Thu, 3 Sep 2009 18:38:41 +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 21FEF8FC0A; Thu, 3 Sep 2009 18:38:41 +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 B3D3F46B29; Thu, 3 Sep 2009 14:38:40 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1D6558A043; Thu, 3 Sep 2009 14:38:40 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Thu, 3 Sep 2009 13:56:51 -0400 User-Agent: KMail/1.9.7 References: <200909031713.n83HDsFc039487@svn.freebsd.org> In-Reply-To: <200909031713.n83HDsFc039487@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909031356.52226.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 03 Sep 2009 14:38:40 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 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-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196791 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 18:38:41 -0000 On Thursday 03 September 2009 1:13:54 pm Warner Losh wrote: > Author: imp > Date: Thu Sep 3 17:13:54 2009 > New Revision: 196791 > URL: http://svn.freebsd.org/changeset/base/196791 > > Log: > Actually, stable/8 is what was created... Technically both were done: RELENG_8 in CVS and stable/8 in SVN. That said, it is probably better to document SVN rather than CVS going forward. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 19:02:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17394106566B; Thu, 3 Sep 2009 19:02:18 +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 059278FC15; Thu, 3 Sep 2009 19:02: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 n83J2HiJ042130; Thu, 3 Sep 2009 19:02:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83J2HZC042128; Thu, 3 Sep 2009 19:02:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200909031902.n83J2HZC042128@svn.freebsd.org> From: Alexander Motin Date: Thu, 3 Sep 2009 19:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196796 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 19:02:18 -0000 Author: mav Date: Thu Sep 3 19:02:17 2009 New Revision: 196796 URL: http://svn.freebsd.org/changeset/base/196796 Log: Round maxio for ATI SB600 to 64K. Submitted by: scottl@ Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu Sep 3 18:27:55 2009 (r196795) +++ head/sys/dev/ahci/ahci.c Thu Sep 3 19:02:17 2009 (r196796) @@ -1944,7 +1944,7 @@ ahciaction(struct cam_sim *sim, union cc cpi->maxio = MAXPHYS; /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ if (pci_get_devid(device_get_parent(dev)) == 0x43801002) - cpi->maxio = min(cpi->maxio, 255 * 512); + cpi->maxio = min(cpi->maxio, 128 * 512); cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 19:15:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 733971065670; Thu, 3 Sep 2009 19:15:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id E25B38FC14; Thu, 3 Sep 2009 19:15:54 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n83JFniC014658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Sep 2009 22:15:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n83JFnic035002; Thu, 3 Sep 2009 22:15:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n83JFnoh035001; Thu, 3 Sep 2009 22:15:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Sep 2009 22:15:48 +0300 From: Kostik Belousov To: Attilio Rao Message-ID: <20090903191548.GJ1881@deviant.kiev.zoral.com.ua> References: <200909031340.n83Defkv034013@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kLVHNs1Bw8OEK8QD" Content-Disposition: inline In-Reply-To: <200909031340.n83Defkv034013@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196779 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 19:15:55 -0000 --kLVHNs1Bw8OEK8QD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 03, 2009 at 01:40:41PM +0000, Attilio Rao wrote: > Author: attilio > Date: Thu Sep 3 13:40:41 2009 > New Revision: 196779 > URL: http://svn.freebsd.org/changeset/base/196779 >=20 > Log: > Add intermediate states for attaching and detaching that will be > reused by the enhached newbus locking once it is checked in. > This change can be easilly MFCed to STABLE_8 at the appropriate moment. > =20 > Reviewed by: jhb, scottl > Tested by: Giovanni Trematerra >=20 =2E... > Modified: head/sys/sys/bus.h > =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 > --- head/sys/sys/bus.h Thu Sep 3 12:41:00 2009 (r196778) > +++ head/sys/sys/bus.h Thu Sep 3 13:40:41 2009 (r196779) > @@ -52,8 +52,11 @@ struct u_businfo { > typedef enum device_state { > DS_NOTPRESENT, /**< @brief not probed or probe failed */ > DS_ALIVE, /**< @brief probe succeeded */ > + DS_ATTACHING, /**< @brief attaching is in progress */ > DS_ATTACHED, /**< @brief attach method called */ > - DS_BUSY /**< @brief device is open */ > + DS_BUSY, /**< @brief device is open */ > + DS_DETACHING /**< @brief detaching is in progress */ > + > } device_state_t; Since device_state_t is exposed to consumers and started to be modified, would it make sense to add explicit values for enumeration members, with enough gap in between ? It seems to give more freedom for newbus locking work with regard to backward-compatible ABI changes. --kLVHNs1Bw8OEK8QD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqgFeQACgkQC3+MBN1Mb4gZkACgkT0igWmErBrn5RWj3PWwB4fb eA4An1KDW5QAwjVRhGr2w9PMaMge2LXQ =2xZu -----END PGP SIGNATURE----- --kLVHNs1Bw8OEK8QD-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 19:45:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B7A7106566C; Thu, 3 Sep 2009 19:45:29 +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 3A0398FC14; Thu, 3 Sep 2009 19:45:27 +0000 (UTC) Received: by ewy4 with SMTP id 4so262839ewy.36 for ; Thu, 03 Sep 2009 12:45:27 -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=igxB8U5ZDSnbf4nvW1GwYh39JxjG/iUZTdY5CNQg38w=; b=DG48w1l3CB/xu34BKgxNSlrl2OKrp4vS1U33H/ge1rRJbp4abx6D0WUL1HXuPJXBZO LFrgJx+9ZOgteFZSArIKV8FNw08yXyrmgWGreA7z30A1epyMwsizRcEu8Fie2NZNZKuH g0EWRN8cgNvAOOdcZGv6Ri5En8jpKsHVHEEjU= 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=RC6uixJRa+RvL09/C+8Pm0SjAm6kOIr//5GkmCXVtkaMVxWTTuohboI3x39rXTaoUC 9H1eL3ZMs6qh2VJzRK54aq+11r3nckF1/G7K/MBJOtuoRhnIV6yo4fyoOpEJbVrm0xgt Tg0rzldSzRLLZvqGoIgdFOP3SyTYb2tV0QAPQ= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.7.67 with SMTP id 45mr592161weo.95.1252007127089; Thu, 03 Sep 2009 12:45:27 -0700 (PDT) In-Reply-To: <20090903114121.C20031@pooker.samsco.org> References: <200909031237.n83CbIgk032551@svn.freebsd.org> <1872D962-9297-4C45-9F73-4BB823C49D74@samsco.org> <4A9FD8B4.2080605@FreeBSD.org> <20090903095224.N20031@pooker.samsco.org> <9bbcef730909031037y4aecd692t4812718b1fd7e78e@mail.gmail.com> <20090903114121.C20031@pooker.samsco.org> From: Ivan Voras Date: Thu, 3 Sep 2009 21:45:07 +0200 X-Google-Sender-Auth: 185079f3d5a3088a Message-ID: <9bbcef730909031245o7c380925sd29b2cc976c4d7dd@mail.gmail.com> To: Scott Long Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 19:45:29 -0000 2009/9/3 Scott Long : > The problem is lack of kernel address space, not lack of RAM, but that's Yes. > just semantics in this discussion. =C2=A0I've tested with increasing MAXP= HYS in > increments to 1M. =C2=A0Performance increases logrithmically, and effecti= vely > hits a max at 512K for the variety of controllers that I tested. =C2=A0Th= e gain > from 64K to 128K is huge, the gain from 128K to 256K is ok, the gain from > 256k to 512k is measurable but less significant, and the gain from 512k t= o > 1m is almost not measurable. >From what I've seen with iostat, all machines I can currently test (SATA, various SCSI-like RAID, QLogic FC HBA), 64 k is the maximum transfer size, which I assume is DFLTPHYS. From your tests it's apparent it is suboptimal... > I have simple patches to increase MAXPHYS. =C2=A0The introduction of the = the > maxio paramter in the CAM SIM interface is there in preparation for this. > However, a _LOT_LOT_LOT_ of drivers in the tree falsely assume that MAXPH= YS > and DEFLTPHYS are 128k and 64k respectively, and size their data structur= es > accordingly. =C2=A0Changing these values will cause the drivers to fail i= n bad > ways. =C2=A0So an audit needs to be done. =C2=A0Also, MAXPHYS is abused b= y the swapper > in the struct-buf, so that needs to be reviewed as well. Since GEOM is ok with it, couldn't a migration path be to introduce a new tunable, something like LARGE_MAXPHYS (or to rename it completely to MAX_IO) or whatever and use it (after reviewing cases of abuses) in new and better maintained drivers? If the new size is larger than the old one, maybe the maximum damage would be a little bit of wasted space now and then? I can test mostly ciss and mfi. I see mfi uses it in one place that looks kind of logical: 334 /* 335 * Get information needed for sizing the contiguous memory for= the 336 * frame pool. Size down the sgl parameter since we know that 337 * we will never need more than what's required for MAXPHYS. 338 * It would be nice if these constants were available at runti= me 339 * instead of compile time. 340 */ 341 status =3D sc->mfi_read_fw_status(sc); 342 sc->mfi_max_fw_cmds =3D status & MFI_FWSTATE_MAXCMD_MASK; 343 max_fw_sge =3D (status & MFI_FWSTATE_MAXSGL_MASK) >> 16; 344 sc->mfi_max_sge =3D min(max_fw_sge, ((MAXPHYS / PAGE_SIZE) + 1= )); But ciss doesn't reference it at all so either it deviously assumes it or is independent of it. > Even though kernel address space is less restricted on 64bit platforms, i= t's > still not free and limitless. =C2=A0Large I/O's requires more work in the= VM to > assign address space, and in turn causes more lock contention. =C2=A0I ha= ven't > done any practical measurements of this on common workloads, but I can > anecdotally say that I see increased lock contention from it in locking > profiles. =C2=A0If FreeBSD wants to seriously increase MAXPHYS, this need= s to be > looked at and either proven to not be important, or fixed. I think the major benefits would be for the server-side crowd using RAID modes with some kind of striping. --=20 f+rEnSIBITAhITAhLR1nM9F4cIs5KJrhbcsVtUIt7K1MhWJy1A=3D=3D From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 20:10:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28FF21065672; Thu, 3 Sep 2009 20:10:01 +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 E625A8FC17; Thu, 3 Sep 2009 20:10: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 7FA9046B03; Thu, 3 Sep 2009 16:10:00 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 9623A8A043; Thu, 3 Sep 2009 16:09:59 -0400 (EDT) From: John Baldwin To: Ivan Voras Date: Thu, 3 Sep 2009 16:02:00 -0400 User-Agent: KMail/1.9.7 References: <200909031237.n83CbIgk032551@svn.freebsd.org> <20090903114121.C20031@pooker.samsco.org> <9bbcef730909031245o7c380925sd29b2cc976c4d7dd@mail.gmail.com> In-Reply-To: <9bbcef730909031245o7c380925sd29b2cc976c4d7dd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909031602.01222.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 03 Sep 2009 16:09:59 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 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-head@freebsd.org, svn-src-all@freebsd.org, Scott Long , src-committers@freebsd.org, Alexander Motin Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 20:10:01 -0000 On Thursday 03 September 2009 3:45:07 pm Ivan Voras wrote: > But ciss doesn't reference it at all so either it deviously assumes it > or is independent of it. Actually, it may be much worse, it may be that the author of ciss(4) new that ciss(4)'s largest supported I/O size was larger than 128k so they didn't bother handling the limit at all giving the false impression the hardware has no limit. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 20:26:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 334271065670; Thu, 3 Sep 2009 20:26:05 +0000 (UTC) (envelope-from zec@icir.org) Received: from labs3.cc.fer.hr (labs3.cc.fer.hr [161.53.72.21]) by mx1.freebsd.org (Postfix) with ESMTP id C25098FC1A; Thu, 3 Sep 2009 20:26:04 +0000 (UTC) Received: from sluga.fer.hr (sluga.cc.fer.hr [161.53.72.14]) by labs3.cc.fer.hr (8.13.8+Sun/8.12.10) with ESMTP id n83KPv2U012020; Thu, 3 Sep 2009 22:26:03 +0200 (CEST) Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Sep 2009 22:25:56 +0200 From: Marko Zec To: "Jung-uk Kim" Date: Thu, 3 Sep 2009 22:25:49 +0200 User-Agent: KMail/1.9.10 References: <200909021602.n82G2mpE000812@svn.freebsd.org> In-Reply-To: <200909021602.n82G2mpE000812@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909032225.50210.zec@icir.org> X-OriginalArrivalTime: 03 Sep 2009 20:25:56.0760 (UTC) FILETIME=[BE1AD980:01CA2CD4] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196769 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 20:26:05 -0000 On Wednesday 02 September 2009 18:02:48 Jung-uk Kim wrote: > Author: jkim > Date: Wed Sep 2 16:02:48 2009 > New Revision: 196769 > URL: http://svn.freebsd.org/changeset/base/196769 > > Log: > - Work around ACPI mode transition problem for recent NVIDIA 9400M > chipset based Intel Macs. Since r189055, these platforms started freezing > when ACPI is being initialized for unknown reason. For these platforms, we > just use the old PAT layout. Note this change is not enough to boot fully > on these platforms because of other problems but it makes debugging > possible. Note MacBook5,2 may be affected as well but it was not added here > because of lack of hardware to test. > - Initialize PAT MSR fully instead of reading and modifying it for > safety. Perhaps I'm missing something, but I fail to understand what is the purpose / use of variable pat_tested here? Marko > Reported by: rpaulo, hps, Eygene Ryabinkin (rea-fbsd at codelabs dot ru) > Reviewed by: jhb > > Modified: > head/sys/amd64/amd64/pmap.c > head/sys/i386/i386/pmap.c > > Modified: head/sys/amd64/amd64/pmap.c > =========================================================================== >=== --- head/sys/amd64/amd64/pmap.c Wed Sep 2 14:56:23 2009 (r196768) +++ > head/sys/amd64/amd64/pmap.c Wed Sep 2 16:02:48 2009 (r196769) @@ -178,6 > +178,8 @@ static vm_paddr_t dmaplimit; > vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS; > pt_entry_t pg_nx; > > +static int pat_works = 0; /* Is page attribute table sane? */ > + > SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); > > static int pg_ps_enabled = 1; > @@ -590,20 +592,56 @@ void > pmap_init_pat(void) > { > uint64_t pat_msr; > + char *sysenv; > + static int pat_tested = 0; > > /* Bail if this CPU doesn't implement PAT. */ > if (!(cpu_feature & CPUID_PAT)) > panic("no PAT??"); > > /* > - * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. > - * Program 4 and 5 as WP and WC. > - * Leave 6 and 7 as UC and UC-. > - */ > - pat_msr = rdmsr(MSR_PAT); > - pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); > - pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | > - PAT_VALUE(5, PAT_WRITE_COMBINING); > + * Some Apple Macs based on nVidia chipsets cannot enter ACPI mode > + * via SMI# when we use upper 4 PAT entries for unknown reason. > + */ > + if (!pat_tested) { > + pat_works = 1; > + sysenv = getenv("smbios.system.product"); > + if (sysenv != NULL) { > + if (strncmp(sysenv, "MacBook5,1", 10) == 0 || > + strncmp(sysenv, "MacBookPro5,5", 13) == 0 || > + strncmp(sysenv, "Macmini3,1", 10) == 0) > + pat_works = 0; > + freeenv(sysenv); > + } > + pat_tested = 1; > + } > + > + /* Initialize default PAT entries. */ > + pat_msr = PAT_VALUE(0, PAT_WRITE_BACK) | > + PAT_VALUE(1, PAT_WRITE_THROUGH) | > + PAT_VALUE(2, PAT_UNCACHED) | > + PAT_VALUE(3, PAT_UNCACHEABLE) | > + PAT_VALUE(4, PAT_WRITE_BACK) | > + PAT_VALUE(5, PAT_WRITE_THROUGH) | > + PAT_VALUE(6, PAT_UNCACHED) | > + PAT_VALUE(7, PAT_UNCACHEABLE); > + > + if (pat_works) { > + /* > + * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. > + * Program 4 and 5 as WP and WC. > + * Leave 6 and 7 as UC and UC-. > + */ > + pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); > + pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | > + PAT_VALUE(5, PAT_WRITE_COMBINING); > + } else { > + /* > + * Just replace PAT Index 2 with WC instead of UC-. > + */ > + pat_msr &= ~PAT_MASK(2); > + pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); > + } > wrmsr(MSR_PAT, pat_msr); > } > > @@ -754,27 +792,48 @@ pmap_cache_bits(int mode, boolean_t is_p > pat_flag = is_pde ? PG_PDE_PAT : PG_PTE_PAT; > > /* Map the caching mode to a PAT index. */ > - switch (mode) { > - case PAT_UNCACHEABLE: > - pat_index = 3; > - break; > - case PAT_WRITE_THROUGH: > - pat_index = 1; > - break; > - case PAT_WRITE_BACK: > - pat_index = 0; > - break; > - case PAT_UNCACHED: > - pat_index = 2; > - break; > - case PAT_WRITE_COMBINING: > - pat_index = 5; > - break; > - case PAT_WRITE_PROTECTED: > - pat_index = 4; > - break; > - default: > - panic("Unknown caching mode %d\n", mode); > + if (pat_works) { > + switch (mode) { > + case PAT_UNCACHEABLE: > + pat_index = 3; > + break; > + case PAT_WRITE_THROUGH: > + pat_index = 1; > + break; > + case PAT_WRITE_BACK: > + pat_index = 0; > + break; > + case PAT_UNCACHED: > + pat_index = 2; > + break; > + case PAT_WRITE_COMBINING: > + pat_index = 5; > + break; > + case PAT_WRITE_PROTECTED: > + pat_index = 4; > + break; > + default: > + panic("Unknown caching mode %d\n", mode); > + } > + } else { > + switch (mode) { > + case PAT_UNCACHED: > + case PAT_UNCACHEABLE: > + case PAT_WRITE_PROTECTED: > + pat_index = 3; > + break; > + case PAT_WRITE_THROUGH: > + pat_index = 1; > + break; > + case PAT_WRITE_BACK: > + pat_index = 0; > + break; > + case PAT_WRITE_COMBINING: > + pat_index = 2; > + break; > + default: > + panic("Unknown caching mode %d\n", mode); > + } > } > > /* Map the 3-bit index value into the PAT, PCD, and PWT bits. */ > > Modified: head/sys/i386/i386/pmap.c > =========================================================================== >=== --- head/sys/i386/i386/pmap.c Wed Sep 2 14:56:23 2009 (r196768) > +++ head/sys/i386/i386/pmap.c Wed Sep 2 16:02:48 2009 (r196769) > @@ -212,7 +212,7 @@ pt_entry_t pg_nx; > static uma_zone_t pdptzone; > #endif > > -static int pat_works; /* Is page attribute table sane? */ > +static int pat_works = 0; /* Is page attribute table sane? */ > > SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); > > @@ -478,40 +478,69 @@ void > pmap_init_pat(void) > { > uint64_t pat_msr; > + char *sysenv; > + static int pat_tested = 0; > > /* Bail if this CPU doesn't implement PAT. */ > if (!(cpu_feature & CPUID_PAT)) > return; > > - if (cpu_vendor_id != CPU_VENDOR_INTEL || > - (I386_CPU_FAMILY(cpu_id) == 6 && I386_CPU_MODEL(cpu_id) >= 0xe)) { > + /* > + * Due to some Intel errata, we can only safely use the lower 4 > + * PAT entries. > + * > + * Intel Pentium III Processor Specification Update > + * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B > + * or Mode C Paging) > + * > + * Intel Pentium IV Processor Specification Update > + * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) > + * > + * Some Apple Macs based on nVidia chipsets cannot enter ACPI mode > + * via SMI# when we use upper 4 PAT entries for unknown reason. > + */ > + if (!pat_tested) { > + if (cpu_vendor_id != CPU_VENDOR_INTEL || > + (I386_CPU_FAMILY(cpu_id) == 6 && > + I386_CPU_MODEL(cpu_id) >= 0xe)) { > + pat_works = 1; > + sysenv = getenv("smbios.system.product"); > + if (sysenv != NULL) { > + if (strncmp(sysenv, "MacBook5,1", 10) == 0 || > + strncmp(sysenv, "MacBookPro5,5", 13) == 0 || > + strncmp(sysenv, "Macmini3,1", 10) == 0) > + pat_works = 0; > + freeenv(sysenv); > + } > + } > + pat_tested = 1; > + } > + > + /* Initialize default PAT entries. */ > + pat_msr = PAT_VALUE(0, PAT_WRITE_BACK) | > + PAT_VALUE(1, PAT_WRITE_THROUGH) | > + PAT_VALUE(2, PAT_UNCACHED) | > + PAT_VALUE(3, PAT_UNCACHEABLE) | > + PAT_VALUE(4, PAT_WRITE_BACK) | > + PAT_VALUE(5, PAT_WRITE_THROUGH) | > + PAT_VALUE(6, PAT_UNCACHED) | > + PAT_VALUE(7, PAT_UNCACHEABLE); > + > + if (pat_works) { > /* > * Leave the indices 0-3 at the default of WB, WT, UC, and UC-. > * Program 4 and 5 as WP and WC. > * Leave 6 and 7 as UC and UC-. > */ > - pat_msr = rdmsr(MSR_PAT); > pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5)); > pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) | > PAT_VALUE(5, PAT_WRITE_COMBINING); > - pat_works = 1; > } else { > /* > - * Due to some Intel errata, we can only safely use the lower 4 > - * PAT entries. Thus, just replace PAT Index 2 with WC instead > - * of UC-. > - * > - * Intel Pentium III Processor Specification Update > - * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B > - * or Mode C Paging) > - * > - * Intel Pentium IV Processor Specification Update > - * Errata N46 (PAT Index MSB May Be Calculated Incorrectly) > + * Just replace PAT Index 2 with WC instead of UC-. > */ > - pat_msr = rdmsr(MSR_PAT); > pat_msr &= ~PAT_MASK(2); > pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING); > - pat_works = 0; > } > wrmsr(MSR_PAT, pat_msr); > } From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 20:31:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B96801065696; Thu, 3 Sep 2009 20:31:11 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 65FE58FC1E; Thu, 3 Sep 2009 20:31:11 +0000 (UTC) Received: from [10.104.92.121] (166-205-132-119.mobile.mymmode.com [166.205.132.119] (may be forged)) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n83KUonE090209; Thu, 3 Sep 2009 14:31:00 -0600 (MDT) (envelope-from scottl@samsco.org) References: <200909031237.n83CbIgk032551@svn.freebsd.org> <20090903114121.C20031@pooker.samsco.org> <9bbcef730909031245o7c380925sd29b2cc976c4d7dd@mail.gmail.com> <200909031602.01222.jhb@freebsd.org> Message-Id: From: Scott Long To: John Baldwin In-Reply-To: <200909031602.01222.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7A400) Mime-Version: 1.0 (iPhone Mail 7A400) Date: Thu, 3 Sep 2009 14:28:46 -0600 X-Spam-Status: No, score=-3.5 required=3.8 tests=AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Alexander Motin , "src-committers@freebsd.org" , Ivan Voras Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 20:31:11 -0000 On Sep 3, 2009, at 2:02 PM, John Baldwin wrote: > On Thursday 03 September 2009 3:45:07 pm Ivan Voras wrote: >> But ciss doesn't reference it at all so either it deviously assumes >> it >> or is independent of it. > > Actually, it may be much worse, it may be that the author of ciss(4) > new that > ciss(4)'s largest supported I/O size was larger than 128k so they > didn't > bother handling the limit at all giving the false impression the > hardware has > no limit. You're exactly right. The solution is to do a proper audit and fix the potential problems, not add yet another 1-off flag that avoids doing real work. If you want to help, keep in mind that I need help _generating_ patches, not testing them. I appreciate all of the testing goodwill out there, but analysis and fixing goodwill is needed at this phase. Scott From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 20:52:01 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 3E591106568B; Thu, 3 Sep 2009 20:52:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Marko Zec Date: Thu, 3 Sep 2009 16:51:47 -0400 User-Agent: KMail/1.6.2 References: <200909021602.n82G2mpE000812@svn.freebsd.org> <200909032225.50210.zec@icir.org> In-Reply-To: <200909032225.50210.zec@icir.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200909031651.49575.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196769 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 20:52:01 -0000 On Thursday 03 September 2009 04:25 pm, Marko Zec wrote: > On Wednesday 02 September 2009 18:02:48 Jung-uk Kim wrote: > > Author: jkim > > Date: Wed Sep 2 16:02:48 2009 > > New Revision: 196769 > > URL: http://svn.freebsd.org/changeset/base/196769 > > > > Log: > > - Work around ACPI mode transition problem for recent NVIDIA > > 9400M chipset based Intel Macs. Since r189055, these platforms > > started freezing when ACPI is being initialized for unknown > > reason. For these platforms, we just use the old PAT layout. > > Note this change is not enough to boot fully on these platforms > > because of other problems but it makes debugging possible. Note > > MacBook5,2 may be affected as well but it was not added here > > because of lack of hardware to test. > > - Initialize PAT MSR fully instead of reading and modifying it > > for safety. > > Perhaps I'm missing something, but I fail to understand what is the > purpose / use of variable pat_tested here? Without it, bad things may happen while APs are being initialized in SMP case. Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 21:10:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7141106566B; Thu, 3 Sep 2009 21:10:57 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C45798FC1D; Thu, 3 Sep 2009 21:10: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 n83LAv0k044737; Thu, 3 Sep 2009 21:10:57 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83LAvUF044731; Thu, 3 Sep 2009 21:10:57 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200909032110.n83LAvUF044731@svn.freebsd.org> From: "George V. Neville-Neil" Date: Thu, 3 Sep 2009 21:10:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 21:10:57 -0000 Author: gnn Date: Thu Sep 3 21:10:57 2009 New Revision: 196797 URL: http://svn.freebsd.org/changeset/base/196797 Log: Add ARP statistics to the kernel and netstat. New counters now exist for: requests sent replies sent requests received replies received packets received total packets dropped due to no ARP entry entrys timed out Duplicate IPs seen The new statistics are seen in the netstat command when it is given the -s command line switch. MFC after: 2 weeks In collaboration with: bz Modified: head/sys/net/if_arp.h head/sys/netinet/if_ether.c head/usr.bin/netstat/inet.c head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.h Modified: head/sys/net/if_arp.h ============================================================================== --- head/sys/net/if_arp.h Thu Sep 3 19:02:17 2009 (r196796) +++ head/sys/net/if_arp.h Thu Sep 3 21:10:57 2009 (r196797) @@ -108,6 +108,31 @@ struct arpcom { #define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com)) #define AC2IFP(ac) ((ac)->ac_ifp) -#endif +#endif /* _KERNEL */ + +struct arpstat { + /* Normal things that happen: */ + u_long txrequests; /* # of ARP requests sent by this host. */ + u_long txreplies; /* # of ARP replies sent by this host. */ + u_long rxrequests; /* # of ARP requests received by this host. */ + u_long rxreplies; /* # of ARP replies received by this host. */ + u_long received; /* # of ARP packets received by this host. */ + + u_long arp_spares[4]; /* For either the upper or lower half. */ + /* Abnormal event and error counting: */ + u_long dropped; /* # of packets dropped waiting for a reply. */ + u_long timeouts; /* # of times with entries removed */ + /* due to timeout. */ + u_long dupips; /* # of duplicate IPs detected. */ +}; + +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ +#define ARPSTAT_ADD(name, val) V_arpstat.name += (val) +#define ARPSTAT_SUB(name, val) V_arpstat.name -= (val) +#define ARPSTAT_INC(name) ARPSTAT_ADD(name, 1) +#define ARPSTAT_DEC(name) ARPSTAT_SUB(name, 1) #endif /* !_NET_IF_ARP_H_ */ Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Sep 3 19:02:17 2009 (r196796) +++ head/sys/netinet/if_ether.c Thu Sep 3 21:10:57 2009 (r196797) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); SYSCTL_DECL(_net_link_ether); SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, ""); +SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for * local traffic */ @@ -89,10 +90,12 @@ static VNET_DEFINE(int, arpt_keep) = (20 * minutes */ static VNET_DEFINE(int, arp_maxtries) = 5; static VNET_DEFINE(int, arp_proxyall); +static VNET_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ #define V_arpt_keep VNET(arpt_keep) #define V_arp_maxtries VNET(arp_maxtries) #define V_arp_proxyall VNET(arp_proxyall) +#define V_arpstat VNET(arpstat) SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW, &VNET_NAME(arpt_keep), 0, @@ -107,6 +110,9 @@ SYSCTL_VNET_INT(_net_link_ether_inet, OI SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, &VNET_NAME(arp_proxyall), 0, "Enable proxy ARP for all suitable requests"); +SYSCTL_VNET_STRUCT(_net_link_ether_arp, OID_AUTO, stats, CTLFLAG_RW, + &VNET_NAME(arpstat), arpstat, + "ARP statistics (struct arpstat, net/if_arp.h)"); static void arp_init(void); void arprequest(struct ifnet *, @@ -163,20 +169,23 @@ arptimer(void *arg) return; } ifp = lle->lle_tbl->llt_ifp; + CURVNET_SET(ifp->if_vnet); IF_AFDATA_LOCK(ifp); LLE_WLOCK(lle); - if (((lle->la_flags & LLE_DELETED) - || (time_second >= lle->la_expire)) - && (!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer))) + if (((lle->la_flags & LLE_DELETED) || + (time_second >= lle->la_expire)) && + (!callout_pending(&lle->la_timer) && + callout_active(&lle->la_timer))) { (void) llentry_free(lle); - else { + ARPSTAT_INC(timeouts); + } else { /* * Still valid, just drop our reference */ LLE_FREE_LOCKED(lle); } IF_AFDATA_UNLOCK(ifp); + CURVNET_RESTORE(); } /* @@ -238,6 +247,7 @@ arprequest(struct ifnet *ifp, struct in_ sa.sa_len = 2; m->m_flags |= M_BCAST; (*ifp->if_output)(ifp, m, &sa, NULL); + ARPSTAT_INC(txrequests); } /* @@ -339,8 +349,10 @@ retry: * latest one. */ if (m != NULL) { - if (la->la_hold != NULL) + if (la->la_hold != NULL) { m_freem(la->la_hold); + ARPSTAT_INC(dropped); + } la->la_hold = m; if (renew == 0 && (flags & LLE_EXCLUSIVE)) { flags &= ~LLE_EXCLUSIVE; @@ -413,6 +425,7 @@ arpintr(struct mbuf *m) ar = mtod(m, struct arphdr *); } + ARPSTAT_INC(received); switch (ntohs(ar->ar_pro)) { #ifdef INET case ETHERTYPE_IP: @@ -493,6 +506,9 @@ in_arpinput(struct mbuf *m) (void)memcpy(&isaddr, ar_spa(ah), sizeof (isaddr)); (void)memcpy(&itaddr, ar_tpa(ah), sizeof (itaddr)); + if (op == ARPOP_REPLY) + ARPSTAT_INC(rxreplies); + /* * For a bridge, we want to check the address irrespective * of the receive interface. (This will change slightly @@ -603,6 +619,7 @@ match: ifp->if_addrlen, (u_char *)ar_sha(ah), ":", inet_ntoa(isaddr), ifp->if_xname); itaddr = myaddr; + ARPSTAT_INC(dupips); goto reply; } if (ifp->if_flags & IFF_STATICARP) @@ -686,6 +703,7 @@ match: reply: if (op != ARPOP_REQUEST) goto drop; + ARPSTAT_INC(rxrequests); if (itaddr.s_addr == myaddr.s_addr) { /* Shortcut.. the receiving interface is the target. */ @@ -774,6 +792,7 @@ reply: sa.sa_family = AF_ARP; sa.sa_len = 2; (*ifp->if_output)(ifp, m, &sa, NULL); + ARPSTAT_INC(txreplies); return; drop: Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Thu Sep 3 19:02:17 2009 (r196796) +++ head/usr.bin/netstat/inet.c Thu Sep 3 21:10:57 2009 (r196797) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -871,6 +872,47 @@ ip_stats(u_long off, const char *name, i #undef p1a } +/* + * Dump ARP statistics structure. + */ +void +arp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) +{ + struct arpstat arpstat, zerostat; + size_t len = sizeof(arpstat); + + if (live) { + if (zflag) + memset(&zerostat, 0, len); + if (sysctlbyname("net.link.ether.arp.stats", &arpstat, &len, + zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { + warn("sysctl: net.link.ether.arp.stats"); + return; + } + } else + kread(off, &arpstat, len); + + printf("%s:\n", name); + +#define p(f, m) if (arpstat.f || sflag <= 1) \ + printf(m, arpstat.f, plural(arpstat.f)) +#define p2(f, m) if (arpstat.f || sflag <= 1) \ + printf(m, arpstat.f, pluralies(arpstat.f)) + + p(txrequests, "\t%lu ARP request%s sent\n"); + p2(txreplies, "\t%lu ARP repl%s sent\n"); + p(rxrequests, "\t%lu ARP request%s received\n"); + p2(rxreplies, "\t%lu ARP repl%s received\n"); + p(received, "\t%lu ARP packet%s received\n"); + p(dropped, "\t%lu total packet%s dropped due to no ARP entry\n"); + p(timeouts, "\t%lu ARP entry%s timed out\n"); + p(dupips, "\t%lu Duplicate IP%s seen\n"); +#undef p +#undef p2 +} + + + static const char *icmpnames[ICMP_MAXTYPE + 1] = { "echo reply", /* RFC 792 */ "#1", Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Thu Sep 3 19:02:17 2009 (r196796) +++ head/usr.bin/netstat/main.c Thu Sep 3 21:10:57 2009 (r196797) @@ -184,6 +184,8 @@ static struct nlist nl[] = { { .n_name = "_sctpstat" }, #define N_MFCTABLESIZE 54 { .n_name = "_mfctablesize" }, +#define N_ARPSTAT 55 + { .n_name = "_arpstat" }, { .n_name = NULL }, }; @@ -232,6 +234,8 @@ struct protox { carp_stats, NULL, "carp", 1, 0 }, { -1, N_PFSYNCSTAT, 1, NULL, pfsync_stats, NULL, "pfsync", 1, 0 }, + { -1, N_ARPSTAT, 1, NULL, + arp_stats, NULL, "arp", 1, 0 }, { -1, -1, 0, NULL, NULL, NULL, NULL, 0, 0 } }; Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Thu Sep 3 19:02:17 2009 (r196796) +++ head/usr.bin/netstat/netstat.h Thu Sep 3 21:10:57 2009 (r196797) @@ -75,6 +75,7 @@ void udp_stats(u_long, const char *, int void sctp_protopr(u_long, const char *, int, int); void sctp_stats(u_long, const char *, int, int); #endif +void arp_stats(u_long, const char *, int, int); void ip_stats(u_long, const char *, int, int); void icmp_stats(u_long, const char *, int, int); void igmp_stats(u_long, const char *, int, int); From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 21:11:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 797251065679; Thu, 3 Sep 2009 21:11:13 +0000 (UTC) (envelope-from zec@icir.org) Received: from labs3.cc.fer.hr (labs3.cc.fer.hr [161.53.72.21]) by mx1.freebsd.org (Postfix) with ESMTP id 07FF58FC16; Thu, 3 Sep 2009 21:11:12 +0000 (UTC) Received: from sluga.fer.hr (sluga.cc.fer.hr [161.53.72.14]) by labs3.cc.fer.hr (8.13.8+Sun/8.12.10) with ESMTP id n83LB52P014893; Thu, 3 Sep 2009 23:11:11 +0200 (CEST) Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Sep 2009 23:11:04 +0200 From: Marko Zec To: "Jung-uk Kim" Date: Thu, 3 Sep 2009 23:10:59 +0200 User-Agent: KMail/1.9.10 References: <200909021602.n82G2mpE000812@svn.freebsd.org> <200909032225.50210.zec@icir.org> <200909031651.49575.jkim@FreeBSD.org> In-Reply-To: <200909031651.49575.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909032310.59837.zec@icir.org> X-OriginalArrivalTime: 03 Sep 2009 21:11:05.0072 (UTC) FILETIME=[0C627700:01CA2CDB] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196769 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 21:11:13 -0000 On Thursday 03 September 2009 22:51:47 Jung-uk Kim wrote: > On Thursday 03 September 2009 04:25 pm, Marko Zec wrote: > > On Wednesday 02 September 2009 18:02:48 Jung-uk Kim wrote: > > > Author: jkim > > > Date: Wed Sep 2 16:02:48 2009 > > > New Revision: 196769 > > > URL: http://svn.freebsd.org/changeset/base/196769 > > > > > > Log: > > > - Work around ACPI mode transition problem for recent NVIDIA > > > 9400M chipset based Intel Macs. Since r189055, these platforms > > > started freezing when ACPI is being initialized for unknown > > > reason. For these platforms, we just use the old PAT layout. > > > Note this change is not enough to boot fully on these platforms > > > because of other problems but it makes debugging possible. Note > > > MacBook5,2 may be affected as well but it was not added here > > > because of lack of hardware to test. > > > - Initialize PAT MSR fully instead of reading and modifying it > > > for safety. > > > > Perhaps I'm missing something, but I fail to understand what is the > > purpose / use of variable pat_tested here? > > Without it, bad things may happen while APs are being initialized in > SMP case. Ouch, OK, only now I see that pat_tested is declared static - I thought it was reset to 0 at each pmap_init_pat() call... Sorry for the noise, Marko From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 22:00:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC0B410656A3; Thu, 3 Sep 2009 22:00:42 +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 CB6588FC24; Thu, 3 Sep 2009 22:00: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 n83M0gfi045773; Thu, 3 Sep 2009 22:00:42 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83M0gTK045771; Thu, 3 Sep 2009 22:00:42 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <200909032200.n83M0gTK045771@svn.freebsd.org> From: Jack F Vogel Date: Thu, 3 Sep 2009 22:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196798 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 22:00:43 -0000 Author: jfv Date: Thu Sep 3 22:00:42 2009 New Revision: 196798 URL: http://svn.freebsd.org/changeset/base/196798 Log: Stupid cut and paste error on a stats struct member, thanks to Ryan at Small Tree for finding this one. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Thu Sep 3 21:10:57 2009 (r196797) +++ head/sys/dev/ixgbe/ixgbe.c Thu Sep 3 22:00:42 2009 (r196798) @@ -4507,7 +4507,7 @@ ixgbe_update_stats_counters(struct adapt adapter->stats.lxoffrxc += IXGBE_READ_REG(hw, IXGBE_LXOFFRXC); /* 82598 only has a counter in the high register */ adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GORCH); - adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GOTCH); + adapter->stats.gotc += IXGBE_READ_REG(hw, IXGBE_GOTCH); adapter->stats.tor += IXGBE_READ_REG(hw, IXGBE_TORH); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 3 22:19:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED395106568D; Thu, 3 Sep 2009 22:19:09 +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 DC6D28FC0C; Thu, 3 Sep 2009 22:19: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 n83MJ9rl046175; Thu, 3 Sep 2009 22:19:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n83MJ9cQ046173; Thu, 3 Sep 2009 22:19:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909032219.n83MJ9cQ046173@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 3 Sep 2009 22:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196799 - head/usr.sbin/diskinfo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 22:19:10 -0000 Author: pjd Date: Thu Sep 3 22:19:09 2009 New Revision: 196799 URL: http://svn.freebsd.org/changeset/base/196799 Log: Don't bother obtaining the ident if we are not going to print it. Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Thu Sep 3 22:00:42 2009 (r196798) +++ head/usr.sbin/diskinfo/diskinfo.c Thu Sep 3 22:19:09 2009 (r196799) @@ -104,9 +104,6 @@ main(int argc, char **argv) error = ioctl(fd, DIOCGFWHEADS, &fwheads); if (error) fwheads = 0; - error = ioctl(fd, DIOCGIDENT, ident); - if (error) - ident[0] = '\0'; if (!opt_v) { printf("%s", argv[i]); printf("\t%u", sectorsize); @@ -133,7 +130,7 @@ main(int argc, char **argv) printf("\t%-12u\t# Heads according to firmware.\n", fwheads); printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors); } - if (ident[0] != '\0') + if (ioctl(fd, DIOCGIDENT, ident) == 0) printf("\t%-12s\t# Disk ident.\n", ident); } printf("\n"); From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 03:42:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C9221065670; Fri, 4 Sep 2009 03:42:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id A4FAB8FC19; Fri, 4 Sep 2009 03:42:15 +0000 (UTC) Received: from c220-239-231-153.carlnfd4.nsw.optusnet.com.au (c220-239-231-153.carlnfd4.nsw.optusnet.com.au [220.239.231.153]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n843g4Yb010465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Sep 2009 13:42:07 +1000 Date: Fri, 4 Sep 2009 13:42:04 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86zl9c9z05.fsf@ds4.des.no> Message-ID: <20090904115255.Q48987@delplex.bde.org> References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> <86zl9c9z05.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-307050607-1252035724=:48987" Cc: svn-src-head@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, src-committers@freebsd.org, "Simon L. Nielsen" Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 03:42:16 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-307050607-1252035724=:48987 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 3 Sep 2009, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote: > Andrey Chernov writes: >> Thanx for detailed explanation. > > np; I've made that mistake many times myself. Andrey doesn't make that mistake many times (at least this millenium), but fixes it a lot. > What do you think of the attached patch? Why not use the same text as POSIX? I don't like repeating this ad nauseum, but POSIX does. (In POSIX.1-2001-draft7, this repetition is responsible for 1/3 of the lines matching of "unsigned char".) C99 says this only once for ctype functions, at the beginning of the section on . The patch is missing the corresponding text for wctype functions (argmuments of type wint_t generally give undefined behaviour unless their value is representable as a wchar_t or equal to the value of WEOF). In FreeBSD, wint_t has the same type as wchar_t and that type is int, so bugs in this area are latent (unportable code might run on FreeBSD, and there might be problems with the sign bit and/or with WEOF being indistinguishable from a valid wide char encoding. gcc/config/i386 has some targets with 16-bit wide chars, and these have to be more careful about both. The non-broken ones use uint16_t for wchar_t and int for wint_t)> % Index: lib/libc/locale/iscntrl.3 % =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 % --- lib/libc/locale/iscntrl.3=09(revision 196695) % +++ lib/libc/locale/iscntrl.3=09(working copy) % @@ -32,7 +32,7 @@ % .\" @(#)iscntrl.3=098.1 (Berkeley) 6/4/93 % .\" $FreeBSD$ % .\" % -.Dd July 17, 2005 % +.Dd September 3, 2009 % .Dt ISCNTRL 3 % .Os % .Sh NAME % @@ -65,6 +65,15 @@ % .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS" % .It "\&036\ RS \t037\ US \t177\ DEL" % .El % +.Pp % +.Em NOTE : % +if the value passed to the % +.Fn iscntrl % +function is a % +.Vt signed char , % +as is usually the case, it must be cast to an % +.Vt unsigned char % +to avoid sign-extension errors. This wording is poor. It should be something like "if the value to be passed is represented as a signed char" ... I don't know a good easy way to fix "must be cast ... to avoid sign-extension errors". The value must be converted to one representable as an unsigned char to work, but that is not always possible, and blindly casting may give a wrong value. In most cases, it is an error to represent the value as a signed char to begin with, and better to cast a pointer from "char *" to "u_char": =09char *p;=09=09=09/* Already a bad type. */ =09... isalpha(*p);=09=09/* Wrong since *p might be < 0. */ =09... isalpha((u_char)*p);=09/* Mishandles exotic machines. */ =09... isalpha(*(u_char *)p);=09/* Mishandles diff. exotic machines. */ "unsigned char" is spelled u_char in KNF. Here this makes the above lines barely fit in 80 columns before quoting. Exotic machines include: - simple ones complement with no trap representations, signed chars and CHAR_BIT =3D 8. I think '\xff' is -0. Casting this to u_char gives 0, which is probably not what is wanted, while casting the pointer to it gives 0xff (if the bits are there in the memory copy), which is probably what is wanted. - ones with chars being signed and signed chars having a larger range than unsigned ones, or with u_char of a different size than char (not sure if the latter is allowed). Then casting the pointer will give a reasonable value, though possibly not the wanted one (the difficulty is more in advancing the pointer), while blindly casting the value may corrupt many more values than -0. - ones with trap representations, instead of or in addition to the above complications. Now *p will trap on trap reps but there should be no trap reps in valid data, while casting the pointer will always give a reasonable value, possibly including trap bits. Sign extension for passing a signed char is not an error. The error is passing a negative value. Neither C99 nor POSIX gives any advice. They just say that the behaviour is undefined if the value is not representable as an unsigned char or equal to the value of EOF. % Index: lib/libc/locale/isrune.3 % =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 % --- lib/libc/locale/isrune.3=09(revision 196695) % +++ lib/libc/locale/isrune.3=09(working copy) % @@ -25,7 +25,7 @@ % .\" % .\" $FreeBSD$ % .\" % -.Dd March 30, 2004 % +.Dd September 3, 2009 % .Dt ISRUNE 3 % .Os % .Sh NAME % @@ -46,6 +46,15 @@ % .Tn ASCII % character set, this is equivalent to % .Fn isascii . % +.Pp % +.Em NOTE : % +if the value passed to the % +.Fn isrune % +function is a % +.Vt signed char , % +as is usually the case, it must be cast to an % +.Vt unsigned char % +to avoid sign-extension errors. % .Sh RETURN VALUES % The % .Fn isrune This seems to be wrong. isascii() works on all int args, so I assume isrune() does too. isrune.3 also misdescribes its arg as "the character" -- this prejudges the arg. % Index: lib/libc/locale/digittoint.3 % =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 % --- lib/libc/locale/digittoint.3=09(revision 196695) % +++ lib/libc/locale/digittoint.3=09(working copy) % @@ -28,7 +28,7 @@ % .\"=09@(#)digittoint.3=098.1 (Berkeley) 6/4/93 % .\" $FreeBSD$ % .\" % -.Dd April 6, 2001 % +.Dd September 3, 2009 % .Dt DIGITTOINT 3 % .Os % .Sh NAME % @@ -46,6 +46,15 @@ % function converts a numeric character to its corresponding integer value= =2E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ % The character can be any decimal digit or hexadecimal digit. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ % With hexadecimal characters, the case of the values does not matter. % +.Pp % +.Em NOTE : % +if the value passed to the % +.Fn digittoint % +function is a % +.Vt signed char , % +as is usually the case, it must be cast to an % +.Vt unsigned char % +to avoid sign-extension errors. % .Sh RETURN VALUES % The % .Fn digittoint Here the behaviour already seems to be undefined unless the arg is a decimal or hex digit. Like isascii(), this function isn't in C99, so it can be more or less strict than other ctype functions. % Index: lib/libc/locale/isascii.3 % =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 % --- lib/libc/locale/isascii.3=09(revision 196695) % +++ lib/libc/locale/isascii.3=09(working copy) % @@ -28,7 +28,7 @@ % .\" @(#)isascii.3=098.2 (Berkeley) 12/11/93 % .\" $FreeBSD$ % .\" % -.Dd October 6, 2002 % +.Dd September 3, 2009 % .Dt ISASCII 3 % .Os % .Sh NAME % @@ -47,6 +47,15 @@ % .Tn ASCII % character, which is any character % between 0 and octal 0177 inclusive. % +.Pp % +.Em NOTE : % +if the value passed to the % +.Fn isascii % +function is a % +.Vt signed char , % +as is usually the case, it must be cast to an % +.Vt unsigned char % +to avoid sign-extension errors. % .Sh SEE ALSO % .Xr ctype 3 , % .Xr iswascii 3 , This is wrong -- see above. POSIX specifically says that "The isascii() function is defined on all integer values". Please check POSIX for any other special cases -- I only remembered this one and passed most of your other changes since most of the functions are in C99. % Index: lib/libc/locale/toascii.3 % =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 % --- lib/libc/locale/toascii.3=09(revision 196695) % +++ lib/libc/locale/toascii.3=09(working copy) % @@ -28,7 +28,7 @@ % .\"=09@(#)toascii.3=098.1 (Berkeley) 6/4/93 % .\" $FreeBSD$ % .\" % -.Dd June 4, 1993 % +.Dd September 3, 2009 % .Dt TOASCII 3 % .Os % .Sh NAME % @@ -45,6 +45,15 @@ % .Fn toascii % function strips all but the low 7 bits from a letter, % including parity or other marker bits. % +.Pp % +.Em NOTE : % +if the value passed to the % +.Fn toascii % +function is a % +.Vt signed char , % +as is usually the case, it must be cast to an % +.Vt unsigned char % +to avoid sign-extension errors. % .Sh RETURN VALUES % The % .Fn toascii This seems wrong too. POSIX doesn't say anything specific for it (neither the restriction nor lack of it). It just says that the result is and 0x7f where the above says "strips all but the low 7 bits from a letter". Another old bug is the above saying "letter" -- toascii() always worked on at least ASCII non-letters. % Index: lib/libc/locale/toupper.3 % =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 % --- lib/libc/locale/toupper.3=09(revision 196695) % +++ lib/libc/locale/toupper.3=09(working copy) % @@ -32,7 +32,7 @@ % .\"=09@(#)toupper.3=098.1 (Berkeley) 6/4/93 % .\" $FreeBSD$ % .\" % -.Dd July 17, 2005 % +.Dd September 3, 2009 % .Dt TOUPPER 3 % .Os % .Sh NAME % @@ -53,6 +53,15 @@ % .Vt "unsigned char" % or the value of % .Dv EOF . % +.Pp % +.Em NOTE : % +if the value passed to the % +.Fn toupper % +function is a % +.Vt signed char , % +as is usually the case, it must be cast to an % +.Vt unsigned char % +to avoid sign-extension errors. % .Sh RETURN VALUES % If the argument is a lower-case letter, the % .Fn toupper toupper.2 already says that "the value of the argument is representable as an unsigned char or the value EOF" (it should say "the argument is representable as an unsigned char or equal to the value of EOF"). The new text, if any, should be mixed with this. Presumably similarly for tolower (I didn't noticed these problems earlier). Bruce --0-307050607-1252035724=:48987-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 04:44:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B923106566B; Fri, 4 Sep 2009 04:44:56 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 364C98FC16; Fri, 4 Sep 2009 04:44:55 +0000 (UTC) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 08CD157488; Fri, 4 Sep 2009 00:44:55 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 04 Sep 2009 00:44:55 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=jGSk9OQYPUqVM5meHQzpjqyLanM=; b=IJnLn0vs5owMNxjaE3SXWQzm9IC+r7LxpRm8u9btw9QBVxUlkxfjhOz9WM5smjnv1VoXFOY2u5nfH7LE1Ci9i3WegdWUL5vB7syLTmSntVp9wPjbZTtXU4PwyFHyh7kSr96y4qUrgPYOeEWhFBlRDOvUQmGt4pNJfvD+PHWgELU= X-Sasl-enc: EfG4hyXDKinucmiaozLYVxm6Ecw6jCPie8MEwnQQX6Oq 1252039494 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 2AFCB66C19; Fri, 4 Sep 2009 00:44:54 -0400 (EDT) Message-ID: <4AA09B41.3040103@incunabulum.net> Date: Fri, 04 Sep 2009 05:44:49 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: "George V. Neville-Neil" References: <200909032110.n83LAvUF044731@svn.freebsd.org> In-Reply-To: <200909032110.n83LAvUF044731@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 04:44:56 -0000 George V. Neville-Neil wrote: > Author: gnn > Date: Thu Sep 3 21:10:57 2009 > New Revision: 196797 > URL: http://svn.freebsd.org/changeset/base/196797 > > Log: > Add ARP statistics to the kernel and netstat. > Thanks very much for this change. Any chance this struct can get explicitly versioned (i.e. as for struct igmpstat) as it is a new struct? cheers, BMS From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 05:16:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DF67106566C; Fri, 4 Sep 2009 05:16:33 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id AA59B8FC19; Fri, 4 Sep 2009 05:16:32 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n845GUC0088693; Fri, 4 Sep 2009 09:16:30 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1252041390; bh=ydCGVf7poqXsYuVQZAYbsqmAFVy1dLa2XkLuQToqAE8=; l=2030; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=CYQ/7979kiWaVAzJ3zXw49+4O08mgqekyosG3IDpdxXmA9gClEvUusjVL/SbT6BLa F9xEZKdI1wsDPdDgCHy2xL30ZzzjWZwMH5OrkA9MbihlxQrJXMN+etZq5fgVJAn02U eOidY59OoV+B4RBKhKl/ok1LSCnkRq842B/oeX50= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n845GTfe088692; Fri, 4 Sep 2009 09:16:29 +0400 (MSD) (envelope-from ache) Date: Fri, 4 Sep 2009 09:16:29 +0400 From: Andrey Chernov To: Bruce Evans Message-ID: <20090904051629.GA88503@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Dag-Erling Sm??rgrav , "Simon L. Nielsen" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> <86zl9c9z05.fsf@ds4.des.no> <20090904115255.Q48987@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090904115255.Q48987@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, Dag-Erling Sm??rgrav , svn-src-all@freebsd.org, src-committers@freebsd.org, "Simon L. Nielsen" Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 05:16:33 -0000 On Fri, Sep 04, 2009 at 01:42:04PM +1000, Bruce Evans wrote: > The patch is missing the corresponding text for wctype functions > (argmuments of type wint_t generally give undefined behaviour unless > their value is representable as a wchar_t or equal to the value of > WEOF). In FreeBSD, wint_t has the same type as wchar_t and that type > is int, so bugs in this area are latent (unportable code might run > on FreeBSD, and there might be problems with the sign bit and/or with > WEOF being indistinguishable from a valid wide char encoding. Yes, having the same note for wctype family will be nice too. > It should be something like "if the value to be > passed is represented as a signed char" ... I don't know a good easy > way to fix "must be cast ... to avoid sign-extension errors". The > value must be converted to one representable as an unsigned char to > work, but that is not always possible, and blindly casting may give > a wrong value. > Exotic machines include: I think, "exotic machines" examples you mention already brokes too many other aspects regarding to char manipulating, so nobody will really make such machines with standard-compliance C compiler on them :) > Sign extension for passing a signed char is not an error. The error is > passing a negative value. Yes. Perhaps 'Never pass negative arg there, including sign-extended char' or something alike. > Neither C99 nor POSIX gives any advice. They just say that the behaviour > is undefined if the value is not representable as an unsigned char or > equal to the value of EOF. Yes, I already mention that. > % Index: lib/libc/locale/isrune.3 > % Index: lib/libc/locale/digittoint.3 > % Index: lib/libc/locale/isascii.3 > % Index: lib/libc/locale/toascii.3 Yes, those ones works with int. I don't pay attention to them in the whole patch :( About other wording nuances mentioned in your reply, I don't have an opinion, everybody knows my English is poor :) -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 05:21:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB0171065697; Fri, 4 Sep 2009 05:21:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2978FC2A; Fri, 4 Sep 2009 05:21:20 +0000 (UTC) Received: from c220-239-231-153.carlnfd4.nsw.optusnet.com.au (c220-239-231-153.carlnfd4.nsw.optusnet.com.au [220.239.231.153]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n845L8mU000765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Sep 2009 15:21:09 +1000 Date: Fri, 4 Sep 2009 15:21:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Bruce Evans In-Reply-To: <20090904115255.Q48987@delplex.bde.org> Message-ID: <20090904144214.O49099@delplex.bde.org> References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> <86zl9c9z05.fsf@ds4.des.no> <20090904115255.Q48987@delplex.bde.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1394947128-1252041669=:49099" Cc: src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, "Simon L. Nielsen" , svn-src-head@freebsd.org, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 05:21:21 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1394947128-1252041669=:49099 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 4 Sep 2009, Bruce Evans wrote: > On Thu, 3 Sep 2009, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote: > >> What do you think of the attached patch? Oops, it is more broken than I noticed. Almost all ctype man pages already documented the requirements in even more detail than POSIX, since Andrey fixed the missing documentation to almost catch up with C99 and POSIX in Y2K, and tjr added more details on 6 Oct 2002. E.g., in isalpha.3: % The value of the argument must be representable as an % .Vt "unsigned char" % or the value of % .Dv EOF . This is the same as in POSIX except the POSIX wording is better (e.g., the above only says implicitly that the behaviour is undefined if "must" is not satisfied). It took too many commits (revs 1.8-1.10) to get this far. % ... % .Sh COMPATIBILITY % The % .Bx 4.4 % extension of accepting arguments outside of the range of the % .Vt "unsigned char" % type in locales with large character sets is considered obsolete % and may not be supported in future releases. % The % .Fn iswalpha % function should be used instead. This was added in rev.1.16. It also has bugs from not being merged with the old documentation about this problem -- it contradicts the "must", yet still doesn't say what the behaviour is for args outside the range: - are they classified as non-alpha, or are characters with (positive) values outside the range actually possible in some locales, with these characters being classified as alpha by this function and handled correctly by all ctype functions - we now have future releases, and the above says that these releases are not permitted to support this behaviour, so why do we still have it ;-) - what happens for the corresponding problem with iswalpha -- will the FreeBSD extension of not having these problems ever be documented or not permitted or actually go away? > % Index: lib/libc/locale/iscntrl.3 > % =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 > % --- lib/libc/locale/iscntrl.3=09(revision 196695) > % +++ lib/libc/locale/iscntrl.3=09(working copy) > % @@ -32,7 +32,7 @@ > % .\" @(#)iscntrl.3=098.1 (Berkeley) 6/4/93 > % .\" $FreeBSD$ > % .\" > % -.Dd July 17, 2005 > % +.Dd September 3, 2009 > % .Dt ISCNTRL 3 > % .Os > % .Sh NAME > % @@ -65,6 +65,15 @@ > % .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS" > % .It "\&036\ RS \t037\ US \t177\ DEL" > % .El > % +.Pp > % +.Em NOTE : > % +if the value passed to the > % +.Fn iscntrl > % +function is a > % +.Vt signed char , > % +as is usually the case, it must be cast to an > % +.Vt unsigned char > % +to avoid sign-extension errors. > > This wording is poor. It should be something like "if the value to be > passed is represented as a signed char" ... I don't know a good easy > way to fix "must be cast ... to avoid sign-extension errors". The "value to be passed" is wrong too, since the problematic negative values must not be passed. Anyway, teaching how to apply casts to satisfy the requirements of the API should be duplicated ad nauseum in man pages even less than the requirement= s of the API. Bruce --0-1394947128-1252041669=:49099-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 05:28:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B13191065676; Fri, 4 Sep 2009 05:28:10 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A03CA8FC1E; Fri, 4 Sep 2009 05:28: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 n845SAsf054989; Fri, 4 Sep 2009 05:28:10 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n845SAna054988; Fri, 4 Sep 2009 05:28:10 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200909040528.n845SAna054988@svn.freebsd.org> From: Weongyo Jeong Date: Fri, 4 Sep 2009 05:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196809 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 05:28:10 -0000 Author: weongyo Date: Fri Sep 4 05:28:09 2009 New Revision: 196809 URL: http://svn.freebsd.org/changeset/base/196809 Log: fix a TX issue on big endian machines like powerpc or sparc64. Now zyd(4) should work on all architectures. Obtained from: OpenBSD Modified: head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Fri Sep 4 05:06:15 2009 (r196808) +++ head/sys/dev/usb/wlan/if_zyd.c Fri Sep 4 05:28:09 2009 (r196809) @@ -2547,7 +2547,7 @@ zyd_tx_start(struct zyd_softc *sc, struc bits = (rate == 11) ? (totlen * 16) + 10 : ((rate == 22) ? (totlen * 8) + 10 : (totlen * 8)); - desc->plcp_length = bits / ratediv[phy]; + desc->plcp_length = htole16(bits / ratediv[phy]); desc->plcp_service = 0; if (rate == 22 && (bits % 11) > 0 && (bits % 11) <= 3) desc->plcp_service |= ZYD_PLCP_LENGEXT; From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 05:40:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29F00106566B; Fri, 4 Sep 2009 05:40:07 +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 18CA28FC08; Fri, 4 Sep 2009 05:40: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 n845e7iN055327; Fri, 4 Sep 2009 05:40:07 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n845e6nQ055325; Fri, 4 Sep 2009 05:40:06 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200909040540.n845e6nQ055325@svn.freebsd.org> From: Julian Elischer Date: Fri, 4 Sep 2009 05:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196811 - head/sys/i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 05:40:07 -0000 Author: julian Date: Fri Sep 4 05:40:06 2009 New Revision: 196811 URL: http://svn.freebsd.org/changeset/base/196811 Log: Bring i386 up to date with amd64 and others. The macros for PCPU can be slightly simplified, which makes the resulting tangle qa lot easier to understand when trying to read them. MFC after: 4 weeks Modified: head/sys/i386/include/pcpu.h Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Fri Sep 4 05:37:49 2009 (r196810) +++ head/sys/i386/include/pcpu.h Fri Sep 4 05:40:06 2009 (r196811) @@ -152,7 +152,7 @@ extern struct pcpu *pcpup; #define __PCPU_GET(name) __extension__ ({ \ __pcpu_type(name) __res; \ struct __s { \ - u_char __b[MIN(sizeof(__pcpu_type(name)), 4)]; \ + u_char __b[MIN(sizeof(__res), 4)]; \ } __s; \ \ if (sizeof(__res) == 1 || sizeof(__res) == 2 || \ @@ -174,7 +174,7 @@ extern struct pcpu *pcpup; #define __PCPU_ADD(name, val) do { \ __pcpu_type(name) __val; \ struct __s { \ - u_char __b[MIN(sizeof(__pcpu_type(name)), 4)]; \ + u_char __b[MIN(sizeof(__val), 4)]; \ } __s; \ \ __val = (val); \ @@ -214,10 +214,10 @@ extern struct pcpu *pcpup; /* * Sets the value of the per-cpu variable name to value val. */ -#define __PCPU_SET(name, val) { \ +#define __PCPU_SET(name, val) do { \ __pcpu_type(name) __val; \ struct __s { \ - u_char __b[MIN(sizeof(__pcpu_type(name)), 4)]; \ + u_char __b[MIN(sizeof(__val), 4)]; \ } __s; \ \ __val = (val); \ @@ -230,7 +230,7 @@ extern struct pcpu *pcpup; } else { \ *__PCPU_PTR(name) = __val; \ } \ -} +} while (0) #define PCPU_GET(member) __PCPU_GET(pc_ ## member) #define PCPU_ADD(member, val) __PCPU_ADD(pc_ ## member, val) From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 05:54:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5663106566B; Fri, 4 Sep 2009 05:54:45 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B46038FC14; Fri, 4 Sep 2009 05:54:45 +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 n845sjiE055651; Fri, 4 Sep 2009 05:54:45 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n845sjlO055648; Fri, 4 Sep 2009 05:54:45 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909040554.n845sjlO055648@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 4 Sep 2009 05:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196812 - head/share/monetdef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 05:54:45 -0000 Author: ache Date: Fri Sep 4 05:54:45 2009 New Revision: 196812 URL: http://svn.freebsd.org/changeset/base/196812 Log: Add lv_LV PR: 105100 Submitted by: Aldis Berjoza Added: head/share/monetdef/lv_LV.ISO8859-13.src (contents, props changed) Modified: head/share/monetdef/Makefile Modified: head/share/monetdef/Makefile ============================================================================== --- head/share/monetdef/Makefile Fri Sep 4 05:40:06 2009 (r196811) +++ head/share/monetdef/Makefile Fri Sep 4 05:54:45 2009 (r196812) @@ -44,6 +44,7 @@ LOCALES= af_ZA.ISO8859-1 \ ko_KR.eucKR \ ko_KR.UTF-8 \ lt_LT.ISO8859-13 \ + lv_LV.ISO8859-13 \ mn_MN.UTF-8 \ nl_BE.ISO8859-1 \ nl_NL.ISO8859-1 \ @@ -117,7 +118,7 @@ ISO8859-2_UTF-8= hr_HR hu_HU ro_RO sk_SK ISO8859-7_UTF-8= el_GR ISO8859-9_UTF-8= tr_TR ISO8859-13_ISO8859-4= lt_LT -ISO8859-13_UTF-8= lt_LT +ISO8859-13_UTF-8= lt_LT lv_LV ISO8859-15_ISO8859-15= es_ES:eu_ES ISO8859-15_UTF-8= et_EE UTF-8_Big5HKSCS= zh_HK Added: head/share/monetdef/lv_LV.ISO8859-13.src ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/monetdef/lv_LV.ISO8859-13.src Fri Sep 4 05:54:45 2009 (r196812) @@ -0,0 +1,36 @@ +# $FreeBSD$ +# +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# int_curr_symbol (last character always SPACE) +LVL +# currency_symbol +Ls +# mon_decimal_point +, +# mon_thousands_sep + +# mon_grouping, separated by ; +3;3 +# positive_sign + +# negative_sign +- +# int_frac_digits +2 +# frac_digits +2 +# p_cs_precedes +0 +# p_sep_by_space +1 +# n_cs_precedes +0 +# n_sep_by_space +1 +# p_sign_posn +1 +# n_sign_posn +1 +# EOF From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 06:19:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D547106566B; Fri, 4 Sep 2009 06:19:38 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F08C08FC12; Fri, 4 Sep 2009 06:19:37 +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 n846JbB3056326; Fri, 4 Sep 2009 06:19:37 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n846Jbg8056322; Fri, 4 Sep 2009 06:19:37 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909040619.n846Jbg8056322@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 4 Sep 2009 06:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196813 - head/share/msgdef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 06:19:38 -0000 Author: ache Date: Fri Sep 4 06:19:37 2009 New Revision: 196813 URL: http://svn.freebsd.org/changeset/base/196813 Log: Add lv_LV PR: 105100 Submitted by: Aldis Berjoza Added: head/share/msgdef/lv_LV.ISO8859-13.src (contents, props changed) head/share/msgdef/lv_LV.UTF-8.src (contents, props changed) Modified: head/share/msgdef/Makefile Modified: head/share/msgdef/Makefile ============================================================================== --- head/share/msgdef/Makefile Fri Sep 4 05:54:45 2009 (r196812) +++ head/share/msgdef/Makefile Fri Sep 4 06:19:37 2009 (r196813) @@ -40,6 +40,8 @@ LOCALES= af_ZA.ISO8859-1 \ ko_KR.UTF-8 \ ko_KR.eucKR \ lt_LT.ISO8859-13 \ + lv_LV.ISO8859-13 \ + lv_LV.UTF-8 \ mn_MN.UTF-8 \ nl_NL.ISO8859-1 \ no_NO.ISO8859-1 \ Added: head/share/msgdef/lv_LV.ISO8859-13.src ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/msgdef/lv_LV.ISO8859-13.src Fri Sep 4 06:19:37 2009 (r196813) @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# yesexpr +^[jJyY].* +# noexpr +^[nN].* +# yesstr +j +# nostr +n +# EOF Added: head/share/msgdef/lv_LV.UTF-8.src ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/msgdef/lv_LV.UTF-8.src Fri Sep 4 06:19:37 2009 (r196813) @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# yesexpr +^[jJyY].* +# noexpr +^[nN].* +# yesstr +jā +# nostr +nē +# EOF From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 06:26:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E18E71065670; Fri, 4 Sep 2009 06:26:41 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5AD88FC12; Fri, 4 Sep 2009 06:26:41 +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 n846QfcA056511; Fri, 4 Sep 2009 06:26:41 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n846QfIo056506; Fri, 4 Sep 2009 06:26:41 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909040626.n846QfIo056506@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 4 Sep 2009 06:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196814 - head/share/timedef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 06:26:42 -0000 Author: ache Date: Fri Sep 4 06:26:40 2009 New Revision: 196814 URL: http://svn.freebsd.org/changeset/base/196814 Log: Add lv_LV PR: 105100 Submitted by: Aldis Berjoza Added: head/share/timedef/lv_LV.ISO8859-13.src (contents, props changed) head/share/timedef/lv_LV.UTF-8.src (contents, props changed) Modified: head/share/timedef/Makefile Modified: head/share/timedef/Makefile ============================================================================== --- head/share/timedef/Makefile Fri Sep 4 06:19:37 2009 (r196813) +++ head/share/timedef/Makefile Fri Sep 4 06:26:40 2009 (r196814) @@ -53,6 +53,8 @@ LOCALES= am_ET.UTF-8 \ lt_LT.ISO8859-4 \ lt_LT.ISO8859-13 \ lt_LT.UTF-8 \ + lv_LV.ISO8859-13 \ + lv_LV.UTF-8 \ mn_MN.UTF-8 \ nb_NO.ISO8859-1 \ nb_NO.UTF-8 \ Added: head/share/timedef/lv_LV.ISO8859-13.src ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/timedef/lv_LV.ISO8859-13.src Fri Sep 4 06:26:40 2009 (r196814) @@ -0,0 +1,101 @@ +# $FreeBSD$ +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# Short month names +# +Jan +Feb +Mar +Apr +Mai +Jn +Jl +Aug +Sep +Okt +Nov +Dec +# +# Long month names +# +janvris +februris +marts +aprlis +maijs +jnijs +jlijs +augusts +septembris +oktobris +novembris +decembris +# +# Short weekday names +# +Sv +Pr +Ot +Tr +Ct +Pk +Ss +# +# Long weekday names +# +Svtdiena +Pirmdiena +Otrdiena +Trediena +Ceturtdiena +Piektdiena +Sestdiena +# +# X_fmt +# +%H:%M:%S +# +# x_fmt +# +%d/%m/%Y +# +# c_fmt +# %A, %Y m. %B %e d. %T +%e. %b, %Y. gads %X +# +# am +# + +# +# pm +# + +# +# date_fmt +# +%A, %Y. gada %e. %B %T %Z +# +# Long month names in alternative form +# +janvris +februris +marts +aprlis +maijs +jnijs +jlijs +augusts +septembris +oktobris +novembris +decembris +# +# md_order +# +md +# +# ampm_fmt +# + +# EOF Added: head/share/timedef/lv_LV.UTF-8.src ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/timedef/lv_LV.UTF-8.src Fri Sep 4 06:26:40 2009 (r196814) @@ -0,0 +1,101 @@ +# $FreeBSD$ +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# Short month names +# +Jan +Feb +Mar +Apr +Mai +Jūn +Jūl +Aug +Sep +Okt +Nov +Dec +# +# Long month names +# +janvāris +februāris +marts +aprīlis +maijs +jūnijs +jūlijs +augusts +septembris +oktobris +novembris +decembris +# +# Short weekday names +# +Sv +Pr +Ot +Tr +Ct +Pk +Ss +# +# Long weekday names +# +Svētdiena +Pirmdiena +Otrdiena +Trešdiena +Ceturtdiena +Piektdiena +Sestdiena +# +# X_fmt +# +%H:%M:%S +# +# x_fmt +# +%d/%m/%Y +# +# c_fmt +# %A, %Y m. %B %e d. %T +%e. %b, %Y. gads %X +# +# am +# + +# +# pm +# + +# +# date_fmt +# +%A, %Y. gada %e. %B %T %Z +# +# Long month names in alternative form +# +janvāris +februāris +marts +aprīlis +maijs +jūnijs +jūlijs +augusts +septembris +oktobris +novembris +decembris +# +# md_order +# +md +# +# ampm_fmt +# + +# EOF From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 07:29:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 329701065672; Fri, 4 Sep 2009 07:29:25 +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 21ACB8FC08; Fri, 4 Sep 2009 07:29: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 n847TPRF057928; Fri, 4 Sep 2009 07:29:25 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n847TPxD057926; Fri, 4 Sep 2009 07:29:25 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200909040729.n847TPxD057926@svn.freebsd.org> From: Julian Elischer Date: Fri, 4 Sep 2009 07:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196816 - head/sys/i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 07:29:25 -0000 Author: julian Date: Fri Sep 4 07:29:24 2009 New Revision: 196816 URL: http://svn.freebsd.org/changeset/base/196816 Log: whitespace commit Submitted by: bde@ Modified: head/sys/i386/include/pcpu.h Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Fri Sep 4 07:13:07 2009 (r196815) +++ head/sys/i386/include/pcpu.h Fri Sep 4 07:29:24 2009 (r196816) @@ -152,7 +152,7 @@ extern struct pcpu *pcpup; #define __PCPU_GET(name) __extension__ ({ \ __pcpu_type(name) __res; \ struct __s { \ - u_char __b[MIN(sizeof(__res), 4)]; \ + u_char __b[MIN(sizeof(__res), 4)]; \ } __s; \ \ if (sizeof(__res) == 1 || sizeof(__res) == 2 || \ @@ -174,7 +174,7 @@ extern struct pcpu *pcpup; #define __PCPU_ADD(name, val) do { \ __pcpu_type(name) __val; \ struct __s { \ - u_char __b[MIN(sizeof(__val), 4)]; \ + u_char __b[MIN(sizeof(__val), 4)]; \ } __s; \ \ __val = (val); \ From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 07:42:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B9A01065679; Fri, 4 Sep 2009 07:42:14 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 319B98FC17; Fri, 4 Sep 2009 07:42: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 n847gDeq058269; Fri, 4 Sep 2009 07:42:13 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n847gD62058267; Fri, 4 Sep 2009 07:42:13 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909040742.n847gD62058267@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 4 Sep 2009 07:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196818 - head/contrib/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 07:42:14 -0000 Author: ache Date: Fri Sep 4 07:42:13 2009 New Revision: 196818 URL: http://svn.freebsd.org/changeset/base/196818 Log: 1) Remove single occurance of HAS_CTYPE ifdef, ctype functions used here for a long time and needs their header in anycase. 2) Add (unsigned char) casts to more ctype macros. 3) Simplify menu input handling using ctype instead of range unguarded hardcoded tricks. Modified: head/contrib/ee/ee.c Modified: head/contrib/ee/ee.c ============================================================================== --- head/contrib/ee/ee.c Fri Sep 4 07:33:17 2009 (r196817) +++ head/contrib/ee/ee.c Fri Sep 4 07:42:13 2009 (r196818) @@ -72,10 +72,7 @@ char *version = "@(#) ee, version " EE_ #include #endif -#ifdef HAS_CTYPE #include -#endif - #include #include #include @@ -1973,7 +1970,7 @@ int sensitive; } else { - if (toupper(*strng1) != toupper(*strng2)) + if (toupper((unsigned char)*strng1) != toupper((unsigned char)*strng2)) equal = FALSE; } strng1++; @@ -2445,7 +2442,7 @@ int noverify; if ((text_changes) && (!noverify)) { ans = get_string(changes_made_prompt, TRUE); - if (toupper(*ans) == toupper(*yes_char)) + if (toupper((unsigned char)*ans) == toupper((unsigned char)*yes_char)) text_changes = FALSE; else return(0); @@ -2522,7 +2519,7 @@ int warn_if_exists; if ((temp_fp = fopen(file_name, "r"))) { tmp_point = get_string(file_exists_prompt, TRUE); - if (toupper(*tmp_point) == toupper(*yes_char)) + if (toupper((unsigned char)*tmp_point) == toupper((unsigned char)*yes_char)) write_flag = TRUE; else write_flag = FALSE; @@ -3437,14 +3434,13 @@ struct menu_entries menu_list[]; if (input == -1) exit(0); - if (((tolower(input) >= 'a') && (tolower(input) <= 'z')) || - ((input >= '0') && (input <= '9'))) + if (isascii(input) && isalnum(input)) { - if ((tolower(input) >= 'a') && (tolower(input) <= 'z')) + if (isalpha(input)) { temp = 1 + tolower(input) - 'a'; } - else if ((input >= '0') && (input <= '9')) + else if (isdigit(input)) { temp = (2 + 'z' - 'a') + (input - '0'); } From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 07:44:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51ED01065676; Fri, 4 Sep 2009 07:44:28 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 413A88FC17; Fri, 4 Sep 2009 07:44: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 n847iSDI058382; Fri, 4 Sep 2009 07:44:28 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n847iSMU058380; Fri, 4 Sep 2009 07:44:28 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <200909040744.n847iSMU058380@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 4 Sep 2009 07:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196819 - head/usr.bin/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 07:44:28 -0000 Author: ache Date: Fri Sep 4 07:44:27 2009 New Revision: 196819 URL: http://svn.freebsd.org/changeset/base/196819 Log: Remove single occurance of HAS_CTYPE ifdef, ctype functions used here for a long time and needs their header in anycase. Modified: head/usr.bin/ee/Makefile Modified: head/usr.bin/ee/Makefile ============================================================================== --- head/usr.bin/ee/Makefile Fri Sep 4 07:42:13 2009 (r196818) +++ head/usr.bin/ee/Makefile Fri Sep 4 07:44:27 2009 (r196819) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../contrib/ee CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \ - -DHAS_CTYPE -DHAS_SYS_WAIT + -DHAS_SYS_WAIT PROG= ee LINKS= ${BINDIR}/ee ${BINDIR}/ree ${BINDIR}/ee ${BINDIR}/edit From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 07:44:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 750EB106566B; Fri, 4 Sep 2009 07:44:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 627CC8FC1A; Fri, 4 Sep 2009 07:44: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 n847iwK4058448; Fri, 4 Sep 2009 07:44:58 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n847iwFs058425; Fri, 4 Sep 2009 07:44:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200909040744.n847iwFs058425@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 4 Sep 2009 07:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196820 - head/lib/libc/locale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 07:44:58 -0000 Author: des Date: Fri Sep 4 07:44:58 2009 New Revision: 196820 URL: http://svn.freebsd.org/changeset/base/196820 Log: Let the armchair generals handle this one. Modified: head/lib/libc/locale/ctype.3 head/lib/libc/locale/digittoint.3 head/lib/libc/locale/isalnum.3 head/lib/libc/locale/isalpha.3 head/lib/libc/locale/isascii.3 head/lib/libc/locale/isblank.3 head/lib/libc/locale/iscntrl.3 head/lib/libc/locale/isdigit.3 head/lib/libc/locale/isgraph.3 head/lib/libc/locale/isideogram.3 head/lib/libc/locale/islower.3 head/lib/libc/locale/isphonogram.3 head/lib/libc/locale/isprint.3 head/lib/libc/locale/ispunct.3 head/lib/libc/locale/isrune.3 head/lib/libc/locale/isspace.3 head/lib/libc/locale/isspecial.3 head/lib/libc/locale/isupper.3 head/lib/libc/locale/isxdigit.3 head/lib/libc/locale/toascii.3 head/lib/libc/locale/tolower.3 head/lib/libc/locale/toupper.3 Modified: head/lib/libc/locale/ctype.3 ============================================================================== --- head/lib/libc/locale/ctype.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/ctype.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -28,7 +28,7 @@ .\" @(#)ctype.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd March 30, 2004 .Dt CTYPE 3 .Os .Sh NAME @@ -111,13 +111,6 @@ They are available as macros, defined in .In ctype.h , or as true functions in the C library. See the specific manual pages for more information. -.Pp -.Em NOTE : -if the value passed to one of these functions is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh SEE ALSO .Xr digittoint 3 , .Xr isalnum 3 , Modified: head/lib/libc/locale/digittoint.3 ============================================================================== --- head/lib/libc/locale/digittoint.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/digittoint.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -28,7 +28,7 @@ .\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd April 6, 2001 .Dt DIGITTOINT 3 .Os .Sh NAME @@ -46,15 +46,6 @@ The function converts a numeric character to its corresponding integer value. The character can be any decimal digit or hexadecimal digit. With hexadecimal characters, the case of the values does not matter. -.Pp -.Em NOTE : -if the value passed to the -.Fn digittoint -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn digittoint Modified: head/lib/libc/locale/isalnum.3 ============================================================================== --- head/lib/libc/locale/isalnum.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isalnum.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isalnum.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISALNUM 3 .Os .Sh NAME @@ -75,15 +75,6 @@ In the ASCII character set, this include .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn isalnum -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isalnum Modified: head/lib/libc/locale/isalpha.3 ============================================================================== --- head/lib/libc/locale/isalpha.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isalpha.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isalpha.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISALPHA 3 .Os .Sh NAME @@ -73,15 +73,6 @@ In the ASCII character set, this include .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''" .It "\&171\ ``y'' \t172\ ``z''" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn isalpha -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isalpha Modified: head/lib/libc/locale/isascii.3 ============================================================================== --- head/lib/libc/locale/isascii.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isascii.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -28,7 +28,7 @@ .\" @(#)isascii.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd October 6, 2002 .Dt ISASCII 3 .Os .Sh NAME @@ -47,15 +47,6 @@ function tests for an .Tn ASCII character, which is any character between 0 and octal 0177 inclusive. -.Pp -.Em NOTE : -if the value passed to the -.Fn isascii -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh SEE ALSO .Xr ctype 3 , .Xr iswascii 3 , Modified: head/lib/libc/locale/isblank.3 ============================================================================== --- head/lib/libc/locale/isblank.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isblank.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -28,7 +28,7 @@ .\" @(#)isblank.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISBLANK 3 .Os .Sh NAME @@ -57,15 +57,6 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . -.Pp -.Em NOTE : -if the value passed to the -.Fn isblank -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isblank Modified: head/lib/libc/locale/iscntrl.3 ============================================================================== --- head/lib/libc/locale/iscntrl.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/iscntrl.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)iscntrl.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISCNTRL 3 .Os .Sh NAME @@ -65,15 +65,6 @@ In the ASCII character set, this include .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS" .It "\&036\ RS \t037\ US \t177\ DEL" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn iscntrl -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn iscntrl Modified: head/lib/libc/locale/isdigit.3 ============================================================================== --- head/lib/libc/locale/isdigit.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isdigit.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd May 4, 2007 .Dt ISDIGIT 3 .Os .Sh NAME @@ -68,15 +68,6 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . -.Pp -.Em NOTE : -if the value passed to the -.Fn isdigit -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isdigit Modified: head/lib/libc/locale/isgraph.3 ============================================================================== --- head/lib/libc/locale/isgraph.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isgraph.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISGRAPH 3 .Os .Sh NAME @@ -80,15 +80,6 @@ In the ASCII character set, this include .It "\&166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y'' \t172\ ``z''" .It "\&173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn isgraph -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isgraph Modified: head/lib/libc/locale/isideogram.3 ============================================================================== --- head/lib/libc/locale/isideogram.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isideogram.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd March 30, 2004 .Dt ISIDEOGRAM 3 .Os .Sh NAME @@ -41,15 +41,6 @@ The .Fn isideogram function tests for an ideographic character. -.Pp -.Em NOTE : -if the value passed to the -.Fn isideogram -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isideogram Modified: head/lib/libc/locale/islower.3 ============================================================================== --- head/lib/libc/locale/islower.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/islower.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)islower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISLOWER 3 .Os .Sh NAME @@ -64,15 +64,6 @@ In the ASCII character set, this include .It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" .It "\&172\ ``z''" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn islower -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn islower Modified: head/lib/libc/locale/isphonogram.3 ============================================================================== --- head/lib/libc/locale/isphonogram.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isphonogram.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd March 30, 2004 .Dt ISPHONOGRAM 3 .Os .Sh NAME @@ -41,15 +41,6 @@ The .Fn isphonogram function tests for a phonographic character. -.Pp -.Em NOTE : -if the value passed to the -.Fn isphonogram -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isphonogram Modified: head/lib/libc/locale/isprint.3 ============================================================================== --- head/lib/libc/locale/isprint.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isprint.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isprint.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISPRINT 3 .Os .Sh NAME @@ -78,15 +78,6 @@ In the ASCII character set, this include .It "\&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''" .It "\&172\ ``z'' \t173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn isprint -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isprint Modified: head/lib/libc/locale/ispunct.3 ============================================================================== --- head/lib/libc/locale/ispunct.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/ispunct.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)ispunct.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISPUNCT 3 .Os .Sh NAME @@ -70,15 +70,6 @@ In the ASCII character set, this include .It "\&136\ ``^'' \t137\ ``_'' \t140\ ```'' \t173\ ``{'' \t174\ ``|''" .It "\&175\ ``}'' \t176\ ``~''" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn ispunct -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn ispunct Modified: head/lib/libc/locale/isrune.3 ============================================================================== --- head/lib/libc/locale/isrune.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isrune.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd March 30, 2004 .Dt ISRUNE 3 .Os .Sh NAME @@ -46,15 +46,6 @@ In the .Tn ASCII character set, this is equivalent to .Fn isascii . -.Pp -.Em NOTE : -if the value passed to the -.Fn isrune -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isrune Modified: head/lib/libc/locale/isspace.3 ============================================================================== --- head/lib/libc/locale/isspace.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isspace.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isspace.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISSPACE 3 .Os .Sh NAME @@ -61,15 +61,6 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . -.Pp -.Em NOTE : -if the value passed to the -.Fn isspace -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isspace Modified: head/lib/libc/locale/isspecial.3 ============================================================================== --- head/lib/libc/locale/isspecial.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isspecial.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd March 30, 2004 .Dt ISSPECIAL 3 .Os .Sh NAME @@ -41,15 +41,6 @@ The .Fn isspecial function tests for a special character. -.Pp -.Em NOTE : -if the value passed to the -.Fn isspecial -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isspecial Modified: head/lib/libc/locale/isupper.3 ============================================================================== --- head/lib/libc/locale/isupper.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isupper.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISUPPER 3 .Os .Sh NAME @@ -64,15 +64,6 @@ In the ASCII character set, this include .It "\&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''" .It "\&132\ ``Z''" .El -.Pp -.Em NOTE : -if the value passed to the -.Fn isupper -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isupper Modified: head/lib/libc/locale/isxdigit.3 ============================================================================== --- head/lib/libc/locale/isxdigit.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/isxdigit.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt ISXDIGIT 3 .Os .Sh NAME @@ -71,15 +71,6 @@ The value of the argument must be repres .Vt "unsigned char" or the value of .Dv EOF . -.Pp -.Em NOTE : -if the value passed to the -.Fn isxdigit -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn isxdigit Modified: head/lib/libc/locale/toascii.3 ============================================================================== --- head/lib/libc/locale/toascii.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/toascii.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -28,7 +28,7 @@ .\" @(#)toascii.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd June 4, 1993 .Dt TOASCII 3 .Os .Sh NAME @@ -45,15 +45,6 @@ The .Fn toascii function strips all but the low 7 bits from a letter, including parity or other marker bits. -.Pp -.Em NOTE : -if the value passed to the -.Fn toascii -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES The .Fn toascii Modified: head/lib/libc/locale/tolower.3 ============================================================================== --- head/lib/libc/locale/tolower.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/tolower.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt TOLOWER 3 .Os .Sh NAME @@ -53,15 +53,6 @@ The argument must be representable as an .Vt "unsigned char" or the value of .Dv EOF . -.Pp -.Em NOTE : -if the value passed to the -.Fn tolower -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES If the argument is an upper-case letter, the .Fn tolower Modified: head/lib/libc/locale/toupper.3 ============================================================================== --- head/lib/libc/locale/toupper.3 Fri Sep 4 07:44:27 2009 (r196819) +++ head/lib/libc/locale/toupper.3 Fri Sep 4 07:44:58 2009 (r196820) @@ -32,7 +32,7 @@ .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 3, 2009 +.Dd July 17, 2005 .Dt TOUPPER 3 .Os .Sh NAME @@ -53,15 +53,6 @@ The argument must be representable as an .Vt "unsigned char" or the value of .Dv EOF . -.Pp -.Em NOTE : -if the value passed to the -.Fn toupper -function is a -.Vt signed char , -as is usually the case, it must be cast to an -.Vt unsigned char -to avoid sign-extension errors. .Sh RETURN VALUES If the argument is a lower-case letter, the .Fn toupper From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 07:53:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C11C1065696; Fri, 4 Sep 2009 07:53:46 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id BF8B48FC1F; Fri, 4 Sep 2009 07:53:45 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n847rgDK090672; Fri, 4 Sep 2009 11:53:42 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1252050822; bh=rxsp7SmWlP8W7LnlMmoZyULInE0bJFaV6lvd0FXpJGw=; l=503; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=lLtigaopSGoQj75sd5ARqex11paRbg/RIqhn9HA/u20Nv90rgzyyGCIgYbyEU+rti /DiKC7Jx44DklLzNtTS0IYiLYyeyzYU2nMowmjOwfIVmRjCwwOfDiHoYhIbxfRB+FE ay0L8wDLHPRH0jLEwxktiSTB1yLYQFtH1I2ZgyVs= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n847rfBH090671; Fri, 4 Sep 2009 11:53:41 +0400 (MSD) (envelope-from ache) Date: Fri, 4 Sep 2009 11:53:39 +0400 From: Andrey Chernov To: Bruce Evans Message-ID: <20090904075338.GA90644@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Dag-Erling Sm??rgrav , "Simon L. Nielsen" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> <86zl9c9z05.fsf@ds4.des.no> <20090904115255.Q48987@delplex.bde.org> <20090904144214.O49099@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090904144214.O49099@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, Dag-Erling Sm??rgrav , svn-src-all@freebsd.org, src-committers@freebsd.org, "Simon L. Nielsen" Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 07:53:46 -0000 On Fri, Sep 04, 2009 at 03:21:09PM +1000, Bruce Evans wrote: > % The value of the argument must be representable as an > % .Vt "unsigned char" > % or the value of > % .Dv EOF . > > This is the same as in POSIX except the POSIX wording is better (e.g., > the above only says implicitly that the behaviour is undefined if > "must" is not satisfied). It took too many commits (revs 1.8-1.10) to > get this far. BTW, do we have permissions for direct POSIX quotes? -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 08:59:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 479CE106566B; Fri, 4 Sep 2009 08:59:08 +0000 (UTC) (envelope-from simon@benji.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id 00A198FC18; Fri, 4 Sep 2009 08:59:08 +0000 (UTC) Received: from benji.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 873BE2D495D; Fri, 4 Sep 2009 08:59:06 +0000 (UTC) Received: by benji.nitro.dk (Postfix, from userid 2000) id 0504310A63; Fri, 4 Sep 2009 10:58:55 +0200 (CEST) Date: Fri, 4 Sep 2009 10:58:55 +0200 From: "Simon L. Nielsen" To: Andrey Chernov , Bruce Evans , Dag-Erling Sm??rgrav , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20090904085854.GA1311@zaphod.nitro.dk> References: <200909020456.n824uUqQ082136@svn.freebsd.org> <20090902070808.GA1290@arthur.nitro.dk> <20090902084002.GA17325@nagual.pp.ru> <867hwgcwvo.fsf@ds4.des.no> <20090903084325.GA65192@nagual.pp.ru> <86zl9c9z05.fsf@ds4.des.no> <20090904115255.Q48987@delplex.bde.org> <20090904144214.O49099@delplex.bde.org> <20090904075338.GA90644@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090904075338.GA90644@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 08:59:08 -0000 On 2009.09.04 11:53:39 +0400, Andrey Chernov wrote: > On Fri, Sep 04, 2009 at 03:21:09PM +1000, Bruce Evans wrote: > > % The value of the argument must be representable as an > > % .Vt "unsigned char" > > % or the value of > > % .Dv EOF . > > > > This is the same as in POSIX except the POSIX wording is better (e.g., > > the above only says implicitly that the behaviour is undefined if > > "must" is not satisfied). It took too many commits (revs 1.8-1.10) to > > get this far. > > BTW, do we have permissions for direct POSIX quotes? Yes. I thought I had made a web page about it, but I can't find it now, but see this: http://lists.freebsd.org/pipermail/freebsd-doc/2005-January/006862.html We haven't used it much AFAIK, but there are a few manual pages which does make use of POSIX text. -- Simon L. Nielsen From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 09:33:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 157D6106568F; Fri, 4 Sep 2009 09:33:51 +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 04E348FC13; Fri, 4 Sep 2009 09:33: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 n849Xoms060665; Fri, 4 Sep 2009 09:33:50 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n849Xoh3060664; Fri, 4 Sep 2009 09:33:50 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909040933.n849Xoh3060664@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 4 Sep 2009 09:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196822 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 09:33:51 -0000 Author: pjd Date: Fri Sep 4 09:33:50 2009 New Revision: 196822 URL: http://svn.freebsd.org/changeset/base/196822 Log: Remove 'ad:' prefix from disk serial number. We don't want serial number to change when we reconnect the disk in a way that it is accessible through CAM for example. Discussed with: trasz Modified: head/sys/dev/ata/ata-disk.c Modified: head/sys/dev/ata/ata-disk.c ============================================================================== --- head/sys/dev/ata/ata-disk.c Fri Sep 4 08:21:49 2009 (r196821) +++ head/sys/dev/ata/ata-disk.c Fri Sep 4 09:33:50 2009 (r196822) @@ -136,8 +136,8 @@ ad_attach(device_t dev) if ((atadev->param.support.command2 & ATA_SUPPORT_CFA) || atadev->param.config == ATA_PROTO_CFA) adp->disk->d_flags = DISKFLAG_CANDELETE; - snprintf(adp->disk->d_ident, sizeof(adp->disk->d_ident), "ad:%s", - atadev->param.serial); + strlcpy(adp->disk->d_ident, atadev->param.serial, + sizeof(adp->disk->d_ident)); disk_create(adp->disk, DISK_VERSION); device_add_child(dev, "subdisk", device_get_unit(dev)); ad_firmware_geom_adjust(dev, adp->disk); From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 09:39:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C96EA106568D; Fri, 4 Sep 2009 09:39:06 +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 9DC008FC2A; Fri, 4 Sep 2009 09:39:06 +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 n849d6TA060802; Fri, 4 Sep 2009 09:39:06 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n849d63V060800; Fri, 4 Sep 2009 09:39:06 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909040939.n849d63V060800@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 4 Sep 2009 09:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196823 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 09:39:06 -0000 Author: pjd Date: Fri Sep 4 09:39:06 2009 New Revision: 196823 URL: http://svn.freebsd.org/changeset/base/196823 Log: Simplify g_disk_ident_adjust() function and allow any printable character in serial number. Discussed with: trasz Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl) Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Fri Sep 4 09:33:50 2009 (r196822) +++ head/sys/geom/geom_disk.c Fri Sep 4 09:39:06 2009 (r196823) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -400,39 +401,25 @@ g_disk_destroy(void *ptr, int flag) } /* - * We only allow [a-zA-Z0-9-_@#%.:] characters, the rest is converted to 'x'. + * We only allow printable characters in disk ident, + * the rest is converted to 'x'. */ static void g_disk_ident_adjust(char *ident, size_t size) { - char newid[DISK_IDENT_SIZE], tmp[4]; - size_t len; - char *p; - - bzero(newid, sizeof(newid)); - len = 0; - for (p = ident; *p != '\0' && len < sizeof(newid) - 1; p++) { - switch (*p) { - default: - if ((*p < 'a' || *p > 'z') && - (*p < 'A' || *p > 'Z') && - (*p < '0' || *p > '9')) { - snprintf(tmp, sizeof(tmp), "x%02hhx", *p); - strlcat(newid, tmp, sizeof(newid)); - len += 3; - break; - } - /* FALLTHROUGH */ - case '-': - case '_': - case '@': - case '#': - case '%': - case '.': - case ':': - newid[len++] = *p; - break; + char *p, tmp[4], newid[DISK_IDENT_SIZE]; + + newid[0] = '\0'; + for (p = ident; *p != '\0'; p++) { + if (isprint(*p)) { + tmp[0] = *p; + tmp[1] = '\0'; + } else { + snprintf(tmp, sizeof(tmp), "x%02hhx", + *(unsigned char *)p); } + if (strlcat(newid, tmp, sizeof(newid)) >= sizeof(newid)) + break; } bzero(ident, size); strlcpy(ident, newid, size); From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 09:40:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECA371065672; Fri, 4 Sep 2009 09:40:59 +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 DC59C8FC23; Fri, 4 Sep 2009 09:40: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 n849ex2J060887; Fri, 4 Sep 2009 09:40:59 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n849exab060884; Fri, 4 Sep 2009 09:40:59 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909040940.n849exab060884@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 4 Sep 2009 09:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196824 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 09:41:00 -0000 Author: pjd Date: Fri Sep 4 09:40:59 2009 New Revision: 196824 URL: http://svn.freebsd.org/changeset/base/196824 Log: Make serial numbers of daX disks visible by GEOM. No objections from: scottl Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl) Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Sep 4 09:39:06 2009 (r196823) +++ head/sys/cam/scsi/scsi_da.c Fri Sep 4 09:40:59 2009 (r196824) @@ -1266,6 +1266,8 @@ daregister(struct cam_periph *periph, vo softc->disk->d_flags = 0; if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; + strlcpy(softc->disk->d_ident, cgd->serial_num, + MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); disk_create(softc->disk, DISK_VERSION); mtx_lock(periph->sim->mtx); From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 09:48:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08A151065672; Fri, 4 Sep 2009 09:48:19 +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 EC32D8FC08; Fri, 4 Sep 2009 09:48: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 n849mIXD061078; Fri, 4 Sep 2009 09:48:18 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n849mI3Y061075; Fri, 4 Sep 2009 09:48:18 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909040948.n849mI3Y061075@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 4 Sep 2009 09:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196825 - head/sys/opencrypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 09:48:19 -0000 Author: pjd Date: Fri Sep 4 09:48:18 2009 New Revision: 196825 URL: http://svn.freebsd.org/changeset/base/196825 Log: If crypto operation is finished with EAGAIN, don't repeat operation from the return context, but from the original context. Before repeating operation clear DONE flag and error. Reviewed by: sam Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl) Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Fri Sep 4 09:40:59 2009 (r196824) +++ head/sys/opencrypto/cryptodev.c Fri Sep 4 09:48:18 2009 (r196825) @@ -496,6 +496,7 @@ cryptodev_op( goto bail; } +again: /* * Let the dispatch run unlocked, then, interlock against the * callback before checking if the operation completed and going @@ -512,6 +513,12 @@ cryptodev_op( if (error != 0) goto bail; + if (crp->crp_etype == EAGAIN) { + crp->crp_etype = 0; + crp->crp_flags &= ~CRYPTO_F_DONE; + goto again; + } + if (crp->crp_etype != 0) { error = crp->crp_etype; goto bail; @@ -545,16 +552,10 @@ cryptodev_cb(void *op) { struct cryptop *crp = (struct cryptop *) op; struct csession *cse = (struct csession *)crp->crp_opaque; - int error; - error = crp->crp_etype; - if (error == EAGAIN) - error = crypto_dispatch(crp); mtx_lock(&cse->lock); - if (error != 0 || (crp->crp_flags & CRYPTO_F_DONE)) { - cse->error = error; - wakeup_one(crp); - } + cse->error = crp->crp_etype; + wakeup_one(crp); mtx_unlock(&cse->lock); return (0); } From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 09:57:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0BA8106566C; Fri, 4 Sep 2009 09:57:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF6498FC0A; Fri, 4 Sep 2009 09:57: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 n849v3Fm061287; Fri, 4 Sep 2009 09:57:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n849v3MZ061284; Fri, 4 Sep 2009 09:57:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909040957.n849v3MZ061284@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 4 Sep 2009 09:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196826 - head/sys/dev/usb/storage X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 09:57:03 -0000 Author: trasz Date: Fri Sep 4 09:57:03 2009 New Revision: 196826 URL: http://svn.freebsd.org/changeset/base/196826 Log: Make umass(4) pass device USB serial number to CAM, making it possible to e.g. retrieve it using camcontrol(8). Reviewed by: scottl, hps (earlier version) Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl) Modified: head/sys/dev/usb/storage/umass.c Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Fri Sep 4 09:48:18 2009 (r196825) +++ head/sys/dev/usb/storage/umass.c Fri Sep 4 09:57:03 2009 (r196826) @@ -124,6 +124,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "usbdevs.h" #include @@ -2978,6 +2979,28 @@ umass_cam_action(struct cam_sim *sim, un if (sc->sc_transfer.cmd_data[0] == INQUIRY) { /* + * Umass devices don't generally report their serial numbers + * in the usual SCSI way. Emulate it here. + */ + if ((sc->sc_transfer.cmd_data[1] & SI_EVPD) && + sc->sc_transfer.cmd_data[2] == SVPD_UNIT_SERIAL_NUMBER && + sc->sc_udev != NULL && + sc->sc_udev->serial != NULL && + sc->sc_udev->serial[0] != '\0') { + struct scsi_vpd_unit_serial_number *vpd_serial; + + vpd_serial = (struct scsi_vpd_unit_serial_number *)ccb->csio.data_ptr; + vpd_serial->length = strlen(sc->sc_udev->serial); + if (vpd_serial->length > sizeof(vpd_serial->serial_num)) + vpd_serial->length = sizeof(vpd_serial->serial_num); + memcpy(vpd_serial->serial_num, sc->sc_udev->serial, vpd_serial->length); + ccb->csio.scsi_status = SCSI_STATUS_OK; + ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); + goto done; + } + + /* * Handle EVPD inquiry for broken devices first * NO_INQUIRY also implies NO_INQUIRY_EVPD */ @@ -3193,6 +3216,29 @@ umass_cam_cb(struct umass_softc *sc, uni maxsector = scsi_4btoul(rcap->addr) - 1; scsi_ulto4b(maxsector, rcap->addr); } + /* + * We have to add SVPD_UNIT_SERIAL_NUMBER to the list + * of pages supported by the device - otherwise, CAM + * will never ask us for the serial number if the + * device cannot handle that by itself. + */ + if (ccb->ccb_h.func_code == XPT_SCSI_IO && + sc->sc_transfer.cmd_data[0] == INQUIRY && + (sc->sc_transfer.cmd_data[1] & SI_EVPD) && + sc->sc_transfer.cmd_data[2] == SVPD_SUPPORTED_PAGE_LIST && + sc->sc_udev != NULL && + sc->sc_udev->serial != NULL && + sc->sc_udev->serial[0] != '\0') { + struct ccb_scsiio *csio; + struct scsi_vpd_supported_page_list *page_list; + + csio = &ccb->csio; + page_list = (struct scsi_vpd_supported_page_list *)csio->data_ptr; + if (page_list->length + 1 < SVPD_SUPPORTED_PAGES_SIZE) { + page_list->list[page_list->length] = SVPD_UNIT_SERIAL_NUMBER; + page_list->length++; + } + } xpt_done(ccb); break; From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 10:22:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0EAB106568F; Fri, 4 Sep 2009 10:22:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F6E28FC08; Fri, 4 Sep 2009 10:22:29 +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 n84AMTTu061887; Fri, 4 Sep 2009 10:22:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84AMTJD061884; Fri, 4 Sep 2009 10:22:29 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909041022.n84AMTJD061884@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 4 Sep 2009 10:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196827 - head/bin/getfacl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 10:22:29 -0000 Author: trasz Date: Fri Sep 4 10:22:29 2009 New Revision: 196827 URL: http://svn.freebsd.org/changeset/base/196827 Log: Add NFSv4 ACL support to getfacl(1). Reviewed by: rwatson Modified: head/bin/getfacl/getfacl.1 head/bin/getfacl/getfacl.c Modified: head/bin/getfacl/getfacl.1 ============================================================================== --- head/bin/getfacl/getfacl.1 Fri Sep 4 09:57:03 2009 (r196826) +++ head/bin/getfacl/getfacl.1 Fri Sep 4 10:22:29 2009 (r196827) @@ -30,7 +30,7 @@ .\" Developed by the TrustedBSD Project. .\" Support for POSIX.1e access control lists. .\" -.Dd March 13, 2006 +.Dd September 04, 2009 .Dt GETFACL 1 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd get ACL information .Sh SYNOPSIS .Nm -.Op Fl dhq +.Op Fl dhinqv .Op Ar .Sh DESCRIPTION The @@ -61,13 +61,25 @@ The operation applies to the default ACL access ACL. An error is generated if a default ACL cannot be associated with .Ar file . +This option is not valid for NFSv4 ACLs. .It Fl h If the target of the operation is a symbolic link, return the ACL from the symbolic link itself rather than following the link. +.It Fl i +For NFSv4 ACLs, append numerical ID at the end of each entry containing +user or group name. +Ignored for POSIX.1e ACLs. +.It Fl n +Display user and group IDs numerically rather than converting to +a user or group name. +Ignored for POSIX.1e ACLs. .It Fl q Do not write commented information about file name and ownership. This is useful when dealing with filenames with unprintable characters. +.It Fl v +For NFSv4 ACLs, display access mask and flags in a verbose form. +Ignored for POSIX.1e ACLs. .El .Pp The following operand is available: Modified: head/bin/getfacl/getfacl.c ============================================================================== --- head/bin/getfacl/getfacl.c Fri Sep 4 09:57:03 2009 (r196826) +++ head/bin/getfacl/getfacl.c Fri Sep 4 10:22:29 2009 (r196827) @@ -54,7 +54,7 @@ static void usage(void) { - fprintf(stderr, "getfacl [-dhq] [file ...]\n"); + fprintf(stderr, "getfacl [-dhnqv] [file ...]\n"); } static char * @@ -175,22 +175,39 @@ acl_from_stat(struct stat sb) } static int -print_acl(char *path, acl_type_t type, int hflag, int qflag) +print_acl(char *path, acl_type_t type, int hflag, int iflag, int nflag, + int qflag, int vflag) { struct stat sb; acl_t acl; char *acl_text; - int error; + int error, flags = 0, ret; if (hflag) error = lstat(path, &sb); else error = stat(path, &sb); if (error == -1) { - warn("%s", path); + warn("%s: stat() failed", path); return(-1); } + if (hflag) + ret = lpathconf(path, _PC_ACL_NFS4); + else + ret = pathconf(path, _PC_ACL_NFS4); + if (ret > 0) { + if (type == ACL_TYPE_DEFAULT) { + warnx("%s: there are no default entries in NFSv4 ACLs", + path); + return (-1); + } + type = ACL_TYPE_NFS4; + } else if (ret < 0 && errno != EINVAL) { + warn("%s: pathconf(..., _PC_ACL_NFS4) failed", path); + return (-1); + } + if (more_than_one) printf("\n"); else @@ -210,18 +227,27 @@ print_acl(char *path, acl_type_t type, i return(-1); } errno = 0; - if (type != ACL_TYPE_ACCESS) + if (type == ACL_TYPE_DEFAULT) return(0); acl = acl_from_stat(sb); if (!acl) { - warn("acl_from_stat()"); + warn("%s: acl_from_stat() failed", path); return(-1); } } - acl_text = acl_to_text(acl, 0); + if (iflag) + flags |= ACL_TEXT_APPEND_ID; + + if (nflag) + flags |= ACL_TEXT_NUMERIC_IDS; + + if (vflag) + flags |= ACL_TEXT_VERBOSE; + + acl_text = acl_to_text_np(acl, 0, flags); if (!acl_text) { - warn("%s", path); + warn("%s: acl_to_text_np() failed", path); return(-1); } @@ -234,7 +260,8 @@ print_acl(char *path, acl_type_t type, i } static int -print_acl_from_stdin(acl_type_t type, int hflag, int qflag) +print_acl_from_stdin(acl_type_t type, int hflag, int iflag, int nflag, + int qflag, int vflag) { char *p, pathname[PATH_MAX]; int carried_error = 0; @@ -242,7 +269,8 @@ print_acl_from_stdin(acl_type_t type, in while (fgets(pathname, (int)sizeof(pathname), stdin)) { if ((p = strchr(pathname, '\n')) != NULL) *p = '\0'; - if (print_acl(pathname, type, hflag, qflag) == -1) { + if (print_acl(pathname, type, hflag, iflag, nflag, + qflag, vflag) == -1) { carried_error = -1; } } @@ -256,11 +284,14 @@ main(int argc, char *argv[]) acl_type_t type = ACL_TYPE_ACCESS; int carried_error = 0; int ch, error, i; - int hflag, qflag; + int hflag, iflag, qflag, nflag, vflag; hflag = 0; + iflag = 0; qflag = 0; - while ((ch = getopt(argc, argv, "dhq")) != -1) + nflag = 0; + vflag = 0; + while ((ch = getopt(argc, argv, "dhinqv")) != -1) switch(ch) { case 'd': type = ACL_TYPE_DEFAULT; @@ -268,9 +299,18 @@ main(int argc, char *argv[]) case 'h': hflag = 1; break; + case 'i': + iflag = 1; + break; + case 'n': + nflag = 1; + break; case 'q': qflag = 1; break; + case 'v': + vflag = 1; + break; default: usage(); return(-1); @@ -279,17 +319,20 @@ main(int argc, char *argv[]) argv += optind; if (argc == 0) { - error = print_acl_from_stdin(type, hflag, qflag); + error = print_acl_from_stdin(type, hflag, iflag, nflag, + qflag, vflag); return(error ? 1 : 0); } for (i = 0; i < argc; i++) { if (!strcmp(argv[i], "-")) { - error = print_acl_from_stdin(type, hflag, qflag); + error = print_acl_from_stdin(type, hflag, iflag, nflag, + qflag, vflag); if (error == -1) carried_error = -1; } else { - error = print_acl(argv[i], type, hflag, qflag); + error = print_acl(argv[i], type, hflag, iflag, nflag, + qflag, vflag); if (error == -1) carried_error = -1; } From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 10:32:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C5D106566B; Fri, 4 Sep 2009 10:32:16 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id B6E2C8FC13; Fri, 4 Sep 2009 10:32:15 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 98C141CE49; Fri, 4 Sep 2009 12:32:14 +0200 (CEST) Date: Fri, 4 Sep 2009 12:32:14 +0200 From: Ed Schouten To: "Andrey A. Chernov" Message-ID: <20090904103214.GW2829@hoeg.nl> References: <200909040742.n847gD62058267@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="S2CovAv8lqFB/Tem" Content-Disposition: inline In-Reply-To: <200909040742.n847gD62058267@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196818 - head/contrib/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 10:32:16 -0000 --S2CovAv8lqFB/Tem Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Andrey, * Andrey A. Chernov wrote: > 1) Remove single occurance of HAS_CTYPE ifdef, ctype functions > used here for a long time and needs their header in anycase. > 2) Add (unsigned char) casts to more ctype macros. > 3) Simplify menu input handling using ctype instead of range unguarded > hardcoded tricks. Even though I really appreciate fixes/cleanups to ee(1), I think changes like these should be sent to its maintainer as well. Have you done this? --=20 Ed Schouten WWW: http://80386.nl/ --S2CovAv8lqFB/Tem Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqg7K4ACgkQ52SDGA2eCwXM2QCePT8DwLBxvB05e0nTuK1//1+g PRwAn1yb9FC4hPRQ8Or8PWJL8dSzRbHW =BNFE -----END PGP SIGNATURE----- --S2CovAv8lqFB/Tem-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 14:02:28 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC447106566B; Fri, 4 Sep 2009 14:02:28 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 3E1148FC21; Fri, 4 Sep 2009 14:02:27 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n84E2JAP003511; Fri, 4 Sep 2009 18:02:19 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1252072939; bh=/owvS1eV1ehbwQOkqudB53Vl6x95gk4m5dDbs4BsDk8=; l=714; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=Pzr42a7XpZzU55yGpxzlkHJr8sBX6Sr+5s/0luQsaiVXJEA58QWx8T7qktbh5Wswq 0sCTrUXGzy8M9nDsj8VpKLLUK2s1NdZUr7lBf180AsOoEDZfcNAeSOTrsKfNIPaGhh iCpPxV9he+A27nOEb6gRAWH7H5fK8Y90Ali6pzt8= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n84E2JUe003510; Fri, 4 Sep 2009 18:02:19 +0400 (MSD) (envelope-from ache) Date: Fri, 4 Sep 2009 18:02:19 +0400 From: Andrey Chernov To: Ed Schouten Message-ID: <20090904140219.GA3179@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Ed Schouten , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <200909040742.n847gD62058267@svn.freebsd.org> <20090904103214.GW2829@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <20090904103214.GW2829@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196818 - head/contrib/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 14:02:28 -0000 --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 04, 2009 at 12:32:14PM +0200, Ed Schouten wrote: > Even though I really appreciate fixes/cleanups to ee(1), I think changes > like these should be sent to its maintainer as well. Have you done this? Yes. --=20 http://ache.pp.ru/ --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqhHesACgkQVg5YK5ZEdN3OJgCgtrmTzLt7TMRgKS0wHv4W6IXm yjsAn2DeEUE16xrGN+aBauQwP63hR0NJ =8bHT -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 14:50:07 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28EA3106566C; Fri, 4 Sep 2009 14:50:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id BFD3A8FC1E; Fri, 4 Sep 2009 14:50:06 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id D62071CE49; Fri, 4 Sep 2009 16:50:05 +0200 (CEST) Date: Fri, 4 Sep 2009 16:50:05 +0200 From: Ed Schouten To: Andrey Chernov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-ID: <20090904145005.GX2829@hoeg.nl> References: <200909040742.n847gD62058267@svn.freebsd.org> <20090904103214.GW2829@hoeg.nl> <20090904140219.GA3179@nagual.pp.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jtEtYGE75hrP1CgP" Content-Disposition: inline In-Reply-To: <20090904140219.GA3179@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r196818 - head/contrib/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 14:50:07 -0000 --jtEtYGE75hrP1CgP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Andrey Chernov wrote: > On Fri, Sep 04, 2009 at 12:32:14PM +0200, Ed Schouten wrote: > > Even though I really appreciate fixes/cleanups to ee(1), I think changes > > like these should be sent to its maintainer as well. Have you done this? >=20 > Yes. Great! The reason why I was being a little negative, is because I noticed the previous version of ee(1) we had, had a lot of local patches that were very hard to merge. It turned out most of the features were implemented upstream as well, albeit differently. It's nice to see someone step up to hunt down bugs in ee(1). --=20 Ed Schouten WWW: http://80386.nl/ --jtEtYGE75hrP1CgP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqhKR0ACgkQ52SDGA2eCwVZ5ACZAXWTX+ktlwX/4OShk2wLa3jo VqkAn35yJA0ziVd8HgijjrTjMCOrt78t =/rA7 -----END PGP SIGNATURE----- --jtEtYGE75hrP1CgP-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 14:53:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A10B01065679; Fri, 4 Sep 2009 14:53:12 +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 90B258FC1E; Fri, 4 Sep 2009 14: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 n84ErCk5075968; Fri, 4 Sep 2009 14:53:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84ErCtU075966; Fri, 4 Sep 2009 14:53:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909041453.n84ErCtU075966@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 4 Sep 2009 14:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196829 - head/sys/i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 14:53:12 -0000 Author: kib Date: Fri Sep 4 14:53:12 2009 New Revision: 196829 URL: http://svn.freebsd.org/changeset/base/196829 Log: Add missing ';'. Modified: head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Sep 4 11:32:05 2009 (r196828) +++ head/sys/i386/i386/machdep.c Fri Sep 4 14:53:12 2009 (r196829) @@ -2570,7 +2570,7 @@ init386(first) default_proc_ldt.ldt_base = (caddr_t)ldt; default_proc_ldt.ldt_len = 6; _default_ldt = (int)&default_proc_ldt; - PCPU_SET(currentldt, _default_ldt) + PCPU_SET(currentldt, _default_ldt); PT_SET_MA(ldt, *vtopte((unsigned long)ldt) & ~PG_RW); xen_set_ldt((unsigned long) ldt, (sizeof ldt_segs / sizeof ldt_segs[0])); From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 15:00:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DD001065676; Fri, 4 Sep 2009 15:00:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id C9F018FC17; Fri, 4 Sep 2009 15:00:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 823D841C705; Fri, 4 Sep 2009 17:00:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id EK6te7-60ddP; Fri, 4 Sep 2009 17:00:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id AE8FE41C6FC; Fri, 4 Sep 2009 17:00:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id DEF6B4448E6; Fri, 4 Sep 2009 14:57:07 +0000 (UTC) Date: Fri, 4 Sep 2009 14:57:07 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Konstantin Belousov In-Reply-To: <200909041453.n84ErCtU075966@svn.freebsd.org> Message-ID: <20090904145527.S68375@maildrop.int.zabbadoz.net> References: <200909041453.n84ErCtU075966@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196829 - head/sys/i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 15:00:08 -0000 On Fri, 4 Sep 2009, Konstantin Belousov wrote: > Author: kib > Date: Fri Sep 4 14:53:12 2009 > New Revision: 196829 > URL: http://svn.freebsd.org/changeset/base/196829 > > Log: > Add missing ';'. This hadn't been noticed for a year as up to r196810 PCPU_SET was a { .. } block. With r196811 it was changed to do { .. } while (0) and thus the missing ';' immediately became a syntax error. > Modified: > head/sys/i386/i386/machdep.c > > Modified: head/sys/i386/i386/machdep.c > ============================================================================== > --- head/sys/i386/i386/machdep.c Fri Sep 4 11:32:05 2009 (r196828) > +++ head/sys/i386/i386/machdep.c Fri Sep 4 14:53:12 2009 (r196829) > @@ -2570,7 +2570,7 @@ init386(first) > default_proc_ldt.ldt_base = (caddr_t)ldt; > default_proc_ldt.ldt_len = 6; > _default_ldt = (int)&default_proc_ldt; > - PCPU_SET(currentldt, _default_ldt) > + PCPU_SET(currentldt, _default_ldt); > PT_SET_MA(ldt, *vtopte((unsigned long)ldt) & ~PG_RW); > xen_set_ldt((unsigned long) ldt, (sizeof ldt_segs / sizeof ldt_segs[0])); > > -- Bjoern A. Zeeb What was I talking about and who are you again? From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 15:02:35 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F2F21065672; Fri, 4 Sep 2009 15:02:35 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 969968FC15; Fri, 4 Sep 2009 15:02:34 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id n84F2Vf4004164; Fri, 4 Sep 2009 19:02:31 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1252076551; bh=V7TJtHU920OLURtKByV7XBYLPooJqCey1YGtNjjljBY=; l=1538; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=Vin/gnwpK4am4M+1xbeEPyFwl5E3csJGCL+5mXXwhEmlHZdlqEYD/FuBMYPGKYKSC VeGh+MrWTMBqitzYJDKtDfh66HLtKWK86s3xAXpF/r9IskUlyE50hYZkSnKKDuXTye 8Xqr3OXQUnBNFBvBEV3xhC8shuYPPUnkh97//gbk= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id n84F2UL1004161; Fri, 4 Sep 2009 19:02:31 +0400 (MSD) (envelope-from ache) Date: Fri, 4 Sep 2009 19:02:29 +0400 From: Andrey Chernov To: Ed Schouten Message-ID: <20090904150229.GA4007@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Ed Schouten , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <200909040742.n847gD62058267@svn.freebsd.org> <20090904103214.GW2829@hoeg.nl> <20090904140219.GA3179@nagual.pp.ru> <20090904145005.GX2829@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <20090904145005.GX2829@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196818 - head/contrib/ee X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 15:02:35 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 04, 2009 at 04:50:05PM +0200, Ed Schouten wrote: > * Andrey Chernov wrote: > > On Fri, Sep 04, 2009 at 12:32:14PM +0200, Ed Schouten wrote: > > > Even though I really appreciate fixes/cleanups to ee(1), I think chan= ges > > > like these should be sent to its maintainer as well. Have you done th= is? > >=20 > > Yes. >=20 > Great! The reason why I was being a little negative, is because I > noticed the previous version of ee(1) we had, had a lot of local patches > that were very hard to merge. It turned out most of the features were > implemented upstream as well, albeit differently. >=20 > It's nice to see someone step up to hunt down bugs in ee(1). I got no reply from the author yet, lets wait. Ctype stuff there was in pre-POSIX (and even pre-BSD4.3) old times state,= =20 but luckily enough it affect only several edge cases in FreeBSD. Most unpleasant bug which was the reason I start to look there was all=20 8bit chars highlighting due to passing negative chars to waddch(). --=20 http://ache.pp.ru/ --envbJBWh7q8WU6mo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqhLAUACgkQVg5YK5ZEdN2SqgCgqB4OOpyRZjHuAtrF+/Se0Ayy kIcAn3aGNxvnXP30OJ9WkmQvoWXHTxwh =9j2L -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 15:18:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DA90106566B; Fri, 4 Sep 2009 15:18:48 +0000 (UTC) (envelope-from gnn@hudson-trading.com) Received: from exprod7og115.obsmtp.com (exprod7og115.obsmtp.com [64.18.2.217]) by mx1.freebsd.org (Postfix) with SMTP id 00FF48FC19; Fri, 4 Sep 2009 15:18:46 +0000 (UTC) Received: from source ([74.125.92.148]) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKSqEv1svJ3Rwoqz0xlVJzp2ZZ4v3LvLET@postini.com; Fri, 04 Sep 2009 08:18:47 PDT Received: by qw-out-1920.google.com with SMTP id 5so218526qwc.14 for ; Fri, 04 Sep 2009 08:18:46 -0700 (PDT) Received: by 10.224.108.4 with SMTP id d4mr7349495qap.318.1252076115711; Fri, 04 Sep 2009 07:55:15 -0700 (PDT) Received: from gnnmac.hudson-trading.com ([209.249.190.8]) by mx.google.com with ESMTPS id 20sm640270qyk.1.2009.09.04.07.55.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 04 Sep 2009 07:55:14 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1075.2) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: George Neville-Neil In-Reply-To: <4AA09B41.3040103@incunabulum.net> Date: Fri, 4 Sep 2009 10:55:13 -0400 Content-Transfer-Encoding: 7bit Message-Id: <3C6607F2-D517-41EC-8681-33236EC6D20F@FreeBSD.org> References: <200909032110.n83LAvUF044731@svn.freebsd.org> <4AA09B41.3040103@incunabulum.net> To: Bruce Simpson X-Mailer: Apple Mail (2.1075.2) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 15:18:48 -0000 On Sep 4, 2009, at 00:44 , Bruce Simpson wrote: > George V. Neville-Neil wrote: >> Author: gnn >> Date: Thu Sep 3 21:10:57 2009 >> New Revision: 196797 >> URL: http://svn.freebsd.org/changeset/base/196797 >> >> Log: >> Add ARP statistics to the kernel and netstat. >> > > Thanks very much for this change. > Any chance this struct can get explicitly versioned (i.e. as for > struct igmpstat) as it is a new struct? > bz@ and I will likely be tweaking this over time, so we can probably do that. Later, George From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:20:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 592A41065672; Fri, 4 Sep 2009 17:20:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 0FC798FC12; Fri, 4 Sep 2009 17:20:06 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 531B941C6FC; Fri, 4 Sep 2009 19:20:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id OvqzO894JnNF; Fri, 4 Sep 2009 19:20:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id EA7E341C6A3; Fri, 4 Sep 2009 19:20:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 99AB64448E6; Fri, 4 Sep 2009 17:19:12 +0000 (UTC) Date: Fri, 4 Sep 2009 17:19:12 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Bruce Simpson In-Reply-To: <3C6607F2-D517-41EC-8681-33236EC6D20F@FreeBSD.org> Message-ID: <20090904171511.Q68375@maildrop.int.zabbadoz.net> References: <200909032110.n83LAvUF044731@svn.freebsd.org> <4AA09B41.3040103@incunabulum.net> <3C6607F2-D517-41EC-8681-33236EC6D20F@FreeBSD.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, George Neville-Neil , src-committers@FreeBSD.org Subject: Re: svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:20:07 -0000 On Fri, 4 Sep 2009, George Neville-Neil wrote: Hi, > On Sep 4, 2009, at 00:44 , Bruce Simpson wrote: > >> George V. Neville-Neil wrote: >>> Author: gnn >>> Date: Thu Sep 3 21:10:57 2009 >>> New Revision: 196797 >>> URL: http://svn.freebsd.org/changeset/base/196797 >>> >>> Log: >>> Add ARP statistics to the kernel and netstat. >>> >> >> Thanks very much for this change. >> Any chance this struct can get explicitly versioned (i.e. as for struct >> igmpstat) as it is a new struct? >> > > bz@ and I will likely be tweaking this over time, so we can probably do that. I am not entirely sure what "versioning" that struct would help? ARP is from the early 80s, we've got 8 variables and 4 spares and I cannot forsee any major rewrite of the code or the protocoll to gather a lot more stats anymore. /bz -- Bjoern A. Zeeb What was I talking about and who are you again? From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:31:05 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BD271065700; Fri, 4 Sep 2009 17:31:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 15F818FC21; Fri, 4 Sep 2009 17:31:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n84HS00l003294; Fri, 4 Sep 2009 11:28:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 04 Sep 2009 11:29:19 -0600 (MDT) Message-Id: <20090904.112919.1521002024.imp@bsdimp.com> To: attilio@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200909031340.n83Defkv034013@svn.freebsd.org> References: <200909031340.n83Defkv034013@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196779 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:31:05 -0000 In message: <200909031340.n83Defkv034013@svn.freebsd.org> Attilio Rao writes: : Author: attilio : Date: Thu Sep 3 13:40:41 2009 : New Revision: 196779 : URL: http://svn.freebsd.org/changeset/base/196779 : : Log: : Add intermediate states for attaching and detaching that will be : reused by the enhached newbus locking once it is checked in. : This change can be easilly MFCed to STABLE_8 at the appropriate moment. That appropriate moment better be ASAP. At least for the change I've highlighed below, since it changes the ABI. Btw, this change also breaks devinfo. : Modified: head/sys/sys/bus.h : ============================================================================== : --- head/sys/sys/bus.h Thu Sep 3 12:41:00 2009 (r196778) : +++ head/sys/sys/bus.h Thu Sep 3 13:40:41 2009 (r196779) : @@ -52,8 +52,11 @@ struct u_businfo { : typedef enum device_state { : DS_NOTPRESENT, /**< @brief not probed or probe failed */ : DS_ALIVE, /**< @brief probe succeeded */ : + DS_ATTACHING, /**< @brief attaching is in progress */ : DS_ATTACHED, /**< @brief attach method called */ : - DS_BUSY /**< @brief device is open */ : + DS_BUSY, /**< @brief device is open */ : + DS_DETACHING /**< @brief detaching is in progress */ : + : } device_state_t; device_state_t is exported to userland via devctl. Well, that's not entirely true... It isn't used EXACTLY, but there's this in devinfo.h: /* * State of the device. */ /* XXX not sure if I want a copy here, or expose sys/bus.h */ typedef enum devinfo_state { DIS_NOTPRESENT, /* not probed or probe failed */ DIS_ALIVE, /* probe succeeded */ DIS_ATTACHED, /* attach method called */ DIS_BUSY /* device is open */ } devinfo_state_t; which is why devinfo is broken. Also, DS_BUSY is used in many drivers to PREVENT detaching. So the change is bad from that point of view, since DS_DETACHING is now > DS_BUSY. There's really a partial ordering relationship now where before there was a total ordering (DS_BUSY is > DS_ATTACHED and DS_DETACHING is > DS_ATTACH, but DS_DETACHING isn't > DS_BUSY and DS_BUSY isn't > DS_DETACHING). I think that you've destroyed information here by unconditionally setting it: - if ((error = DEVICE_DETACH(dev)) != 0) + dev->state = DS_DETACHING; + if ((error = DEVICE_DETACH(dev)) != 0) { + KASSERT(dev->state == DS_DETACHING, + ("%s: %p device state must not been changing", __func__, + dev)); + dev->state = DS_ATTACHED; return (error); + } + KASSERT(dev->state == DS_DETACHING, + ("%s: %p device state must not been changing", __func__, dev)); And this looks racy between the check earlier and this setting. Properly locked, this wouldn't destroy information... At the very least cardbus/cardbus.c and pccard/pccard.c need to be looked at since they both have code that looks like: for (tmp = 0; tmp < numdevs; tmp++) { struct cardbus_devinfo *dinfo = device_get_ivars(devlist[tmp]); int status = device_get_state(devlist[tmp]); if (dinfo->pci.cfg.dev != devlist[tmp]) device_printf(cbdev, "devinfo dev mismatch\n"); if (status == DS_ATTACHED || status == DS_BUSY) device_detach(devlist[tmp]); cardbus_release_all_resources(cbdev, dinfo); cardbus_device_destroy(dinfo); device_delete_child(cbdev, devlist[tmp]); pci_freecfg((struct pci_devinfo *)dinfo); } which does ignore errors returned by device_detach for the DS_BUSY case because there's not currently a good way to tell device_detach that it *MUST* detach the device *NOW* without any possibility of veto by the driver. The above code also isn't DS_DETACHING aware, and may be wrong in the face of this new state. Of course, grepping the tree does show one or two places where DS_BUSY is used inappropriately: rp.c: static int rp_pcidetach(device_t dev) { CONTROLLER_t *ctlp; if (device_get_state(dev) == DS_BUSY) return (EBUSY); is one example. The above check should just be removed (ditto for its SHUTDOWN) routine. So I think we should fix rp.c, but we need to talk through this change a little more. I'm surprised I wasn't even pinged about it, since it hits code that I maintain and a simple grep would have found... I'm not yet asking for it to be backed out, but I don't like it on its surface and want to talk about it in more detail. Warner From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:33:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E52EF106566B; Fri, 4 Sep 2009 17:33:44 +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 BDD648FC15; Fri, 4 Sep 2009 17:33:44 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 3B9ED46B1A; Fri, 4 Sep 2009 13:33:44 -0400 (EDT) Date: Fri, 4 Sep 2009 18:33:44 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Bruce Simpson In-Reply-To: <4AA09B41.3040103@incunabulum.net> Message-ID: References: <200909032110.n83LAvUF044731@svn.freebsd.org> <4AA09B41.3040103@incunabulum.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, "George V. Neville-Neil" , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:33:45 -0000 On Fri, 4 Sep 2009, Bruce Simpson wrote: > George V. Neville-Neil wrote: >> Author: gnn >> Date: Thu Sep 3 21:10:57 2009 >> New Revision: 196797 >> URL: http://svn.freebsd.org/changeset/base/196797 >> >> Log: >> Add ARP statistics to the kernel and netstat. > > Thanks very much for this change. Any chance this struct can get explicitly > versioned (i.e. as for struct igmpstat) as it is a new struct? For sysctls, explicit versioning doesn't help too much -- what I've been pondering for another structure was including spares and having a capabilities field in the structure where flags are set when fields are known by the kernel. That way userspace can tell if the kernel knows about the field it cares about and therefore whether they're worth looking at. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:33:55 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB9911065769; Fri, 4 Sep 2009 17:33:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8E79D8FC1D; Fri, 4 Sep 2009 17:33:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n84HVsnp003335; Fri, 4 Sep 2009 11:31:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 04 Sep 2009 11:33:14 -0600 (MDT) Message-Id: <20090904.113314.1979406201.imp@bsdimp.com> To: attilio@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <3bbf2fe10909030646o2dc30166r303ee646572c741b@mail.gmail.com> References: <200909031340.n83Defkv034013@svn.freebsd.org> <3bbf2fe10909030646o2dc30166r303ee646572c741b@mail.gmail.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196779 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:33:56 -0000 In message: <3bbf2fe10909030646o2dc30166r303ee646572c741b@mail.gmail.com> Attilio Rao writes: : 2009/9/3 Attilio Rao : : > Author: attilio : > Date: Thu Sep 3 13:40:41 2009 : > New Revision: 196779 : > URL: http://svn.freebsd.org/changeset/base/196779 : > : > Log: : > Add intermediate states for attaching and detaching that will be : > reused by the enhached newbus locking once it is checked in. : > This change can be easilly MFCed to STABLE_8 at the appropriate moment. : : About this commit, there are a few of things which worths nothing: : - This has been committed separately from the new-bus locking because : it is planned to be MFCed before 8.0 goes out in order to offer the : correct ABI compatibility for merging, while 8.1-REL, the newbus : locking I understand why the change is made here, but I don't think it is the right one. Or at least I don't think I adequately understand its motivation and need to understand that better since it doesn't make sense to me. : - Probabilly what we really wanted here is just a transitioning state : instead than both DS_ATTACHING and DS_DETACHING. Some consumers would : eventually understand what of the 2 is that and one of these consumers : is device_is_attached(). That function is used improperly by many : detach handlers in a construct like: I don't understand the point you are trying to make here... I'm not sure that piggybacking this information on the state is the right approach. : int : foo_attach(device_t dev) : { : ... : if (error != 0) : foo_detach(dev); : ... : } : : int : foo_detach(device_dev) : { : ... : if (device_is_attached(dev)) { : /* do some handover */ : } : ... : } : : That is an incorrect behaviour which needs to be discouraged and that : will be fixed during 9.0. Why is that bad? There are a lot of drivers that do that. I don't understand the point you are making here... The alternatives are likely worse. Please let me know what the plan here is. : In the while this semantic (used by many drivers) makes the : single-transition state impraticable and so we will need to stick with : that device states also in 9.0. A lot of drivers use that idiom today. Are you signing up to make sure they all work in the future? Again: I wasn't consulted on this change, don't like it, and want to talk more about it. It broke devinfo, and ignored code in cardbus and pccard that likely needs to change to cope. Warner From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:41:46 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D60301065705 for ; Fri, 4 Sep 2009 17:41:46 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8FBCD8FC1A for ; Fri, 4 Sep 2009 17:41:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n84HdL4s003455; Fri, 4 Sep 2009 11:39:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 04 Sep 2009 11:40:40 -0600 (MDT) Message-Id: <20090904.114040.-93208535.imp@bsdimp.com> To: ache@nagual.pp.ru From: "M. Warner Losh" In-Reply-To: <20090904075338.GA90644@nagual.pp.ru> References: <20090904115255.Q48987@delplex.bde.org> <20090904144214.O49099@delplex.bde.org> <20090904075338.GA90644@nagual.pp.ru> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, simon@FreeBSD.org, brde@optusnet.com.au, svn-src-head@FreeBSD.org, des@des.no Subject: Re: svn commit: r196752 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:41:46 -0000 In message: <20090904075338.GA90644@nagual.pp.ru> Andrey Chernov writes: : On Fri, Sep 04, 2009 at 03:21:09PM +1000, Bruce Evans wrote: : > % The value of the argument must be representable as an : > % .Vt "unsigned char" : > % or the value of : > % .Dv EOF . : > : > This is the same as in POSIX except the POSIX wording is better (e.g., : > the above only says implicitly that the behaviour is undefined if : > "must" is not satisfied). It took too many commits (revs 1.8-1.10) to : > get this far. : : BTW, do we have permissions for direct POSIX quotes? Yes. However, if we take more than a couple of words, we need to include the POSIX copyright headers. There was email from core on this about 6 years ago, iirc. Warner From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:46:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD8421065679 for ; Fri, 4 Sep 2009 17:46:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outX.internet-mail-service.net (outx.internet-mail-service.net [216.240.47.247]) by mx1.freebsd.org (Postfix) with ESMTP id A31028FC18 for ; Fri, 4 Sep 2009 17:46:01 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 85B80ADA67; Fri, 4 Sep 2009 10:46:01 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id D2C5A2D6006; Fri, 4 Sep 2009 10:46:00 -0700 (PDT) Message-ID: <4AA15257.4050305@elischer.org> Date: Fri, 04 Sep 2009 10:45:59 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200909041453.n84ErCtU075966@svn.freebsd.org> <20090904145527.S68375@maildrop.int.zabbadoz.net> In-Reply-To: <20090904145527.S68375@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r196829 - head/sys/i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:46:01 -0000 Bjoern A. Zeeb wrote: > On Fri, 4 Sep 2009, Konstantin Belousov wrote: > >> Author: kib >> Date: Fri Sep 4 14:53:12 2009 >> New Revision: 196829 >> URL: http://svn.freebsd.org/changeset/base/196829 >> >> Log: >> Add missing ';'. > > This hadn't been noticed for a year as up to r196810 PCPU_SET was a > { > .. > } > block. With r196811 it was changed to > do { > .. > } while (0) > and thus the missing ';' immediately became a syntax error. so, why does my tree compile? > > >> Modified: >> head/sys/i386/i386/machdep.c >> >> Modified: head/sys/i386/i386/machdep.c >> ============================================================================== >> >> --- head/sys/i386/i386/machdep.c Fri Sep 4 11:32:05 2009 (r196828) >> +++ head/sys/i386/i386/machdep.c Fri Sep 4 14:53:12 2009 (r196829) >> @@ -2570,7 +2570,7 @@ init386(first) >> default_proc_ldt.ldt_base = (caddr_t)ldt; >> default_proc_ldt.ldt_len = 6; >> _default_ldt = (int)&default_proc_ldt; >> - PCPU_SET(currentldt, _default_ldt) >> + PCPU_SET(currentldt, _default_ldt); >> PT_SET_MA(ldt, *vtopte((unsigned long)ldt) & ~PG_RW); >> xen_set_ldt((unsigned long) ldt, (sizeof ldt_segs / sizeof >> ldt_segs[0])); >> >> > From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:51:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7796D1065676; Fri, 4 Sep 2009 17:51:24 +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 31C318FC19; Fri, 4 Sep 2009 17:51:24 +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 B845C46B2C; Fri, 4 Sep 2009 13:51:23 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C945B8A043; Fri, 4 Sep 2009 13:51:22 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Fri, 4 Sep 2009 13:49:53 -0400 User-Agent: KMail/1.9.7 References: <200909031340.n83Defkv034013@svn.freebsd.org> <3bbf2fe10909030646o2dc30166r303ee646572c741b@mail.gmail.com> <20090904.113314.1979406201.imp@bsdimp.com> In-Reply-To: <20090904.113314.1979406201.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909041349.53872.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 04 Sep 2009 13:51:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 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: attilio@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196779 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:51:24 -0000 On Friday 04 September 2009 1:33:14 pm M. Warner Losh wrote: > In message: <3bbf2fe10909030646o2dc30166r303ee646572c741b@mail.gmail.com> > Attilio Rao writes: > : 2009/9/3 Attilio Rao : > : > Author: attilio > : > Date: Thu Sep 3 13:40:41 2009 > : > New Revision: 196779 > : > URL: http://svn.freebsd.org/changeset/base/196779 > : > > : > Log: > : > Add intermediate states for attaching and detaching that will be > : > reused by the enhached newbus locking once it is checked in. > : > This change can be easilly MFCed to STABLE_8 at the appropriate moment. > : > : About this commit, there are a few of things which worths nothing: > : - This has been committed separately from the new-bus locking because > : it is planned to be MFCed before 8.0 goes out in order to offer the > : correct ABI compatibility for merging, while 8.1-REL, the newbus > : locking > > I understand why the change is made here, but I don't think it is the > right one. Or at least I don't think I adequately understand its > motivation and need to understand that better since it doesn't make > sense to me. > > : - Probabilly what we really wanted here is just a transitioning state > : instead than both DS_ATTACHING and DS_DETACHING. Some consumers would > : eventually understand what of the 2 is that and one of these consumers > : is device_is_attached(). That function is used improperly by many > : detach handlers in a construct like: > > I don't understand the point you are trying to make here... I'm not > sure that piggybacking this information on the state is the right > approach. We need a single state (though not really 2 IMO) so we can run device attach and detach routines w/o holding the new-bus lock (which it turns out we need to do as attach and detach routines can do too many things that aren't safe to do while holding the new-bus lock). > : int > : foo_attach(device_t dev) > : { > : ... > : if (error != 0) > : foo_detach(dev); > : ... > : } > : > : int > : foo_detach(device_dev) > : { > : ... > : if (device_is_attached(dev)) { > : /* do some handover */ > : } > : ... > : } > : > : That is an incorrect behaviour which needs to be discouraged and that > : will be fixed during 9.0. > > Why is that bad? There are a lot of drivers that do that. I don't > understand the point you are making here... I think it is sloppy/lazy at best. A detach routine should really only be used for detaching. > The alternatives are likely worse. Please let me know what the plan > here is. I think a very sane alternative is to split these detach routines up. All the bits that aren't conditional on 'device_is_attached()' would move into a 'foo_release_resources()' that foo_attach() calls on error. foo_detach() would then do all the work that is currently conditional on 'device_is_attached()' unconditionally and then invoke foo_release_resources(). A larger demo: int foo_attach() { sc->ifp = if_alloc(); ... ether_ifattach(sc->ifp); return (0); error: foo_detach(); } int foo_detach() { if (device_is_attached()) { ether_ifdetach(sc->ifp); } ... if_free(sc->ifp); } would now become this: int foo_attach() { sc->ifp = if_alloc(); ... ether_ifattach(sc->ifp); return (0); error: foo_release_resources(); } int foo_detach() { ether_ifdetach(sc->ifp); foo_release_resources(); } int foo_release_resources() { ... if_free(sc->ifp); } -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:51:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27C881065692 for ; Fri, 4 Sep 2009 17:51:50 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outM.internet-mail-service.net (outm.internet-mail-service.net [216.240.47.236]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE918FC28 for ; Fri, 4 Sep 2009 17:51:50 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id F11C3ADA67; Fri, 4 Sep 2009 10:51:49 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 9C8062D6010; Fri, 4 Sep 2009 10:51:49 -0700 (PDT) Message-ID: <4AA153B4.4050408@elischer.org> Date: Fri, 04 Sep 2009 10:51:48 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200909041453.n84ErCtU075966@svn.freebsd.org> <20090904145527.S68375@maildrop.int.zabbadoz.net> <4AA15257.4050305@elischer.org> In-Reply-To: <4AA15257.4050305@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r196829 - head/sys/i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:51:50 -0000 Julian Elischer wrote: > Bjoern A. Zeeb wrote: >> On Fri, 4 Sep 2009, Konstantin Belousov wrote: >> >>> Author: kib >>> Date: Fri Sep 4 14:53:12 2009 >>> New Revision: 196829 >>> URL: http://svn.freebsd.org/changeset/base/196829 >>> >>> Log: >>> Add missing ';'. >> >> This hadn't been noticed for a year as up to r196810 PCPU_SET was a >> { >> .. >> } >> block. With r196811 it was changed to >> do { >> .. >> } while (0) >> and thus the missing ';' immediately became a syntax error. > > so, why does my tree compile? I don't understand.. I've been running on that kernel for weeks > >> >> >>> Modified: >>> head/sys/i386/i386/machdep.c >>> >>> Modified: head/sys/i386/i386/machdep.c >>> ============================================================================== >>> >>> --- head/sys/i386/i386/machdep.c Fri Sep 4 11:32:05 2009 >>> (r196828) >>> +++ head/sys/i386/i386/machdep.c Fri Sep 4 14:53:12 2009 >>> (r196829) >>> @@ -2570,7 +2570,7 @@ init386(first) >>> default_proc_ldt.ldt_base = (caddr_t)ldt; >>> default_proc_ldt.ldt_len = 6; >>> _default_ldt = (int)&default_proc_ldt; >>> - PCPU_SET(currentldt, _default_ldt) >>> + PCPU_SET(currentldt, _default_ldt); >>> PT_SET_MA(ldt, *vtopte((unsigned long)ldt) & ~PG_RW); >>> xen_set_ldt((unsigned long) ldt, (sizeof ldt_segs / sizeof >>> ldt_segs[0])); >>> >>> >> From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 17:56:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FA281065676; Fri, 4 Sep 2009 17:56:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8A40F8FC08; Fri, 4 Sep 2009 17:56:32 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n84HuLGf009118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Sep 2009 20:56:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n84HuL99047624; Fri, 4 Sep 2009 20:56:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n84HuLlB047623; Fri, 4 Sep 2009 20:56:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 4 Sep 2009 20:56:21 +0300 From: Kostik Belousov To: Julian Elischer Message-ID: <20090904175621.GS1881@deviant.kiev.zoral.com.ua> References: <200909041453.n84ErCtU075966@svn.freebsd.org> <20090904145527.S68375@maildrop.int.zabbadoz.net> <4AA15257.4050305@elischer.org> <4AA153B4.4050408@elischer.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M95kW2oAquAyfxRp" Content-Disposition: inline In-Reply-To: <4AA153B4.4050408@elischer.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, "Bjoern A. Zeeb" Subject: Re: svn commit: r196829 - head/sys/i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 17:56:33 -0000 --M95kW2oAquAyfxRp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 04, 2009 at 10:51:48AM -0700, Julian Elischer wrote: > Julian Elischer wrote: > >Bjoern A. Zeeb wrote: > >>On Fri, 4 Sep 2009, Konstantin Belousov wrote: > >> > >>>Author: kib > >>>Date: Fri Sep 4 14:53:12 2009 > >>>New Revision: 196829 > >>>URL: http://svn.freebsd.org/changeset/base/196829 > >>> > >>>Log: > >>> Add missing ';'. > >> > >>This hadn't been noticed for a year as up to r196810 PCPU_SET was a > >> { > >> .. > >> } > >>block. With r196811 it was changed to > >> do { > >> .. > >> } while (0) > >>and thus the missing ';' immediately became a syntax error. > > > >so, why does my tree compile? >=20 > I don't understand.. I've been running on that kernel for weeks Do you run XEN ? --M95kW2oAquAyfxRp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkqhVMUACgkQC3+MBN1Mb4igiQCgiF23GvGMbLLBB+KBDFUF5Lpb Q7sAnRS1HrAylrJ5ta9q1IqWnQEoSbm8 =2TKW -----END PGP SIGNATURE----- --M95kW2oAquAyfxRp-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 18:21:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B631065670; Fri, 4 Sep 2009 18:21:41 +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 3F14E8FC1D; Fri, 4 Sep 2009 18:21:41 +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 n84ILfsn092254; Fri, 4 Sep 2009 18:21:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84ILfWo092251; Fri, 4 Sep 2009 18:21:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200909041821.n84ILfWo092251@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Sep 2009 18:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196831 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 18:21:41 -0000 Author: mav Date: Fri Sep 4 18:21:40 2009 New Revision: 196831 URL: http://svn.freebsd.org/changeset/base/196831 Log: 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 modes, caching, security and any other features and tasks, not supported by existing drivers. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Sep 4 16:41:17 2009 (r196830) +++ head/sbin/camcontrol/camcontrol.8 Fri Sep 4 18:21:40 2009 (r196831) @@ -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: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Fri Sep 4 16:41:17 2009 (r196830) +++ head/sbin/camcontrol/camcontrol.c Fri Sep 4 18:21:40 2009 (r196831) @@ -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-head@FreeBSD.ORG Fri Sep 4 18:52:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F4C41065676; Fri, 4 Sep 2009 18:52:27 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EA148FC14; Fri, 4 Sep 2009 18:52: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 n84IqRE3098224; Fri, 4 Sep 2009 18:52:27 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84IqRtF098222; Fri, 4 Sep 2009 18:52:27 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200909041852.n84IqRtF098222@svn.freebsd.org> From: Kip Macy Date: Fri, 4 Sep 2009 18:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196833 - head/sbin/route X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 18:52:27 -0000 Author: kmacy Date: Fri Sep 4 18:52:26 2009 New Revision: 196833 URL: http://svn.freebsd.org/changeset/base/196833 Log: remove stale references to RTF_CLONING and RTF_LLINFO MFC after: 3 days Modified: head/sbin/route/route.8 Modified: head/sbin/route/route.8 ============================================================================== --- head/sbin/route/route.8 Fri Sep 4 18:40:03 2009 (r196832) +++ head/sbin/route/route.8 Fri Sep 4 18:52:26 2009 (r196833) @@ -279,7 +279,6 @@ when sending to destinations matched by These flags may be set (or sometimes cleared) by indicating the following corresponding modifiers: .Bd -literal --cloning RTF_CLONING - generates a new route on use -xresolve RTF_XRESOLVE - emit mesg on use (for external lookup) -iface ~RTF_GATEWAY - destination is directly reachable -static RTF_STATIC - manually added route @@ -288,7 +287,6 @@ by indicating the following correspondin -blackhole RTF_BLACKHOLE - silently discard pkts (during updates) -proto1 RTF_PROTO1 - set protocol specific routing flag #1 -proto2 RTF_PROTO2 - set protocol specific routing flag #2 --llinfo RTF_LLINFO - validly translates proto addr to link addr .Ed .Pp The optional modifiers @@ -326,25 +324,6 @@ or .Fl ifa modifiers may be used to determine the interface or interface address. .Pp -The optional -.Fl proxy -modifier specifies that the -.Dv RTF_LLINFO -routing table entry is the -.Dq published (proxy-only) -.Tn ARP -entry, as reported by -.Xr arp 8 . -.Pp -The optional -.Fl genmask -modifier specifies that a cloning mask is present. -This specifies the mask applied when determining if a child route -should be created. -It is only applicable to network routes with the -.Dv RTF_CLONING -flag set. -.Pp All symbolic names specified for a .Ar destination or From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 19:00:49 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56FA4106566C; Fri, 4 Sep 2009 19:00:49 +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 2CA108FC12; Fri, 4 Sep 2009 19:00: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 n84J0m3N099969; Fri, 4 Sep 2009 19:00:48 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84J0mx8099967; Fri, 4 Sep 2009 19:00:48 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200909041900.n84J0mx8099967@svn.freebsd.org> From: Jamie Gritton Date: Fri, 4 Sep 2009 19:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196835 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 19:00:49 -0000 Author: jamie Date: Fri Sep 4 19:00:48 2009 New Revision: 196835 URL: http://svn.freebsd.org/changeset/base/196835 Log: Allow a jail's name to be the same as its jid (which is the default if no name is specified), but still disallow other numeric names. Reviewed by: zec Approved by: bz (mentor) MFC after: 3 days Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Fri Sep 4 18:57:40 2009 (r196834) +++ head/sys/kern/kern_jail.c Fri Sep 4 19:00:48 2009 (r196835) @@ -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-head@FreeBSD.ORG Fri Sep 4 19:20:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87BD7106566B; Fri, 4 Sep 2009 19:20:47 +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 5D0438FC12; Fri, 4 Sep 2009 19:20:47 +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 n84JKlr0004087; Fri, 4 Sep 2009 19:20:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84JKlab004085; Fri, 4 Sep 2009 19:20:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200909041920.n84JKlab004085@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Sep 2009 19:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196837 - head/sys/geom/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 19:20:47 -0000 Author: mav Date: Fri Sep 4 19:20:46 2009 New Revision: 196837 URL: http://svn.freebsd.org/changeset/base/196837 Log: Remove artificial MAX_IO_SIZE constant, equal to DFLTPHYS * 2. Use MAXPHYS instead. It is NULL change for GENERIC kernel, but allows 'fast' mode to work on systems with increased MAXPHYS. Modified: head/sys/geom/stripe/g_stripe.c Modified: head/sys/geom/stripe/g_stripe.c ============================================================================== --- head/sys/geom/stripe/g_stripe.c Fri Sep 4 19:02:11 2009 (r196836) +++ head/sys/geom/stripe/g_stripe.c Fri Sep 4 19:20:46 2009 (r196837) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include -#define MAX_IO_SIZE (DFLTPHYS * 2) static MALLOC_DEFINE(M_STRIPE, "stripe_data", "GEOM_STRIPE Data"); static uma_zone_t g_stripe_zone; @@ -87,7 +86,7 @@ g_sysctl_stripe_fast(SYSCTL_HANDLER_ARGS } SYSCTL_PROC(_kern_geom_stripe, OID_AUTO, fast, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, g_sysctl_stripe_fast, "I", "Fast, but memory-consuming, mode"); -static u_int g_stripe_maxmem = MAX_IO_SIZE * 100; +static u_int g_stripe_maxmem = MAXPHYS * 100; TUNABLE_INT("kern.geom.stripe.maxmem", &g_stripe_maxmem); SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, maxmem, CTLFLAG_RD, &g_stripe_maxmem, 0, "Maximum memory that can be allocated in \"fast\" mode (in bytes)"); @@ -125,10 +124,10 @@ static void g_stripe_init(struct g_class *mp __unused) { - g_stripe_zone = uma_zcreate("g_stripe_zone", MAX_IO_SIZE, NULL, NULL, + g_stripe_zone = uma_zcreate("g_stripe_zone", MAXPHYS, NULL, NULL, NULL, NULL, 0, 0); - g_stripe_maxmem -= g_stripe_maxmem % MAX_IO_SIZE; - uma_zone_set_max(g_stripe_zone, g_stripe_maxmem / MAX_IO_SIZE); + g_stripe_maxmem -= g_stripe_maxmem % MAXPHYS; + uma_zone_set_max(g_stripe_zone, g_stripe_maxmem / MAXPHYS); } static void @@ -613,14 +612,14 @@ g_stripe_start(struct bio *bp) * Do use "fast" mode when: * 1. "Fast" mode is ON. * and - * 2. Request size is less than or equal to MAX_IO_SIZE (128kB), + * 2. Request size is less than or equal to MAXPHYS, * which should always be true. * and * 3. Request size is bigger than stripesize * ndisks. If it isn't, * there will be no need to send more than one I/O request to * a provider, so there is nothing to optmize. */ - if (g_stripe_fast && bp->bio_length <= MAX_IO_SIZE && + if (g_stripe_fast && bp->bio_length <= MAXPHYS && bp->bio_length >= stripesize * sc->sc_ndisks) { fast = 1; } From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 19:41:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 305B31065698; Fri, 4 Sep 2009 19:41:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4BA0F8FC1E; Fri, 4 Sep 2009 19:41:37 +0000 (UTC) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 253481315; Fri, 04 Sep 2009 22:41:35 +0300 Message-ID: <4AA16D68.3080908@FreeBSD.org> Date: Fri, 04 Sep 2009 22:41:28 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Eric Masson References: <200909041821.n84ILfWo092251@svn.freebsd.org> <86iqfytsqe.fsf@srvbsdnanssv.interne.kisoft-services.com> In-Reply-To: <86iqfytsqe.fsf@srvbsdnanssv.interne.kisoft-services.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196831 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 19:41:39 -0000 Eric Masson wrote: > Alexander Motin writes: >> Author: mav >> Date: Fri Sep 4 18:21:40 2009 >> New Revision: 196831 >> URL: http://svn.freebsd.org/changeset/base/196831 >> >> Log: >> 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 modes, caching, security and any other features and tasks, >> not supported by existing drivers. > > Like controlling speed of DVD drives like this linux code snippet > (speedcontrol.c) seems to be able to : > http://ubuntuforums.org/archive/index.php/t-592513.html It looks like using SCSI/ATAPI command, not an ATA. So it is supported for long time. But the idea is right, it should be possible to control it from command line. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 20:01:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57A1A106566C; Fri, 4 Sep 2009 20:01:17 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0EF8FC1A; Fri, 4 Sep 2009 20:01:17 +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 n84K1HqT010092; Fri, 4 Sep 2009 20:01:17 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84K1HMe010090; Fri, 4 Sep 2009 20:01:17 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909042001.n84K1HMe010090@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 4 Sep 2009 20:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196839 - head/usr.bin/find X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 20:01:17 -0000 Author: trasz Date: Fri Sep 4 20:01:16 2009 New Revision: 196839 URL: http://svn.freebsd.org/changeset/base/196839 Log: Add NFSv4 ACL support to find(1). Reviewed by: rwatson Modified: head/usr.bin/find/function.c Modified: head/usr.bin/find/function.c ============================================================================== --- head/usr.bin/find/function.c Fri Sep 4 19:59:32 2009 (r196838) +++ head/usr.bin/find/function.c Fri Sep 4 20:01:16 2009 (r196839) @@ -371,38 +371,48 @@ c_mXXdepth(OPTION *option, char ***argvp int f_acl(PLAN *plan __unused, FTSENT *entry) { - int match, entries; - acl_entry_t ae; acl_t facl; + acl_type_t acl_type; + int acl_supported = 0, ret, trivial; if (S_ISLNK(entry->fts_statp->st_mode)) return 0; - if ((match = pathconf(entry->fts_accpath, _PC_ACL_EXTENDED)) <= 0) { - if (match < 0 && errno != EINVAL) - warn("%s", entry->fts_accpath); - else - return 0; + ret = pathconf(entry->fts_accpath, _PC_ACL_NFS4); + if (ret > 0) { + acl_supported = 1; + acl_type = ACL_TYPE_NFS4; + } else if (ret < 0 && errno != EINVAL) { + warn("%s", entry->fts_accpath); + return (0); } - match = 0; - if ((facl = acl_get_file(entry->fts_accpath,ACL_TYPE_ACCESS)) != NULL) { - if (acl_get_entry(facl, ACL_FIRST_ENTRY, &ae) == 1) { - /* - * POSIX.1e requires that ACLs of type ACL_TYPE_ACCESS - * must have at least three entries (owner, group, - * other). - */ - entries = 1; - while (acl_get_entry(facl, ACL_NEXT_ENTRY, &ae) == 1) { - if (++entries > 3) { - match = 1; - break; - } - } + if (acl_supported == 0) { + ret = pathconf(entry->fts_accpath, _PC_ACL_EXTENDED); + if (ret > 0) { + acl_supported = 1; + acl_type = ACL_TYPE_ACCESS; + } else if (ret < 0 && errno != EINVAL) { + warn("%s", entry->fts_accpath); + return (0); } - acl_free(facl); - } else + } + if (acl_supported == 0) + return (0); + + facl = acl_get_file(entry->fts_accpath, acl_type); + if (facl == NULL) { warn("%s", entry->fts_accpath); - return match; + return (0); + } + ret = acl_is_trivial_np(facl, &trivial); + acl_free(facl); + if (ret) { + warn("%s", entry->fts_accpath); + acl_free(facl); + return (0); + } + if (trivial) + return (0); + return (1); } PLAN * From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 20:26:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E7C3106566C; Fri, 4 Sep 2009 20:26:38 +0000 (UTC) (envelope-from emss@free.fr) Received: from smtp-msa-out01.orange.fr (smtp-msa-out01.orange.fr [193.252.23.120]) by mx1.freebsd.org (Postfix) with ESMTP id 19A1D8FC13; Fri, 4 Sep 2009 20:26:38 +0000 (UTC) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 3366D1C00084; Fri, 4 Sep 2009 22:26:37 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 25C501C00088; Fri, 4 Sep 2009 22:26:37 +0200 (CEST) Received: from srvbsdnanssv.interne.kisoft-services.com (LCaen-151-92-21-48.w217-128.abo.wanadoo.fr [217.128.200.48]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 11B9C1C00084; Fri, 4 Sep 2009 22:26:37 +0200 (CEST) X-ME-UUID: 20090904202637727.11B9C1C00084@mwinf5a03.orange.fr X-ME-User-Auth: e-masson0330 Received: from localhost (localhost [127.0.0.1]) by srvbsdnanssv.interne.kisoft-services.com (Postfix) with ESMTP id A2F21170D6; Fri, 4 Sep 2009 22:26:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at interne.kisoft-services.com Received: from srvbsdnanssv.interne.kisoft-services.com ([127.0.0.1]) by localhost (srvbsdnanssv.interne.kisoft-services.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xC0zA2zhJCCu; Fri, 4 Sep 2009 22:26:33 +0200 (CEST) Received: by srvbsdnanssv.interne.kisoft-services.com (Postfix, from userid 1001) id 63DCD170E6; Fri, 4 Sep 2009 22:26:33 +0200 (CEST) To: Alexander Motin From: Eric Masson In-Reply-To: <4AA16D68.3080908@FreeBSD.org> (Alexander Motin's message of "Fri, 04 Sep 2009 22:41:28 +0300") References: <200909041821.n84ILfWo092251@svn.freebsd.org> <86iqfytsqe.fsf@srvbsdnanssv.interne.kisoft-services.com> <4AA16D68.3080908@FreeBSD.org> X-Operating-System: FreeBSD 6.4-RELEASE-p6 i386 Date: Fri, 04 Sep 2009 22:26:33 +0200 Message-ID: <86eiqmtq12.fsf@srvbsdnanssv.interne.kisoft-services.com> User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.5-b28 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196831 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 20:26:38 -0000 Alexander Motin writes: > It looks like using SCSI/ATAPI command, not an ATA. So it is supported > for long time. But the idea is right, it should be possible to control > it from command line. Ok, I'll dig this. atapicam & camcontrol will be my new friends ;) I've been using FreeBSD since 3.0 with scsi storage but never really dug into cam arcanes... Thanks a lot. -- Warning: file "/home/emss/misc/fortune/En_sig.dat" unreadable Warning: file "/home/emss/misc/fortune/Fr_sig.dat" unreadable Doh, I really need to fix the auto sig feature :) From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 20:32:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08441106566B; Fri, 4 Sep 2009 20:32:11 +0000 (UTC) (envelope-from emss@free.fr) Received: from smtp19.orange.fr (smtp19.orange.fr [80.12.242.17]) by mx1.freebsd.org (Postfix) with ESMTP id 84F078FC0A; Fri, 4 Sep 2009 20:32:10 +0000 (UTC) Received: from smtp-msa-out01.orange.fr (mwinf5a03 [10.232.33.25]) by mwinf1910.orange.fr (SMTP Server) with ESMTP id 367C41C14F78; Fri, 4 Sep 2009 21:28:16 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 3F1AB1C00083; Fri, 4 Sep 2009 21:28:14 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 323F71C00085; Fri, 4 Sep 2009 21:28:14 +0200 (CEST) Received: from srvbsdnanssv.interne.kisoft-services.com (LCaen-151-92-21-48.w217-128.abo.wanadoo.fr [217.128.200.48]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 1DBEB1C00083; Fri, 4 Sep 2009 21:28:14 +0200 (CEST) X-ME-UUID: 20090904192814121.1DBEB1C00083@mwinf5a03.orange.fr X-ME-User-Auth: e-masson0330 Received: from localhost (localhost [127.0.0.1]) by srvbsdnanssv.interne.kisoft-services.com (Postfix) with ESMTP id A8C9B170D6; Fri, 4 Sep 2009 21:28:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at interne.kisoft-services.com Received: from srvbsdnanssv.interne.kisoft-services.com ([127.0.0.1]) by localhost (srvbsdnanssv.interne.kisoft-services.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6mE5qU0WEwin; Fri, 4 Sep 2009 21:28:09 +0200 (CEST) Received: by srvbsdnanssv.interne.kisoft-services.com (Postfix, from userid 1001) id 84C31170FC; Fri, 4 Sep 2009 21:28:09 +0200 (CEST) To: Alexander Motin From: Eric Masson In-Reply-To: <200909041821.n84ILfWo092251@svn.freebsd.org> (Alexander Motin's message of "Fri, 4 Sep 2009 18:21:41 +0000 (UTC)") References: <200909041821.n84ILfWo092251@svn.freebsd.org> X-Operating-System: FreeBSD 6.4-RELEASE-p6 i386 Date: Fri, 04 Sep 2009 21:28:09 +0200 Message-ID: <86iqfytsqe.fsf@srvbsdnanssv.interne.kisoft-services.com> User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.5-b28 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196831 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 20:32:11 -0000 Alexander Motin writes: Hi Alexander, > Author: mav > Date: Fri Sep 4 18:21:40 2009 > New Revision: 196831 > URL: http://svn.freebsd.org/changeset/base/196831 > > Log: > 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 modes, caching, security and any other features and tasks, > not supported by existing drivers. Like controlling speed of DVD drives like this linux code snippet (speedcontrol.c) seems to be able to : http://ubuntuforums.org/archive/index.php/t-592513.html Regards -- Ca fait dj plusieurs semaines que j"essaie de correspondre par l" intermdiaire d"un groupe de discussion. Ca ne fait que deux jour que je suis parvenu expdier un message -+- GM in GNU : Patience et longueur de temps.. -+- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 21:00:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 942FA106566C; Fri, 4 Sep 2009 21:00:45 +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 83AC38FC13; Fri, 4 Sep 2009 21:00:45 +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 n84L0jo6014736; Fri, 4 Sep 2009 21:00:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84L0j6Z014735; Fri, 4 Sep 2009 21:00:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200909042100.n84L0j6Z014735@svn.freebsd.org> From: John Baldwin Date: Fri, 4 Sep 2009 21:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196840 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 21:00:45 -0000 Author: jhb Date: Fri Sep 4 21:00:45 2009 New Revision: 196840 URL: http://svn.freebsd.org/changeset/base/196840 Log: Fill the reverse RSS map with 0xff's so that the subsequent loop to calculate the values will work properly. Reviewed by: np MFC after: 1 month Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Fri Sep 4 20:01:16 2009 (r196839) +++ head/sys/dev/cxgb/cxgb_main.c Fri Sep 4 21:00:45 2009 (r196840) @@ -1456,7 +1456,10 @@ setup_rss(adapter_t *adap) rspq_map[i] = nq[0] ? i % nq[0] : 0; rspq_map[i + RSS_TABLE_SIZE / 2] = nq[1] ? i % nq[1] + nq[0] : 0; } + /* Calculate the reverse RSS map table */ + for (i = 0; i < SGE_QSETS; ++i) + adap->rrss_map[i] = 0xff; for (i = 0; i < RSS_TABLE_SIZE; ++i) if (adap->rrss_map[rspq_map[i]] == 0xff) adap->rrss_map[rspq_map[i]] = i; From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 21:49:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D85D71065676; Fri, 4 Sep 2009 21:49:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCFBA8FC0A; Fri, 4 Sep 2009 21:49:37 +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 n84LnbNC018525; Fri, 4 Sep 2009 21:49:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84LnbdE018523; Fri, 4 Sep 2009 21:49:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909042149.n84LnbdE018523@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 4 Sep 2009 21:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196841 - head/bin/mv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 21:49:38 -0000 Author: trasz Date: Fri Sep 4 21:49:37 2009 New Revision: 196841 URL: http://svn.freebsd.org/changeset/base/196841 Log: Add NFSv4 ACL support to mv(1). Reviewed by: rwatson Modified: head/bin/mv/mv.c Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Fri Sep 4 21:00:45 2009 (r196840) +++ head/bin/mv/mv.c Fri Sep 4 21:49:37 2009 (r196841) @@ -74,6 +74,8 @@ static int copy(const char *, const char static int do_move(const char *, const char *); static int fastcopy(const char *, const char *, struct stat *); static void usage(void); +static void preserve_fd_acls(int source_fd, int dest_fd, const char *source_path, + const char *dest_path); int main(int argc, char *argv[]) @@ -260,7 +262,6 @@ fastcopy(const char *from, const char *t struct timeval tval[2]; static u_int blen; static char *bp; - acl_t acl; mode_t oldmode; int nread, from_fd, to_fd; @@ -311,23 +312,15 @@ err: if (unlink(to)) sbp->st_mode &= ~(S_ISUID | S_ISGID); } } + if (fchmod(to_fd, sbp->st_mode)) + warn("%s: set mode (was: 0%03o)", to, oldmode); /* * POSIX 1003.2c states that if _POSIX_ACL_EXTENDED is in effect * for dest_file, then its ACLs shall reflect the ACLs of the * source_file. */ - if (fpathconf(to_fd, _PC_ACL_EXTENDED) == 1 && - fpathconf(from_fd, _PC_ACL_EXTENDED) == 1) { - acl = acl_get_fd(from_fd); - if (acl == NULL) - warn("failed to get acl entries while setting %s", - from); - else if (acl_set_fd(to_fd, acl) < 0) - warn("failed to set acl entries for %s", to); - } + preserve_fd_acls(from_fd, to_fd, from, to); (void)close(from_fd); - if (fchmod(to_fd, sbp->st_mode)) - warn("%s: set mode (was: 0%03o)", to, oldmode); /* * XXX * NFS doesn't support chflags; ignore errors unless there's reason @@ -439,6 +432,59 @@ copy(const char *from, const char *to) } static void +preserve_fd_acls(int source_fd, int dest_fd, const char *source_path, + const char *dest_path) +{ + acl_t acl; + acl_type_t acl_type; + int acl_supported = 0, ret, trivial; + + ret = fpathconf(source_fd, _PC_ACL_NFS4); + if (ret > 0 ) { + acl_supported = 1; + acl_type = ACL_TYPE_NFS4; + } else if (ret < 0 && errno != EINVAL) { + warn("fpathconf(..., _PC_ACL_NFS4) failed for %s", + source_path); + return; + } + if (acl_supported == 0) { + ret = fpathconf(source_fd, _PC_ACL_EXTENDED); + if (ret > 0 ) { + acl_supported = 1; + acl_type = ACL_TYPE_ACCESS; + } else if (ret < 0 && errno != EINVAL) { + warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s", + source_path); + return; + } + } + if (acl_supported == 0) + return; + + acl = acl_get_fd_np(source_fd, acl_type); + if (acl == NULL) { + warn("failed to get acl entries for %s", source_path); + return; + } + if (acl_is_trivial_np(acl, &trivial)) { + warn("acl_is_trivial() failed for %s", source_path); + acl_free(acl); + return; + } + if (trivial) { + acl_free(acl); + return; + } + if (acl_set_fd_np(dest_fd, acl, acl_type) < 0) { + warn("failed to set acl entries for %s", dest_path); + acl_free(acl); + return; + } + acl_free(acl); +} + +static void usage(void) { From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 21:55:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69F901065672; Fri, 4 Sep 2009 21:55:54 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id 998EB8FC19; Fri, 4 Sep 2009 21:55:53 +0000 (UTC) Received: by fxm6 with SMTP id 6so933161fxm.43 for ; Fri, 04 Sep 2009 14:55:52 -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:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=8pyxS5VfajkBTt49OFFUQaiayMXJs3qtRVTm08HZ2pI=; b=DwAC00fWirsTSxZ4QFmX4QWYMSwIL8WTx2G7HhVWqhk+/tC3hWFcs56lbz6dtqcKrF 6nPsRSnZbb2QsEPa+8AvIo7uo1WVJx6egFBEJpDS+a98qwq+s1NbsNtZZKOR38iQO5vc h2CHAzpBBQRCuh/mpSjVFDuU8Q3jlhnLzU8qg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=CFNkYJuWVgkXdTtlyz2uSNj4c/t1Y1L3xNqnjKVlPm6GIDOpX46iTrRlmBLbdcnoZm 2ZLpDnNMtsXyTDcCUoyhEokZNRIdE1XJBFkrmmdwAZzn7vaNzH/UDhOmP7qA0V1AflIL uTudoxqkMFHkN9x8aG2IPJuqIKLwnrgqh1sBg= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.143.15 with SMTP id s15mr4780435fau.77.1252101352549; Fri, 04 Sep 2009 14:55:52 -0700 (PDT) In-Reply-To: <20090904.112919.1521002024.imp@bsdimp.com> References: <200909031340.n83Defkv034013@svn.freebsd.org> <20090904.112919.1521002024.imp@bsdimp.com> Date: Fri, 4 Sep 2009 23:55:52 +0200 X-Google-Sender-Auth: 34e1473445759915 Message-ID: <3bbf2fe10909041455u552b0dbdm1708ea0a26365149@mail.gmail.com> From: Attilio Rao To: "M. Warner Losh" Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196779 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 21:55:54 -0000 2009/9/4 M. Warner Losh : > In message: <200909031340.n83Defkv034013@svn.freebsd.org> > Attilio Rao writes: > : Modified: head/sys/sys/bus.h > : ============================================================================== > : --- head/sys/sys/bus.h Thu Sep 3 12:41:00 2009 (r196778) > : +++ head/sys/sys/bus.h Thu Sep 3 13:40:41 2009 (r196779) > : @@ -52,8 +52,11 @@ struct u_businfo { > : typedef enum device_state { > : DS_NOTPRESENT, /**< @brief not probed or probe failed */ > : DS_ALIVE, /**< @brief probe succeeded */ > : + DS_ATTACHING, /**< @brief attaching is in progress */ > : DS_ATTACHED, /**< @brief attach method called */ > : - DS_BUSY /**< @brief device is open */ > : + DS_BUSY, /**< @brief device is open */ > : + DS_DETACHING /**< @brief detaching is in progress */ > : + > : } device_state_t; > > device_state_t is exported to userland via devctl. Well, that's not > entirely true... It isn't used EXACTLY, but there's this in > devinfo.h: > > /* > * State of the device. > */ > /* XXX not sure if I want a copy here, or expose sys/bus.h */ > typedef enum devinfo_state { > DIS_NOTPRESENT, /* not probed or probe failed */ > DIS_ALIVE, /* probe succeeded */ > DIS_ATTACHED, /* attach method called */ > DIS_BUSY /* device is open */ > } devinfo_state_t; > > which is why devinfo is broken. I think the right fix here is to maintain in sync devinfo.h and bus.h definition by just having one. I see that the devices states are redefined in devinfo.h in order to avoid namespace pollution and this is a good point. What I propose is to add a new header (_bus.h, to be included in both bus.h and devinfo.h) which just containst the device states. > Also, DS_BUSY is used in many drivers to PREVENT detaching. So the > change is bad from that point of view, since DS_DETACHING is now > > DS_BUSY. There's really a partial ordering relationship now where > before there was a total ordering (DS_BUSY is > DS_ATTACHED and > DS_DETACHING is > DS_ATTACH, but DS_DETACHING isn't > DS_BUSY and > DS_BUSY isn't > DS_DETACHING). I think that you've destroyed > information here by unconditionally setting it: > > - if ((error = DEVICE_DETACH(dev)) != 0) > + dev->state = DS_DETACHING; > + if ((error = DEVICE_DETACH(dev)) != 0) { > + KASSERT(dev->state == DS_DETACHING, > + ("%s: %p device state must not been changing", __func__, > + dev)); > + dev->state = DS_ATTACHED; > return (error); > + } > + KASSERT(dev->state == DS_DETACHING, > + ("%s: %p device state must not been changing", __func__, dev)); > > And this looks racy between the check earlier and this setting. > Properly locked, this wouldn't destroy information... Sorry, I really don't understand what point are you making here, and what the scaring words of "destroying", "racy", etc. means. Can you explain better that part? > At the very least cardbus/cardbus.c and pccard/pccard.c need to be > looked at since they both have code that looks like: > > for (tmp = 0; tmp < numdevs; tmp++) { > struct cardbus_devinfo *dinfo = device_get_ivars(devlist[tmp]); > int status = device_get_state(devlist[tmp]); > > if (dinfo->pci.cfg.dev != devlist[tmp]) > device_printf(cbdev, "devinfo dev mismatch\n"); > if (status == DS_ATTACHED || status == DS_BUSY) > device_detach(devlist[tmp]); > cardbus_release_all_resources(cbdev, dinfo); > cardbus_device_destroy(dinfo); > device_delete_child(cbdev, devlist[tmp]); > pci_freecfg((struct pci_devinfo *)dinfo); > } > > which does ignore errors returned by device_detach for the DS_BUSY > case because there's not currently a good way to tell device_detach > that it *MUST* detach the device *NOW* without any possibility of veto > by the driver. The above code also isn't DS_DETACHING aware, and may > be wrong in the face of this new state. How DS_DETACHING can cause problems here? device_detach() simply won't run if the state is DS_DETACHING as expected (another thread is alredy detaching and there is no need for it to detach). Also, please note that in this case, for the state == DS_BUSY he device_detach() won't do anything. You can't simply skip the return value and anything else, but the reality is still the operation won't happen. > Of course, grepping the tree does show one or two places where DS_BUSY > is used inappropriately: > > rp.c: > > static int > rp_pcidetach(device_t dev) > { > CONTROLLER_t *ctlp; > > if (device_get_state(dev) == DS_BUSY) > return (EBUSY); > > is one example. The above check should just be removed (ditto for its > SHUTDOWN) routine. > > So I think we should fix rp.c, but we need to talk through this change > a little more. I'm surprised I wasn't even pinged about it, since it > hits code that I maintain and a simple grep would have found... Still, I don't see a problem with the codes you mentioned (if not in the consumers, which were alredy "broken" before this change and which situation is not worse now), unless the devinfo breakage. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 22:15:26 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6715E106568F; Fri, 4 Sep 2009 22:15:26 +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 C5F3A8FC1C; Fri, 4 Sep 2009 22:15:25 +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 n84MEW2u098663; Fri, 4 Sep 2009 17:14:32 -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 n84MEWUp098662; Fri, 4 Sep 2009 17:14:32 -0500 (CDT) (envelope-from brooks) Date: Fri, 4 Sep 2009 17:14:32 -0500 From: Brooks Davis To: Bruce Cran Message-ID: <20090904221432.GC82231@lor.one-eyed-alien.net> References: <200907241503.n6OF3ATP013228@svn.freebsd.org> <20090829201228.00005860@unknown> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pAwQNkOnpTn9IO2O" Content-Disposition: inline In-Reply-To: <20090829201228.00005860@unknown> 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]); Fri, 04 Sep 2009 17:14:32 -0500 (CDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 22:15:26 -0000 --pAwQNkOnpTn9IO2O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 29, 2009 at 08:12:28PM +0100, Bruce Cran wrote: > On Fri, 24 Jul 2009 15:03:10 +0000 (UTC) > Brooks Davis wrote: >=20 > > Author: brooks > > Date: Fri Jul 24 15:03:10 2009 > > New Revision: 195843 > > URL: http://svn.freebsd.org/changeset/base/195843 > >=20 > > Log: > > Revert the changes to struct kinfo_proc in r194498. Instead, fill > > in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags > > (all bits currently unused) to indicate overflow with the new flag > > KI_CRF_GRP_OVERFLOW. > > =20 > > This fixes procstat -s. > > =20 > > Approved by: re (kib) >=20 > Hi Brooks, >=20 > This checkin appears to have broken crash dump support: the bcopy in > kvm_proc.c crashes when running "ps -ax -M /var/crash/vmcore.x > -N /boot/kernel/kernel", apparently because ucred.cr_groups isn't valid. > Does it need converted using KVM_READ first? Sorry for the delay, I believe you are correct we need to use kvm_read here instead of the bcopy. Do you still have a core handy you can test a patch against? The following should do it. -- Brooks Index: lib/libkvm/kvm_proc.c =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 --- lib/libkvm/kvm_proc.c (revision 196736) +++ lib/libkvm/kvm_proc.c (working copy) @@ -151,7 +151,7 @@ kp->ki_cr_flags |=3D KI_CRF_GRP_OVERFLOW; } kp->ki_ngroups =3D ucred.cr_ngroups; - bcopy(ucred.cr_groups, kp->ki_groups, + kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups, kp->ki_ngroups * sizeof(gid_t)); kp->ki_uid =3D ucred.cr_uid; if (ucred.cr_prison !=3D NULL) { --pAwQNkOnpTn9IO2O Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFKoZFIXY6L6fI4GtQRAmtzAJ0W2fEL0TMPA4pKQAgDTlqxNxsXFwCfcSCp cYjMVqpg0YNDcMZxkINYOZc= =3Uaj -----END PGP SIGNATURE----- --pAwQNkOnpTn9IO2O-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 22:34:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03BB0106568B; Fri, 4 Sep 2009 22:34:58 +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 E777B8FC12; Fri, 4 Sep 2009 22:34: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 n84MYvMZ022113; Fri, 4 Sep 2009 22:34:57 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84MYvcJ022111; Fri, 4 Sep 2009 22:34:57 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200909042234.n84MYvcJ022111@svn.freebsd.org> From: Sam Leffler Date: Fri, 4 Sep 2009 22:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196842 - head/sys/dev/mwl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 22:34:58 -0000 Author: sam Date: Fri Sep 4 22:34:57 2009 New Revision: 196842 URL: http://svn.freebsd.org/changeset/base/196842 Log: must also plumb static wep keys to the local sta db in sta mode; not sure when this became necessary and might be caused by some missing code to do auto-configuration of DWDS usage Noticed by: Felix Feng Modified: head/sys/dev/mwl/if_mwl.c Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Fri Sep 4 21:49:37 2009 (r196841) +++ head/sys/dev/mwl/if_mwl.c Fri Sep 4 22:34:57 2009 (r196842) @@ -1738,6 +1738,10 @@ mwl_key_set(struct ieee80211vap *vap, co * WEP keys when the sta reaches AUTH state. */ macaddr = vap->iv_bss->ni_bssid; + if ((k->wk_flags & IEEE80211_KEY_GROUP) == 0) { + /* XXX plumb to local sta db too for static key wep */ + mwl_hal_keyset(hvap, &hk, vap->iv_myaddr); + } } else if (vap->iv_opmode == IEEE80211_M_WDS && vap->iv_state != IEEE80211_S_RUN) { /* From owner-svn-src-head@FreeBSD.ORG Fri Sep 4 22:45:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 225B01065672; Fri, 4 Sep 2009 22:45:08 +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 1226A8FC15; Fri, 4 Sep 2009 22:45: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 n84Mj7lE022971; Fri, 4 Sep 2009 22:45:07 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n84Mj709022969; Fri, 4 Sep 2009 22:45:07 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <200909042245.n84Mj709022969@svn.freebsd.org> From: Jack F Vogel Date: Fri, 4 Sep 2009 22:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196844 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 22:45:08 -0000 Author: jfv Date: Fri Sep 4 22:45:07 2009 New Revision: 196844 URL: http://svn.freebsd.org/changeset/base/196844 Log: If an interface is brought up with no cable it will experience watchdog resets, this is due to a missing check for link in the new multiqueue start code. MFC: 3 days Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Fri Sep 4 22:37:03 2009 (r196843) +++ head/sys/dev/ixgbe/ixgbe.c Fri Sep 4 22:45:07 2009 (r196844) @@ -759,7 +759,8 @@ ixgbe_mq_start_locked(struct ifnet *ifp, struct mbuf *next; int err = 0; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || + (!adapter->link_active)) { err = drbr_enqueue(ifp, txr->br, m); return (err); } From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 00:05:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 768BB1065670; Sat, 5 Sep 2009 00:05:04 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 403448FC18; Sat, 5 Sep 2009 00:05:04 +0000 (UTC) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 60BA6618C8; Fri, 4 Sep 2009 20:05:03 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 04 Sep 2009 20:05:03 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=l/Df04kmcZRCKy3O0voCZLSXogc=; b=qmX/6M4cFgircA3SHDe0Ozrgvm8cyA5RaXzulDYIRGVndXqLWZGIP8AyQNN5vzeoSCMIxBf0OfhiFhlHh6YInnAFjV4jYh1+UXuBovRNbuJru3vMC6Dm0kSQ6PZ2CkQIR/aR6U7tD/VCMMzIPoiuD3ddgmXnzMGPWHL63neVtT0= X-Sasl-enc: KwF4aIWVkGS3Q9a2ipchXtKpV/07uyMS1ALxXrY3/gEe 1252109102 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 80BF32E39C; Fri, 4 Sep 2009 20:05:02 -0400 (EDT) Message-ID: <4AA1AB29.9030704@incunabulum.net> Date: Sat, 05 Sep 2009 01:04:57 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Robert Watson References: <200909032110.n83LAvUF044731@svn.freebsd.org> <4AA09B41.3040103@incunabulum.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, "George V. Neville-Neil" , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 00:05:04 -0000 Robert Watson wrote: > For sysctls, explicit versioning doesn't help too much -- what I've > been pondering for another structure was including spares and having a > capabilities field in the structure where flags are set when fields > are known by the kernel. That way userspace can tell if the kernel > knows about the field it cares about and therefore whether they're > worth looking at. One thing that Thrift did was to explicitly all number fields in their implementation of RPC. This is useful, because if anything changes over time, implementations can be updated to keep track of that. Whilst I agree that it's unlikely 'struct arpstat' would change, if it did, it would be great to have a length field, at a minimum, in front. sysctl can determine size at runtime, however, kmem interfaces cannot. That's the only real reason why I'd nudge about it. :-) For igmpstat, at least, the SSM drop adds a LOT of state to the network stack which wasn't there before, so having an explicit version field is warranted for backwards compatibility (and this is something Robert chewed me out about many months ago). Much respect, big yo'self up yo... From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 06:16:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 966FA106566B; Sat, 5 Sep 2009 06:16:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 234798FC0A; Sat, 5 Sep 2009 06:16:50 +0000 (UTC) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 253496099; Sat, 05 Sep 2009 09:16:47 +0300 Message-ID: <4AA20249.9000301@FreeBSD.org> Date: Sat, 05 Sep 2009 09:16:41 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: John Baldwin References: <200909031237.n83CbIgk032551@svn.freebsd.org> <20090903114121.C20031@pooker.samsco.org> <9bbcef730909031245o7c380925sd29b2cc976c4d7dd@mail.gmail.com> <200909031602.01222.jhb@freebsd.org> In-Reply-To: <200909031602.01222.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Scott Long , src-committers@freebsd.org, Ivan Voras Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 06:16:52 -0000 John Baldwin wrote: > On Thursday 03 September 2009 3:45:07 pm Ivan Voras wrote: >> But ciss doesn't reference it at all so either it deviously assumes it >> or is independent of it. > > Actually, it may be much worse, it may be that the author of ciss(4) new that > ciss(4)'s largest supported I/O size was larger than 128k so they didn't > bother handling the limit at all giving the false impression the hardware has > no limit. In cases of ATA and CAM infrastructures it was is so, that if driver does not sets max_iosize or maxio respectively, it uses DFLTPHYS. So problem is only about non-ATA/CAM RAIDs or cases where wrong value could be specified explicitly. ciss(4) driver was explicitly limited to 64K, until somebody could review it's capabilities. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 08:08:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 684FE106566B; Sat, 5 Sep 2009 08:08:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 581B48FC2D; Sat, 5 Sep 2009 08:08: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 n8588Ewf041436; Sat, 5 Sep 2009 08:08:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8588EEO041434; Sat, 5 Sep 2009 08:08:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200909050808.n8588EEO041434@svn.freebsd.org> From: Warner Losh Date: Sat, 5 Sep 2009 08:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196856 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 08:08:14 -0000 Author: imp Date: Sat Sep 5 08:08:14 2009 New Revision: 196856 URL: http://svn.freebsd.org/changeset/base/196856 Log: Note migration of tunable from hw.bus.devctl_disable to hw.bus.devctl_queue. The sysctl interface provides legacys upport for the latter sysctl, but the tunable support was removed. MFC after: 1 day Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Sep 5 08:03:29 2009 (r196855) +++ head/UPDATING Sat Sep 5 08:08:14 2009 (r196856) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090825: + The old tunable hw.bus.devctl_disable has been superseded by + hw.bus.devctl_queue. hw.bus.devctl_disable=1 in loader.conf should be + replaced by hw.bus.devctl_queue=0. The default for this new tunable + is 1000. + 20090813: Remove the option STOP_NMI. The default action is now to use NMI only for KDB via the newly introduced function stop_cpus_hard() and From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 08:09:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D730106566C; Sat, 5 Sep 2009 08:09:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6FD8FC28; Sat, 5 Sep 2009 08:09: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 n8589auj041496; Sat, 5 Sep 2009 08:09:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8589a9o041494; Sat, 5 Sep 2009 08:09:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200909050809.n8589a9o041494@svn.freebsd.org> From: Warner Losh Date: Sat, 5 Sep 2009 08:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196857 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 08:09:36 -0000 Author: imp Date: Sat Sep 5 08:09:35 2009 New Revision: 196857 URL: http://svn.freebsd.org/changeset/base/196857 Log: Go ahead and mention the CVS branch name as well as the svn branch name. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Sep 5 08:08:14 2009 (r196856) +++ head/UPDATING Sat Sep 5 08:09:35 2009 (r196857) @@ -34,7 +34,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. maintain stop_cpus() to just use a normal IPI_STOP on ia32 and amd64. 20090803: - stable/8 branch created in subversion. + The stable/8 branch created in subversion. This corresponds to the + RELENG_8 branch in CVS. 20090719: Bump the shared library version numbers for all libraries that do not From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 08:38:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0227106566B; Sat, 5 Sep 2009 08:38:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B3F78FC08; Sat, 5 Sep 2009 08:38: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 n858cPPd042102; Sat, 5 Sep 2009 08:38:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n858cP6f042100; Sat, 5 Sep 2009 08:38:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200909050838.n858cP6f042100@svn.freebsd.org> From: Warner Losh Date: Sat, 5 Sep 2009 08:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196858 - head/sys/dev/rp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 08:38:25 -0000 Author: imp Date: Sat Sep 5 08:38:25 2009 New Revision: 196858 URL: http://svn.freebsd.org/changeset/base/196858 Log: These checks against BUSY aren't needed: the newbus layer does this already with the appropriate locks held... There's no need to do it here, so just delete the checks. Modified: head/sys/dev/rp/rp_pci.c Modified: head/sys/dev/rp/rp_pci.c ============================================================================== --- head/sys/dev/rp/rp_pci.c Sat Sep 5 08:09:35 2009 (r196857) +++ head/sys/dev/rp/rp_pci.c Sat Sep 5 08:38:25 2009 (r196858) @@ -225,11 +225,7 @@ rp_pcidetach(device_t dev) { CONTROLLER_t *ctlp; - if (device_get_state(dev) == DS_BUSY) - return (EBUSY); - ctlp = device_get_softc(dev); - rp_pcireleaseresource(ctlp); return (0); @@ -240,11 +236,7 @@ rp_pcishutdown(device_t dev) { CONTROLLER_t *ctlp; - if (device_get_state(dev) == DS_BUSY) - return (EBUSY); - ctlp = device_get_softc(dev); - rp_pcireleaseresource(ctlp); return (0); From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 11:07:46 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8990F106568B; Sat, 5 Sep 2009 11:07:46 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id C4ECC8FC16; Sat, 5 Sep 2009 11:07:44 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 9616745E11; Sat, 5 Sep 2009 13:07:43 +0200 (CEST) Received: from localhost (chello087206049004.chello.pl [87.206.49.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 565284569A; Sat, 5 Sep 2009 13:07:38 +0200 (CEST) Date: Sat, 5 Sep 2009 13:07:40 +0200 From: Pawel Jakub Dawidek To: "Bjoern A. Zeeb" Message-ID: <20090905110740.GD1665@garage.freebsd.pl> References: <200909032110.n83LAvUF044731@svn.freebsd.org> <4AA09B41.3040103@incunabulum.net> <3C6607F2-D517-41EC-8681-33236EC6D20F@FreeBSD.org> <20090904171511.Q68375@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZwgA9U+XZDXt4+m+" Content-Disposition: inline In-Reply-To: <20090904171511.Q68375@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: George Neville-Neil , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Bruce Simpson , src-committers@FreeBSD.org Subject: Re: svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 11:07:46 -0000 --ZwgA9U+XZDXt4+m+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 04, 2009 at 05:19:12PM +0000, Bjoern A. Zeeb wrote: > On Fri, 4 Sep 2009, George Neville-Neil wrote: >=20 > Hi, >=20 > >On Sep 4, 2009, at 00:44 , Bruce Simpson wrote: > > > >>George V. Neville-Neil wrote: > >>>Author: gnn > >>>Date: Thu Sep 3 21:10:57 2009 > >>>New Revision: 196797 > >>>URL: http://svn.freebsd.org/changeset/base/196797 > >>> > >>>Log: > >>>Add ARP statistics to the kernel and netstat. > >>> > >> > >>Thanks very much for this change. > >>Any chance this struct can get explicitly versioned (i.e. as for struct= =20 > >>igmpstat) as it is a new struct? > >> > > > >bz@ and I will likely be tweaking this over time, so we can probably do= =20 > >that. >=20 > I am not entirely sure what "versioning" that struct would help? >=20 > ARP is from the early 80s, we've got 8 variables and 4 spares and > I cannot forsee any major rewrite of the code or the protocoll to > gather a lot more stats anymore. If there is a way to version those structures it will be good to do it even if it isn't going to change in the future. This way it can be used as an example for others to follow. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ZwgA9U+XZDXt4+m+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKokZ8ForvXbEpPzQRAuNvAJ9zh5Uo8/Yluq8TGQnrgiFLMkdPSACg9dxo /SlG5zNbrnX0L/FNlWcCMlo= =aL1/ -----END PGP SIGNATURE----- --ZwgA9U+XZDXt4+m+-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 13:32:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBD671065670; Sat, 5 Sep 2009 13:32:05 +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 BB6748FC16; Sat, 5 Sep 2009 13:32: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 n85DW5Tq054298; Sat, 5 Sep 2009 13:32:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n85DW5Q1054296; Sat, 5 Sep 2009 13:32:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909051332.n85DW5Q1054296@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 5 Sep 2009 13:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196861 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 13:32:05 -0000 Author: kib Date: Sat Sep 5 13:32:05 2009 New Revision: 196861 URL: http://svn.freebsd.org/changeset/base/196861 Log: Handle zero size for posix_memalign. Return NULL or unique address according to the 'V' option. PR: standards/138307 MFC after: 1 week Modified: head/lib/libc/stdlib/malloc.c Modified: head/lib/libc/stdlib/malloc.c ============================================================================== --- head/lib/libc/stdlib/malloc.c Sat Sep 5 13:31:16 2009 (r196860) +++ head/lib/libc/stdlib/malloc.c Sat Sep 5 13:32:05 2009 (r196861) @@ -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); } From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 15:08:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D227106568D; Sat, 5 Sep 2009 15:08:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B1D58FC0C; Sat, 5 Sep 2009 15:08: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 n85F8xbV056721; Sat, 5 Sep 2009 15:08:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n85F8xnN056719; Sat, 5 Sep 2009 15:08:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200909051508.n85F8xnN056719@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 5 Sep 2009 15:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196863 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 15:08:59 -0000 Author: trasz Date: Sat Sep 5 15:08:58 2009 New Revision: 196863 URL: http://svn.freebsd.org/changeset/base/196863 Log: Improve wording. Discussed with: pjd, cperciva, rink, wkoszek and des, in order of appearance. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Sep 5 15:01:56 2009 (r196862) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Sep 5 15:08:58 2009 (r196863) @@ -3557,15 +3557,19 @@ arc_init(void) #ifdef __i386__ if (prefetch_tunable_set == 0) { - printf("ZFS NOTICE: prefetch is disabled by default on i386" - " - add enable to tunable to change.\n" ); + printf("ZFS NOTICE: Prefetch is disabled by default on i386 " + "-- to enable,\n"); + printf(" add \"vfs.zfs.prefetch_disable=0\" " + "to /boot/loader.conf.\n"); zfs_prefetch_disable=1; } #else if ((((uint64_t)physmem * PAGESIZE) < (1ULL << 32)) && prefetch_tunable_set == 0) { - printf("ZFS NOTICE: system has less than 4GB and prefetch enable is not set" - "... disabling.\n"); + printf("ZFS NOTICE: Prefetch is disabled by default if less " + "than 4 GB of RAM is present;\n" + " to enable, add \"vfs.zfs.prefetch_disable=0\" " + "to /boot/loader.conf.\n"); zfs_prefetch_disable=1; } #endif From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 16:43:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49E6D1065670; Sat, 5 Sep 2009 16:43:17 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 380B08FC17; Sat, 5 Sep 2009 16:43:17 +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 n85GhHMq058530; Sat, 5 Sep 2009 16:43:17 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n85GhHkJ058525; Sat, 5 Sep 2009 16:43:17 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200909051643.n85GhHkJ058525@svn.freebsd.org> From: Qing Li Date: Sat, 5 Sep 2009 16:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196864 - in head/sys: net netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 16:43:17 -0000 Author: qingli Date: Sat Sep 5 16:43:16 2009 New Revision: 196864 URL: http://svn.freebsd.org/changeset/base/196864 Log: This patch fixes the following issues: - Interface link-local address is not reachable within the node that owns the interface, this is due to the mismatch in address scope as the result of the installed interface address loopback route. Therefore for each interface address loopback route, the rt_gateway field (of AF_LINK type) will be used to track which interface a given address belongs to. This will aid the address source to use the proper interface for address scope/zone validation. - The loopback address is not reachable. The root cause is the same as the above. - Empty nd6 entries are created for the IPv6 loopback addresses only for validation reason. Doing so will eliminate as much of the special case (loopback addresses) handling code as possible, however, these empty nd6 entries should not be returned to the userland applications such as the "ndp" command. Since both of the above issues contain common files, these files are committed together. Reviewed by: bz MFC after: immediately Modified: head/sys/net/if_llatbl.c head/sys/netinet6/in6.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_output.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sat Sep 5 15:08:58 2009 (r196863) +++ head/sys/net/if_llatbl.c Sat Sep 5 16:43:16 2009 (r196864) @@ -263,6 +263,15 @@ lla_rt_output(struct rt_msghdr *rtm, str __func__, dl->sdl_index); return EINVAL; } + if (ifp->if_flags & IFF_LOOPBACK) { + struct ifaddr *ia; + ia = ifa_ifwithaddr(dst); + if (ia != NULL) { + ifp = ia->ifa_ifp; + ifa_free(ia); + } else + return EINVAL; + } switch (rtm->rtm_type) { case RTM_ADD: Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sat Sep 5 15:08:58 2009 (r196863) +++ head/sys/netinet6/in6.c Sat Sep 5 16:43:16 2009 (r196864) @@ -1201,8 +1201,8 @@ in6_purgeaddr(struct ifaddr *ifa) bzero(&null_sdl, sizeof(null_sdl)); null_sdl.sdl_len = sizeof(null_sdl); null_sdl.sdl_family = AF_LINK; - null_sdl.sdl_type = V_loif->if_type; - null_sdl.sdl_index = V_loif->if_index; + null_sdl.sdl_type = ia->ia_ifp->if_type; + null_sdl.sdl_index = ia->ia_ifp->if_index; bzero(&info, sizeof(info)); info.rti_flags = ia->ia_flags | RTF_HOST | RTF_STATIC; info.rti_info[RTAX_DST] = (struct sockaddr *)&ia->ia_addr; @@ -1782,9 +1782,9 @@ in6_ifinit(struct ifnet *ifp, struct in6 if (error == 0 && rt != NULL) { RT_LOCK(rt); ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type = - rt->rt_ifp->if_type; + ifp->if_type; ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index = - rt->rt_ifp->if_index; + ifp->if_index; RT_REMREF(rt); RT_UNLOCK(rt); } else if (error != 0) @@ -2495,6 +2495,9 @@ in6_lltable_dump(struct lltable *llt, st } ndpc; int i, error; + if (ifp->if_flags & IFF_LOOPBACK) + return 0; + LLTABLE_LOCK_ASSERT(); error = 0; Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Sat Sep 5 15:08:58 2009 (r196863) +++ head/sys/netinet6/in6_src.c Sat Sep 5 16:43:16 2009 (r196864) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #ifdef RADIX_MPATH @@ -697,8 +698,25 @@ selectroute(struct sockaddr_in6 *dstsock if (error == EHOSTUNREACH) V_ip6stat.ip6s_noroute++; - if (retifp != NULL) + if (retifp != NULL) { *retifp = ifp; + + /* + * Adjust the "outgoing" interface. If we're going to loop + * the packet back to ourselves, the ifp would be the loopback + * interface. However, we'd rather know the interface associated + * to the destination address (which should probably be one of + * our own addresses.) + */ + if (rt) { + if ((rt->rt_ifp->if_flags & IFF_LOOPBACK) && + (rt->rt_gateway->sa_family == AF_LINK)) + *retifp = + ifnet_byindex(((struct sockaddr_dl *) + rt->rt_gateway)->sdl_index); + } + } + if (retrt != NULL) *retrt = rt; /* rt may be NULL */ @@ -750,16 +768,6 @@ in6_selectif(struct sockaddr_in6 *dstsoc return (flags); } - /* - * Adjust the "outgoing" interface. If we're going to loop the packet - * back to ourselves, the ifp would be the loopback interface. - * However, we'd rather know the interface associated to the - * destination address (which should probably be one of our own - * addresses.) - */ - if (rt && rt->rt_ifa && rt->rt_ifa->ifa_ifp) - *retifp = rt->rt_ifa->ifa_ifp; - if (ro == &sro && rt && rt == sro.ro_rt) RTFREE(rt); return (0); Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Sat Sep 5 15:08:58 2009 (r196863) +++ head/sys/netinet6/ip6_output.c Sat Sep 5 16:43:16 2009 (r196864) @@ -602,15 +602,12 @@ again: rt->rt_use++; } + /* * The outgoing interface must be in the zone of source and - * destination addresses. We should use ia_ifp to support the - * case of sending packets to an address of our own. + * destination addresses. */ - if (ia != NULL && ia->ia_ifp) - origifp = ia->ia_ifp; - else - origifp = ifp; + origifp = ifp; src0 = ip6->ip6_src; if (in6_setscope(&src0, origifp, &zone)) @@ -634,6 +631,12 @@ again: goto badscope; } + /* We should use ia_ifp to support the case of + * sending packets to an address of our own. + */ + if (ia != NULL && ia->ia_ifp) + ifp = ia->ia_ifp; + /* scope check is done. */ goto routefound; From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 16:50:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F8E31065692; Sat, 5 Sep 2009 16:50:56 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5808FC1E; Sat, 5 Sep 2009 16:50:56 +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 n85GotRU058715; Sat, 5 Sep 2009 16:50:55 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n85GotlE058713; Sat, 5 Sep 2009 16:50:55 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200909051650.n85GotlE058713@svn.freebsd.org> From: Qing Li Date: Sat, 5 Sep 2009 16:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196865 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 16:50:56 -0000 Author: qingli Date: Sat Sep 5 16:50:55 2009 New Revision: 196865 URL: http://svn.freebsd.org/changeset/base/196865 Log: This patch fixes an address scope violation. Considering the scenario where an anycast address is assigned on one interface, and a global address with the same scope is assigned on another interface. In other words, the interface owns the anycast address has only the link-local address as one other address. Without this patch, "ping6" the anycast address from another station will observe the source address of the returned ICMP6 echo reply has the link-local address, not the global address that exists on the other interface in the same node. Reviewed by: bz MFC after: immediately Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Sat Sep 5 16:43:16 2009 (r196864) +++ head/sys/netinet6/icmp6.c Sat Sep 5 16:50:55 2009 (r196865) @@ -2170,6 +2170,10 @@ icmp6_reflect(struct mbuf *m, size_t off } } + if ((srcp != NULL) && + (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src))) + srcp = NULL; + if (srcp == NULL) { int e; struct sockaddr_in6 sin6; From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 16:51:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEDAD1065676; Sat, 5 Sep 2009 16:51:51 +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 BE2748FC19; Sat, 5 Sep 2009 16:51: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 n85GppFq058768; Sat, 5 Sep 2009 16:51:51 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n85GppUJ058766; Sat, 5 Sep 2009 16:51:51 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200909051651.n85GppUJ058766@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 5 Sep 2009 16:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196866 - head/usr.sbin/ndp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 16:51:51 -0000 Author: bz Date: Sat Sep 5 16:51:51 2009 New Revision: 196866 URL: http://svn.freebsd.org/changeset/base/196866 Log: In the NEXTADDR macro use SA_SIZE() rather than directly using sizeof(), as introduced in r186119, for advancing the current position into the buffer. See comment in net/route.h for a description of the difference. This makes ndp -s work again. Reviewed by: qingli X-MFC after: now Modified: head/usr.sbin/ndp/ndp.c Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Sat Sep 5 16:50:55 2009 (r196865) +++ head/usr.sbin/ndp/ndp.c Sat Sep 5 16:51:51 2009 (r196866) @@ -116,7 +116,7 @@ #define NEXTADDR(w, s) \ if (rtm->rtm_addrs & (w)) { \ - bcopy((char *)&s, cp, sizeof(s)); cp += sizeof(s);} + bcopy((char *)&s, cp, sizeof(s)); cp += SA_SIZE(&s);} static pid_t pid; From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 19:05:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 665C71065692; Sat, 5 Sep 2009 19:05:18 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 13BDF8FC17; Sat, 5 Sep 2009 19:05:17 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n85J5Emn011253; Sat, 5 Sep 2009 13:05:14 -0600 (MDT) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1075.2) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: <4AA20249.9000301@FreeBSD.org> Date: Sat, 5 Sep 2009 13:05:14 -0600 Content-Transfer-Encoding: 7bit Message-Id: References: <200909031237.n83CbIgk032551@svn.freebsd.org> <20090903114121.C20031@pooker.samsco.org> <9bbcef730909031245o7c380925sd29b2cc976c4d7dd@mail.gmail.com> <200909031602.01222.jhb@freebsd.org> <4AA20249.9000301@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1075.2) X-Spam-Status: No, score=-2.5 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ivan Voras , John Baldwin Subject: Re: svn commit: r196777 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 19:05:18 -0000 On Sep 5, 2009, at 12:16 AM, Alexander Motin wrote: > John Baldwin wrote: >> On Thursday 03 September 2009 3:45:07 pm Ivan Voras wrote: >>> But ciss doesn't reference it at all so either it deviously >>> assumes it >>> or is independent of it. >> >> Actually, it may be much worse, it may be that the author of ciss >> (4) new that >> ciss(4)'s largest supported I/O size was larger than 128k so they >> didn't >> bother handling the limit at all giving the false impression the >> hardware has >> no limit. > > In cases of ATA and CAM infrastructures it was is so, that if driver > does not sets max_iosize or maxio respectively, it uses DFLTPHYS. So > problem is only about non-ATA/CAM RAIDs or cases where wrong value > could > be specified explicitly. > > ciss(4) driver was explicitly limited to 64K, until somebody could > review it's capabilities. > Right, but I don't want people blindly changing this in any of the CAM drivers without understanding what is going on. Also, there are plenty of non-CAM block drivers that haven't been audited very well yet, if at all. Scott From owner-svn-src-head@FreeBSD.ORG Sat Sep 5 20:24:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A4D81065676; Sat, 5 Sep 2009 20:24:38 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40A3F8FC08; Sat, 5 Sep 2009 20:24:38 +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 n85KOcNn063185; Sat, 5 Sep 2009 20:24:38 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n85KOcuh063182; Sat, 5 Sep 2009 20:24:38 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200909052024.n85KOcuh063182@svn.freebsd.org> From: Qing Li Date: Sat, 5 Sep 2009 20:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196871 - in head/sys: net netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 20:24:38 -0000 Author: qingli Date: Sat Sep 5 20:24:37 2009 New Revision: 196871 URL: http://svn.freebsd.org/changeset/base/196871 Log: The addresses that are assigned to the loopback interface should be part of the kernel routing table. Reviewed by: bz MFC after: immediately Modified: head/sys/net/if_llatbl.c head/sys/netinet6/in6.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sat Sep 5 18:44:36 2009 (r196870) +++ head/sys/net/if_llatbl.c Sat Sep 5 20:24:37 2009 (r196871) @@ -263,15 +263,6 @@ lla_rt_output(struct rt_msghdr *rtm, str __func__, dl->sdl_index); return EINVAL; } - if (ifp->if_flags & IFF_LOOPBACK) { - struct ifaddr *ia; - ia = ifa_ifwithaddr(dst); - if (ia != NULL) { - ifp = ia->ifa_ifp; - ifa_free(ia); - } else - return EINVAL; - } switch (rtm->rtm_type) { case RTM_ADD: Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sat Sep 5 18:44:36 2009 (r196870) +++ head/sys/netinet6/in6.c Sat Sep 5 20:24:37 2009 (r196871) @@ -1192,9 +1192,10 @@ in6_purgeaddr(struct ifaddr *ifa) /* * Remove the loopback route to the interface address. - * The check for the current setting of "nd6_useloopback" is not needed. + * The check for the current setting of "nd6_useloopback" + * is not needed. */ - if (!(ia->ia_ifp->if_flags & IFF_LOOPBACK)) { + { struct rt_addrinfo info; struct sockaddr_dl null_sdl; @@ -1767,7 +1768,9 @@ in6_ifinit(struct ifnet *ifp, struct in6 /* * add a loopback route to self */ - if (V_nd6_useloopback && !(ifp->if_flags & IFF_LOOPBACK)) { + if (!(ia->ia_flags & IFA_ROUTE) + && (V_nd6_useloopback + || (ifp->if_flags & IFF_LOOPBACK))) { struct rt_addrinfo info; struct rtentry *rt = NULL; static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; @@ -1788,7 +1791,7 @@ in6_ifinit(struct ifnet *ifp, struct in6 RT_REMREF(rt); RT_UNLOCK(rt); } else if (error != 0) - log(LOG_INFO, "in6_ifinit: insertion failed\n"); + log(LOG_INFO, "in6_ifinit: error = %d, insertion failed\n", error); } /* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */