From owner-svn-src-stable@FreeBSD.ORG Sun Jul 19 12:57:11 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CE5106566B; Sun, 19 Jul 2009 12:57:11 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38ACB8FC0C; Sun, 19 Jul 2009 12:57:11 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6JCvATt043101; Sun, 19 Jul 2009 12:57:10 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6JCvA9r043100; Sun, 19 Jul 2009 12:57:10 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200907191257.n6JCvA9r043100@svn.freebsd.org> From: Ulf Lilleengen Date: Sun, 19 Jul 2009 12:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195759 - in stable/7/sys: . contrib/pf geom/linux_lvm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 12:57:11 -0000 Author: lulf Date: Sun Jul 19 12:57:10 2009 New Revision: 195759 URL: http://svn.freebsd.org/changeset/base/195759 Log: MFC r194924: - Apply the same naming rules of LVM names as done in the LVM code itself. PR: kern/135874 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/geom/linux_lvm/g_linux_lvm.c Modified: stable/7/sys/geom/linux_lvm/g_linux_lvm.c ============================================================================== --- stable/7/sys/geom/linux_lvm/g_linux_lvm.c Sat Jul 18 21:50:53 2009 (r195758) +++ stable/7/sys/geom/linux_lvm/g_linux_lvm.c Sun Jul 19 12:57:10 2009 (r195759) @@ -826,14 +826,6 @@ llvm_md_decode(const u_char *data, struc return (0); } -#define GRAB_NAME(tok, name, len) \ - len = 0; \ - while (tok[len] && (isalpha(tok[len]) || isdigit(tok[len])) && \ - len < G_LLVM_NAMELEN - 1) \ - len++; \ - bcopy(tok, name, len); \ - name[len] = '\0'; - #define GRAB_INT(key, tok1, tok2, v) \ if (tok1 && tok2 && strncmp(tok1, key, sizeof(key)) == 0) { \ v = strtol(tok2, &tok1, 10); \ @@ -864,6 +856,27 @@ llvm_md_decode(const u_char *data, struc break; \ } +static size_t +llvm_grab_name(char *name, const char *tok) +{ + size_t len; + + len = 0; + if (tok == NULL) + return (0); + if (tok[0] == '-') + return (0); + if (strcmp(tok, ".") == 0 || strcmp(tok, "..") == 0) + return (0); + while (tok[len] && (isalpha(tok[len]) || isdigit(tok[len]) || + tok[len] == '.' || tok[len] == '_' || tok[len] == '-' || + tok[len] == '+') && len < G_LLVM_NAMELEN - 1) + len++; + bcopy(tok, name, len); + name[len] = '\0'; + return (len); +} + static int llvm_textconf_decode(u_char *data, int buflen, struct g_llvm_metadata *md) { @@ -872,7 +885,7 @@ llvm_textconf_decode(u_char *data, int b char *tok, *v; char name[G_LLVM_NAMELEN]; char uuid[G_LLVM_UUIDLEN]; - int len; + size_t len; if (buf == NULL || *buf == '\0') return (EINVAL); @@ -880,7 +893,7 @@ llvm_textconf_decode(u_char *data, int b tok = strsep(&buf, "\n"); if (tok == NULL) return (EINVAL); - GRAB_NAME(tok, name, len); + len = llvm_grab_name(name, tok); if (len == 0) return (EINVAL); @@ -970,7 +983,7 @@ llvm_textconf_decode_pv(char **buf, char { struct g_llvm_pv *pv; char *v; - int len; + size_t len; if (*buf == NULL || **buf == '\0') return (EINVAL); @@ -983,7 +996,7 @@ llvm_textconf_decode_pv(char **buf, char len = 0; if (tok == NULL) goto bad; - GRAB_NAME(tok, pv->pv_name, len); + len = llvm_grab_name(pv->pv_name, tok); if (len == 0) goto bad; @@ -1024,7 +1037,7 @@ llvm_textconf_decode_lv(char **buf, char struct g_llvm_lv *lv; struct g_llvm_segment *sg; char *v; - int len; + size_t len; if (*buf == NULL || **buf == '\0') return (EINVAL); @@ -1036,10 +1049,9 @@ llvm_textconf_decode_lv(char **buf, char lv->lv_vg = vg; LIST_INIT(&lv->lv_segs); - len = 0; if (tok == NULL) goto bad; - GRAB_NAME(tok, lv->lv_name, len); + len = llvm_grab_name(lv->lv_name, tok); if (len == 0) goto bad; @@ -1162,7 +1174,6 @@ bad: free(sg, M_GLLVM); return (-1); } -#undef GRAB_NAME #undef GRAB_INT #undef GRAB_STR #undef SPLIT From owner-svn-src-stable@FreeBSD.ORG Sun Jul 19 16:50:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45FC6106564A; Sun, 19 Jul 2009 16:50:49 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 331108FC0C; Sun, 19 Jul 2009 16:50:49 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6JGonuN048594; Sun, 19 Jul 2009 16:50:49 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6JGons0048592; Sun, 19 Jul 2009 16:50:49 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907191650.n6JGons0048592@svn.freebsd.org> From: Bruce M Simpson Date: Sun, 19 Jul 2009 16:50:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195764 - stable/7/contrib/gcc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 16:50:49 -0000 Author: bms Date: Sun Jul 19 16:50:48 2009 New Revision: 195764 URL: http://svn.freebsd.org/changeset/base/195764 Log: Output debug information for global 'using' declarations, instead of just blowing up. A very similar change to this exists which is GPLv3 licensed, this is my own change. See also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31899 Reviewed by: luigi Modified: stable/7/contrib/gcc/dwarf2out.c Modified: stable/7/contrib/gcc/dwarf2out.c ============================================================================== --- stable/7/contrib/gcc/dwarf2out.c Sun Jul 19 16:48:25 2009 (r195763) +++ stable/7/contrib/gcc/dwarf2out.c Sun Jul 19 16:50:48 2009 (r195764) @@ -10007,7 +10007,7 @@ reference_to_unused (tree * tp, int * wa return NULL_TREE; else if (!cgraph_global_info_ready && (TREE_CODE (*tp) == VAR_DECL || TREE_CODE (*tp) == FUNCTION_DECL)) - gcc_unreachable (); + return *tp; else if (DECL_P (*tp) && TREE_CODE (*tp) == VAR_DECL) { struct cgraph_varpool_node *node = cgraph_varpool_node (*tp); From owner-svn-src-stable@FreeBSD.ORG Sun Jul 19 17:07:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9624A1065690; Sun, 19 Jul 2009 17:07:22 +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 EA4BB8FC0A; Sun, 19 Jul 2009 17:07:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 n6JGttuR033877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Jul 2009 19:55:56 +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 n6JGttGK075465; Sun, 19 Jul 2009 19:55:55 +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 n6JGttoU075464; Sun, 19 Jul 2009 19:55:55 +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: Sun, 19 Jul 2009 19:55:55 +0300 From: Kostik Belousov To: Bruce M Simpson Message-ID: <20090719165555.GC55190@deviant.kiev.zoral.com.ua> References: <200907191650.n6JGons0048592@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cgSBEnGlXcJKhBVw" Content-Disposition: inline In-Reply-To: <200907191650.n6JGons0048592@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-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r195764 - stable/7/contrib/gcc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 17:07:29 -0000 --cgSBEnGlXcJKhBVw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 19, 2009 at 04:50:49PM +0000, Bruce M Simpson wrote: > Author: bms > Date: Sun Jul 19 16:50:48 2009 > New Revision: 195764 > URL: http://svn.freebsd.org/changeset/base/195764 >=20 > Log: > Output debug information for global 'using' declarations, instead > of just blowing up. A very similar change to this exists which is > GPLv3 licensed, this is my own change. > =20 > See also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D31899 > Reviewed by: luigi >=20 > Modified: > stable/7/contrib/gcc/dwarf2out.c Was this committed to HEAD first ? Please revert ASAP if not. --cgSBEnGlXcJKhBVw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkpjUBsACgkQC3+MBN1Mb4j1QgCg4Zraa1QyMI3YfUlQ1hvfkV1j XgUAoLqPMaiEx8Gq7keDC6nbaB+DKxr+ =SqZq -----END PGP SIGNATURE----- --cgSBEnGlXcJKhBVw-- From owner-svn-src-stable@FreeBSD.ORG Sun Jul 19 17:13:17 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 457E8106566C; Sun, 19 Jul 2009 17:13:17 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32DA18FC24; Sun, 19 Jul 2009 17:13:17 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6JHDGOm049116; Sun, 19 Jul 2009 17:13:16 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6JHDGel049114; Sun, 19 Jul 2009 17:13:16 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907191713.n6JHDGel049114@svn.freebsd.org> From: Bruce M Simpson Date: Sun, 19 Jul 2009 17:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195766 - stable/7/contrib/gcc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 17:13:17 -0000 Author: bms Date: Sun Jul 19 17:13:16 2009 New Revision: 195766 URL: http://svn.freebsd.org/changeset/base/195766 Log: Revert previous change. Requested by: kib Modified: stable/7/contrib/gcc/dwarf2out.c Modified: stable/7/contrib/gcc/dwarf2out.c ============================================================================== --- stable/7/contrib/gcc/dwarf2out.c Sun Jul 19 16:54:24 2009 (r195765) +++ stable/7/contrib/gcc/dwarf2out.c Sun Jul 19 17:13:16 2009 (r195766) @@ -10007,7 +10007,7 @@ reference_to_unused (tree * tp, int * wa return NULL_TREE; else if (!cgraph_global_info_ready && (TREE_CODE (*tp) == VAR_DECL || TREE_CODE (*tp) == FUNCTION_DECL)) - return *tp; + gcc_unreachable (); else if (DECL_P (*tp) && TREE_CODE (*tp) == VAR_DECL) { struct cgraph_varpool_node *node = cgraph_varpool_node (*tp); From owner-svn-src-stable@FreeBSD.ORG Sun Jul 19 18:36:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133471065686; Sun, 19 Jul 2009 18:36:55 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 010AA8FC08; Sun, 19 Jul 2009 18:36:55 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6JIas1b050944; Sun, 19 Jul 2009 18:36:54 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6JIasO8050942; Sun, 19 Jul 2009 18:36:54 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907191836.n6JIasO8050942@svn.freebsd.org> From: Bruce M Simpson Date: Sun, 19 Jul 2009 18:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195770 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 18:36:55 -0000 Author: bms Date: Sun Jul 19 18:36:54 2009 New Revision: 195770 URL: http://svn.freebsd.org/changeset/base/195770 Log: Fix two typos in sctp_send_initiate(); these corrupt the INIT chunk on 64-bit platforms, in the 7.x SCTP stack. Observed on 7.2-STABLE/amd64. Submitted by: Michael Tuexen Reviewed by: rrs Modified: stable/7/sys/netinet/sctp_output.c Modified: stable/7/sys/netinet/sctp_output.c ============================================================================== --- stable/7/sys/netinet/sctp_output.c Sun Jul 19 17:40:45 2009 (r195769) +++ stable/7/sys/netinet/sctp_output.c Sun Jul 19 18:36:54 2009 (r195770) @@ -6087,7 +6087,7 @@ sctp_send_initiate(struct sctp_inpcb *in ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); ph->param_type = htons(SCTP_HAS_NAT_SUPPORT); ph->param_length = htons(sizeof(struct sctp_paramhdr)); - SCTP_BUF_LEN(m) += sizeof(sizeof(struct sctp_paramhdr)); + SCTP_BUF_LEN(m) += sizeof(struct sctp_paramhdr); } /* add authentication parameters */ if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { @@ -7198,7 +7198,7 @@ do_a_abort: ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); ph->param_type = htons(SCTP_HAS_NAT_SUPPORT); ph->param_length = htons(sizeof(struct sctp_paramhdr)); - SCTP_BUF_LEN(m) += sizeof(sizeof(struct sctp_paramhdr)); + SCTP_BUF_LEN(m) += sizeof(struct sctp_paramhdr); } /* And now tell the peer we do all the extensions */ pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); From owner-svn-src-stable@FreeBSD.ORG Sun Jul 19 18:37:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 229AA10656A8; Sun, 19 Jul 2009 18:37:21 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 102AE8FC1A; Sun, 19 Jul 2009 18:37:21 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6JIbKMp050989; Sun, 19 Jul 2009 18:37:20 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6JIbKme050987; Sun, 19 Jul 2009 18:37:20 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907191837.n6JIbKme050987@svn.freebsd.org> From: Bruce M Simpson Date: Sun, 19 Jul 2009 18:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195771 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 18:37:22 -0000 Author: bms Date: Sun Jul 19 18:37:20 2009 New Revision: 195771 URL: http://svn.freebsd.org/changeset/base/195771 Log: When moving an SCTP association from one hash table to another, make sure the association's link entry in the hash table is updated. This fixes a panic on closing an association in the 7.x SCTP stack. Observed on 7.2-STABLE/amd64. Submitted by: Michael Tuexen Reviewed by: rrs Modified: stable/7/sys/netinet/sctp_pcb.c Modified: stable/7/sys/netinet/sctp_pcb.c ============================================================================== --- stable/7/sys/netinet/sctp_pcb.c Sun Jul 19 18:36:54 2009 (r195770) +++ stable/7/sys/netinet/sctp_pcb.c Sun Jul 19 18:37:20 2009 (r195771) @@ -2504,7 +2504,9 @@ sctp_move_pcb_and_assoc(struct sctp_inpc /* Pull the tcb from the old association */ LIST_REMOVE(stcb, sctp_tcbhash); LIST_REMOVE(stcb, sctp_tcblist); - + if (stcb->asoc.in_asocid_hash) { + LIST_REMOVE(stcb, sctp_tcbasocidhash); + } /* Now insert the new_inp into the TCP connected hash */ head = &SCTP_BASE_INFO(sctp_tcpephash)[SCTP_PCBHASH_ALLADDR((lport), SCTP_BASE_INFO(hashtcpmark))]; @@ -2520,7 +2522,12 @@ sctp_move_pcb_and_assoc(struct sctp_inpc * only have one connection? Probably not :> so lets get rid of it * and not suck up any kernel memory in that. */ - + if (stcb->asoc.in_asocid_hash) { + struct sctpasochead *lhd; + lhd = &new_inp->sctp_asocidhash[SCTP_PCBHASH_ASOC(stcb->asoc.assoc_id, + new_inp->hashasocidmark)]; + LIST_INSERT_HEAD(lhd, stcb, sctp_tcbasocidhash); + } /* Ok. Let's restart timer. */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, new_inp, From owner-svn-src-stable@FreeBSD.ORG Mon Jul 20 16:19:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA2211065673; Mon, 20 Jul 2009 16:19:42 +0000 (UTC) (envelope-from snb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D679D8FC22; Mon, 20 Jul 2009 16:19:42 +0000 (UTC) (envelope-from snb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6KGJgQd082555; Mon, 20 Jul 2009 16:19:42 GMT (envelope-from snb@svn.freebsd.org) Received: (from snb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6KGJgQ0082553; Mon, 20 Jul 2009 16:19:42 GMT (envelope-from snb@svn.freebsd.org) Message-Id: <200907201619.n6KGJgQ0082553@svn.freebsd.org> From: Sean Nicholas Barkas Date: Mon, 20 Jul 2009 16:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195783 - stable/7/sys/ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2009 16:19:43 -0000 Author: snb Date: Mon Jul 20 16:19:42 2009 New Revision: 195783 URL: http://svn.freebsd.org/changeset/base/195783 Log: MFC r195003: Fix a bug reported by pho@ where one can induce a panic by decreasing vfs.ufs.dirhash_maxmem below the current amount of memory used by dirhash. When ufsdirhash_build() is called with the memory in use greater than dirhash_maxmem, it attempts to free up memory by calling ufsdirhash_recycle(). If successful in freeing enough memory, ufsdirhash_recycle() leaves the dirhash list locked. But at this point in ufsdirhash_build(), the list is not explicitly unlocked after the call(s) to ufsdirhash_recycle(). When we next attempt to lock the dirhash list, we will get a "panic: _mtx_lock_sleep: recursed on non-recursive mutex dirhash list". Approved by: dwmalone (mentor) Modified: stable/7/sys/ufs/ufs/ufs_dirhash.c Modified: stable/7/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_dirhash.c Mon Jul 20 13:55:33 2009 (r195782) +++ stable/7/sys/ufs/ufs/ufs_dirhash.c Mon Jul 20 16:19:42 2009 (r195783) @@ -329,9 +329,12 @@ ufsdirhash_build(struct inode *ip) int dirblocks, i, j, memreqd, nblocks, narrays, nslots, slot; /* Take care of a decreased sysctl value. */ - while (ufs_dirhashmem > ufs_dirhashmaxmem) + while (ufs_dirhashmem > ufs_dirhashmaxmem) { if (ufsdirhash_recycle(0) != 0) return (-1); + /* Recycled enough memory, so unlock the list. */ + DIRHASHLIST_UNLOCK(); + } /* Check if we can/should use dirhash. */ if (ip->i_size < ufs_mindirhashsize || OFSFMT(ip->i_vnode) || From owner-svn-src-stable@FreeBSD.ORG Mon Jul 20 19:20:39 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E60D1065674; Mon, 20 Jul 2009 19:20:39 +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 3B29D8FC1D; Mon, 20 Jul 2009 19:20:39 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6KJKdrc086454; Mon, 20 Jul 2009 19:20:39 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6KJKbtj086449; Mon, 20 Jul 2009 19:20:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200907201920.n6KJKbtj086449@svn.freebsd.org> From: Doug Barton Date: Mon, 20 Jul 2009 19:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195786 - in stable/7/games/fortune: . datfiles fortune X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2009 19:20:40 -0000 Author: dougb Date: Mon Jul 20 19:20:37 2009 New Revision: 195786 URL: http://svn.freebsd.org/changeset/base/195786 Log: MFC 195726: spaces before commas and one ). Modified: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/fortunes stable/7/games/fortune/datfiles/fortunes-o.real stable/7/games/fortune/datfiles/freebsd-tips (props changed) stable/7/games/fortune/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Mon Jul 20 19:16:42 2009 (r195785) +++ stable/7/games/fortune/datfiles/fortunes Mon Jul 20 19:20:37 2009 (r195786) @@ -12229,7 +12229,7 @@ after they got done, you wanted to be tr "The test or the room?" "The tests or the room? Vell, nah, about them I can't complain." "The nurses? The food?" asked Fats, but Bernard shook his head no. -Fats laughed and said, "Listen , Bernie, you went to the MBH, they did this +Fats laughed and said, "Listen, Bernie, you went to the MBH, they did this great workup, and when I asked you shy you came to the House of God, all you tell me is, 'Nah, I can't complain.' So why did you come here? Why, Bernie, why?" @@ -25009,7 +25009,7 @@ Great song. -- Fred Reuss % I went to a job interview the other day, the guy asked me if I had any -questions , I said yes, just one, if you're in a car traveling at the +questions, I said yes, just one, if you're in a car traveling at the speed of light and you turn your headlights on, does anything happen? He said he couldn't answer that, I told him sorry, but I couldn't work @@ -25534,7 +25534,7 @@ we wouldn't reach a conclusion. If an average person on the subway turns to you, like an ancient mariner, and starts telling you her tale, you turn away or nod and hope she stops, not just because you fear she might be crazy. If she tells her tale on -camera, you might listen. Watching strangers on television , even +camera, you might listen. Watching strangers on television, even responding to them from a studio audience, we're disengaged - voyeurs collaborating with exhibitionists in rituals of sham community. Never have so many known so much about people for whom they cared so little. @@ -26161,9 +26161,9 @@ they'll never hurt you, nine times out o % If practice makes perfect, and nobody's perfect, why practice? % -If preceded by a '-' , the timezone shall be east of the Prime +If preceded by a '-', the timezone shall be east of the Prime Meridian; otherwise, it shall be west (which may be indicated by -an optional preceding '+' ). +an optional preceding '+'). -- POSIX 2001 The "+" or "-" indicates whether the time-of-day is ahead of Modified: stable/7/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/7/games/fortune/datfiles/fortunes-o.real Mon Jul 20 19:16:42 2009 (r195785) +++ stable/7/games/fortune/datfiles/fortunes-o.real Mon Jul 20 19:20:37 2009 (r195786) @@ -6576,7 +6576,7 @@ mean. The answer is hot tubs. A hot tu water that you sit in naked with members of the opposite sex, none of whom is necessarily your spouse. After a few hours in their hot tubs, Californians don't give a damn about earthquakes or mass murderers. They don't give a -damn about anything , which is why they are able to produce "Laverne and +damn about anything, which is why they are able to produce "Laverne and Shirley" week after week. -- Dave Barry % From owner-svn-src-stable@FreeBSD.ORG Mon Jul 20 19:33:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30DFD1065673; Mon, 20 Jul 2009 19:33:23 +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 1DAFF8FC0A; Mon, 20 Jul 2009 19:33:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6KJXNIR086841; Mon, 20 Jul 2009 19:33:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6KJXMIc086838; Mon, 20 Jul 2009 19:33:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200907201933.n6KJXMIc086838@svn.freebsd.org> From: Doug Barton Date: Mon, 20 Jul 2009 19:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195787 - in stable/6/games/fortune: . datfiles fortune X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2009 19:33:24 -0000 Author: dougb Date: Mon Jul 20 19:33:22 2009 New Revision: 195787 URL: http://svn.freebsd.org/changeset/base/195787 Log: MFC 195726: spaces before commas and one ). (Note, the change to fortunes2-o is applied by hand from HEAD/*/fortunes-o.real since the fortunes2-o file was consolidated into it as of RELENG_7.) Modified: stable/6/games/fortune/ (props changed) stable/6/games/fortune/datfiles/fortunes stable/6/games/fortune/datfiles/fortunes2-o stable/6/games/fortune/fortune/ (props changed) Modified: stable/6/games/fortune/datfiles/fortunes ============================================================================== --- stable/6/games/fortune/datfiles/fortunes Mon Jul 20 19:20:37 2009 (r195786) +++ stable/6/games/fortune/datfiles/fortunes Mon Jul 20 19:33:22 2009 (r195787) @@ -12228,7 +12228,7 @@ after they got done, you wanted to be tr "The test or the room?" "The tests or the room? Vell, nah, about them I can't complain." "The nurses? The food?" asked Fats, but Bernard shook his head no. -Fats laughed and said, "Listen , Bernie, you went to the MBH, they did this +Fats laughed and said, "Listen, Bernie, you went to the MBH, they did this great workup, and when I asked you shy you came to the House of God, all you tell me is, 'Nah, I can't complain.' So why did you come here? Why, Bernie, why?" @@ -25008,7 +25008,7 @@ Great song. -- Fred Reuss % I went to a job interview the other day, the guy asked me if I had any -questions , I said yes, just one, if you're in a car traveling at the +questions, I said yes, just one, if you're in a car traveling at the speed of light and you turn your headlights on, does anything happen? He said he couldn't answer that, I told him sorry, but I couldn't work @@ -25533,7 +25533,7 @@ we wouldn't reach a conclusion. If an average person on the subway turns to you, like an ancient mariner, and starts telling you her tale, you turn away or nod and hope she stops, not just because you fear she might be crazy. If she tells her tale on -camera, you might listen. Watching strangers on television , even +camera, you might listen. Watching strangers on television, even responding to them from a studio audience, we're disengaged - voyeurs collaborating with exhibitionists in rituals of sham community. Never have so many known so much about people for whom they cared so little. @@ -26160,9 +26160,9 @@ they'll never hurt you, nine times out o % If practice makes perfect, and nobody's perfect, why practice? % -If preceded by a '-' , the timezone shall be east of the Prime +If preceded by a '-', the timezone shall be east of the Prime Meridian; otherwise, it shall be west (which may be indicated by -an optional preceding '+' ). +an optional preceding '+'). -- POSIX 2001 The "+" or "-" indicates whether the time-of-day is ahead of Modified: stable/6/games/fortune/datfiles/fortunes2-o ============================================================================== --- stable/6/games/fortune/datfiles/fortunes2-o Mon Jul 20 19:20:37 2009 (r195786) +++ stable/6/games/fortune/datfiles/fortunes2-o Mon Jul 20 19:33:22 2009 (r195787) @@ -5745,7 +5745,7 @@ mean. The answer is hot tubs. A hot tu water that you sit in naked with members of the opposite sex, none of whom is necessarily your spouse. After a few hours in their hot tubs, Californians don't give a damn about earthquakes or mass murderers. They don't give a -damn about anything , which is why they are able to produce "Laverne and +damn about anything, which is why they are able to produce "Laverne and Shirley" week after week. -- Dave Barry % From owner-svn-src-stable@FreeBSD.ORG Tue Jul 21 04:04:35 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BBF71065673; Tue, 21 Jul 2009 04:04:35 +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 470C28FC20; Tue, 21 Jul 2009 04:04:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6L44ZCc098756; Tue, 21 Jul 2009 04:04:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6L44Za3098751; Tue, 21 Jul 2009 04:04:35 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200907210404.n6L44Za3098751@svn.freebsd.org> From: Xin LI Date: Tue, 21 Jul 2009 04:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195796 - stable/7/usr.bin/gzip X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 04:04:36 -0000 Author: delphij Date: Tue Jul 21 04:04:35 2009 New Revision: 195796 URL: http://svn.freebsd.org/changeset/base/195796 Log: MFC all recent gzip(1) changes, up to r194916. Added: stable/7/usr.bin/gzip/unpack.c - copied unchanged from r195795, head/usr.bin/gzip/unpack.c Modified: stable/7/usr.bin/gzip/ (props changed) stable/7/usr.bin/gzip/gzip.1 stable/7/usr.bin/gzip/gzip.c stable/7/usr.bin/gzip/zuncompress.c Modified: stable/7/usr.bin/gzip/gzip.1 ============================================================================== --- stable/7/usr.bin/gzip/gzip.1 Tue Jul 21 02:14:39 2009 (r195795) +++ stable/7/usr.bin/gzip/gzip.1 Tue Jul 21 04:04:35 2009 (r195796) @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $ +.\" $NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $ .\" .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green .\" All rights reserved. @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 30, 2008 +.Dd June 24, 2009 .Dt GZIP 1 .Os .Sh NAME @@ -152,8 +152,8 @@ embedded in the file. This option causes the stored filename in the input file to be used as the output file. .It Fl n , -no-name -This option stops the filename from being stored in the output -file. +This option stops the filename and timestamp from being stored in +the output file. .It Fl q , -quiet With this option, no warnings or errors are printed. .It Fl r , -recursive @@ -206,7 +206,7 @@ This implementation of was ported based on the .Nx .Nm -20060927, and first appeared in +20090412, and first appeared in .Fx 7.0 . .Sh AUTHORS This implementation of Modified: stable/7/usr.bin/gzip/gzip.c ============================================================================== --- stable/7/usr.bin/gzip/gzip.c Tue Jul 21 02:14:39 2009 (r195795) +++ stable/7/usr.bin/gzip/gzip.c Tue Jul 21 04:04:35 2009 (r195796) @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.92 2008/07/21 14:19:22 lukem Exp $ */ +/* $NetBSD: gzip.c,v 1.94 2009/04/12 10:31:14 lukem Exp $ */ /*- * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -79,6 +79,9 @@ enum filetype { #ifndef NO_COMPRESS_SUPPORT FT_Z, #endif +#ifndef NO_PACK_SUPPORT + FT_PACK, +#endif FT_LAST, FT_UNKNOWN }; @@ -95,6 +98,10 @@ enum filetype { #define Z_MAGIC "\037\235" #endif +#ifndef NO_PACK_SUPPORT +#define PACK_MAGIC "\037\036" +#endif + #define GZ_SUFFIX ".gz" #define BUFLEN (64 * 1024) @@ -143,7 +150,7 @@ static suffixes_t suffixes[] = { }; #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) -static const char gzip_version[] = "FreeBSD gzip 20070711"; +static const char gzip_version[] = "FreeBSD gzip 20090621"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -195,10 +202,10 @@ static int exit_value = 0; /* exit valu static char *infile; /* name of file coming in */ -static void maybe_err(const char *fmt, ...) +static void maybe_err(const char *fmt, ...) __dead2 __attribute__((__format__(__printf__, 1, 2))); #ifndef NO_BZIP2_SUPPORT -static void maybe_errx(const char *fmt, ...) +static void maybe_errx(const char *fmt, ...) __dead2 __attribute__((__format__(__printf__, 1, 2))); #endif static void maybe_warn(const char *fmt, ...) @@ -248,6 +255,10 @@ static FILE *zdopen(int); static off_t zuncompress(FILE *, FILE *, char *, size_t, off_t *); #endif +#ifndef NO_PACK_SUPPORT +static off_t unpack(int, int, char *, size_t, off_t *); +#endif + int main(int, char **p); #ifdef SMALL @@ -1104,6 +1115,11 @@ file_gettype(u_char *buf) return FT_Z; else #endif +#ifndef NO_PACK_SUPPORT + if (memcmp(buf, PACK_MAGIC, 2) == 0) + return FT_PACK; + else +#endif return FT_UNKNOWN; } @@ -1297,7 +1313,7 @@ file_uncompress(char *file, char *outfil ssize_t rbytes; unsigned char header1[4]; enum filetype method; - int rv, fd, ofd, zfd = -1; + int fd, ofd, zfd = -1; #ifndef SMALL time_t timestamp = 0; unsigned char name[PATH_MAX + 1]; @@ -1344,9 +1360,10 @@ file_uncompress(char *file, char *outfil #ifndef SMALL if (method == FT_GZIP && Nflag) { unsigned char ts[4]; /* timestamp */ + ssize_t rv; rv = pread(fd, ts, sizeof ts, GZIP_TIMESTAMP); - if (rv >= 0 && (size_t)rv < sizeof ts) + if (rv >= 0 && rv < (ssize_t)(sizeof ts)) goto unexpected_EOF; if (rv == -1) { if (!fflag) @@ -1457,6 +1474,17 @@ file_uncompress(char *file, char *outfil } else #endif +#ifndef NO_PACK_SUPPORT + if (method == FT_PACK) { + if (lflag) { + maybe_warnx("no -l with packed files"); + goto lose; + } + + size = unpack(fd, zfd, NULL, 0, NULL); + } else +#endif + #ifndef SMALL if (method == FT_UNKNOWN) { if (lflag) { @@ -1650,6 +1678,12 @@ handle_stdin(void) fclose(in); break; #endif +#ifndef NO_PACK_SUPPORT + case FT_PACK: + usize = unpack(STDIN_FILENO, STDOUT_FILENO, + (char *)header1, sizeof header1, &gsize); + break; +#endif } #ifndef SMALL @@ -1966,6 +2000,8 @@ print_list(int fd, off_t out, const char } in_tot += in; out_tot += out; +#else + (void)&ts; /* XXX */ #endif printf("%12llu %12llu ", (unsigned long long)out, (unsigned long long)in); print_ratio(in, out, stdout); @@ -2035,6 +2071,9 @@ display_version(void) #ifndef NO_COMPRESS_SUPPORT #include "zuncompress.c" #endif +#ifndef NO_PACK_SUPPORT +#include "unpack.c" +#endif static ssize_t read_retry(int fd, void *buf, size_t sz) Copied: stable/7/usr.bin/gzip/unpack.c (from r195795, head/usr.bin/gzip/unpack.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/usr.bin/gzip/unpack.c Tue Jul 21 04:04:35 2009 (r195796, copy of r195795, head/usr.bin/gzip/unpack.c) @@ -0,0 +1,322 @@ +/*- + * Copyright (c) 2009 Xin LI + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* This file is #included by gzip.c */ + +/* + * pack(1) file format: + * + * The first 7 bytes is the header: + * 00, 01 - Signature (US, RS), we already validated it earlier. + * 02..05 - Uncompressed size + * 06 - Level for the huffman tree (<=24) + * + * pack(1) will then store symbols (leaf) nodes count in each huffman + * tree levels, each level would consume 1 byte (See [1]). + * + * After the symbol count table, there is the symbol table, storing + * symbols represented by coresponding leaf node. EOB is not being + * explicitly transmitted (not necessary anyway) in the symbol table. + * + * Compressed data goes after the symbol table. + * + * NOTES + * + * [1] If we count EOB into the symbols, that would mean that we will + * have at most 256 symbols in the huffman tree. pack(1) rejects empty + * file and files that just repeats one character, which means that we + * will have at least 2 symbols. Therefore, pack(1) would reduce the + * last level symbol count by 2 which makes it a number in + * range [0..254], so all levels' symbol count would fit into 1 byte. + */ + +#define PACK_HEADER_LENGTH 7 +#define HTREE_MAXLEVEL 24 + +/* + * unpack descriptor + * + * Represent the huffman tree in a similiar way that pack(1) would + * store in a packed file. We store all symbols in a linear table, + * and store pointers to each level's first symbol. In addition to + * that, maintain two counts for each level: inner nodes count and + * leaf nodes count. + */ +typedef struct { + int symbol_size; /* Size of the symbol table */ + int treelevels; /* Levels for the huffman tree */ + + int *symbolsin; /* Table of leaf symbols count in + each level */ + int *inodesin; /* Table of internal nodes count in + each level */ + + char *symbol; /* The symbol table */ + char *symbol_eob; /* Pointer to the EOB symbol */ + char **tree; /* Decoding huffman tree (pointers to + first symbol of each tree level */ + + off_t uncompressed_size; /* Uncompressed size */ + FILE *fpIn; /* Input stream */ + FILE *fpOut; /* Output stream */ +} unpack_descriptor_t; + +/* + * Release resource allocated to an unpack descriptor. + * + * Caller is responsible to make sure that all of these pointers are + * initialized (in our case, they all point to valid memory block). + * We don't zero out pointers here because nobody else would ever + * reference the memory block without scrubing them. + */ +static void +unpack_descriptor_fini(unpack_descriptor_t *unpackd) +{ + + free(unpackd->symbolsin); + free(unpackd->inodesin); + free(unpackd->symbol); + free(unpackd->tree); + + fclose(unpackd->fpIn); + fclose(unpackd->fpOut); +} + +/* + * Recursively fill the internal node count table + */ +static void +unpackd_fill_inodesin(const unpack_descriptor_t *unpackd, int level) +{ + + /* + * The internal nodes would be 1/2 of total internal nodes and + * leaf nodes in the next level. For the last level there + * would be no internal node by defination. + */ + if (level < unpackd->treelevels) { + unpackd_fill_inodesin(unpackd, level + 1); + unpackd->inodesin[level] = (unpackd->inodesin[level + 1] + + unpackd->symbolsin[level + 1]) / 2; + } else + unpackd->inodesin[level] = 0; +} + +/* + * Update counter for accepted bytes + */ +static void +accepted_bytes(off_t *bytes_in, off_t newbytes) +{ + + if (bytes_in != NULL) + (*bytes_in) += newbytes; +} + +/* + * Read file header and construct the tree. Also, prepare the buffered I/O + * for decode rountine. + * + * Return value is uncompressed size. + */ +static void +unpack_parse_header(int in, int out, char *pre, size_t prelen, off_t *bytes_in, + unpack_descriptor_t *unpackd) +{ + unsigned char hdr[PACK_HEADER_LENGTH]; /* buffer for header */ + ssize_t bytesread; /* Bytes read from the file */ + int i, j, thisbyte; + + /* Prepend the header buffer if we already read some data */ + if (prelen != 0) + memcpy(hdr, pre, prelen); + + /* Read in and fill the rest bytes of header */ + bytesread = read(in, hdr + prelen, PACK_HEADER_LENGTH - prelen); + if (bytesread < 0) + maybe_err("Error reading pack header"); + + accepted_bytes(bytes_in, PACK_HEADER_LENGTH); + + /* Obtain uncompressed length (bytes 2,3,4,5)*/ + unpackd->uncompressed_size = 0; + for (i = 2; i <= 5; i++) { + unpackd->uncompressed_size <<= 8; + unpackd->uncompressed_size |= hdr[i]; + } + + /* Get the levels of the tree */ + unpackd->treelevels = hdr[6]; + if (unpackd->treelevels > HTREE_MAXLEVEL || unpackd->treelevels < 1) + maybe_errx("Huffman tree has insane levels"); + + /* Let libc take care for buffering from now on */ + if ((unpackd->fpIn = fdopen(in, "r")) == NULL) + maybe_err("Can not fdopen() input stream"); + if ((unpackd->fpOut = fdopen(out, "w")) == NULL) + maybe_err("Can not fdopen() output stream"); + + /* Allocate for the tables of bounds and the tree itself */ + unpackd->inodesin = + calloc(unpackd->treelevels, sizeof(*(unpackd->inodesin))); + unpackd->symbolsin = + calloc(unpackd->treelevels, sizeof(*(unpackd->symbolsin))); + unpackd->tree = + calloc(unpackd->treelevels, (sizeof (*(unpackd->tree)))); + if (unpackd->inodesin == NULL || unpackd->symbolsin == NULL || + unpackd->tree == NULL) + maybe_err("calloc"); + + /* We count from 0 so adjust to match array upper bound */ + unpackd->treelevels--; + + /* Read the levels symbol count table and caculate total */ + unpackd->symbol_size = 1; /* EOB */ + for (i = 0; i <= unpackd->treelevels; i++) { + if ((thisbyte = fgetc(unpackd->fpIn)) == EOF) + maybe_err("File appears to be truncated"); + unpackd->symbolsin[i] = (unsigned char)thisbyte; + unpackd->symbol_size += unpackd->symbolsin[i]; + } + accepted_bytes(bytes_in, unpackd->treelevels); + if (unpackd->symbol_size > 256) + maybe_errx("Bad symbol table"); + + /* Allocate for the symbol table, point symbol_eob at the beginning */ + unpackd->symbol_eob = unpackd->symbol = calloc(1, unpackd->symbol_size); + if (unpackd->symbol == NULL) + maybe_err("calloc"); + + /* + * Read in the symbol table, which contain [2, 256] symbols. + * In order to fit the count in one byte, pack(1) would offset + * it by reducing 2 from the actual number from the last level. + * + * We adjust the last level's symbol count by 1 here, because + * the EOB symbol is not being transmitted explicitly. Another + * adjustment would be done later afterward. + */ + unpackd->symbolsin[unpackd->treelevels]++; + for (i = 0; i <= unpackd->treelevels; i++) { + unpackd->tree[i] = unpackd->symbol_eob; + for (j = 0; j < unpackd->symbolsin[i]; j++) { + if ((thisbyte = fgetc(unpackd->fpIn)) == EOF) + maybe_errx("Symbol table truncated"); + *unpackd->symbol_eob++ = (char)thisbyte; + } + accepted_bytes(bytes_in, unpackd->symbolsin[i]); + } + + /* Now, take account for the EOB symbol as well */ + unpackd->symbolsin[unpackd->treelevels]++; + + /* + * The symbolsin table has been constructed now. + * Caculate the internal nodes count table based on it. + */ + unpackd_fill_inodesin(unpackd, 0); +} + +/* + * Decode huffman stream, based on the huffman tree. + */ +static void +unpack_decode(const unpack_descriptor_t *unpackd, off_t *bytes_in) +{ + int thislevel, thiscode, thisbyte, inlevelindex; + int i; + off_t bytes_out = 0; + const char *thissymbol; /* The symbol pointer decoded from stream */ + + /* + * Decode huffman. Fetch every bytes from the file, get it + * into 'thiscode' bit-by-bit, then output the symbol we got + * when one has been found. + * + * Assumption: sizeof(int) > ((max tree levels + 1) / 8). + * bad things could happen if not. + */ + thislevel = 0; + thiscode = thisbyte = 0; + + while ((thisbyte = fgetc(unpackd->fpIn)) != EOF) { + accepted_bytes(bytes_in, 1); + + /* + * Split one bit from thisbyte, from highest to lowest, + * feed the bit into thiscode, until we got a symbol from + * the tree. + */ + for (i = 7; i >= 0; i--) { + thiscode = (thiscode << 1) | ((thisbyte >> i) & 1); + + /* Did we got a symbol? (referencing leaf node) */ + if (thiscode >= unpackd->inodesin[thislevel]) { + inlevelindex = + thiscode - unpackd->inodesin[thislevel]; + if (inlevelindex > unpackd->symbolsin[thislevel]) + maybe_errx("File corrupt"); + + thissymbol = + &(unpackd->tree[thislevel][inlevelindex]); + if ((thissymbol == unpackd->symbol_eob) && + (bytes_out == unpackd->uncompressed_size)) + goto finished; + + fputc((*thissymbol), unpackd->fpOut); + bytes_out++; + + /* Prepare for next input */ + thislevel = 0; thiscode = 0; + } else { + thislevel++; + if (thislevel > unpackd->treelevels) + maybe_errx("File corrupt"); + } + } + } + +finished: + if (bytes_out != unpackd->uncompressed_size) + maybe_errx("Premature EOF"); +} + +/* Handler for pack(1)'ed file */ +static off_t +unpack(int in, int out, char *pre, size_t prelen, off_t *bytes_in) +{ + unpack_descriptor_t unpackd; + + unpack_parse_header(dup(in), dup(out), pre, prelen, bytes_in, &unpackd); + unpack_decode(&unpackd, bytes_in); + unpack_descriptor_fini(&unpackd); + + /* If we reached here, the unpack was successful */ + return (unpackd.uncompressed_size); +} + Modified: stable/7/usr.bin/gzip/zuncompress.c ============================================================================== --- stable/7/usr.bin/gzip/zuncompress.c Tue Jul 21 02:14:39 2009 (r195795) +++ stable/7/usr.bin/gzip/zuncompress.c Tue Jul 21 04:04:35 2009 (r195796) @@ -1,4 +1,4 @@ -/* $NetBSD: zuncompress.c,v 1.6 2005/11/22 09:05:30 mrg Exp $ */ +/* $NetBSD: zuncompress.c,v 1.7 2009/04/12 10:31:14 lukem Exp $ */ /*- * Copyright (c) 1985, 1986, 1992, 1993 @@ -147,7 +147,7 @@ zuncompress(FILE *in, FILE *out, char *p compressed_pre = NULL; while ((bin = fread(buf, 1, sizeof(buf), in)) != 0) { - if (tflag == 0 && fwrite(buf, 1, bin, out) != (size_t)bin) { + if (tflag == 0 && (off_t)fwrite(buf, 1, bin, out) != bin) { free(buf); return -1; } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 21 04:25:04 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E011065670; Tue, 21 Jul 2009 04:25:03 +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 CF89A8FC0C; Tue, 21 Jul 2009 04:25:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6L4P36h099432; Tue, 21 Jul 2009 04:25:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6L4P3Z3099428; Tue, 21 Jul 2009 04:25:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200907210425.n6L4P3Z3099428@svn.freebsd.org> From: Xin LI Date: Tue, 21 Jul 2009 04:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195797 - stable/6/usr.bin/gzip X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 04:25:04 -0000 Author: delphij Date: Tue Jul 21 04:25:03 2009 New Revision: 195797 URL: http://svn.freebsd.org/changeset/base/195797 Log: MFC all recent gzip(1) changes, up to r194916. Added: stable/6/usr.bin/gzip/unpack.c - copied unchanged from r194579, head/usr.bin/gzip/unpack.c Modified: stable/6/usr.bin/gzip/ (props changed) stable/6/usr.bin/gzip/gzip.1 stable/6/usr.bin/gzip/gzip.c stable/6/usr.bin/gzip/zuncompress.c Modified: stable/6/usr.bin/gzip/gzip.1 ============================================================================== --- stable/6/usr.bin/gzip/gzip.1 Tue Jul 21 04:04:35 2009 (r195796) +++ stable/6/usr.bin/gzip/gzip.1 Tue Jul 21 04:25:03 2009 (r195797) @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $ +.\" $NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $ .\" .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green .\" All rights reserved. @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 30, 2008 +.Dd June 24, 2009 .Dt GZIP 1 .Os .Sh NAME @@ -152,8 +152,8 @@ embedded in the file. This option causes the stored filename in the input file to be used as the output file. .It Fl n , -no-name -This option stops the filename from being stored in the output -file. +This option stops the filename and timestamp from being stored in +the output file. .It Fl q , -quiet With this option, no warnings or errors are printed. .It Fl r , -recursive @@ -206,7 +206,7 @@ This implementation of was ported based on the .Nx .Nm -20060927, and first appeared in +20090412, and first appeared in .Fx 7.0 . .Sh AUTHORS This implementation of Modified: stable/6/usr.bin/gzip/gzip.c ============================================================================== --- stable/6/usr.bin/gzip/gzip.c Tue Jul 21 04:04:35 2009 (r195796) +++ stable/6/usr.bin/gzip/gzip.c Tue Jul 21 04:25:03 2009 (r195797) @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.92 2008/07/21 14:19:22 lukem Exp $ */ +/* $NetBSD: gzip.c,v 1.94 2009/04/12 10:31:14 lukem Exp $ */ /*- * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -79,6 +79,9 @@ enum filetype { #ifndef NO_COMPRESS_SUPPORT FT_Z, #endif +#ifndef NO_PACK_SUPPORT + FT_PACK, +#endif FT_LAST, FT_UNKNOWN }; @@ -95,6 +98,10 @@ enum filetype { #define Z_MAGIC "\037\235" #endif +#ifndef NO_PACK_SUPPORT +#define PACK_MAGIC "\037\036" +#endif + #define GZ_SUFFIX ".gz" #define BUFLEN (64 * 1024) @@ -143,7 +150,7 @@ static suffixes_t suffixes[] = { }; #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) -static const char gzip_version[] = "FreeBSD gzip 20070711"; +static const char gzip_version[] = "FreeBSD gzip 20090621"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -195,10 +202,10 @@ static int exit_value = 0; /* exit valu static char *infile; /* name of file coming in */ -static void maybe_err(const char *fmt, ...) +static void maybe_err(const char *fmt, ...) __dead2 __attribute__((__format__(__printf__, 1, 2))); #ifndef NO_BZIP2_SUPPORT -static void maybe_errx(const char *fmt, ...) +static void maybe_errx(const char *fmt, ...) __dead2 __attribute__((__format__(__printf__, 1, 2))); #endif static void maybe_warn(const char *fmt, ...) @@ -248,6 +255,10 @@ static FILE *zdopen(int); static off_t zuncompress(FILE *, FILE *, char *, size_t, off_t *); #endif +#ifndef NO_PACK_SUPPORT +static off_t unpack(int, int, char *, size_t, off_t *); +#endif + int main(int, char **p); #ifdef SMALL @@ -1104,6 +1115,11 @@ file_gettype(u_char *buf) return FT_Z; else #endif +#ifndef NO_PACK_SUPPORT + if (memcmp(buf, PACK_MAGIC, 2) == 0) + return FT_PACK; + else +#endif return FT_UNKNOWN; } @@ -1297,7 +1313,7 @@ file_uncompress(char *file, char *outfil ssize_t rbytes; unsigned char header1[4]; enum filetype method; - int rv, fd, ofd, zfd = -1; + int fd, ofd, zfd = -1; #ifndef SMALL time_t timestamp = 0; unsigned char name[PATH_MAX + 1]; @@ -1344,9 +1360,10 @@ file_uncompress(char *file, char *outfil #ifndef SMALL if (method == FT_GZIP && Nflag) { unsigned char ts[4]; /* timestamp */ + ssize_t rv; rv = pread(fd, ts, sizeof ts, GZIP_TIMESTAMP); - if (rv >= 0 && (size_t)rv < sizeof ts) + if (rv >= 0 && rv < (ssize_t)(sizeof ts)) goto unexpected_EOF; if (rv == -1) { if (!fflag) @@ -1457,6 +1474,17 @@ file_uncompress(char *file, char *outfil } else #endif +#ifndef NO_PACK_SUPPORT + if (method == FT_PACK) { + if (lflag) { + maybe_warnx("no -l with packed files"); + goto lose; + } + + size = unpack(fd, zfd, NULL, 0, NULL); + } else +#endif + #ifndef SMALL if (method == FT_UNKNOWN) { if (lflag) { @@ -1650,6 +1678,12 @@ handle_stdin(void) fclose(in); break; #endif +#ifndef NO_PACK_SUPPORT + case FT_PACK: + usize = unpack(STDIN_FILENO, STDOUT_FILENO, + (char *)header1, sizeof header1, &gsize); + break; +#endif } #ifndef SMALL @@ -1966,6 +2000,8 @@ print_list(int fd, off_t out, const char } in_tot += in; out_tot += out; +#else + (void)&ts; /* XXX */ #endif printf("%12llu %12llu ", (unsigned long long)out, (unsigned long long)in); print_ratio(in, out, stdout); @@ -2035,6 +2071,9 @@ display_version(void) #ifndef NO_COMPRESS_SUPPORT #include "zuncompress.c" #endif +#ifndef NO_PACK_SUPPORT +#include "unpack.c" +#endif static ssize_t read_retry(int fd, void *buf, size_t sz) Copied: stable/6/usr.bin/gzip/unpack.c (from r194579, head/usr.bin/gzip/unpack.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/usr.bin/gzip/unpack.c Tue Jul 21 04:25:03 2009 (r195797, copy of r194579, head/usr.bin/gzip/unpack.c) @@ -0,0 +1,322 @@ +/*- + * Copyright (c) 2009 Xin LI + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* This file is #included by gzip.c */ + +/* + * pack(1) file format: + * + * The first 7 bytes is the header: + * 00, 01 - Signature (US, RS), we already validated it earlier. + * 02..05 - Uncompressed size + * 06 - Level for the huffman tree (<=24) + * + * pack(1) will then store symbols (leaf) nodes count in each huffman + * tree levels, each level would consume 1 byte (See [1]). + * + * After the symbol count table, there is the symbol table, storing + * symbols represented by coresponding leaf node. EOB is not being + * explicitly transmitted (not necessary anyway) in the symbol table. + * + * Compressed data goes after the symbol table. + * + * NOTES + * + * [1] If we count EOB into the symbols, that would mean that we will + * have at most 256 symbols in the huffman tree. pack(1) rejects empty + * file and files that just repeats one character, which means that we + * will have at least 2 symbols. Therefore, pack(1) would reduce the + * last level symbol count by 2 which makes it a number in + * range [0..254], so all levels' symbol count would fit into 1 byte. + */ + +#define PACK_HEADER_LENGTH 7 +#define HTREE_MAXLEVEL 24 + +/* + * unpack descriptor + * + * Represent the huffman tree in a similiar way that pack(1) would + * store in a packed file. We store all symbols in a linear table, + * and store pointers to each level's first symbol. In addition to + * that, maintain two counts for each level: inner nodes count and + * leaf nodes count. + */ +typedef struct { + int symbol_size; /* Size of the symbol table */ + int treelevels; /* Levels for the huffman tree */ + + int *symbolsin; /* Table of leaf symbols count in + each level */ + int *inodesin; /* Table of internal nodes count in + each level */ + + char *symbol; /* The symbol table */ + char *symbol_eob; /* Pointer to the EOB symbol */ + char **tree; /* Decoding huffman tree (pointers to + first symbol of each tree level */ + + off_t uncompressed_size; /* Uncompressed size */ + FILE *fpIn; /* Input stream */ + FILE *fpOut; /* Output stream */ +} unpack_descriptor_t; + +/* + * Release resource allocated to an unpack descriptor. + * + * Caller is responsible to make sure that all of these pointers are + * initialized (in our case, they all point to valid memory block). + * We don't zero out pointers here because nobody else would ever + * reference the memory block without scrubing them. + */ +static void +unpack_descriptor_fini(unpack_descriptor_t *unpackd) +{ + + free(unpackd->symbolsin); + free(unpackd->inodesin); + free(unpackd->symbol); + free(unpackd->tree); + + fclose(unpackd->fpIn); + fclose(unpackd->fpOut); +} + +/* + * Recursively fill the internal node count table + */ +static void +unpackd_fill_inodesin(const unpack_descriptor_t *unpackd, int level) +{ + + /* + * The internal nodes would be 1/2 of total internal nodes and + * leaf nodes in the next level. For the last level there + * would be no internal node by defination. + */ + if (level < unpackd->treelevels) { + unpackd_fill_inodesin(unpackd, level + 1); + unpackd->inodesin[level] = (unpackd->inodesin[level + 1] + + unpackd->symbolsin[level + 1]) / 2; + } else + unpackd->inodesin[level] = 0; +} + +/* + * Update counter for accepted bytes + */ +static void +accepted_bytes(off_t *bytes_in, off_t newbytes) +{ + + if (bytes_in != NULL) + (*bytes_in) += newbytes; +} + +/* + * Read file header and construct the tree. Also, prepare the buffered I/O + * for decode rountine. + * + * Return value is uncompressed size. + */ +static void +unpack_parse_header(int in, int out, char *pre, size_t prelen, off_t *bytes_in, + unpack_descriptor_t *unpackd) +{ + unsigned char hdr[PACK_HEADER_LENGTH]; /* buffer for header */ + ssize_t bytesread; /* Bytes read from the file */ + int i, j, thisbyte; + + /* Prepend the header buffer if we already read some data */ + if (prelen != 0) + memcpy(hdr, pre, prelen); + + /* Read in and fill the rest bytes of header */ + bytesread = read(in, hdr + prelen, PACK_HEADER_LENGTH - prelen); + if (bytesread < 0) + maybe_err("Error reading pack header"); + + accepted_bytes(bytes_in, PACK_HEADER_LENGTH); + + /* Obtain uncompressed length (bytes 2,3,4,5)*/ + unpackd->uncompressed_size = 0; + for (i = 2; i <= 5; i++) { + unpackd->uncompressed_size <<= 8; + unpackd->uncompressed_size |= hdr[i]; + } + + /* Get the levels of the tree */ + unpackd->treelevels = hdr[6]; + if (unpackd->treelevels > HTREE_MAXLEVEL || unpackd->treelevels < 1) + maybe_errx("Huffman tree has insane levels"); + + /* Let libc take care for buffering from now on */ + if ((unpackd->fpIn = fdopen(in, "r")) == NULL) + maybe_err("Can not fdopen() input stream"); + if ((unpackd->fpOut = fdopen(out, "w")) == NULL) + maybe_err("Can not fdopen() output stream"); + + /* Allocate for the tables of bounds and the tree itself */ + unpackd->inodesin = + calloc(unpackd->treelevels, sizeof(*(unpackd->inodesin))); + unpackd->symbolsin = + calloc(unpackd->treelevels, sizeof(*(unpackd->symbolsin))); + unpackd->tree = + calloc(unpackd->treelevels, (sizeof (*(unpackd->tree)))); + if (unpackd->inodesin == NULL || unpackd->symbolsin == NULL || + unpackd->tree == NULL) + maybe_err("calloc"); + + /* We count from 0 so adjust to match array upper bound */ + unpackd->treelevels--; + + /* Read the levels symbol count table and caculate total */ + unpackd->symbol_size = 1; /* EOB */ + for (i = 0; i <= unpackd->treelevels; i++) { + if ((thisbyte = fgetc(unpackd->fpIn)) == EOF) + maybe_err("File appears to be truncated"); + unpackd->symbolsin[i] = (unsigned char)thisbyte; + unpackd->symbol_size += unpackd->symbolsin[i]; + } + accepted_bytes(bytes_in, unpackd->treelevels); + if (unpackd->symbol_size > 256) + maybe_errx("Bad symbol table"); + + /* Allocate for the symbol table, point symbol_eob at the beginning */ + unpackd->symbol_eob = unpackd->symbol = calloc(1, unpackd->symbol_size); + if (unpackd->symbol == NULL) + maybe_err("calloc"); + + /* + * Read in the symbol table, which contain [2, 256] symbols. + * In order to fit the count in one byte, pack(1) would offset + * it by reducing 2 from the actual number from the last level. + * + * We adjust the last level's symbol count by 1 here, because + * the EOB symbol is not being transmitted explicitly. Another + * adjustment would be done later afterward. + */ + unpackd->symbolsin[unpackd->treelevels]++; + for (i = 0; i <= unpackd->treelevels; i++) { + unpackd->tree[i] = unpackd->symbol_eob; + for (j = 0; j < unpackd->symbolsin[i]; j++) { + if ((thisbyte = fgetc(unpackd->fpIn)) == EOF) + maybe_errx("Symbol table truncated"); + *unpackd->symbol_eob++ = (char)thisbyte; + } + accepted_bytes(bytes_in, unpackd->symbolsin[i]); + } + + /* Now, take account for the EOB symbol as well */ + unpackd->symbolsin[unpackd->treelevels]++; + + /* + * The symbolsin table has been constructed now. + * Caculate the internal nodes count table based on it. + */ + unpackd_fill_inodesin(unpackd, 0); +} + +/* + * Decode huffman stream, based on the huffman tree. + */ +static void +unpack_decode(const unpack_descriptor_t *unpackd, off_t *bytes_in) +{ + int thislevel, thiscode, thisbyte, inlevelindex; + int i; + off_t bytes_out = 0; + const char *thissymbol; /* The symbol pointer decoded from stream */ + + /* + * Decode huffman. Fetch every bytes from the file, get it + * into 'thiscode' bit-by-bit, then output the symbol we got + * when one has been found. + * + * Assumption: sizeof(int) > ((max tree levels + 1) / 8). + * bad things could happen if not. + */ + thislevel = 0; + thiscode = thisbyte = 0; + + while ((thisbyte = fgetc(unpackd->fpIn)) != EOF) { + accepted_bytes(bytes_in, 1); + + /* + * Split one bit from thisbyte, from highest to lowest, + * feed the bit into thiscode, until we got a symbol from + * the tree. + */ + for (i = 7; i >= 0; i--) { + thiscode = (thiscode << 1) | ((thisbyte >> i) & 1); + + /* Did we got a symbol? (referencing leaf node) */ + if (thiscode >= unpackd->inodesin[thislevel]) { + inlevelindex = + thiscode - unpackd->inodesin[thislevel]; + if (inlevelindex > unpackd->symbolsin[thislevel]) + maybe_errx("File corrupt"); + + thissymbol = + &(unpackd->tree[thislevel][inlevelindex]); + if ((thissymbol == unpackd->symbol_eob) && + (bytes_out == unpackd->uncompressed_size)) + goto finished; + + fputc((*thissymbol), unpackd->fpOut); + bytes_out++; + + /* Prepare for next input */ + thislevel = 0; thiscode = 0; + } else { + thislevel++; + if (thislevel > unpackd->treelevels) + maybe_errx("File corrupt"); + } + } + } + +finished: + if (bytes_out != unpackd->uncompressed_size) + maybe_errx("Premature EOF"); +} + +/* Handler for pack(1)'ed file */ +static off_t +unpack(int in, int out, char *pre, size_t prelen, off_t *bytes_in) +{ + unpack_descriptor_t unpackd; + + unpack_parse_header(dup(in), dup(out), pre, prelen, bytes_in, &unpackd); + unpack_decode(&unpackd, bytes_in); + unpack_descriptor_fini(&unpackd); + + /* If we reached here, the unpack was successful */ + return (unpackd.uncompressed_size); +} + Modified: stable/6/usr.bin/gzip/zuncompress.c ============================================================================== --- stable/6/usr.bin/gzip/zuncompress.c Tue Jul 21 04:04:35 2009 (r195796) +++ stable/6/usr.bin/gzip/zuncompress.c Tue Jul 21 04:25:03 2009 (r195797) @@ -1,4 +1,4 @@ -/* $NetBSD: zuncompress.c,v 1.6 2005/11/22 09:05:30 mrg Exp $ */ +/* $NetBSD: zuncompress.c,v 1.7 2009/04/12 10:31:14 lukem Exp $ */ /*- * Copyright (c) 1985, 1986, 1992, 1993 @@ -147,7 +147,7 @@ zuncompress(FILE *in, FILE *out, char *p compressed_pre = NULL; while ((bin = fread(buf, 1, sizeof(buf), in)) != 0) { - if (tflag == 0 && fwrite(buf, 1, bin, out) != (size_t)bin) { + if (tflag == 0 && (off_t)fwrite(buf, 1, bin, out) != bin) { free(buf); return -1; } From owner-svn-src-stable@FreeBSD.ORG Tue Jul 21 04:33:01 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6C031065670; Tue, 21 Jul 2009 04:33:01 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id C231A8FC08; Tue, 21 Jul 2009 04:33:01 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.3/8.14.3) with ESMTP id n6L48Aks085162; Mon, 20 Jul 2009 21:08:10 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.3/8.14.2/Submit) id n6L48Amg085161; Mon, 20 Jul 2009 21:08:10 -0700 (PDT) (envelope-from obrien) Date: Mon, 20 Jul 2009 21:08:10 -0700 From: "David O'Brien" To: John Baldwin Message-ID: <20090721040810.GA84807@dragon.NUXI.org> References: <200907142046.n6EKkJwO070823@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907142046.n6EKkJwO070823@svn.freebsd.org> X-Operating-System: FreeBSD 8.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r195696 - in stable/7: crypto/openssh secure/lib/libssh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 04:33:02 -0000 On Tue, Jul 14, 2009 at 08:46:19PM +0000, John Baldwin wrote: > Date: Tue Jul 14 20:46:19 2009 > New Revision: 195696 > URL: http://svn.freebsd.org/changeset/base/195696 > Log: > MFC: Use the closefrom(2) system call. > Modified: > stable/7/crypto/openssh/ (props changed) > stable/7/crypto/openssh/config.h > stable/7/crypto/openssh/ssh_namespace.h > stable/7/secure/lib/libssh/ (props changed) > stable/7/secure/lib/libssh/Makefile Hi John, Would you mind backing out this commit from 7-stable. This change mades it so one cannot seriously boot a machine multiuser with an older kernel as /usr/sbin/sshd dies due to bad system call. I think the MFC of this part of the closefrom(2) addtion edge up against POLA for a mature -stable branch. Even in -CURRENT it's good form to add a new system call and then immedately use it... without some time laps to allow folks to boot a week old kernel. Thanks, -- David From owner-svn-src-stable@FreeBSD.ORG Tue Jul 21 12:43:12 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B441410656EF; Tue, 21 Jul 2009 12:43:12 +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 6DA158FC08; Tue, 21 Jul 2009 12:43:12 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5C5E66D41E; Tue, 21 Jul 2009 14:43:11 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 39BF8844C2; Tue, 21 Jul 2009 14:43:11 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: obrien@FreeBSD.org References: <200907142046.n6EKkJwO070823@svn.freebsd.org> <20090721040810.GA84807@dragon.NUXI.org> Date: Tue, 21 Jul 2009 14:43:11 +0200 In-Reply-To: <20090721040810.GA84807@dragon.NUXI.org> (David O'Brien's message of "Mon, 20 Jul 2009 21:08:10 -0700") Message-ID: <86hbx6xl40.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-stable-7@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r195696 - in stable/7: crypto/openssh secure/lib/libssh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 12:43:13 -0000 "David O'Brien" writes: > Would you mind backing out this commit from 7-stable. Rather than backing it out, we can fix it by adding a closefrom implementation in crypto/openssh/compat/. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable@FreeBSD.ORG Tue Jul 21 12:45:06 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9BA7106566C; Tue, 21 Jul 2009 12:45:06 +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 92B3C8FC15; Tue, 21 Jul 2009 12:45:06 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id D39CF6D418; Tue, 21 Jul 2009 14:45:05 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id B19EA844C2; Tue, 21 Jul 2009 14:45:05 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: obrien@FreeBSD.org References: <200907142046.n6EKkJwO070823@svn.freebsd.org> <20090721040810.GA84807@dragon.NUXI.org> <86hbx6xl40.fsf@ds4.des.no> Date: Tue, 21 Jul 2009 14:45:05 +0200 In-Reply-To: <86hbx6xl40.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Tue, 21 Jul 2009 14:43:11 +0200") Message-ID: <86d47uxl0u.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-stable-7@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r195696 - in stable/7: crypto/openssh secure/lib/libssh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 12:45:07 -0000 Dag-Erling Sm=C3=B8rgrav writes: > "David O'Brien" writes: > > Would you mind backing out this commit from 7-stable. > Rather than backing it out, we can fix it by adding a closefrom > implementation in crypto/openssh/compat/. Brain fart. That's what we had before the MFC. John, please back out your commit. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable@FreeBSD.ORG Tue Jul 21 13:43:59 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D56910656EF; Tue, 21 Jul 2009 13:43:59 +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 E45AE8FC16; Tue, 21 Jul 2009 13:43:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9624446B65; Tue, 21 Jul 2009 09:43:58 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C2B7F8A09C; Tue, 21 Jul 2009 09:43:56 -0400 (EDT) From: John Baldwin To: obrien@freebsd.org Date: Tue, 21 Jul 2009 09:33:23 -0400 User-Agent: KMail/1.9.7 References: <200907142046.n6EKkJwO070823@svn.freebsd.org> <20090721040810.GA84807@dragon.NUXI.org> In-Reply-To: <20090721040810.GA84807@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907210933.24176.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 21 Jul 2009 09:43:57 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r195696 - in stable/7: crypto/openssh secure/lib/libssh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 13:44:03 -0000 On Tuesday 21 July 2009 12:08:10 am David O'Brien wrote: > On Tue, Jul 14, 2009 at 08:46:19PM +0000, John Baldwin wrote: > > Date: Tue Jul 14 20:46:19 2009 > > New Revision: 195696 > > URL: http://svn.freebsd.org/changeset/base/195696 > > Log: > > MFC: Use the closefrom(2) system call. > > Modified: > > stable/7/crypto/openssh/ (props changed) > > stable/7/crypto/openssh/config.h > > stable/7/crypto/openssh/ssh_namespace.h > > stable/7/secure/lib/libssh/ (props changed) > > stable/7/secure/lib/libssh/Makefile > > Hi John, > Would you mind backing out this commit from 7-stable. > This change mades it so one cannot seriously boot a machine multiuser > with an older kernel as /usr/sbin/sshd dies due to bad system call. I > think the MFC of this part of the closefrom(2) addtion edge up against > POLA for a mature -stable branch. > > Even in -CURRENT it's good form to add a new system call and then > immedately use it... without some time laps to allow folks to boot > a week old kernel. Will do, no problem. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Tue Jul 21 13:45:40 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9F441065675; Tue, 21 Jul 2009 13:45:40 +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 BCD218FC2F; Tue, 21 Jul 2009 13:45:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6LDjeq5012888; Tue, 21 Jul 2009 13:45:40 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6LDjeZb012884; Tue, 21 Jul 2009 13:45:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200907211345.n6LDjeZb012884@svn.freebsd.org> From: John Baldwin Date: Tue, 21 Jul 2009 13:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195802 - in stable/7: crypto/openssh secure/lib/libssh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 13:45:41 -0000 Author: jhb Date: Tue Jul 21 13:45:40 2009 New Revision: 195802 URL: http://svn.freebsd.org/changeset/base/195802 Log: Revert to using the userland closefrom() stub instead of the system call to give a longer grace time where newer ssh binaries work with older kernels. Requested by: obrien Approved by: des Modified: stable/7/crypto/openssh/ (props changed) stable/7/crypto/openssh/config.h stable/7/crypto/openssh/ssh_namespace.h stable/7/secure/lib/libssh/ (props changed) stable/7/secure/lib/libssh/Makefile Modified: stable/7/crypto/openssh/config.h ============================================================================== --- stable/7/crypto/openssh/config.h Tue Jul 21 12:32:46 2009 (r195801) +++ stable/7/crypto/openssh/config.h Tue Jul 21 13:45:40 2009 (r195802) @@ -211,7 +211,7 @@ #define HAVE_CLOCK_T 1 /* Define to 1 if you have the `closefrom' function. */ -#define HAVE_CLOSEFROM 1 +/* #undef HAVE_CLOSEFROM */ /* Define if gai_strerror() returns const char * */ #define HAVE_CONST_GAI_STRERROR_PROTO 1 Modified: stable/7/crypto/openssh/ssh_namespace.h ============================================================================== --- stable/7/crypto/openssh/ssh_namespace.h Tue Jul 21 12:32:46 2009 (r195801) +++ stable/7/crypto/openssh/ssh_namespace.h Tue Jul 21 13:45:40 2009 (r195802) @@ -154,6 +154,7 @@ #define ciphers_valid ssh_ciphers_valid #define cleanhostname ssh_cleanhostname #define cleanup_exit ssh_cleanup_exit +#define closefrom ssh_closefrom #define colon ssh_colon #define compat_cipher_proposal ssh_compat_cipher_proposal #define compat_datafellows ssh_compat_datafellows Modified: stable/7/secure/lib/libssh/Makefile ============================================================================== --- stable/7/secure/lib/libssh/Makefile Tue Jul 21 12:32:46 2009 (r195801) +++ stable/7/secure/lib/libssh/Makefile Tue Jul 21 13:45:40 2009 (r195802) @@ -19,7 +19,7 @@ SRCS= acss.c authfd.c authfile.c bufaux. # compiled directly into sshd instead. # Portability layer -SRCS+= bsd-arc4random.c bsd-misc.c fmt_scaled.c \ +SRCS+= bsd-arc4random.c bsd-closefrom.c bsd-misc.c fmt_scaled.c \ getrrsetbyname.c openssl-compat.c port-tun.c strtonum.c \ vis.c xcrypt.c xmmap.c # FreeBSD additions From owner-svn-src-stable@FreeBSD.ORG Wed Jul 22 01:07:50 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B402106566B; Wed, 22 Jul 2009 01:07:50 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 487948FC1C; Wed, 22 Jul 2009 01:07:50 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6M17ok6026880; Wed, 22 Jul 2009 01:07:50 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6M17ofL026878; Wed, 22 Jul 2009 01:07:50 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907220107.n6M17ofL026878@svn.freebsd.org> From: Bruce M Simpson Date: Wed, 22 Jul 2009 01:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195816 - stable/7/contrib/gcc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 01:07:51 -0000 Author: bms Date: Wed Jul 22 01:07:49 2009 New Revision: 195816 URL: http://svn.freebsd.org/changeset/base/195816 Log: Output DWARF debug information for global 'using' declarations, instead of just blowing up. A very similar change to this exists which is GPLv3 licensed, this is my own change. This problem was triggered by running the Boost regression tests. See also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31899 Reviewed by: luigi Modified: stable/7/contrib/gcc/dwarf2out.c Modified: stable/7/contrib/gcc/dwarf2out.c ============================================================================== --- stable/7/contrib/gcc/dwarf2out.c Wed Jul 22 01:07:11 2009 (r195815) +++ stable/7/contrib/gcc/dwarf2out.c Wed Jul 22 01:07:49 2009 (r195816) @@ -10007,7 +10007,7 @@ reference_to_unused (tree * tp, int * wa return NULL_TREE; else if (!cgraph_global_info_ready && (TREE_CODE (*tp) == VAR_DECL || TREE_CODE (*tp) == FUNCTION_DECL)) - gcc_unreachable (); + return *tp; else if (DECL_P (*tp) && TREE_CODE (*tp) == VAR_DECL) { struct cgraph_varpool_node *node = cgraph_varpool_node (*tp); From owner-svn-src-stable@FreeBSD.ORG Wed Jul 22 15:26:20 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F8C010656B7; Wed, 22 Jul 2009 15:26:20 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E543A8FC2C; Wed, 22 Jul 2009 15:26:19 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6MFQJWW045141; Wed, 22 Jul 2009 15:26:19 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6MFQJvr045140; Wed, 22 Jul 2009 15:26:19 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907221526.n6MFQJvr045140@svn.freebsd.org> From: Bruce M Simpson Date: Wed, 22 Jul 2009 15:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195823 - stable/7/contrib/gcc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 15:26:22 -0000 Author: bms Date: Wed Jul 22 15:26:19 2009 New Revision: 195823 URL: http://svn.freebsd.org/changeset/base/195823 Log: Mark the dwarf2out.c bug fix, r195815 as integrated; using --record-only. Pointy hat to: bms Requested by: kib Modified: stable/7/contrib/gcc/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed Jul 22 15:41:38 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2654106564A; Wed, 22 Jul 2009 15:41:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE79C8FC12; Wed, 22 Jul 2009 15:41:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6MFfbix045458; Wed, 22 Jul 2009 15:41:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6MFfbEo045455; Wed, 22 Jul 2009 15:41:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200907221541.n6MFfbEo045455@svn.freebsd.org> From: Andriy Gapon Date: Wed, 22 Jul 2009 15:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195824 - in stable/7/sys: . cddl/dev/dtrace/amd64 cddl/dev/dtrace/i386 contrib/pf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 15:41:38 -0000 Author: avg Date: Wed Jul 22 15:41:37 2009 New Revision: 195824 URL: http://svn.freebsd.org/changeset/base/195824 Log: MFC 195710: dtrace_gethrtime: improve scaling of TSC ticks to nanoseconds PR: kern/127441 Modified: stable/7/sys/ (props changed) stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Wed Jul 22 15:26:19 2009 (r195823) +++ stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Wed Jul 22 15:41:37 2009 (r195824) @@ -366,6 +366,10 @@ dtrace_safe_defer_signal(void) static int64_t tgt_cpu_tsc; static int64_t hst_cpu_tsc; static int64_t tsc_skew[MAXCPU]; +static uint64_t nsec_scale; + +/* See below for the explanation of this macro. */ +#define SCALE_SHIFT 28 static void dtrace_gethrtime_init_sync(void *arg) @@ -401,9 +405,36 @@ dtrace_gethrtime_init_cpu(void *arg) static void dtrace_gethrtime_init(void *arg) { + uint64_t tsc_f; cpumask_t map; int i; - struct pcpu *cp; + + /* + * Get TSC frequency known at this moment. + * This should be constant if TSC is invariant. + * Otherwise tick->time conversion will be inaccurate, but + * will preserve monotonic property of TSC. + */ + tsc_f = tsc_freq; + + /* + * The following line checks that nsec_scale calculated below + * doesn't overflow 32-bit unsigned integer, so that it can multiply + * another 32-bit integer without overflowing 64-bit. + * Thus minimum supported TSC frequency is 62.5MHz. + */ + KASSERT(tsc_f > (NANOSEC >> (32 - SCALE_SHIFT)), ("TSC frequency is too low")); + + /* + * We scale up NANOSEC/tsc_f ratio to preserve as much precision + * as possible. + * 2^28 factor was chosen quite arbitrarily from practical + * considerations: + * - it supports TSC frequencies as low as 62.5MHz (see above); + * - it provides quite good precision (e < 0.01%) up to THz + * (terahertz) values; + */ + nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; /* The current CPU is the reference one. */ tsc_skew[curcpu] = 0; @@ -412,7 +443,7 @@ dtrace_gethrtime_init(void *arg) if (i == curcpu) continue; - if ((cp = pcpu_find(i)) == NULL) + if (pcpu_find(i) == NULL) continue; map = 0; @@ -439,7 +470,21 @@ SYSINIT(dtrace_gethrtime_init, SI_SUB_SM uint64_t dtrace_gethrtime() { - return ((rdtsc() + tsc_skew[curcpu]) * (int64_t) 1000000000 / tsc_freq); + uint64_t tsc; + uint32_t lo; + uint32_t hi; + + /* + * We split TSC value into lower and higher 32-bit halves and separately + * scale them with nsec_scale, then we scale them down by 2^28 + * (see nsec_scale calculations) taking into account 32-bit shift of + * the higher half and finally add. + */ + tsc = rdtsc() + tsc_skew[curcpu]; + lo = tsc; + hi = tsc >> 32; + return (((lo * nsec_scale) >> SCALE_SHIFT) + + ((hi * nsec_scale) << (32 - SCALE_SHIFT))); } uint64_t Modified: stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c Wed Jul 22 15:26:19 2009 (r195823) +++ stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c Wed Jul 22 15:41:37 2009 (r195824) @@ -366,6 +366,10 @@ dtrace_safe_defer_signal(void) static int64_t tgt_cpu_tsc; static int64_t hst_cpu_tsc; static int64_t tsc_skew[MAXCPU]; +static uint64_t nsec_scale; + +/* See below for the explanation of this macro. */ +#define SCALE_SHIFT 28 static void dtrace_gethrtime_init_sync(void *arg) @@ -401,10 +405,38 @@ dtrace_gethrtime_init_cpu(void *arg) static void dtrace_gethrtime_init(void *arg) { + uint64_t tsc_f; cpumask_t map; int i; struct pcpu *cp; + /* + * Get TSC frequency known at this moment. + * This should be constant if TSC is invariant. + * Otherwise tick->time conversion will be inaccurate, but + * will preserve monotonic property of TSC. + */ + tsc_f = tsc_freq; + + /* + * The following line checks that nsec_scale calculated below + * doesn't overflow 32-bit unsigned integer, so that it can multiply + * another 32-bit integer without overflowing 64-bit. + * Thus minimum supported TSC frequency is 62.5MHz. + */ + KASSERT(tsc_f > (NANOSEC >> (32 - SCALE_SHIFT)), ("TSC frequency is too low")); + + /* + * We scale up NANOSEC/tsc_f ratio to preserve as much precision + * as possible. + * 2^28 factor was chosen quite arbitrarily from practical + * considerations: + * - it supports TSC frequencies as low as 62.5MHz (see above); + * - it provides quite good precision (e < 0.01%) up to THz + * (terahertz) values; + */ + nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; + /* The current CPU is the reference one. */ tsc_skew[curcpu] = 0; @@ -439,7 +471,21 @@ SYSINIT(dtrace_gethrtime_init, SI_SUB_SM uint64_t dtrace_gethrtime() { - return ((rdtsc() + tsc_skew[curcpu]) * (int64_t) 1000000000 / tsc_freq); + uint64_t tsc; + uint32_t lo; + uint32_t hi; + + /* + * We split TSC value into lower and higher 32-bit halves and separately + * scale them with nsec_scale, then we scale them down by 2^28 + * (see nsec_scale calculations) taking into account 32-bit shift of + * the higher half and finally add. + */ + tsc = rdtsc() + tsc_skew[curcpu]; + lo = tsc; + hi = tsc >> 32; + return (((lo * nsec_scale) >> SCALE_SHIFT) + + ((hi * nsec_scale) << (32 - SCALE_SHIFT))); } uint64_t From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 01:35:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76812106564A; Thu, 23 Jul 2009 01:35:14 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 608D48FC13; Thu, 23 Jul 2009 01:35:14 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6N1ZE8s057596; Thu, 23 Jul 2009 01:35:14 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6N1ZEar057595; Thu, 23 Jul 2009 01:35:14 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907230135.n6N1ZEar057595@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 23 Jul 2009 01:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 01:35:15 -0000 Author: bms Date: Thu Jul 23 01:35:13 2009 New Revision: 195829 URL: http://svn.freebsd.org/changeset/base/195829 Log: MFC r182138: Greatly expand the devices listed as being supported. This list was taken from PR/121184 which was mechanically generated from similar lists in the Linux ipaq driver. I then took the numbers we had in usbdevs and filled in the right symbols and eliminated duplicates. PR: usb/121184 Modified: stable/7/sys/dev/usb/uipaq.c Modified: stable/7/sys/dev/usb/uipaq.c ============================================================================== --- stable/7/sys/dev/usb/uipaq.c Wed Jul 22 22:13:42 2009 (r195828) +++ stable/7/sys/dev/usb/uipaq.c Thu Jul 23 01:35:13 2009 (r195829) @@ -119,16 +119,465 @@ struct uipaq_type { u_int16_t uv_flags; }; -static const struct uipaq_type uipaq_devs[] = { - {{ USB_VENDOR_HP, USB_PRODUCT_HP_2215 }, 0 }, - {{ USB_VENDOR_HP, USB_PRODUCT_HP_568J }, 0}, - {{ USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE }, 0}, - {{ USB_VENDOR_HTC, USB_PRODUCT_HTC_PPC6700MODEM }, 0}, - {{ USB_VENDOR_HTC, USB_PRODUCT_HTC_SMARTPHONE }, 0}, - {{ USB_VENDOR_COMPAQ, USB_PRODUCT_COMPAQ_IPAQPOCKETPC } , 0}, - {{ USB_VENDOR_CASIO, USB_PRODUCT_CASIO_BE300 } , 0}, - {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WZERO3ES }, 0}, - {{ USB_VENDOR_ASUS, USB_PRODUCT_ASUS_P535 }, 0}, +/* + * Much of this list is generated from lists of other drivers that support + * the same hardware. Numeric values are used where no usbdevs entries + * exist. + */ + static const struct uipaq_type uipaq_devs[] = { + {{ 0x0104, 0x00be }, 0}, /* Socket USB Sync */ + {{ 0x04ad, 0x0301 }, 0}, /* USB Sync 0301 */ + {{ 0x04ad, 0x0302 }, 0}, /* USB Sync 0302 */ + {{ 0x04ad, 0x0303 }, 0}, /* USB Sync 0303 */ + {{ 0x04ad, 0x0306 }, 0}, /* GPS Pocket PC USB Sync */ + {{ 0x0536, 0x01a0 }, 0}, /* HHP PDT */ + {{ 0x067e, 0x1001 }, 0}, /* Intermec Mobile Computer */ + {{ 0x094b, 0x0001 }, 0}, /* Linkup Systems USB Sync */ + {{ 0x0960, 0x0065 }, 0}, /* BCOM USB Sync 0065 */ + {{ 0x0960, 0x0066 }, 0}, /* BCOM USB Sync 0066 */ + {{ 0x0960, 0x0067 }, 0}, /* BCOM USB Sync 0067 */ + {{ 0x0961, 0x0010 }, 0}, /* Portatec USB Sync */ + {{ 0x099e, 0x0052 }, 0}, /* Trimble GeoExplorer */ + {{ 0x099e, 0x4000 }, 0}, /* TDS Data Collector */ + {{ 0x0c44, 0x03a2 }, 0}, /* Motorola iDEN Smartphone */ + {{ 0x0c8e, 0x6000 }, 0}, /* Cesscom Luxian Series */ + {{ 0x0cad, 0x9001 }, 0}, /* Motorola PowerPad Pocket PCDevice */ + {{ 0x0f4e, 0x0200 }, 0}, /* Freedom Scientific USB Sync */ + {{ 0x0f98, 0x0201 }, 0}, /* Cyberbank USB Sync */ + {{ 0x0fb8, 0x3001 }, 0}, /* Wistron USB Sync */ + {{ 0x0fb8, 0x3002 }, 0}, /* Wistron USB Sync */ + {{ 0x0fb8, 0x3003 }, 0}, /* Wistron USB Sync */ + {{ 0x0fb8, 0x4001 }, 0}, /* Wistron USB Sync */ + {{ 0x1066, 0x00ce }, 0}, /* E-TEN USB Sync */ + {{ 0x1066, 0x0300 }, 0}, /* E-TEN P3XX Pocket PC */ + {{ 0x1066, 0x0500 }, 0}, /* E-TEN P5XX Pocket PC */ + {{ 0x1066, 0x0600 }, 0}, /* E-TEN P6XX Pocket PC */ + {{ 0x1066, 0x0700 }, 0}, /* E-TEN P7XX Pocket PC */ + {{ 0x1114, 0x0001 }, 0}, /* Psion Teklogix Sync 753x */ + {{ 0x1114, 0x0004 }, 0}, /* Psion Teklogix Sync netBookPro */ + {{ 0x1114, 0x0006 }, 0}, /* Psion Teklogix Sync 7525 */ + {{ 0x1182, 0x1388 }, 0}, /* VES USB Sync */ + {{ 0x11d9, 0x1002 }, 0}, /* Rugged Pocket PC 2003 */ + {{ 0x11d9, 0x1003 }, 0}, /* Rugged Pocket PC 2003 */ + {{ 0x1231, 0xce01 }, 0}, /* USB Sync 03 */ + {{ 0x1231, 0xce02 }, 0}, /* USB Sync 03 */ + {{ 0x3340, 0x011c }, 0}, /* Mio DigiWalker PPC StrongARM */ + {{ 0x3340, 0x0326 }, 0}, /* Mio DigiWalker 338 */ + {{ 0x3340, 0x0426 }, 0}, /* Mio DigiWalker 338 */ + {{ 0x3340, 0x043a }, 0}, /* Mio DigiWalker USB Sync */ + {{ 0x3340, 0x051c }, 0}, /* MiTAC USB Sync 528 */ + {{ 0x3340, 0x053a }, 0}, /* Mio DigiWalker SmartPhone USB Sync */ + {{ 0x3340, 0x071c }, 0}, /* MiTAC USB Sync */ + {{ 0x3340, 0x0b1c }, 0}, /* Generic PPC StrongARM */ + {{ 0x3340, 0x0e3a }, 0}, /* Generic PPC USB Sync */ + {{ 0x3340, 0x0f1c }, 0}, /* Itautec USB Sync */ + {{ 0x3340, 0x0f3a }, 0}, /* Generic SmartPhone USB Sync */ + {{ 0x3340, 0x1326 }, 0}, /* Itautec USB Sync */ + {{ 0x3340, 0x191c }, 0}, /* YAKUMO USB Sync */ + {{ 0x3340, 0x2326 }, 0}, /* Vobis USB Sync */ + {{ 0x3340, 0x3326 }, 0}, /* MEDION Winodws Moble USB Sync */ + {{ 0x3708, 0x20ce }, 0}, /* Legend USB Sync */ + {{ 0x3708, 0x21ce }, 0}, /* Lenovo USB Sync */ + {{ 0x4113, 0x0210 }, 0}, /* Mobile Media Technology USB Sync */ + {{ 0x4113, 0x0211 }, 0}, /* Mobile Media Technology USB Sync */ + {{ 0x4113, 0x0400 }, 0}, /* Mobile Media Technology USB Sync */ + {{ 0x4113, 0x0410 }, 0}, /* Mobile Media Technology USB Sync */ + {{ 0x4505, 0x0010 }, 0}, /* Smartphone */ + {{ 0x5e04, 0xce00 }, 0}, /* SAGEM Wireless Assistant */ + {{ USB_VENDOR_ACER, 0x1631 }, 0}, /* c10 Series */ + {{ USB_VENDOR_ACER, 0x1632 }, 0}, /* c20 Series */ + {{ USB_VENDOR_ACER, 0x16e1 }, 0}, /* Acer n10 Handheld USB Sync */ + {{ USB_VENDOR_ACER, 0x16e2 }, 0}, /* Acer n20 Handheld USB Sync */ + {{ USB_VENDOR_ACER, 0x16e3 }, 0}, /* Acer n30 Handheld USB Sync */ + {{ USB_VENDOR_ASUS, 0x4200 }, 0}, /* ASUS USB Sync */ + {{ USB_VENDOR_ASUS, 0x4201 }, 0}, /* ASUS USB Sync */ + {{ USB_VENDOR_ASUS, 0x4202 }, 0}, /* ASUS USB Sync */ + {{ USB_VENDOR_ASUS, 0x9200 }, 0}, /* ASUS USB Sync */ + {{ USB_VENDOR_ASUS, 0x9202 }, 0}, /* ASUS USB Sync */ + {{ USB_VENDOR_ASUS, USB_PRODUCT_ASUS_P535 }, 0}, + {{ USB_VENDOR_CASIO, 0x2001 }, 0}, /* CASIO USB Sync 2001 */ + {{ USB_VENDOR_CASIO, 0x2003 }, 0}, /* CASIO USB Sync 2003 */ + {{ USB_VENDOR_CASIO, USB_PRODUCT_CASIO_BE300 } , 0}, + {{ USB_VENDOR_COMPAL, 0x0531 }, 0}, /* MyGuide 7000 XL USB Sync */ + {{ USB_VENDOR_COMPAQ, 0x0032 }, 0}, /* Compaq iPAQ USB Sync */ + {{ USB_VENDOR_COMPAQ, USB_PRODUCT_COMPAQ_IPAQPOCKETPC } , 0}, + {{ USB_VENDOR_DELL, 0x4001 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4002 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4003 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4004 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4005 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4006 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4007 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4008 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_DELL, 0x4009 }, 0}, /* Dell Axim USB Sync */ + {{ USB_VENDOR_FSC, 0x1001 }, 0}, /* Fujitsu Siemens Computers USB Sync */ + {{ USB_VENDOR_FUJITSU, 0x1058 }, 0}, /* FUJITSU USB Sync */ + {{ USB_VENDOR_FUJITSU, 0x1079 }, 0}, /* FUJITSU USB Sync */ + {{ USB_VENDOR_GIGASET, 0x0601 }, 0}, /* Askey USB Sync */ + {{ USB_VENDOR_HITACHI, 0x0014 }, 0}, /* Hitachi USB Sync */ + {{ USB_VENDOR_HP, 0x1216 }, 0}, /* HP USB Sync 1612 */ + {{ USB_VENDOR_HP, 0x2016 }, 0}, /* HP USB Sync 1620 */ + {{ USB_VENDOR_HP, 0x2116 }, 0}, /* HP USB Sync 1621 */ + {{ USB_VENDOR_HP, 0x2216 }, 0}, /* HP USB Sync 1622 */ + {{ USB_VENDOR_HP, 0x3016 }, 0}, /* HP USB Sync 1630 */ + {{ USB_VENDOR_HP, 0x3116 }, 0}, /* HP USB Sync 1631 */ + {{ USB_VENDOR_HP, 0x3216 }, 0}, /* HP USB Sync 1632 */ + {{ USB_VENDOR_HP, 0x4016 }, 0}, /* HP USB Sync 1640 */ + {{ USB_VENDOR_HP, 0x4116 }, 0}, /* HP USB Sync 1641 */ + {{ USB_VENDOR_HP, 0x4216 }, 0}, /* HP USB Sync 1642 */ + {{ USB_VENDOR_HP, 0x5016 }, 0}, /* HP USB Sync 1650 */ + {{ USB_VENDOR_HP, 0x5116 }, 0}, /* HP USB Sync 1651 */ + {{ USB_VENDOR_HP, 0x5216 }, 0}, /* HP USB Sync 1652 */ + {{ USB_VENDOR_HP, USB_PRODUCT_HP_2215 }, 0 }, + {{ USB_VENDOR_HP, USB_PRODUCT_HP_568J }, 0}, + {{ USB_VENDOR_HTC, 0x00cf }, 0}, /* HTC USB Modem */ + {{ USB_VENDOR_HTC, 0x0a01 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a02 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a03 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a04 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a05 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a06 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a07 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a08 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a09 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a0a }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a0b }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a0c }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a0d }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a0e }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a0f }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a10 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a11 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a12 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a13 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a14 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a15 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a16 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a17 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a18 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a19 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a1a }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a1b }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a1c }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a1d }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a1e }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a1f }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a20 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a21 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a22 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a23 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a24 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a25 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a26 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a27 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a28 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a29 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a2a }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a2b }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a2c }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a2d }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a2e }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a2f }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a30 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a31 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a32 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a33 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a34 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a35 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a36 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a37 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a38 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a39 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a3a }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a3b }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a3c }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a3d }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a3e }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a3f }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a40 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a41 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a42 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a43 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a44 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a45 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a46 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a47 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a48 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a49 }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a4a }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a4b }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a4c }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a4d }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a4e }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a4f }, 0}, /* PocketPC USB Sync */ + {{ USB_VENDOR_HTC, 0x0a50 }, 0}, /* HTC SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a52 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a53 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a54 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a55 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a56 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a57 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a58 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a59 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a5a }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a5b }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a5c }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a5d }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a5e }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a5f }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a60 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a61 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a62 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a63 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a64 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a65 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a66 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a67 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a68 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a69 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a6a }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a6b }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a6c }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a6d }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a6e }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a6f }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a70 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a71 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a72 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a73 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a74 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a75 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a76 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a77 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a78 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a79 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a7a }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a7b }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a7c }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a7d }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a7e }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a7f }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a80 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a81 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a82 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a83 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a84 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a85 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a86 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a87 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a88 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a89 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a8a }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a8b }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a8c }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a8d }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a8e }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a8f }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a90 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a91 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a92 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a93 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a94 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a95 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a96 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a97 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a98 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a99 }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a9a }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a9b }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a9c }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a9d }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a9e }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0a9f }, 0}, /* SmartPhone USB Sync */ + {{ USB_VENDOR_HTC, 0x0bce }, 0}, /* "High Tech Computer Corp" */ + {{ USB_VENDOR_HTC, USB_PRODUCT_HTC_PPC6700MODEM }, 0}, + {{ USB_VENDOR_HTC, USB_PRODUCT_HTC_SMARTPHONE }, 0}, + {{ USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE }, 0}, + {{ USB_VENDOR_JVC, 0x3011 }, 0}, /* JVC USB Sync */ + {{ USB_VENDOR_JVC, 0x3012 }, 0}, /* JVC USB Sync */ + {{ USB_VENDOR_LG, 0x9c01 }, 0}, /* LGE USB Sync */ + {{ USB_VENDOR_MICROSOFT, 0x00ce }, 0}, /* Microsoft USB Sync */ + {{ USB_VENDOR_MICROSOFT, 0x0400 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0401 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0402 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0403 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0404 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0405 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0406 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0407 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0408 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0409 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x040a }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x040b }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x040c }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x040d }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x040e }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x040f }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0410 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0411 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0412 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0413 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0414 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0415 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0416 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0417 }, 0}, /* Windows Pocket PC 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x0432 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0433 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0434 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0435 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0436 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0437 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0438 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0439 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x043a }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x043b }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x043c }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x043d }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x043e }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x043f }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0440 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0441 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0442 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0443 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0444 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0445 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0446 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0447 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0448 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0449 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x044a }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x044b }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x044c }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x044d }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x044e }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x044f }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0450 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0451 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0452 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0453 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0454 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0455 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0456 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0457 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0458 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0459 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x045a }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x045b }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x045c }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x045d }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x045e }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x045f }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0460 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0461 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0462 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0463 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0464 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0465 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0466 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0467 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0468 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0469 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x046a }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x046b }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x046c }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x046d }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x046e }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x046f }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0470 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0471 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0472 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0473 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0474 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0475 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0476 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0477 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0478 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x0479 }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x047a }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x047b }, 0}, /* Windows Pocket PC 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04c8 }, 0}, /* Windows Smartphone 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x04c9 }, 0}, /* Windows Smartphone 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x04ca }, 0}, /* Windows Smartphone 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x04cb }, 0}, /* Windows Smartphone 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x04cc }, 0}, /* Windows Smartphone 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x04cd }, 0}, /* Windows Smartphone 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x04ce }, 0}, /* Windows Smartphone 2002 */ + {{ USB_VENDOR_MICROSOFT, 0x04d7 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04d8 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04d9 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04da }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04db }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04dc }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04dd }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04de }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04df }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e0 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e1 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e2 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e3 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e4 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e5 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e6 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e7 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e8 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04e9 }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MICROSOFT, 0x04ea }, 0}, /* Windows Smartphone 2003 */ + {{ USB_VENDOR_MOTOROLA2, 0x4204 }, 0}, /* Motorola MPx200 Smartphone */ + {{ USB_VENDOR_MOTOROLA2, 0x4214 }, 0}, /* Motorola MPc GSM */ + {{ USB_VENDOR_MOTOROLA2, 0x4224 }, 0}, /* Motorola MPx220 Smartphone */ + {{ USB_VENDOR_MOTOROLA2, 0x4234 }, 0}, /* Motorola MPc CDMA */ + {{ USB_VENDOR_MOTOROLA2, 0x4244 }, 0}, /* Motorola MPx100 Smartphone */ + {{ USB_VENDOR_NEC, 0x00d5 }, 0}, /* NEC USB Sync */ + {{ USB_VENDOR_NEC, 0x00d6 }, 0}, /* NEC USB Sync */ + {{ USB_VENDOR_NEC, 0x00d7 }, 0}, /* NEC USB Sync */ + {{ USB_VENDOR_NEC, 0x8024 }, 0}, /* NEC USB Sync */ + {{ USB_VENDOR_NEC, 0x8025 }, 0}, /* NEC USB Sync */ + {{ USB_VENDOR_PANASONIC, 0x2500 }, 0}, /* Panasonic USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x5f00 }, 0}, /* Samsung NEXiO USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x5f01 }, 0}, /* Samsung NEXiO USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x5f02 }, 0}, /* Samsung NEXiO USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x5f03 }, 0}, /* Samsung NEXiO USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x5f04 }, 0}, /* Samsung NEXiO USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x6611 }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x6613 }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x6615 }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x6617 }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x6619 }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x661b }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x662e }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x6630 }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SAMSUNG, 0x6632 }, 0}, /* Samsung MITs USB Sync */ + {{ USB_VENDOR_SHARP, 0x9102 }, 0}, /* SHARP WS003SH USB Modem */ + {{ USB_VENDOR_SHARP, 0x9121 }, 0}, /* SHARP WS004SH USB Modem */ + {{ USB_VENDOR_SHARP, 0x9151 }, 0}, /* SHARP S01SH USB Modem */ + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WZERO3ES }, 0}, + {{ USB_VENDOR_SYMBOL, 0x2000 }, 0}, /* Symbol USB Sync */ + {{ USB_VENDOR_SYMBOL, 0x2001 }, 0}, /* Symbol USB Sync 0x2001 */ + {{ USB_VENDOR_SYMBOL, 0x2002 }, 0}, /* Symbol USB Sync 0x2002 */ + {{ USB_VENDOR_SYMBOL, 0x2003 }, 0}, /* Symbol USB Sync 0x2003 */ + {{ USB_VENDOR_SYMBOL, 0x2004 }, 0}, /* Symbol USB Sync 0x2004 */ + {{ USB_VENDOR_SYMBOL, 0x2005 }, 0}, /* Symbol USB Sync 0x2005 */ + {{ USB_VENDOR_SYMBOL, 0x2006 }, 0}, /* Symbol USB Sync 0x2006 */ + {{ USB_VENDOR_SYMBOL, 0x2007 }, 0}, /* Symbol USB Sync 0x2007 */ + {{ USB_VENDOR_SYMBOL, 0x2008 }, 0}, /* Symbol USB Sync 0x2008 */ + {{ USB_VENDOR_SYMBOL, 0x2009 }, 0}, /* Symbol USB Sync 0x2009 */ + {{ USB_VENDOR_SYMBOL, 0x200a }, 0}, /* Symbol USB Sync 0x200a */ + {{ USB_VENDOR_TOSHIBA, 0x0700 }, 0}, /* TOSHIBA USB Sync 0700 */ + {{ USB_VENDOR_TOSHIBA, 0x0705 }, 0}, /* TOSHIBA Pocket PC e310 */ + {{ USB_VENDOR_TOSHIBA, 0x0707 }, 0}, /* TOSHIBA Pocket PC e330 Series */ + {{ USB_VENDOR_TOSHIBA, 0x0708 }, 0}, /* TOSHIBA Pocket PC e350Series */ + {{ USB_VENDOR_TOSHIBA, 0x0709 }, 0}, /* TOSHIBA Pocket PC e750 Series */ + {{ USB_VENDOR_TOSHIBA, 0x070a }, 0}, /* TOSHIBA Pocket PC e400 Series */ + {{ USB_VENDOR_TOSHIBA, 0x070b }, 0}, /* TOSHIBA Pocket PC e800 Series */ + {{ USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_POCKETPC_E740 }, 0}, /* TOSHIBA Pocket PC e740 */ + {{ USB_VENDOR_VIEWSONIC, 0x0ed9 }, 0}, /* ViewSonic Color Pocket PC V35 */ + {{ USB_VENDOR_VIEWSONIC, 0x1527 }, 0}, /* ViewSonic Color Pocket PC V36 */ + {{ USB_VENDOR_VIEWSONIC, 0x1529 }, 0}, /* ViewSonic Color Pocket PC V37 */ + {{ USB_VENDOR_VIEWSONIC, 0x152b }, 0}, /* ViewSonic Color Pocket PC V38 */ + {{ USB_VENDOR_VIEWSONIC, 0x152e }, 0}, /* ViewSonic Pocket PC */ + {{ USB_VENDOR_VIEWSONIC, 0x1921 }, 0}, /* ViewSonic Communicator Pocket PC */ + {{ USB_VENDOR_VIEWSONIC, 0x1922 }, 0}, /* ViewSonic Smartphone */ + {{ USB_VENDOR_VIEWSONIC, 0x1923 }, 0}, /* ViewSonic Pocket PC V30 */ }; #define uipaq_lookup(v, p) ((const struct uipaq_type *)usb_lookup(uipaq_devs, v, p)) From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 01:58:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FAA31065677; Thu, 23 Jul 2009 01:58:54 +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 039F48FC18; Thu, 23 Jul 2009 01:58:53 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 2FA143BC6C8; Wed, 22 Jul 2009 21:41:08 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 22 Jul 2009 21:41:08 -0400 X-Sasl-enc: +htrv0Kvw6mwTzPh8fSptQnHjKFdJR/PiTZs9Cl8YRuN 1248313267 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 4FB552B9F1; Wed, 22 Jul 2009 21:41:07 -0400 (EDT) Message-ID: <4A67BFB1.40904@incunabulum.net> Date: Thu, 23 Jul 2009 02:41:05 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Bruce M Simpson References: <200907230135.n6N1ZEar057595@svn.freebsd.org> In-Reply-To: <200907230135.n6N1ZEar057595@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 01:58:54 -0000 Hi all, I haven't updated the mergeinfo for this file, as the USB stack in HEAD has been completely replaced with the new USB stack. If this is desired, please let me know how to proceed -- I'm new to mergeinfo. When I used the following command to try to maintain the mergeinfo information, I got a very large list of revisions, not all of which look as though they should be merged for this file: % svn merge --record-only -c182138 $FSVN/head/sys/dev/usb/uipaq.c@182138 uipaq.c If I omit the @182138 from the above command, the resultant mergeinfo is empty. thanks, BMS P.S. I tested the code in this commit with an HP iPaq 2215 and it appears to work fine. From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 10:15:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFC671065670; Thu, 23 Jul 2009 10:15:22 +0000 (UTC) (envelope-from prvs=144824d4a6=brian@FreeBSD.org) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 5BFF68FC08; Thu, 23 Jul 2009 10:15:22 +0000 (UTC) (envelope-from prvs=144824d4a6=brian@FreeBSD.org) Received: from pd6ml2no-ssvc.prod.shaw.ca ([10.0.153.163]) by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 23 Jul 2009 03:47:03 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=9hgBjiEyFVcA:10 a=4Z0QP1WVBuUwHZGQKe2N1A==:17 a=awCybExcAAAA:8 a=MMwg4So0AAAA:8 a=6I5d2MoRAAAA:8 a=tKGW4t-VMDxU3_BKpUQA:9 a=oxZ1sUjUtO-yMlPT-DzJQwY8M4sA:4 a=z2jkVXLrYuwA:10 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=DUDImQE_u13sDucWSrcA:9 a=SAitR033TxKKAKZwAVlIbvYN7zAA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd6ml2no-dmz.prod.shaw.ca with ESMTP; 23 Jul 2009 03:47:00 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 59818C43548_A68319AB; Thu, 23 Jul 2009 09:47:06 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id CDEC3C460F4_A68318FF; Thu, 23 Jul 2009 09:46:55 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n6N9kkUx042082; Thu, 23 Jul 2009 02:46:48 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Thu, 23 Jul 2009 02:46:40 -0700 From: Brian Somers To: Bruce Simpson Message-ID: <20090723024640.6f5c893a@dev.lan.Awfulhak.org> In-Reply-To: <4A67BFB1.40904@incunabulum.net> References: <200907230135.n6N1ZEar057595@svn.freebsd.org> <4A67BFB1.40904@incunabulum.net> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.4; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/j7SZnq._V4iBURktYQh_wjy"; protocol="application/pgp-signature" Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce M Simpson , svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 10:15:23 -0000 --Sig_/j7SZnq._V4iBURktYQh_wjy Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 23 Jul 2009 02:41:05 +0100 Bruce Simpson wrot= e: > Hi all, >=20 > I haven't updated the mergeinfo for this file, as the USB stack in=20 > HEAD has been completely replaced with the new USB stack. If this is=20 > desired, please let me know how to proceed -- I'm new to mergeinfo. >=20 > When I used the following command to try to maintain the mergeinfo=20 > information, I got a very large list of revisions, not all of which look= =20 > as though they should be merged for this file: > % svn merge --record-only -c182138=20 > $FSVN/head/sys/dev/usb/uipaq.c@182138 uipaq.c >=20 > If I omit the @182138 from the above command, the resultant mergeinfo is= =20 > empty. >=20 > thanks, > BMS >=20 > P.S. I tested the code in this commit with an HP iPaq 2215 and it=20 > appears to work fine. It seems ok to me: brian@dev svn $ cd stable/7/sys brian@dev sys $ svn merge --record-only -c182138 ^/head/sys brian@dev sys $ svn diff Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys:r182138 Property changes on: contrib/pf ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys/contrib/pf:r182138 brian@dev sys $ svn st M . M contrib/pf You should keep the mergeinfo on the sys directory, so the entire merge should really have been done as with the above command but without the --record-only - that would update the mergeinfo properties (as above) and patch uipaq.c in one commit. HTH. --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/j7SZnq._V4iBURktYQh_wjy Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iQCVAwUBSmgxhg7tvOdmanQhAQIVYgP/dYqPUOgdQczdOuFvw1oLXSvks/yalfmW 5AcVNzs/ktcbySgZRLqQDj6cccRM1twM/MJ6W+/Z5K7EDIlVHl8EGFFRay0rB8zE NgYEEXc5SZJGlZZV1A4azB/mFIyq773KJwDeQzNAqNISPrq4HmKoDKPktWe6n+x5 rZUuRyswGec= =VBH2 -----END PGP SIGNATURE----- --Sig_/j7SZnq._V4iBURktYQh_wjy-- From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 12:40:47 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 185E6106566B; Thu, 23 Jul 2009 12:40:47 +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 D85E08FC0A; Thu, 23 Jul 2009 12:40:46 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 3847F3BCF60; Thu, 23 Jul 2009 08:40:46 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 23 Jul 2009 08:40:46 -0400 X-Sasl-enc: 9esvlyEtqfKMpY46ULzKVnaQxQKzCxGLPiDOvF/buv3l 1248352845 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 2E926B4A5; Thu, 23 Jul 2009 08:40:45 -0400 (EDT) Message-ID: <4A685A4B.9070201@incunabulum.net> Date: Thu, 23 Jul 2009 13:40:43 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Brian Somers References: <200907230135.n6N1ZEar057595@svn.freebsd.org> <4A67BFB1.40904@incunabulum.net> <20090723024640.6f5c893a@dev.lan.Awfulhak.org> In-Reply-To: <20090723024640.6f5c893a@dev.lan.Awfulhak.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce M Simpson , svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 12:40:47 -0000 Brian Somers wrote: > ... > brian@dev sys $ svn st > M . > M contrib/pf > > You should keep the mergeinfo on the sys directory, so the entire merge > should really have been done as with the above command but without > the --record-only - that would update the mergeinfo properties (as above) > and patch uipaq.c in one commit. > Why would this commit update contrib/pf? This looks spurious. I got a lot more revisions than this (especially ones listed well after the new USB merge) in the mergeinfo output, therefore I did not commit the mergeinfo update. Too many to list here ATM. thanks, BMS From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 16:00:38 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FB1F10656DB; Thu, 23 Jul 2009 16:00:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB5E8FC12; Thu, 23 Jul 2009 16:00:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6NG0cCu082776; Thu, 23 Jul 2009 16:00:38 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6NG0cTf082775; Thu, 23 Jul 2009 16:00:38 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200907231600.n6NG0cTf082775@svn.freebsd.org> From: Ed Maste Date: Thu, 23 Jul 2009 16:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195832 - in stable/6/sys: . boot/common contrib/pf dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 16:00:40 -0000 Author: emaste Date: Thu Jul 23 16:00:37 2009 New Revision: 195832 URL: http://svn.freebsd.org/changeset/base/195832 Log: MFC r163917 by ru: Unbreak compile with ELF_VERBOSE defined, and fix format warnings. Modified: stable/6/sys/ (props changed) stable/6/sys/boot/common/load_elf.c stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/common/load_elf.c ============================================================================== --- stable/6/sys/boot/common/load_elf.c Thu Jul 23 12:51:27 2009 (r195831) +++ stable/6/sys/boot/common/load_elf.c Thu Jul 23 16:00:37 2009 (r195832) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -400,9 +401,9 @@ __elfN(loadimage)(struct preloaded_file lastaddr += sizeof(size); #ifdef ELF_VERBOSE - printf("\n%s: 0x%lx@0x%lx -> 0x%lx-0x%lx", secname, - shdr[i].sh_size, shdr[i].sh_offset, - lastaddr, lastaddr + shdr[i].sh_size); + printf("\n%s: 0x%jx@0x%jx -> 0x%jx-0x%jx", secname, + (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, + (uintmax_t)lastaddr, (uintmax_t)(lastaddr + shdr[i].sh_size)); #else if (i == symstrindex) printf("+"); From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 17:52:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B6971065673; Thu, 23 Jul 2009 17:52:25 +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 393228FC0A; Thu, 23 Jul 2009 17:52:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DEE7746B90; Thu, 23 Jul 2009 13:52:24 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 42B878A0A2; Thu, 23 Jul 2009 13:52:24 -0400 (EDT) From: John Baldwin To: Bruce Simpson Date: Thu, 23 Jul 2009 10:23:46 -0400 User-Agent: KMail/1.9.7 References: <200907230135.n6N1ZEar057595@svn.freebsd.org> <20090723024640.6f5c893a@dev.lan.Awfulhak.org> <4A685A4B.9070201@incunabulum.net> In-Reply-To: <4A685A4B.9070201@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907231023.47428.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 23 Jul 2009 13:52:24 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable-7@freebsd.org, Brian Somers , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce M Simpson Subject: Re: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 17:52:26 -0000 On Thursday 23 July 2009 8:40:43 am Bruce Simpson wrote: > Brian Somers wrote: > > ... > > brian@dev sys $ svn st > > M . > > M contrib/pf > > > > You should keep the mergeinfo on the sys directory, so the entire merge > > should really have been done as with the above command but without > > the --record-only - that would update the mergeinfo properties (as above) > > and patch uipaq.c in one commit. > > > > Why would this commit update contrib/pf? This looks spurious. This is a FAQ at this point and has been discussed multiple times in the archives, but it is correct. > I got a lot more revisions than this (especially ones listed well after > the new USB merge) in the mergeinfo output, therefore I did not commit > the mergeinfo update. Too many to list here ATM. That's because you merged to the file rather than to sys/. There's a set of instructions about mergning with SVN on the wiki that explains why to do kernel merges to sys/ instead of individual files. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 19:03:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 391881065670; Thu, 23 Jul 2009 19:03:05 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BF258FC1B; Thu, 23 Jul 2009 19:03:05 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6NJ34nx086637; Thu, 23 Jul 2009 19:03:04 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6NJ34hP086636; Thu, 23 Jul 2009 19:03:04 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907231903.n6NJ34hP086636@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 23 Jul 2009 19:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195835 - in stable/7/sys: . contrib/pf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 19:03:05 -0000 Author: bms Date: Thu Jul 23 19:03:04 2009 New Revision: 195835 URL: http://svn.freebsd.org/changeset/base/195835 Log: Update mergeinfo for merge of r182138 to sys/dev/usb/uipaq.c. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 19:03:41 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F351106564A; Thu, 23 Jul 2009 19:03:41 +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 377A38FC17; Thu, 23 Jul 2009 19:03:41 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id C6FA43BD547; Thu, 23 Jul 2009 15:03:40 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 23 Jul 2009 15:03:40 -0400 X-Sasl-enc: QhsCuvlcv2cM3NgmoLqs+yFR72ReIt0VgVcCLR/mS2vc 1248375820 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 AB9BCB624; Thu, 23 Jul 2009 15:03:39 -0400 (EDT) Message-ID: <4A68B40A.8020307@incunabulum.net> Date: Thu, 23 Jul 2009 20:03:38 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Baldwin References: <200907230135.n6N1ZEar057595@svn.freebsd.org> <20090723024640.6f5c893a@dev.lan.Awfulhak.org> <4A685A4B.9070201@incunabulum.net> <200907231023.47428.jhb@freebsd.org> In-Reply-To: <200907231023.47428.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@freebsd.org, Brian Somers , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce M Simpson Subject: Re: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 19:03:42 -0000 John Baldwin wrote: > ... > That's because you merged to the file rather than to sys/. There's a set of > instructions about mergning with SVN on the wiki that explains why to do > kernel merges to sys/ instead of individual files. > I read them, having been pointed at them by kib@ -- but they didn't explain why contrib/pf was being touched at all. In the absence of other information, I'll take this at face value, and commit the mergeinfo, although I would be happier understanding why contrib/pf is being touched by the merge. Perhaps a purchase of the Subversion book is in my future. thanks, BMS From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 20:00:30 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD372106566C; Thu, 23 Jul 2009 20:00:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD478FC19; Thu, 23 Jul 2009 20:00:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1FFA546B85; Thu, 23 Jul 2009 16:00:30 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 4C88E8A0A2; Thu, 23 Jul 2009 16:00:29 -0400 (EDT) From: John Baldwin To: Bruce Simpson Date: Thu, 23 Jul 2009 15:16:04 -0400 User-Agent: KMail/1.9.7 References: <200907230135.n6N1ZEar057595@svn.freebsd.org> <200907231023.47428.jhb@freebsd.org> <4A68B40A.8020307@incunabulum.net> In-Reply-To: <4A68B40A.8020307@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907231516.05011.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 23 Jul 2009 16:00:29 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable-7@freebsd.org, Brian Somers , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce M Simpson Subject: Re: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 20:00:31 -0000 On Thursday 23 July 2009 3:03:38 pm Bruce Simpson wrote: > John Baldwin wrote: > > ... > > That's because you merged to the file rather than to sys/. There's a set of > > instructions about mergning with SVN on the wiki that explains why to do > > kernel merges to sys/ instead of individual files. > > > > I read them, having been pointed at them by kib@ -- but they didn't > explain why contrib/pf was being touched at all. True enough, though I was pointing to the docs to explain merging to sys/ rather than the file. I should probably add some note to the wiki page about the "spurious" mergeinfo. The short version is that stable/7/sys/contrib/pf has two sets of mergeinfo: 1 from head/sys/contrib/pf and 2 from vendor-sys/pf. 2) is inherited from head and is a result of a vendor update of pf being merged over from the vendor area into sys/contrib/pf. It is not suitable for other parts of the kernel. 1) is the normal mergeinfo for merges from head/sys to stable/7/sys. However, a design choice in mergeinfo is that mergeinfo is not inherited via pathnames. Specifically, when the svn client starts walking up the path tree to find mergeinfo, it stops at the first parent directory that has any mergeinfo whatsoever and expects that mergeinfo to fully describe all the mergeinfo for its subtree. Thus, because the mergeinfo from 2) is present on sys/contrib/pf, the mergeinfo in 1) has to be duplicated in sys/contrib/pf in addition to sys. I'm not sure this is the best design, but that is the way Subversion works. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Thu Jul 23 20:51:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC6B8106564A; Thu, 23 Jul 2009 20:51:19 +0000 (UTC) (envelope-from prvs=144824d4a6=brian@FreeBSD.org) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 706F88FC16; Thu, 23 Jul 2009 20:51:19 +0000 (UTC) (envelope-from prvs=144824d4a6=brian@FreeBSD.org) Received: from pd7ml1no-ssvc.prod.shaw.ca ([10.0.153.161]) by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 23 Jul 2009 14:51:18 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=9hgBjiEyFVcA:10 a=4Z0QP1WVBuUwHZGQKe2N1A==:17 a=awCybExcAAAA:8 a=MMwg4So0AAAA:8 a=6I5d2MoRAAAA:8 a=Ofibz1gJ8D_GyrKScWQA:9 a=B5u56gGq7mY0cWMgY2E6UkhbjPoA:4 a=z2jkVXLrYuwA:10 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd7ml1no-dmz.prod.shaw.ca with ESMTP; 23 Jul 2009 14:51:09 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 5A811C43548_A68CD42B; Thu, 23 Jul 2009 20:51:14 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id 71748C460F7_A68CD35F; Thu, 23 Jul 2009 20:51:01 +0000 (GMT) Received: from localhost (brian@gw.lan.Awfulhak.org [172.16.0.1]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n6NKoirp069401; Thu, 23 Jul 2009 13:50:47 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Thu, 23 Jul 2009 13:50:44 -0700 From: Brian Somers To: Bruce Simpson Message-ID: <20090723135044.53ad9173@FreeBSD.org> In-Reply-To: <4A68B40A.8020307@incunabulum.net> References: <200907230135.n6N1ZEar057595@svn.freebsd.org> <20090723024640.6f5c893a@dev.lan.Awfulhak.org> <4A685A4B.9070201@incunabulum.net> <200907231023.47428.jhb@freebsd.org> <4A68B40A.8020307@incunabulum.net> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@FreeBSD.org, John Baldwin , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce M Simpson Subject: Re: svn commit: r195829 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 20:51:20 -0000 On Thu, 23 Jul 2009 20:03:38 +0100, Bruce Simpson wrote: > Perhaps a purchase of the Subversion book is in my future. You can download the pdf for free - it's worth reading. IMHO the svn:mergeinfo idea is flawed. It doesn't handle hierarchies with mixed --depth values at all - it should at least handle merges to trees with non-infinity-depth nodes by duplicating the mergeinfo for each non-infinity-depth node from it's closest parent and not merging to the node. The observant committer would of course not commit such a thing (and would set their depth to infinity on these nodes first). -- Brian Somers Don't _EVER_ lose your sense of humour ! From owner-svn-src-stable@FreeBSD.ORG Fri Jul 24 19:35:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 898B01065672; Fri, 24 Jul 2009 19:35:06 +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 736128FC19; Fri, 24 Jul 2009 19:35:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6OJZ6AH019129; Fri, 24 Jul 2009 19:35:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6OJZ6HX019123; Fri, 24 Jul 2009 19:35:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200907241935.n6OJZ6HX019123@svn.freebsd.org> From: John Baldwin Date: Fri, 24 Jul 2009 19:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195854 - in stable/7: lib/libc lib/libc/sys sys sys/compat/freebsd32 sys/contrib/pf sys/kern sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 19:35:07 -0000 Author: jhb Date: Fri Jul 24 19:35:06 2009 New Revision: 195854 URL: http://svn.freebsd.org/changeset/base/195854 Log: MFC: Several cleanups to the syscall tables: - Add explicit prototypes for lkmnosys() and lkmressys() in and remove hacks for those routines from makesyscalls.sh. - Change the LKM syscall entries in the freebsd32 table to use lkmnosys rather than nosys. - Use NOPROTO for __syscall() to remove more magic logic from makesyscalls.sh. - Retire the unused nfsclnt() system call and mark it as UNIMPL rather than NOIMPL. - Remove the NOIMPL system call type. - Allow multiple flags in the type system call type field. Use this to retire CPT_NOA. - Update the comment descriptions for COMPAT[45] system calls in various generated files. - Update comments in syscalls.master. - Include defintions for audit identifiers for compat system calls in . Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/sys/Symbol.map stable/7/sys/ (props changed) stable/7/sys/compat/freebsd32/syscalls.master stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/makesyscalls.sh stable/7/sys/kern/syscalls.master stable/7/sys/sys/sysent.h Modified: stable/7/lib/libc/sys/Symbol.map ============================================================================== --- stable/7/lib/libc/sys/Symbol.map Fri Jul 24 19:12:19 2009 (r195853) +++ stable/7/lib/libc/sys/Symbol.map Fri Jul 24 19:35:06 2009 (r195854) @@ -202,7 +202,6 @@ FBSD_1.0 { nanosleep; netbsd_lchown; netbsd_msync; - nfsclnt; nfssvc; nfstat; nlstat; @@ -746,8 +745,6 @@ FBSDprivate_1.0 { __sys_netbsd_lchown; _netbsd_msync; __sys_netbsd_msync; - _nfsclnt; - __sys_nfsclnt; _nfssvc; __sys_nfssvc; _nfstat; Modified: stable/7/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/7/sys/compat/freebsd32/syscalls.master Fri Jul 24 19:12:19 2009 (r195853) +++ stable/7/sys/compat/freebsd32/syscalls.master Fri Jul 24 19:35:06 2009 (r195854) @@ -5,15 +5,17 @@ ; System call name/number master file. ; Processed to created init_sysent.c, syscalls.c and syscall.h. -; Columns: number audit type nargs name alt{name,tag,rtyp}/comments +; Columns: number audit type name alt{name,tag,rtyp}/comments ; number system call number, must be in order ; audit the audit event associated with the system call ; A value of AUE_NULL means no auditing, but it also means that ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT, -; NODEF, NOARGS, NOPROTO, NOIMPL, NOSTD, COMPAT4 +; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6, +; LIBCOMPAT, NODEF, NOARGS, NOPROTO, NOSTD +; The COMPAT* options may be combined with one or more NO* +; options separated by '|' with no spaces (e.g. COMPAT|NOARGS) ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different @@ -25,15 +27,16 @@ ; STD always included ; COMPAT included on COMPAT #ifdef ; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat) +; COMPAT6 included on COMPAT6 #ifdef (FreeBSD 6 compat) ; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h ; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only ; NOSTD implemented but as a lkm that can be statically -; compiled in; sysent entry will be filled with lkmsys +; compiled in; sysent entry will be filled with lkmressys ; so the SYSCALL_MODULE macro works ; NOARGS same as STD except do not create structure in sys/sysproto.h ; NODEF same as STD except only have the entry in the syscall table -; added. Meaning - do do not create structure or function +; added. Meaning - do not create structure or function ; prototype in sys/sysproto.h ; NOPROTO same as STD except do not create structure or ; function prototype in sys/sysproto.h. Does add a @@ -388,16 +391,16 @@ ; ; The following are reserved for loadable syscalls ; -210 AUE_NULL UNIMPL -211 AUE_NULL UNIMPL -212 AUE_NULL UNIMPL -213 AUE_NULL UNIMPL -214 AUE_NULL UNIMPL -215 AUE_NULL UNIMPL -216 AUE_NULL UNIMPL -217 AUE_NULL UNIMPL -218 AUE_NULL UNIMPL -219 AUE_NULL UNIMPL +210 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +211 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +212 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +213 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +214 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +215 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +216 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +217 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +218 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int +219 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int ; ; The following were introduced with NetBSD/4.4Lite-2 @@ -652,7 +655,7 @@ 367 AUE_NULL UNIMPL __cap_get_file 368 AUE_NULL UNIMPL __cap_set_fd 369 AUE_NULL UNIMPL __cap_set_file -370 AUE_NULL UNIMPL lkmressys +370 AUE_NULL UNIMPL nosys 371 AUE_EXTATTR_SET_FD NOPROTO { int extattr_set_fd(int fd, \ int attrnamespace, const char *attrname, \ void *data, size_t nbytes); } Modified: stable/7/sys/kern/makesyscalls.sh ============================================================================== --- stable/7/sys/kern/makesyscalls.sh Fri Jul 24 19:12:19 2009 (r195853) +++ stable/7/sys/kern/makesyscalls.sh Fri Jul 24 19:35:06 2009 (r195854) @@ -213,6 +213,19 @@ s/\$//g print exit 1 } + # Returns true if the type "name" is the first flag in the type field + function type(name, flags, n) { + n = split($3, flags, /\|/) + return (n > 0 && flags[1] == name) + } + # Returns true if the flag "name" is set in the type field + function flag(name, flags, i, n) { + n = split($3, flags, /\|/) + for (i = 1; i <= n; i++) + if (flags[i] == name) + return 1 + return 0 + } function align_sysent_comment(column) { printf("\t") > sysent column = column + 8 - column % 8 @@ -241,7 +254,7 @@ s/\$//g rettype="int" end=NF } - if ($3 == "NODEF") { + if (flag("NODEF")) { auditev="AUE_NULL" funcname=$4 argssize = "AS(" $6 ")" @@ -267,11 +280,11 @@ s/\$//g funcalias = funcname if (argalias == "") { argalias = funcname "_args" - if ($3 == "COMPAT") + if (flag("COMPAT")) argalias = "o" argalias - if ($3 == "COMPAT4") + if (flag("COMPAT4")) argalias = "freebsd4_" argalias - if ($3 == "COMPAT6") + if (flag("COMPAT6")) argalias = "freebsd6_" argalias } f++ @@ -318,8 +331,8 @@ s/\$//g auditev = $2; } - $3 == "STD" || $3 == "NODEF" || $3 == "NOARGS" || $3 == "NOPROTO" \ - || $3 == "NOIMPL" || $3 == "NOSTD" { + type("STD") || type("NODEF") || type("NOARGS") || type("NOPROTO") \ + || type("NOSTD") { parseline() printf("\t/* %s */\n\tcase %d: {\n", funcname, syscall) > systrace printf("\t/* %s */\n\tcase %d:\n", funcname, syscall) > systracetmp @@ -345,43 +358,30 @@ s/\$//g } printf("\t\t*n_args = %d;\n\t\tbreak;\n\t}\n", argc) > systrace printf("\t\tbreak;\n") > systracetmp - if ((!nosys || funcname != "nosys") && \ - (funcname != "lkmnosys") && (funcname != "lkmressys")) { - if (argc != 0 && $3 != "NOARGS" && $3 != "NOPROTO") { - printf("struct %s {\n", argalias) > sysarg - for (i = 1; i <= argc; i++) - printf("\tchar %s_l_[PADL_(%s)]; " \ - "%s %s; char %s_r_[PADR_(%s)];\n", - argname[i], argtype[i], - argtype[i], argname[i], - argname[i], argtype[i]) > sysarg - printf("};\n") > sysarg - } - else if ($3 != "NOARGS" && $3 != "NOPROTO" && \ - $3 != "NODEF") - printf("struct %s {\n\tregister_t dummy;\n};\n", - argalias) > sysarg - } - if (($3 != "NOPROTO" && $3 != "NODEF" && \ - (funcname != "nosys" || !nosys)) || \ - (funcname == "lkmnosys" && !lkmnosys) || \ - funcname == "lkmressys") { + if (argc != 0 && !flag("NOARGS") && !flag("NOPROTO") && \ + !flag("NODEF")) { + printf("struct %s {\n", argalias) > sysarg + for (i = 1; i <= argc; i++) + printf("\tchar %s_l_[PADL_(%s)]; " \ + "%s %s; char %s_r_[PADR_(%s)];\n", + argname[i], argtype[i], + argtype[i], argname[i], + argname[i], argtype[i]) > sysarg + printf("};\n") > sysarg + } + else if (!flag("NOARGS") && !flag("NOPROTO") && !flag("NODEF")) + printf("struct %s {\n\tregister_t dummy;\n};\n", + argalias) > sysarg + if (!flag("NOPROTO") && !flag("NODEF")) { printf("%s\t%s(struct thread *, struct %s *)", rettype, funcname, argalias) > sysdcl printf(";\n") > sysdcl printf("#define\t%sAUE_%s\t%s\n", syscallprefix, funcalias, auditev) > sysaue } - if (funcname == "nosys") - nosys = 1 - if (funcname == "lkmnosys") - lkmnosys = 1 printf("\t{ %s, (sy_call_t *)", argssize) > sysent column = 8 + 2 + length(argssize) + 15 - if ($3 == "NOIMPL") { - printf("%s },", "nosys, AUE_NULL, NULL, 0, 0") > sysent - column = column + length("nosys") + 3 - } else if ($3 == "NOSTD") { + if (flag("NOSTD")) { printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0") > sysent column = column + length("lkmressys") + 3 } else { @@ -392,7 +392,7 @@ s/\$//g printf("/* %d = %s */\n", syscall, funcalias) > sysent printf("\t\"%s\",\t\t\t/* %d = %s */\n", funcalias, syscall, funcalias) > sysnames - if ($3 != "NODEF") { + if (!flag("NODEF")) { printf("#define\t%s%s\t%d\n", syscallprefix, funcalias, syscall) > syshdr printf(" \\\n\t%s.o", funcalias) > sysmk @@ -400,28 +400,32 @@ s/\$//g syscall++ next } - $3 == "COMPAT" || $3 == "COMPAT4" || $3 == "COMPAT6" || $3 == "CPT_NOA" { - if ($3 == "COMPAT" || $3 == "CPT_NOA") { + type("COMPAT") || type("COMPAT4") || type("COMPAT6") { + if (flag("COMPAT")) { ncompat++ out = syscompat outdcl = syscompatdcl wrap = "compat" prefix = "o" - } else if ($3 == "COMPAT4") { + descr = "old" + } else if (flag("COMPAT4")) { ncompat4++ out = syscompat4 outdcl = syscompat4dcl wrap = "compat4" prefix = "freebsd4_" - } else if ($3 == "COMPAT6") { + descr = "freebsd4" + } else if (flag("COMPAT6")) { ncompat6++ out = syscompat6 outdcl = syscompat6dcl wrap = "compat6" prefix = "freebsd6_" + descr = "freebsd6" } parseline() - if (argc != 0 && $3 != "CPT_NOA") { + if (argc != 0 && !flag("NOARGS") && !flag("NOPROTO") && \ + !flag("NODEF")) { printf("struct %s {\n", argalias) > out for (i = 1; i <= argc; i++) printf("\tchar %s_l_[PADL_(%s)]; %s %s; " \ @@ -431,22 +435,33 @@ s/\$//g argname[i], argtype[i]) > out printf("};\n") > out } - else if($3 != "CPT_NOA") + else if (!flag("NOARGS") && !flag("NOPROTO") && !flag("NODEF")) printf("struct %s {\n\tregister_t dummy;\n};\n", argalias) > sysarg - printf("%s\t%s%s(struct thread *, struct %s *);\n", - rettype, prefix, funcname, argalias) > outdcl - printf("\t{ %s(%s,%s), %s, NULL, 0, 0 },", - wrap, argssize, funcname, auditev) > sysent - align_sysent_comment(8 + 9 + \ - length(argssize) + 1 + length(funcname) + length(auditev) + 4) - printf("/* %d = old %s */\n", syscall, funcalias) > sysent - printf("\t\"%s.%s\",\t\t/* %d = old %s */\n", - wrap, funcalias, syscall, funcalias) > sysnames - if ($3 == "COMPAT" || $3 == "CPT_NOA") { + if (!flag("NOPROTO") && !flag("NODEF")) { + printf("%s\t%s%s(struct thread *, struct %s *);\n", + rettype, prefix, funcname, argalias) > outdcl + printf("#define\t%sAUE_%s%s\t%s\n", syscallprefix, + prefix, funcname, auditev) > sysaue + } + if (flag("NOSTD")) { + printf("\t{ %s, (sy_call_t *)%s, %s, NULL, 0, 0 },", + "0", "lkmressys", "AUE_NULL") > sysent + align_sysent_comment(8 + 2 + length("0") + 15 + \ + length("lkmressys") + 3) + } else { + printf("\t{ %s(%s,%s), %s, NULL, 0, 0 },", + wrap, argssize, funcname, auditev) > sysent + align_sysent_comment(8 + 9 + length(argssize) + 1 + \ + length(funcname) + length(auditev) + 4) + } + printf("/* %d = %s %s */\n", syscall, descr, funcalias) > sysent + printf("\t\"%s.%s\",\t\t/* %d = %s %s */\n", + wrap, funcalias, syscall, descr, funcalias) > sysnames + if (flag("COMPAT")) { printf("\t\t\t\t/* %d is old %s */\n", syscall, funcalias) > syshdr - } else { + } else if (!flag("NODEF")) { printf("#define\t%s%s%s\t%d\n", syscallprefix, prefix, funcalias, syscall) > syshdr printf(" \\\n\t%s%s.o", prefix, funcalias) > sysmk @@ -454,7 +469,7 @@ s/\$//g syscall++ next } - $3 == "LIBCOMPAT" { + type("LIBCOMPAT") { ncompat++ parseline() printf("%s\to%s();\n", rettype, funcname) > syscompatdcl @@ -471,7 +486,7 @@ s/\$//g syscall++ next } - $3 == "OBSOL" { + type("OBSOL") { printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },") > sysent align_sysent_comment(34) printf("/* %d = obsolete %s */\n", syscall, comment) > sysent @@ -482,7 +497,7 @@ s/\$//g syscall++ next } - $3 == "UNIMPL" { + type("UNIMPL") { printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },\t\t\t/* %d = %s */\n", syscall, comment) > sysent printf("\t\"#%d\",\t\t\t/* %d = %s */\n", Modified: stable/7/sys/kern/syscalls.master ============================================================================== --- stable/7/sys/kern/syscalls.master Fri Jul 24 19:12:19 2009 (r195853) +++ stable/7/sys/kern/syscalls.master Fri Jul 24 19:35:06 2009 (r195854) @@ -11,8 +11,10 @@ ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT, -; NODEF, NOARGS, NOPROTO, NOIMPL, NOSTD, COMPAT4 +; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6, +; LIBCOMPAT, NODEF, NOARGS, NOPROTO, NOSTD +; The COMPAT* options may be combined with one or more NO* +; options separated by '|' with no spaces (e.g. COMPAT|NOARGS) ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different @@ -24,15 +26,16 @@ ; STD always included ; COMPAT included on COMPAT #ifdef ; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat) +; COMPAT6 included on COMPAT6 #ifdef (FreeBSD 6 compat) ; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h ; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only ; NOSTD implemented but as a lkm that can be statically -; compiled in; sysent entry will be filled with lkmsys +; compiled in; sysent entry will be filled with lkmressys ; so the SYSCALL_MODULE macro works ; NOARGS same as STD except do not create structure in sys/sysproto.h ; NODEF same as STD except only have the entry in the syscall table -; added. Meaning - do do not create structure or function +; added. Meaning - do not create structure or function ; prototype in sys/sysproto.h ; NOPROTO same as STD except do not create structure or ; function prototype in sys/sysproto.h. Does add a @@ -214,7 +217,7 @@ int protocol); } 98 AUE_CONNECT STD { int connect(int s, caddr_t name, \ int namelen); } -99 AUE_ACCEPT CPT_NOA { int accept(int s, caddr_t name, \ +99 AUE_ACCEPT COMPAT|NOARGS { int accept(int s, caddr_t name, \ int *anamelen); } accept accept_args int 100 AUE_GETPRIORITY STD { int getpriority(int which, int who); } 101 AUE_SEND COMPAT { int send(int s, caddr_t buf, int len, \ @@ -258,7 +261,7 @@ struct timezone *tzp); } 123 AUE_FCHOWN STD { int fchown(int fd, int uid, int gid); } 124 AUE_FCHMOD STD { int fchmod(int fd, int mode); } -125 AUE_RECVFROM CPT_NOA { int recvfrom(int s, caddr_t buf, \ +125 AUE_RECVFROM COMPAT|NOARGS { int recvfrom(int s, caddr_t buf, \ size_t len, int flags, caddr_t from, int \ *fromlenaddr); } recvfrom recvfrom_args \ int @@ -294,7 +297,7 @@ 148 AUE_QUOTACTL STD { int quotactl(char *path, int cmd, int uid, \ caddr_t arg); } 149 AUE_O_QUOTA COMPAT { int quota(void); } -150 AUE_GETSOCKNAME CPT_NOA { int getsockname(int fdec, \ +150 AUE_GETSOCKNAME COMPAT|NOARGS { int getsockname(int fdec, \ caddr_t asa, int *alen); } getsockname \ getsockname_args int @@ -380,7 +383,7 @@ 197 AUE_MMAP STD { caddr_t freebsd6_mmap(caddr_t addr, \ size_t len, int prot, int flags, int fd, \ int pad, off_t pos); } -198 AUE_NULL STD { int nosys(void); } __syscall \ +198 AUE_NULL NOPROTO { int nosys(void); } __syscall \ __syscall_args int 199 AUE_LSEEK STD { off_t freebsd6_lseek(int fd, int pad, \ off_t offset, int whence); } @@ -657,7 +660,7 @@ 367 AUE_NULL UNIMPL __cap_get_file 368 AUE_NULL UNIMPL __cap_set_fd 369 AUE_NULL UNIMPL __cap_set_file -370 AUE_NULL NODEF lkmressys lkmressys nosys_args int +370 AUE_NULL UNIMPL nosys 371 AUE_EXTATTR_SET_FD STD { int extattr_set_fd(int fd, \ int attrnamespace, const char *attrname, \ void *data, size_t nbytes); } @@ -668,7 +671,7 @@ int attrnamespace, \ const char *attrname); } 374 AUE_NULL STD { int __setugid(int flag); } -375 AUE_NULL NOIMPL { int nfsclnt(int flag, caddr_t argp); } +375 AUE_NULL UNIMPL nfsclnt 376 AUE_EACCESS STD { int eaccess(char *path, int flags); } 377 AUE_NULL UNIMPL afs_syscall 378 AUE_NMOUNT STD { int nmount(struct iovec *iovp, \ Modified: stable/7/sys/sys/sysent.h ============================================================================== --- stable/7/sys/sys/sysent.h Fri Jul 24 19:12:19 2009 (r195853) +++ stable/7/sys/sys/sysent.h Fri Jul 24 19:35:06 2009 (r195854) @@ -158,6 +158,12 @@ int syscall_register(int *offset, str int syscall_deregister(int *offset, struct sysent *old_sysent); int syscall_module_handler(struct module *mod, int what, void *arg); +/* Special purpose system call functions. */ +struct nosys_args; + +int lkmnosys(struct thread *, struct nosys_args *); +int lkmressys(struct thread *, struct nosys_args *); + #endif /* _KERNEL */ #endif /* !_SYS_SYSENT_H_ */ From owner-svn-src-stable@FreeBSD.ORG Fri Jul 24 20:35:45 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0F341065674; Fri, 24 Jul 2009 20:35:44 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9D28FC1F; Fri, 24 Jul 2009 20:35:44 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6OKZiRu020488; Fri, 24 Jul 2009 20:35:44 GMT (envelope-from gad@svn.freebsd.org) Received: (from gad@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6OKZiNF020486; Fri, 24 Jul 2009 20:35:44 GMT (envelope-from gad@svn.freebsd.org) Message-Id: <200907242035.n6OKZiNF020486@svn.freebsd.org> From: Garance A Drosehn Date: Fri, 24 Jul 2009 20:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195855 - in stable/7/usr.sbin/lpr: . common_source X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 20:35:45 -0000 Author: gad Date: Fri Jul 24 20:35:44 2009 New Revision: 195855 URL: http://svn.freebsd.org/changeset/base/195855 Log: MFC: Fix end-of-line issues that can come up when `lpq' reads information about a queue from a remote host. PR: bin/104731 Modified: stable/7/usr.sbin/lpr/ (props changed) stable/7/usr.sbin/lpr/common_source/displayq.c Modified: stable/7/usr.sbin/lpr/common_source/displayq.c ============================================================================== --- stable/7/usr.sbin/lpr/common_source/displayq.c Fri Jul 24 19:35:06 2009 (r195854) +++ stable/7/usr.sbin/lpr/common_source/displayq.c Fri Jul 24 20:35:44 2009 (r195855) @@ -69,6 +69,13 @@ __FBSDID("$FreeBSD$"); #define SIZCOL 62 /* start of Size column in normal */ /* + * isprint() takes a parameter of 'int', but expect values in the range + * of unsigned char. Define a wrapper which takes a value of type 'char', + * whether signed or unsigned, and ensure it ends up in the right range. + */ +#define isprintch(Anychar) isprint((u_char)(Anychar)) + +/* * Stuff for handling job specifications */ extern uid_t uid, euid; @@ -86,6 +93,7 @@ static const char *head0 = "Rank Owne static const char *head1 = "Total Size\n"; static void alarmhandler(int _signo); +static void filtered_write(char *_obuffer, int _wlen, FILE *_wstream); static void warn(const struct printer *_pp); /* @@ -254,12 +262,105 @@ displayq(struct printer *pp, int format) if (write(fd, line, i) != i) fatal(pp, "Lost connection"); while ((i = read(fd, line, sizeof(line))) > 0) - (void) fwrite(line, 1, i, stdout); + filtered_write(line, i, stdout); + filtered_write(NULL, -1, stdout); (void) close(fd); } } /* + * The lpq-info read from remote hosts may contain unprintable characters, + * or carriage-returns instead of line-feeds. Clean those up before echoing + * the lpq-info line(s) to stdout. The info may also be missing any kind of + * end-of-line character. This also turns CRLF and LFCR into a plain LF. + * + * This routine may be called multiple times to process a single set of + * information, and after a set is finished this routine must be called + * one extra time with NULL specified as the buffer address. + */ +static void +filtered_write(char *wbuffer, int wlen, FILE *wstream) +{ + static char lastchar, savedchar; + char *chkptr, *dest_end, *dest_ch, *nxtptr, *w_end; + int destlen; + char destbuf[BUFSIZ]; + + if (wbuffer == NULL) { + if (savedchar != '\0') { + if (savedchar == '\r') + savedchar = '\n'; + fputc(savedchar, wstream); + lastchar = savedchar; + savedchar = '\0'; + } + if (lastchar != '\0' && lastchar != '\n') + fputc('\n', wstream); + lastchar = '\0'; + return; + } + + dest_ch = &destbuf[0]; + dest_end = dest_ch + sizeof(destbuf); + chkptr = wbuffer; + w_end = wbuffer + wlen; + lastchar = '\0'; + if (savedchar != '\0') { + chkptr = &savedchar; + nxtptr = wbuffer; + } else + nxtptr = chkptr + 1; + + while (chkptr < w_end) { + if (nxtptr < w_end) { + if ((*chkptr == '\r' && *nxtptr == '\n') || + (*chkptr == '\n' && *nxtptr == '\r')) { + *dest_ch++ = '\n'; + /* want to skip past that second character */ + nxtptr++; + goto check_next; + } + } else { + /* This is the last byte in the buffer given on this + * call, so check if it could be the first-byte of a + * significant two-byte sequence. If it is, then + * don't write it out now, but save for checking in + * the next call. + */ + savedchar = '\0'; + if (*chkptr == '\r' || *chkptr == '\n') { + savedchar = *chkptr; + break; + } + } + if (*chkptr == '\r') + *dest_ch++ = '\n'; +#if 0 /* XXX - don't translate unprintable characters (yet) */ + else if (*chkptr != '\t' && *chkptr != '\n' && + !isprintch(*chkptr)) + *dest_ch++ = '?'; +#endif + else + *dest_ch++ = *chkptr; + +check_next: + chkptr = nxtptr; + nxtptr = chkptr + 1; + if (dest_ch >= dest_end) { + destlen = dest_ch - &destbuf[0]; + fwrite(destbuf, 1, destlen, wstream); + lastchar = destbuf[destlen - 1]; + dest_ch = &destbuf[0]; + } + } + destlen = dest_ch - &destbuf[0]; + if (destlen > 0) { + fwrite(destbuf, 1, destlen, wstream); + lastchar = destbuf[destlen - 1]; + } +} + +/* * Print a warning message if there is no daemon present. */ static void From owner-svn-src-stable@FreeBSD.ORG Fri Jul 24 21:30:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9181E106564A; Fri, 24 Jul 2009 21:30:10 +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 7D74C8FC13; Fri, 24 Jul 2009 21:30:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6OLUAjN021678; Fri, 24 Jul 2009 21:30:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6OLUAc8021667; Fri, 24 Jul 2009 21:30:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200907242130.n6OLUAc8021667@svn.freebsd.org> From: John Baldwin Date: Fri, 24 Jul 2009 21:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195856 - in stable/7/sys: compat/freebsd32 kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 21:30:11 -0000 Author: jhb Date: Fri Jul 24 21:30:10 2009 New Revision: 195856 URL: http://svn.freebsd.org/changeset/base/195856 Log: Regen. Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h stable/7/sys/compat/freebsd32/freebsd32_syscall.h stable/7/sys/compat/freebsd32/freebsd32_syscalls.c stable/7/sys/compat/freebsd32/freebsd32_sysent.c stable/7/sys/kern/init_sysent.c stable/7/sys/kern/syscalls.c stable/7/sys/kern/systrace_args.c stable/7/sys/sys/syscall.h stable/7/sys/sys/syscall.mk stable/7/sys/sys/sysproto.h Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_proto.h Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/compat/freebsd32/freebsd32_proto.h Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -647,15 +647,24 @@ int freebsd6_freebsd32_ftruncate(struct #endif /* COMPAT_FREEBSD6 */ #define FREEBSD32_SYS_AUE_freebsd32_wait4 AUE_WAIT4 +#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_getfsstat AUE_GETFSSTAT #define FREEBSD32_SYS_AUE_freebsd32_recvmsg AUE_RECVMSG #define FREEBSD32_SYS_AUE_freebsd32_sendmsg AUE_SENDMSG #define FREEBSD32_SYS_AUE_freebsd32_recvfrom AUE_RECVFROM +#define FREEBSD32_SYS_AUE_ofreebsd32_sigaction AUE_SIGACTION +#define FREEBSD32_SYS_AUE_ofreebsd32_sigprocmask AUE_SIGPROCMASK +#define FREEBSD32_SYS_AUE_ofreebsd32_sigpending AUE_SIGPENDING #define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGALTSTACK #define FREEBSD32_SYS_AUE_freebsd32_ioctl AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE #define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER #define FREEBSD32_SYS_AUE_freebsd32_getitimer AUE_GETITIMER #define FREEBSD32_SYS_AUE_freebsd32_select AUE_SELECT +#define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC +#define FREEBSD32_SYS_AUE_ofreebsd32_sigblock AUE_O_SIGBLOCK +#define FREEBSD32_SYS_AUE_ofreebsd32_sigsetmask AUE_O_SIGSETMASK +#define FREEBSD32_SYS_AUE_ofreebsd32_sigsuspend AUE_SIGSUSPEND +#define FREEBSD32_SYS_AUE_ofreebsd32_sigstack AUE_O_SIGSTACK #define FREEBSD32_SYS_AUE_freebsd32_gettimeofday AUE_GETTIMEOFDAY #define FREEBSD32_SYS_AUE_freebsd32_getrusage AUE_GETRUSAGE #define FREEBSD32_SYS_AUE_freebsd32_readv AUE_READV @@ -663,13 +672,21 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_settimeofday AUE_SETTIMEOFDAY #define FREEBSD32_SYS_AUE_freebsd32_utimes AUE_UTIMES #define FREEBSD32_SYS_AUE_freebsd32_adjtime AUE_ADJTIME +#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_statfs AUE_STATFS +#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_fstatfs AUE_FSTATFS #define FREEBSD32_SYS_AUE_freebsd32_semsys AUE_SEMSYS #define FREEBSD32_SYS_AUE_freebsd32_msgsys AUE_MSGSYS #define FREEBSD32_SYS_AUE_freebsd32_shmsys AUE_SHMSYS +#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_pread AUE_PREAD +#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_pwrite AUE_PWRITE #define FREEBSD32_SYS_AUE_freebsd32_stat AUE_STAT #define FREEBSD32_SYS_AUE_freebsd32_fstat AUE_FSTAT #define FREEBSD32_SYS_AUE_freebsd32_lstat AUE_LSTAT #define FREEBSD32_SYS_AUE_freebsd32_getdirentries AUE_GETDIRENTRIES +#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_mmap AUE_MMAP +#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_lseek AUE_LSEEK +#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_truncate AUE_TRUNCATE +#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_ftruncate AUE_FTRUNCATE #define FREEBSD32_SYS_AUE_freebsd32_sysctl AUE_SYSCTL #define FREEBSD32_SYS_AUE_freebsd32_futimes AUE_FUTIMES #define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL @@ -687,6 +704,7 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_lutimes AUE_LUTIMES #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV +#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_fhstatfs AUE_FHSTATFS #define FREEBSD32_SYS_AUE_freebsd32_modstat AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_return AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_suspend AUE_NULL @@ -695,7 +713,10 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_oaio_read AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_oaio_write AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_olio_listio AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_sendfile AUE_SENDFILE #define FREEBSD32_SYS_AUE_freebsd32_jail AUE_JAIL +#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_sigaction AUE_SIGACTION +#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_sigreturn AUE_SIGRETURN #define FREEBSD32_SYS_AUE_freebsd32_sigtimedwait AUE_SIGWAIT #define FREEBSD32_SYS_AUE_freebsd32_sigwaitinfo AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_waitcomplete AUE_NULL Modified: stable/7/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscall.h Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/compat/freebsd32/freebsd32_syscall.h Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ #define FREEBSD32_SYS_syscall 0 Modified: stable/7/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ const char *freebsd32_syscallnames[] = { @@ -25,7 +25,7 @@ const char *freebsd32_syscallnames[] = { "chmod", /* 15 = chmod */ "chown", /* 16 = chown */ "break", /* 17 = break */ - "compat4.freebsd32_getfsstat", /* 18 = old freebsd32_getfsstat */ + "compat4.freebsd32_getfsstat", /* 18 = freebsd4 freebsd32_getfsstat */ "obs_olseek", /* 19 = obsolete olseek */ "getpid", /* 20 = getpid */ "mount", /* 21 = mount */ @@ -164,8 +164,8 @@ const char *freebsd32_syscallnames[] = { "#154", /* 154 = nlm_syscall */ "#155", /* 155 = nfssvc */ "obs_ogetdirentries", /* 156 = obsolete ogetdirentries */ - "compat4.freebsd32_statfs", /* 157 = old freebsd32_statfs */ - "compat4.freebsd32_fstatfs", /* 158 = old freebsd32_fstatfs */ + "compat4.freebsd32_statfs", /* 157 = freebsd4 freebsd32_statfs */ + "compat4.freebsd32_fstatfs", /* 158 = freebsd4 freebsd32_fstatfs */ "#159", /* 159 = nosys */ "#160", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ @@ -180,8 +180,8 @@ const char *freebsd32_syscallnames[] = { "freebsd32_msgsys", /* 170 = freebsd32_msgsys */ "freebsd32_shmsys", /* 171 = freebsd32_shmsys */ "#172", /* 172 = nosys */ - "compat6.freebsd32_pread", /* 173 = old freebsd32_pread */ - "compat6.freebsd32_pwrite", /* 174 = old freebsd32_pwrite */ + "compat6.freebsd32_pread", /* 173 = freebsd6 freebsd32_pread */ + "compat6.freebsd32_pwrite", /* 174 = freebsd6 freebsd32_pwrite */ "#175", /* 175 = nosys */ "ntp_adjtime", /* 176 = ntp_adjtime */ "#177", /* 177 = sfork */ @@ -204,11 +204,11 @@ const char *freebsd32_syscallnames[] = { "getrlimit", /* 194 = getrlimit */ "setrlimit", /* 195 = setrlimit */ "freebsd32_getdirentries", /* 196 = freebsd32_getdirentries */ - "compat6.freebsd32_mmap", /* 197 = old freebsd32_mmap */ + "compat6.freebsd32_mmap", /* 197 = freebsd6 freebsd32_mmap */ "__syscall", /* 198 = __syscall */ - "compat6.freebsd32_lseek", /* 199 = old freebsd32_lseek */ - "compat6.freebsd32_truncate", /* 200 = old freebsd32_truncate */ - "compat6.freebsd32_ftruncate", /* 201 = old freebsd32_ftruncate */ + "compat6.freebsd32_lseek", /* 199 = freebsd6 freebsd32_lseek */ + "compat6.freebsd32_truncate", /* 200 = freebsd6 freebsd32_truncate */ + "compat6.freebsd32_ftruncate", /* 201 = freebsd6 freebsd32_ftruncate */ "freebsd32_sysctl", /* 202 = freebsd32_sysctl */ "mlock", /* 203 = mlock */ "munlock", /* 204 = munlock */ @@ -217,16 +217,16 @@ const char *freebsd32_syscallnames[] = { "getpgid", /* 207 = getpgid */ "#208", /* 208 = newreboot */ "poll", /* 209 = poll */ - "#210", /* 210 = */ - "#211", /* 211 = */ - "#212", /* 212 = */ - "#213", /* 213 = */ - "#214", /* 214 = */ - "#215", /* 215 = */ - "#216", /* 216 = */ - "#217", /* 217 = */ - "#218", /* 218 = */ - "#219", /* 219 = */ + "lkmnosys", /* 210 = lkmnosys */ + "lkmnosys", /* 211 = lkmnosys */ + "lkmnosys", /* 212 = lkmnosys */ + "lkmnosys", /* 213 = lkmnosys */ + "lkmnosys", /* 214 = lkmnosys */ + "lkmnosys", /* 215 = lkmnosys */ + "lkmnosys", /* 216 = lkmnosys */ + "lkmnosys", /* 217 = lkmnosys */ + "lkmnosys", /* 218 = lkmnosys */ + "lkmnosys", /* 219 = lkmnosys */ "freebsd32_semctl", /* 220 = freebsd32_semctl */ "semget", /* 221 = semget */ "semop", /* 222 = semop */ @@ -304,7 +304,7 @@ const char *freebsd32_syscallnames[] = { "#294", /* 294 = nosys */ "#295", /* 295 = nosys */ "#296", /* 296 = nosys */ - "compat4.freebsd32_fhstatfs", /* 297 = old freebsd32_fhstatfs */ + "compat4.freebsd32_fhstatfs", /* 297 = freebsd4 freebsd32_fhstatfs */ "fhopen", /* 298 = fhopen */ "fhstat", /* 299 = fhstat */ "modnext", /* 300 = modnext */ @@ -343,15 +343,15 @@ const char *freebsd32_syscallnames[] = { "sched_get_priority_min", /* 333 = sched_get_priority_min */ "sched_rr_get_interval", /* 334 = sched_rr_get_interval */ "utrace", /* 335 = utrace */ - "compat4.freebsd32_sendfile", /* 336 = old freebsd32_sendfile */ + "compat4.freebsd32_sendfile", /* 336 = freebsd4 freebsd32_sendfile */ "kldsym", /* 337 = kldsym */ "freebsd32_jail", /* 338 = freebsd32_jail */ "#339", /* 339 = pioctl */ "sigprocmask", /* 340 = sigprocmask */ "sigsuspend", /* 341 = sigsuspend */ - "compat4.freebsd32_sigaction", /* 342 = old freebsd32_sigaction */ + "compat4.freebsd32_sigaction", /* 342 = freebsd4 freebsd32_sigaction */ "sigpending", /* 343 = sigpending */ - "compat4.freebsd32_sigreturn", /* 344 = old freebsd32_sigreturn */ + "compat4.freebsd32_sigreturn", /* 344 = freebsd4 freebsd32_sigreturn */ "freebsd32_sigtimedwait", /* 345 = freebsd32_sigtimedwait */ "freebsd32_sigwaitinfo", /* 346 = freebsd32_sigwaitinfo */ "__acl_get_file", /* 347 = __acl_get_file */ @@ -377,7 +377,7 @@ const char *freebsd32_syscallnames[] = { "#367", /* 367 = __cap_get_file */ "#368", /* 368 = __cap_set_fd */ "#369", /* 369 = __cap_set_file */ - "#370", /* 370 = lkmressys */ + "#370", /* 370 = nosys */ "extattr_set_fd", /* 371 = extattr_set_fd */ "extattr_get_fd", /* 372 = extattr_get_fd */ "extattr_delete_fd", /* 373 = extattr_delete_fd */ Modified: stable/7/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_sysent.c Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/compat/freebsd32/freebsd32_sysent.c Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ #include "opt_compat.h" @@ -56,7 +56,7 @@ struct sysent freebsd32_sysent[] = { { AS(chmod_args), (sy_call_t *)chmod, AUE_CHMOD, NULL, 0, 0 }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)chown, AUE_CHOWN, NULL, 0, 0 }, /* 16 = chown */ { AS(obreak_args), (sy_call_t *)obreak, AUE_NULL, NULL, 0, 0 }, /* 17 = break */ - { compat4(AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT, NULL, 0, 0 }, /* 18 = old freebsd32_getfsstat */ + { compat4(AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT, NULL, 0, 0 }, /* 18 = freebsd4 freebsd32_getfsstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 19 = obsolete olseek */ { 0, (sy_call_t *)getpid, AUE_GETPID, NULL, 0, 0 }, /* 20 = getpid */ { AS(mount_args), (sy_call_t *)mount, AUE_MOUNT, NULL, 0, 0 }, /* 21 = mount */ @@ -195,8 +195,8 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 154 = nlm_syscall */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 155 = nfssvc */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 156 = obsolete ogetdirentries */ - { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), AUE_STATFS, NULL, 0, 0 }, /* 157 = old freebsd32_statfs */ - { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), AUE_FSTATFS, NULL, 0, 0 }, /* 158 = old freebsd32_fstatfs */ + { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), AUE_STATFS, NULL, 0, 0 }, /* 157 = freebsd4 freebsd32_statfs */ + { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), AUE_FSTATFS, NULL, 0, 0 }, /* 158 = freebsd4 freebsd32_fstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 159 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0 }, /* 161 = getfh */ @@ -211,8 +211,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_msgsys_args), (sy_call_t *)freebsd32_msgsys, AUE_MSGSYS, NULL, 0, 0 }, /* 170 = freebsd32_msgsys */ { AS(freebsd32_shmsys_args), (sy_call_t *)freebsd32_shmsys, AUE_SHMSYS, NULL, 0, 0 }, /* 171 = freebsd32_shmsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 172 = nosys */ - { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0 }, /* 173 = old freebsd32_pread */ - { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0 }, /* 174 = old freebsd32_pwrite */ + { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0 }, /* 173 = freebsd6 freebsd32_pread */ + { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0 }, /* 174 = freebsd6 freebsd32_pwrite */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 175 = nosys */ { AS(ntp_adjtime_args), (sy_call_t *)ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0 }, /* 176 = ntp_adjtime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 177 = sfork */ @@ -235,11 +235,11 @@ struct sysent freebsd32_sysent[] = { { AS(__getrlimit_args), (sy_call_t *)getrlimit, AUE_GETRLIMIT, NULL, 0, 0 }, /* 194 = getrlimit */ { AS(__setrlimit_args), (sy_call_t *)setrlimit, AUE_SETRLIMIT, NULL, 0, 0 }, /* 195 = setrlimit */ { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0 }, /* 196 = freebsd32_getdirentries */ - { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0 }, /* 197 = old freebsd32_mmap */ + { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0 }, /* 197 = freebsd6 freebsd32_mmap */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 198 = __syscall */ - { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0 }, /* 199 = old freebsd32_lseek */ - { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0 }, /* 200 = old freebsd32_truncate */ - { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0 }, /* 201 = old freebsd32_ftruncate */ + { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0 }, /* 199 = freebsd6 freebsd32_lseek */ + { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0 }, /* 200 = freebsd6 freebsd32_truncate */ + { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0 }, /* 201 = freebsd6 freebsd32_ftruncate */ { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0 }, /* 202 = freebsd32_sysctl */ { AS(mlock_args), (sy_call_t *)mlock, AUE_MLOCK, NULL, 0, 0 }, /* 203 = mlock */ { AS(munlock_args), (sy_call_t *)munlock, AUE_MUNLOCK, NULL, 0, 0 }, /* 204 = munlock */ @@ -248,16 +248,16 @@ struct sysent freebsd32_sysent[] = { { AS(getpgid_args), (sy_call_t *)getpgid, AUE_GETPGID, NULL, 0, 0 }, /* 207 = getpgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 208 = newreboot */ { AS(poll_args), (sy_call_t *)poll, AUE_POLL, NULL, 0, 0 }, /* 209 = poll */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 210 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 211 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 212 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 213 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 214 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 215 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 216 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 217 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 218 = */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 219 = */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 210 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 211 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 212 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 213 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 214 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 215 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 216 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 217 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 218 = lkmnosys */ + { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0 }, /* 219 = lkmnosys */ { AS(freebsd32_semctl_args), (sy_call_t *)freebsd32_semctl, AUE_SEMCTL, NULL, 0, 0 }, /* 220 = freebsd32_semctl */ { AS(semget_args), (sy_call_t *)semget, AUE_SEMGET, NULL, 0, 0 }, /* 221 = semget */ { AS(semop_args), (sy_call_t *)semop, AUE_SEMOP, NULL, 0, 0 }, /* 222 = semop */ @@ -335,7 +335,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 294 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 295 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 296 = nosys */ - { compat4(AS(freebsd4_freebsd32_fhstatfs_args),freebsd32_fhstatfs), AUE_FHSTATFS, NULL, 0, 0 }, /* 297 = old freebsd32_fhstatfs */ + { compat4(AS(freebsd4_freebsd32_fhstatfs_args),freebsd32_fhstatfs), AUE_FHSTATFS, NULL, 0, 0 }, /* 297 = freebsd4 freebsd32_fhstatfs */ { AS(fhopen_args), (sy_call_t *)fhopen, AUE_FHOPEN, NULL, 0, 0 }, /* 298 = fhopen */ { AS(fhstat_args), (sy_call_t *)fhstat, AUE_FHSTAT, NULL, 0, 0 }, /* 299 = fhstat */ { AS(modnext_args), (sy_call_t *)modnext, AUE_NULL, NULL, 0, 0 }, /* 300 = modnext */ @@ -374,15 +374,15 @@ struct sysent freebsd32_sysent[] = { { AS(sched_get_priority_min_args), (sy_call_t *)sched_get_priority_min, AUE_NULL, NULL, 0, 0 }, /* 333 = sched_get_priority_min */ { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval, AUE_NULL, NULL, 0, 0 }, /* 334 = sched_rr_get_interval */ { AS(utrace_args), (sy_call_t *)utrace, AUE_NULL, NULL, 0, 0 }, /* 335 = utrace */ - { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0 }, /* 336 = old freebsd32_sendfile */ + { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0 }, /* 336 = freebsd4 freebsd32_sendfile */ { AS(kldsym_args), (sy_call_t *)kldsym, AUE_NULL, NULL, 0, 0 }, /* 337 = kldsym */ { AS(freebsd32_jail_args), (sy_call_t *)freebsd32_jail, AUE_JAIL, NULL, 0, 0 }, /* 338 = freebsd32_jail */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 339 = pioctl */ { AS(sigprocmask_args), (sy_call_t *)sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0 }, /* 340 = sigprocmask */ { AS(sigsuspend_args), (sy_call_t *)sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0 }, /* 341 = sigsuspend */ - { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0 }, /* 342 = old freebsd32_sigaction */ + { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0 }, /* 342 = freebsd4 freebsd32_sigaction */ { AS(sigpending_args), (sy_call_t *)sigpending, AUE_SIGPENDING, NULL, 0, 0 }, /* 343 = sigpending */ - { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0 }, /* 344 = old freebsd32_sigreturn */ + { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0 }, /* 344 = freebsd4 freebsd32_sigreturn */ { AS(freebsd32_sigtimedwait_args), (sy_call_t *)freebsd32_sigtimedwait, AUE_SIGWAIT, NULL, 0, 0 }, /* 345 = freebsd32_sigtimedwait */ { AS(freebsd32_sigwaitinfo_args), (sy_call_t *)freebsd32_sigwaitinfo, AUE_NULL, NULL, 0, 0 }, /* 346 = freebsd32_sigwaitinfo */ { AS(__acl_get_file_args), (sy_call_t *)__acl_get_file, AUE_NULL, NULL, 0, 0 }, /* 347 = __acl_get_file */ @@ -408,7 +408,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 367 = __cap_get_file */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 368 = __cap_set_fd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 369 = __cap_set_file */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 370 = lkmressys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 370 = nosys */ { AS(extattr_set_fd_args), (sy_call_t *)extattr_set_fd, AUE_EXTATTR_SET_FD, NULL, 0, 0 }, /* 371 = extattr_set_fd */ { AS(extattr_get_fd_args), (sy_call_t *)extattr_get_fd, AUE_EXTATTR_GET_FD, NULL, 0, 0 }, /* 372 = extattr_get_fd */ { AS(extattr_delete_fd_args), (sy_call_t *)extattr_delete_fd, AUE_EXTATTR_DELETE_FD, NULL, 0, 0 }, /* 373 = extattr_delete_fd */ Modified: stable/7/sys/kern/init_sysent.c ============================================================================== --- stable/7/sys/kern/init_sysent.c Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/kern/init_sysent.c Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ #include "opt_compat.h" @@ -46,7 +46,7 @@ struct sysent sysent[] = { { AS(chmod_args), (sy_call_t *)chmod, AUE_CHMOD, NULL, 0, 0 }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)chown, AUE_CHOWN, NULL, 0, 0 }, /* 16 = chown */ { AS(obreak_args), (sy_call_t *)obreak, AUE_NULL, NULL, 0, 0 }, /* 17 = break */ - { compat4(AS(freebsd4_getfsstat_args),getfsstat), AUE_GETFSSTAT, NULL, 0, 0 }, /* 18 = old getfsstat */ + { compat4(AS(freebsd4_getfsstat_args),getfsstat), AUE_GETFSSTAT, NULL, 0, 0 }, /* 18 = freebsd4 getfsstat */ { compat(AS(olseek_args),lseek), AUE_LSEEK, NULL, 0, 0 }, /* 19 = old lseek */ { 0, (sy_call_t *)getpid, AUE_GETPID, NULL, 0, 0 }, /* 20 = getpid */ { AS(mount_args), (sy_call_t *)mount, AUE_MOUNT, NULL, 0, 0 }, /* 21 = mount */ @@ -185,8 +185,8 @@ struct sysent sysent[] = { { AS(nlm_syscall_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 154 = nlm_syscall */ { AS(nfssvc_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 155 = nfssvc */ { compat(AS(ogetdirentries_args),getdirentries), AUE_GETDIRENTRIES, NULL, 0, 0 }, /* 156 = old getdirentries */ - { compat4(AS(freebsd4_statfs_args),statfs), AUE_STATFS, NULL, 0, 0 }, /* 157 = old statfs */ - { compat4(AS(freebsd4_fstatfs_args),fstatfs), AUE_FSTATFS, NULL, 0, 0 }, /* 158 = old fstatfs */ + { compat4(AS(freebsd4_statfs_args),statfs), AUE_STATFS, NULL, 0, 0 }, /* 157 = freebsd4 statfs */ + { compat4(AS(freebsd4_fstatfs_args),fstatfs), AUE_FSTATFS, NULL, 0, 0 }, /* 158 = freebsd4 fstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 159 = nosys */ { AS(lgetfh_args), (sy_call_t *)lgetfh, AUE_LGETFH, NULL, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0 }, /* 161 = getfh */ @@ -325,7 +325,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 294 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 295 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 296 = nosys */ - { compat4(AS(freebsd4_fhstatfs_args),fhstatfs), AUE_FHSTATFS, NULL, 0, 0 }, /* 297 = old fhstatfs */ + { compat4(AS(freebsd4_fhstatfs_args),fhstatfs), AUE_FHSTATFS, NULL, 0, 0 }, /* 297 = freebsd4 fhstatfs */ { AS(fhopen_args), (sy_call_t *)fhopen, AUE_FHOPEN, NULL, 0, 0 }, /* 298 = fhopen */ { AS(fhstat_args), (sy_call_t *)fhstat, AUE_FHSTAT, NULL, 0, 0 }, /* 299 = fhstat */ { AS(modnext_args), (sy_call_t *)modnext, AUE_NULL, NULL, 0, 0 }, /* 300 = modnext */ @@ -364,15 +364,15 @@ struct sysent sysent[] = { { AS(sched_get_priority_min_args), (sy_call_t *)sched_get_priority_min, AUE_NULL, NULL, 0, 0 }, /* 333 = sched_get_priority_min */ { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval, AUE_NULL, NULL, 0, 0 }, /* 334 = sched_rr_get_interval */ { AS(utrace_args), (sy_call_t *)utrace, AUE_NULL, NULL, 0, 0 }, /* 335 = utrace */ - { compat4(AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE, NULL, 0, 0 }, /* 336 = old sendfile */ + { compat4(AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE, NULL, 0, 0 }, /* 336 = freebsd4 sendfile */ { AS(kldsym_args), (sy_call_t *)kldsym, AUE_NULL, NULL, 0, 0 }, /* 337 = kldsym */ { AS(jail_args), (sy_call_t *)jail, AUE_JAIL, NULL, 0, 0 }, /* 338 = jail */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 339 = pioctl */ { AS(sigprocmask_args), (sy_call_t *)sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0 }, /* 340 = sigprocmask */ { AS(sigsuspend_args), (sy_call_t *)sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0 }, /* 341 = sigsuspend */ - { compat4(AS(freebsd4_sigaction_args),sigaction), AUE_SIGACTION, NULL, 0, 0 }, /* 342 = old sigaction */ + { compat4(AS(freebsd4_sigaction_args),sigaction), AUE_SIGACTION, NULL, 0, 0 }, /* 342 = freebsd4 sigaction */ { AS(sigpending_args), (sy_call_t *)sigpending, AUE_SIGPENDING, NULL, 0, 0 }, /* 343 = sigpending */ - { compat4(AS(freebsd4_sigreturn_args),sigreturn), AUE_SIGRETURN, NULL, 0, 0 }, /* 344 = old sigreturn */ + { compat4(AS(freebsd4_sigreturn_args),sigreturn), AUE_SIGRETURN, NULL, 0, 0 }, /* 344 = freebsd4 sigreturn */ { AS(sigtimedwait_args), (sy_call_t *)sigtimedwait, AUE_SIGWAIT, NULL, 0, 0 }, /* 345 = sigtimedwait */ { AS(sigwaitinfo_args), (sy_call_t *)sigwaitinfo, AUE_NULL, NULL, 0, 0 }, /* 346 = sigwaitinfo */ { AS(__acl_get_file_args), (sy_call_t *)__acl_get_file, AUE_NULL, NULL, 0, 0 }, /* 347 = __acl_get_file */ @@ -398,12 +398,12 @@ struct sysent sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 367 = __cap_get_file */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 368 = __cap_set_fd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 369 = __cap_set_file */ - { AS(nosys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 370 = lkmressys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 370 = nosys */ { AS(extattr_set_fd_args), (sy_call_t *)extattr_set_fd, AUE_EXTATTR_SET_FD, NULL, 0, 0 }, /* 371 = extattr_set_fd */ { AS(extattr_get_fd_args), (sy_call_t *)extattr_get_fd, AUE_EXTATTR_GET_FD, NULL, 0, 0 }, /* 372 = extattr_get_fd */ { AS(extattr_delete_fd_args), (sy_call_t *)extattr_delete_fd, AUE_EXTATTR_DELETE_FD, NULL, 0, 0 }, /* 373 = extattr_delete_fd */ { AS(__setugid_args), (sy_call_t *)__setugid, AUE_NULL, NULL, 0, 0 }, /* 374 = __setugid */ - { AS(nfsclnt_args), (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 375 = nfsclnt */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 375 = nfsclnt */ { AS(eaccess_args), (sy_call_t *)eaccess, AUE_EACCESS, NULL, 0, 0 }, /* 376 = eaccess */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 377 = afs_syscall */ { AS(nmount_args), (sy_call_t *)nmount, AUE_NMOUNT, NULL, 0, 0 }, /* 378 = nmount */ Modified: stable/7/sys/kern/syscalls.c ============================================================================== --- stable/7/sys/kern/syscalls.c Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/kern/syscalls.c Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ const char *syscallnames[] = { @@ -25,7 +25,7 @@ const char *syscallnames[] = { "chmod", /* 15 = chmod */ "chown", /* 16 = chown */ "break", /* 17 = break */ - "compat4.getfsstat", /* 18 = old getfsstat */ + "compat4.getfsstat", /* 18 = freebsd4 getfsstat */ "compat.lseek", /* 19 = old lseek */ "getpid", /* 20 = getpid */ "mount", /* 21 = mount */ @@ -164,8 +164,8 @@ const char *syscallnames[] = { "nlm_syscall", /* 154 = nlm_syscall */ "nfssvc", /* 155 = nfssvc */ "compat.getdirentries", /* 156 = old getdirentries */ - "compat4.statfs", /* 157 = old statfs */ - "compat4.fstatfs", /* 158 = old fstatfs */ + "compat4.statfs", /* 157 = freebsd4 statfs */ + "compat4.fstatfs", /* 158 = freebsd4 fstatfs */ "#159", /* 159 = nosys */ "lgetfh", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ @@ -304,7 +304,7 @@ const char *syscallnames[] = { "#294", /* 294 = nosys */ "#295", /* 295 = nosys */ "#296", /* 296 = nosys */ - "compat4.fhstatfs", /* 297 = old fhstatfs */ + "compat4.fhstatfs", /* 297 = freebsd4 fhstatfs */ "fhopen", /* 298 = fhopen */ "fhstat", /* 299 = fhstat */ "modnext", /* 300 = modnext */ @@ -343,15 +343,15 @@ const char *syscallnames[] = { "sched_get_priority_min", /* 333 = sched_get_priority_min */ "sched_rr_get_interval", /* 334 = sched_rr_get_interval */ "utrace", /* 335 = utrace */ - "compat4.sendfile", /* 336 = old sendfile */ + "compat4.sendfile", /* 336 = freebsd4 sendfile */ "kldsym", /* 337 = kldsym */ "jail", /* 338 = jail */ "#339", /* 339 = pioctl */ "sigprocmask", /* 340 = sigprocmask */ "sigsuspend", /* 341 = sigsuspend */ - "compat4.sigaction", /* 342 = old sigaction */ + "compat4.sigaction", /* 342 = freebsd4 sigaction */ "sigpending", /* 343 = sigpending */ - "compat4.sigreturn", /* 344 = old sigreturn */ + "compat4.sigreturn", /* 344 = freebsd4 sigreturn */ "sigtimedwait", /* 345 = sigtimedwait */ "sigwaitinfo", /* 346 = sigwaitinfo */ "__acl_get_file", /* 347 = __acl_get_file */ @@ -377,12 +377,12 @@ const char *syscallnames[] = { "#367", /* 367 = __cap_get_file */ "#368", /* 368 = __cap_set_fd */ "#369", /* 369 = __cap_set_file */ - "lkmressys", /* 370 = lkmressys */ + "#370", /* 370 = nosys */ "extattr_set_fd", /* 371 = extattr_set_fd */ "extattr_get_fd", /* 372 = extattr_get_fd */ "extattr_delete_fd", /* 373 = extattr_delete_fd */ "__setugid", /* 374 = __setugid */ - "nfsclnt", /* 375 = nfsclnt */ + "#375", /* 375 = nfsclnt */ "eaccess", /* 376 = eaccess */ "#377", /* 377 = afs_syscall */ "nmount", /* 378 = nmount */ Modified: stable/7/sys/kern/systrace_args.c ============================================================================== --- stable/7/sys/kern/systrace_args.c Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/kern/systrace_args.c Fri Jul 24 21:30:10 2009 (r195856) @@ -2016,11 +2016,6 @@ systrace_args(int sysnum, void *params, *n_args = 6; break; } - /* lkmressys */ - case 370: { - *n_args = 0; - break; - } /* extattr_set_fd */ case 371: { struct extattr_set_fd_args *p = params; @@ -2059,14 +2054,6 @@ systrace_args(int sysnum, void *params, *n_args = 1; break; } - /* nfsclnt */ - case 375: { - struct nfsclnt_args *p = params; - iarg[0] = p->flag; /* int */ - uarg[1] = (intptr_t) p->argp; /* caddr_t */ - *n_args = 2; - break; - } /* eaccess */ case 376: { struct eaccess_args *p = params; @@ -6188,9 +6175,6 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; - /* lkmressys */ - case 370: - break; /* extattr_set_fd */ case 371: switch(ndx) { @@ -6261,19 +6245,6 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; - /* nfsclnt */ - case 375: - switch(ndx) { - case 0: - p = "int"; - break; - case 1: - p = "caddr_t"; - break; - default: - break; - }; - break; /* eaccess */ case 376: switch(ndx) { Modified: stable/7/sys/sys/syscall.h ============================================================================== --- stable/7/sys/sys/syscall.h Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/sys/syscall.h Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ #define SYS_syscall 0 @@ -305,7 +305,6 @@ #define SYS_extattr_get_fd 372 #define SYS_extattr_delete_fd 373 #define SYS___setugid 374 -#define SYS_nfsclnt 375 #define SYS_eaccess 376 #define SYS_nmount 378 #define SYS_kse_exit 379 Modified: stable/7/sys/sys/syscall.mk ============================================================================== --- stable/7/sys/sys/syscall.mk Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/sys/syscall.mk Fri Jul 24 21:30:10 2009 (r195856) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/7/sys/kern/syscalls.master 195694 2009-07-14 19:48:31Z jhb +# created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb MIASM = \ syscall.o \ exit.o \ @@ -254,7 +254,6 @@ MIASM = \ extattr_get_fd.o \ extattr_delete_fd.o \ __setugid.o \ - nfsclnt.o \ eaccess.o \ nmount.o \ kse_exit.o \ Modified: stable/7/sys/sys/sysproto.h ============================================================================== --- stable/7/sys/sys/sysproto.h Fri Jul 24 20:35:44 2009 (r195855) +++ stable/7/sys/sys/sysproto.h Fri Jul 24 21:30:10 2009 (r195856) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/kern/syscalls.master 195694 2009-07-14 19:48:31Z jhb + * created from FreeBSD: stable/7/sys/kern/syscalls.master 195854 2009-07-24 19:35:06Z jhb */ #ifndef _SYS_SYSPROTO_H_ @@ -1091,10 +1091,6 @@ struct extattr_delete_fd_args { struct __setugid_args { char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; -struct nfsclnt_args { - char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; - char argp_l_[PADL_(caddr_t)]; caddr_t argp; char argp_r_[PADR_(caddr_t)]; -}; struct eaccess_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -1702,7 +1698,6 @@ int undelete(struct thread *, struct und int futimes(struct thread *, struct futimes_args *); int getpgid(struct thread *, struct getpgid_args *); int poll(struct thread *, struct poll_args *); -int lkmnosys(struct thread *, struct nosys_args *); int __semctl(struct thread *, struct __semctl_args *); int semget(struct thread *, struct semget_args *); int semop(struct thread *, struct semop_args *); @@ -1799,12 +1794,10 @@ int getresuid(struct thread *, struct ge int getresgid(struct thread *, struct getresgid_args *); int kqueue(struct thread *, struct kqueue_args *); int kevent(struct thread *, struct kevent_args *); -int lkmressys(struct thread *, struct nosys_args *); int extattr_set_fd(struct thread *, struct extattr_set_fd_args *); int extattr_get_fd(struct thread *, struct extattr_get_fd_args *); int extattr_delete_fd(struct thread *, struct extattr_delete_fd_args *); int __setugid(struct thread *, struct __setugid_args *); -int nfsclnt(struct thread *, struct nfsclnt_args *); int eaccess(struct thread *, struct eaccess_args *); int nmount(struct thread *, struct nmount_args *); int kse_exit(struct thread *, struct kse_exit_args *); @@ -2141,6 +2134,7 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_open AUE_OPEN_RWTC #define SYS_AUE_close AUE_CLOSE #define SYS_AUE_wait4 AUE_WAIT4 +#define SYS_AUE_ocreat AUE_CREAT #define SYS_AUE_link AUE_LINK #define SYS_AUE_unlink AUE_UNLINK #define SYS_AUE_chdir AUE_CHDIR @@ -2149,6 +2143,8 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_chmod AUE_CHMOD #define SYS_AUE_chown AUE_CHOWN #define SYS_AUE_break AUE_NULL +#define SYS_AUE_freebsd4_getfsstat AUE_GETFSSTAT +#define SYS_AUE_olseek AUE_LSEEK #define SYS_AUE_getpid AUE_GETPID #define SYS_AUE_mount AUE_MOUNT #define SYS_AUE_unmount AUE_UMOUNT @@ -2167,16 +2163,21 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_fchflags AUE_FCHFLAGS #define SYS_AUE_sync AUE_SYNC #define SYS_AUE_kill AUE_KILL +#define SYS_AUE_ostat AUE_STAT #define SYS_AUE_getppid AUE_GETPPID +#define SYS_AUE_olstat AUE_LSTAT #define SYS_AUE_dup AUE_DUP #define SYS_AUE_pipe AUE_PIPE #define SYS_AUE_getegid AUE_GETEGID #define SYS_AUE_profil AUE_PROFILE #define SYS_AUE_ktrace AUE_KTRACE +#define SYS_AUE_osigaction AUE_SIGACTION #define SYS_AUE_getgid AUE_GETGID +#define SYS_AUE_osigprocmask AUE_SIGPROCMASK #define SYS_AUE_getlogin AUE_GETLOGIN #define SYS_AUE_setlogin AUE_SETLOGIN #define SYS_AUE_acct AUE_ACCT +#define SYS_AUE_osigpending AUE_SIGPENDING #define SYS_AUE_sigaltstack AUE_SIGALTSTACK #define SYS_AUE_ioctl AUE_IOCTL #define SYS_AUE_reboot AUE_REBOOT @@ -2186,10 +2187,14 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_execve AUE_EXECVE #define SYS_AUE_umask AUE_UMASK #define SYS_AUE_chroot AUE_CHROOT +#define SYS_AUE_ofstat AUE_FSTAT +#define SYS_AUE_ogetkerninfo AUE_NULL +#define SYS_AUE_ogetpagesize AUE_NULL #define SYS_AUE_msync AUE_MSYNC #define SYS_AUE_vfork AUE_VFORK #define SYS_AUE_sbrk AUE_SBRK #define SYS_AUE_sstk AUE_SSTK +#define SYS_AUE_ommap AUE_MMAP #define SYS_AUE_vadvise AUE_O_VADVISE #define SYS_AUE_munmap AUE_MUNMAP #define SYS_AUE_mprotect AUE_MPROTECT @@ -2200,8 +2205,11 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_getpgrp AUE_GETPGRP #define SYS_AUE_setpgid AUE_SETPGRP #define SYS_AUE_setitimer AUE_SETITIMER +#define SYS_AUE_owait AUE_WAIT4 #define SYS_AUE_swapon AUE_SWAPON #define SYS_AUE_getitimer AUE_GETITIMER +#define SYS_AUE_ogethostname AUE_SYSCTL +#define SYS_AUE_osethostname AUE_SYSCTL #define SYS_AUE_getdtablesize AUE_GETDTABLESIZE #define SYS_AUE_dup2 AUE_DUP2 #define SYS_AUE_fcntl AUE_FCNTL @@ -2210,10 +2218,21 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_setpriority AUE_SETPRIORITY #define SYS_AUE_socket AUE_SOCKET #define SYS_AUE_connect AUE_CONNECT +#define SYS_AUE_oaccept AUE_ACCEPT #define SYS_AUE_getpriority AUE_GETPRIORITY +#define SYS_AUE_osend AUE_SEND +#define SYS_AUE_orecv AUE_RECV +#define SYS_AUE_osigreturn AUE_SIGRETURN #define SYS_AUE_bind AUE_BIND #define SYS_AUE_setsockopt AUE_SETSOCKOPT #define SYS_AUE_listen AUE_LISTEN +#define SYS_AUE_osigvec AUE_NULL +#define SYS_AUE_osigblock AUE_NULL +#define SYS_AUE_osigsetmask AUE_NULL +#define SYS_AUE_osigsuspend AUE_NULL +#define SYS_AUE_osigstack AUE_NULL +#define SYS_AUE_orecvmsg AUE_RECVMSG +#define SYS_AUE_osendmsg AUE_SENDMSG #define SYS_AUE_gettimeofday AUE_GETTIMEOFDAY #define SYS_AUE_getrusage AUE_GETRUSAGE #define SYS_AUE_getsockopt AUE_GETSOCKOPT @@ -2222,9 +2241,12 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_settimeofday AUE_SETTIMEOFDAY #define SYS_AUE_fchown AUE_FCHOWN #define SYS_AUE_fchmod AUE_FCHMOD +#define SYS_AUE_orecvfrom AUE_RECVFROM #define SYS_AUE_setreuid AUE_SETREUID #define SYS_AUE_setregid AUE_SETREGID #define SYS_AUE_rename AUE_RENAME +#define SYS_AUE_otruncate AUE_TRUNCATE +#define SYS_AUE_oftruncate AUE_FTRUNCATE #define SYS_AUE_flock AUE_FLOCK #define SYS_AUE_mkfifo AUE_MKFIFO #define SYS_AUE_sendto AUE_SENDTO @@ -2234,10 +2256,21 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_rmdir AUE_RMDIR #define SYS_AUE_utimes AUE_UTIMES #define SYS_AUE_adjtime AUE_ADJTIME +#define SYS_AUE_ogetpeername AUE_GETPEERNAME +#define SYS_AUE_ogethostid AUE_SYSCTL +#define SYS_AUE_osethostid AUE_SYSCTL +#define SYS_AUE_ogetrlimit AUE_GETRLIMIT +#define SYS_AUE_osetrlimit AUE_SETRLIMIT +#define SYS_AUE_okillpg AUE_KILLPG #define SYS_AUE_setsid AUE_SETSID #define SYS_AUE_quotactl AUE_QUOTACTL +#define SYS_AUE_oquota AUE_O_QUOTA +#define SYS_AUE_ogetsockname AUE_GETSOCKNAME #define SYS_AUE_nlm_syscall AUE_NULL #define SYS_AUE_nfssvc AUE_NFS_SVC +#define SYS_AUE_ogetdirentries AUE_GETDIRENTRIES +#define SYS_AUE_freebsd4_statfs AUE_STATFS +#define SYS_AUE_freebsd4_fstatfs AUE_FSTATFS #define SYS_AUE_lgetfh AUE_LGETFH #define SYS_AUE_getfh AUE_NFS_GETFH #define SYS_AUE_getdomainname AUE_SYSCTL @@ -2274,7 +2307,6 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_futimes AUE_FUTIMES #define SYS_AUE_getpgid AUE_GETPGID #define SYS_AUE_poll AUE_POLL -#define SYS_AUE_lkmnosys AUE_NULL #define SYS_AUE___semctl AUE_SEMCTL #define SYS_AUE_semget AUE_SEMGET #define SYS_AUE_semop AUE_SEMOP @@ -2312,6 +2344,7 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_nlstat AUE_LSTAT #define SYS_AUE_preadv AUE_PREADV #define SYS_AUE_pwritev AUE_PWRITEV +#define SYS_AUE_freebsd4_fhstatfs AUE_FHSTATFS #define SYS_AUE_fhopen AUE_FHOPEN #define SYS_AUE_fhstat AUE_FHSTAT #define SYS_AUE_modnext AUE_NULL @@ -2347,11 +2380,14 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_sched_get_priority_min AUE_NULL #define SYS_AUE_sched_rr_get_interval AUE_NULL #define SYS_AUE_utrace AUE_NULL +#define SYS_AUE_freebsd4_sendfile AUE_SENDFILE #define SYS_AUE_kldsym AUE_NULL #define SYS_AUE_jail AUE_JAIL #define SYS_AUE_sigprocmask AUE_SIGPROCMASK #define SYS_AUE_sigsuspend AUE_SIGSUSPEND +#define SYS_AUE_freebsd4_sigaction AUE_SIGACTION #define SYS_AUE_sigpending AUE_SIGPENDING +#define SYS_AUE_freebsd4_sigreturn AUE_SIGRETURN #define SYS_AUE_sigtimedwait AUE_SIGWAIT #define SYS_AUE_sigwaitinfo AUE_NULL #define SYS_AUE___acl_get_file AUE_NULL @@ -2371,12 +2407,10 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_getresgid AUE_GETRESGID #define SYS_AUE_kqueue AUE_KQUEUE #define SYS_AUE_kevent AUE_NULL -#define SYS_AUE_lkmressys AUE_NULL #define SYS_AUE_extattr_set_fd AUE_EXTATTR_SET_FD #define SYS_AUE_extattr_get_fd AUE_EXTATTR_GET_FD #define SYS_AUE_extattr_delete_fd AUE_EXTATTR_DELETE_FD #define SYS_AUE___setugid AUE_NULL -#define SYS_AUE_nfsclnt AUE_NULL #define SYS_AUE_eaccess AUE_EACCESS #define SYS_AUE_nmount AUE_NMOUNT #define SYS_AUE_kse_exit AUE_NULL From owner-svn-src-stable@FreeBSD.ORG Fri Jul 24 21:42:11 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F22F106566C; Fri, 24 Jul 2009 21:42:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF928FC15; Fri, 24 Jul 2009 21:42:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6OLgBwK022074; Fri, 24 Jul 2009 21:42:11 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6OLgA3K022060; Fri, 24 Jul 2009 21:42:10 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200907242142.n6OLgA3K022060@svn.freebsd.org> From: Brooks Davis Date: Fri, 24 Jul 2009 21:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195859 - in stable/7: lib/libc lib/libc/gen lib/libc/rpc lib/libc/sys usr.bin/id usr.bin/newgrp usr.bin/quota usr.sbin/chown usr.sbin/chroot usr.sbin/jail usr.sbin/jexec usr.sbin/lpr u... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 21:42:12 -0000 Author: brooks Date: Fri Jul 24 21:42:10 2009 New Revision: 195859 URL: http://svn.freebsd.org/changeset/base/195859 Log: MFC r194494 to improve support for 7.x worlds on >=8.0 kernels: In preparation for raising NGROUPS and NGROUPS_MAX, change base system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/gen/initgroups.3 stable/7/lib/libc/gen/initgroups.c stable/7/lib/libc/rpc/auth_unix.c stable/7/lib/libc/sys/getgroups.2 stable/7/lib/libc/sys/setgroups.2 stable/7/usr.bin/id/ (props changed) stable/7/usr.bin/id/id.c stable/7/usr.bin/newgrp/ (props changed) stable/7/usr.bin/newgrp/newgrp.c stable/7/usr.bin/quota/ (props changed) stable/7/usr.bin/quota/quota.c stable/7/usr.sbin/chown/ (props changed) stable/7/usr.sbin/chown/chown.c stable/7/usr.sbin/chroot/ (props changed) stable/7/usr.sbin/chroot/chroot.c stable/7/usr.sbin/jail/ (props changed) stable/7/usr.sbin/jail/jail.c stable/7/usr.sbin/jexec/ (props changed) stable/7/usr.sbin/jexec/jexec.c stable/7/usr.sbin/lpr/ (props changed) stable/7/usr.sbin/lpr/lpc/lpc.c Modified: stable/7/lib/libc/gen/initgroups.3 ============================================================================== --- stable/7/lib/libc/gen/initgroups.3 Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/lib/libc/gen/initgroups.3 Fri Jul 24 21:42:10 2009 (r195859) @@ -65,6 +65,13 @@ function may fail and set .Va errno for any of the errors specified for the library function .Xr setgroups 2 . +It may also return: +.Bl -tag -width Er +.It Bq Er ENOMEM +The +.Fn initgroups +function was unable to allocate temporary storage. +.El .Sh SEE ALSO .Xr setgroups 2 , .Xr getgrouplist 3 Modified: stable/7/lib/libc/gen/initgroups.c ============================================================================== --- stable/7/lib/libc/gen/initgroups.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/lib/libc/gen/initgroups.c Fri Jul 24 21:42:10 2009 (r195859) @@ -35,10 +35,12 @@ __FBSDID("$FreeBSD$"); #include -#include #include "namespace.h" #include #include "un-namespace.h" +#include +#include +#include #include int @@ -46,14 +48,21 @@ initgroups(uname, agroup) const char *uname; gid_t agroup; { - int ngroups; + int ngroups, ret; + long ngroups_max; + gid_t *groups; + /* - * Provide space for one group more than NGROUPS to allow + * Provide space for one group more than possible to allow * setgroups to fail and set errno. */ - gid_t groups[NGROUPS + 1]; + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 2; + if ((groups = malloc(sizeof(*groups) * ngroups_max)) == NULL) + return (ENOMEM); - ngroups = NGROUPS + 1; + ngroups = (int)ngroups_max; getgrouplist(uname, agroup, groups, &ngroups); - return (setgroups(ngroups, groups)); + ret = setgroups(ngroups, groups); + free(groups); + return (ret); } Modified: stable/7/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/7/lib/libc/rpc/auth_unix.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/lib/libc/rpc/auth_unix.c Fri Jul 24 21:42:10 2009 (r195859) @@ -185,23 +185,29 @@ authunix_create(machname, uid, gid, len, AUTH * authunix_create_default() { - int len; + int ngids; + long ngids_max; char machname[MAXHOSTNAMELEN + 1]; uid_t uid; gid_t gid; - gid_t gids[NGROUPS_MAX]; + gid_t *gids; + + ngids_max = sysconf(_SC_NGROUPS_MAX) + 1; + gids = malloc(sizeof(gid_t) * ngids_max); + if (gids == NULL) + return (NULL); if (gethostname(machname, sizeof machname) == -1) abort(); machname[sizeof(machname) - 1] = 0; uid = geteuid(); gid = getegid(); - if ((len = getgroups(NGROUPS_MAX, gids)) < 0) + if ((ngids = getgroups(ngids_max, gids)) < 0) abort(); - if (len > NGRPS) - len = NGRPS; + if (ngids > NGRPS) + ngids = NGRPS; /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, len, + return (authunix_create(machname, (int)uid, (int)gid, ngids, (int *)gids)); } Modified: stable/7/lib/libc/sys/getgroups.2 ============================================================================== --- stable/7/lib/libc/sys/getgroups.2 Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/lib/libc/sys/getgroups.2 Fri Jul 24 21:42:10 2009 (r195859) @@ -58,10 +58,7 @@ The system call returns the actual number of groups returned in .Fa gidset . -No more than -.Dv NGROUPS_MAX -will ever -be returned. +At least one and as many as {NGROUPS_MAX}+1 values may be returned. If .Fa gidsetlen is zero, @@ -92,6 +89,11 @@ an invalid address. .Sh SEE ALSO .Xr setgroups 2 , .Xr initgroups 3 +.Sh STANDARDS +The +.Fn getgroups +system call conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn getgroups Modified: stable/7/lib/libc/sys/setgroups.2 ============================================================================== --- stable/7/lib/libc/sys/setgroups.2 Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/lib/libc/sys/setgroups.2 Fri Jul 24 21:42:10 2009 (r195859) @@ -53,9 +53,7 @@ The argument indicates the number of entries in the array and must be no more than -.Dv NGROUPS , -as defined in -.In sys/param.h . +.Dv {NGROUPS_MAX}+1 . .Pp Only the super-user may set new groups. .Sh RETURN VALUES @@ -71,7 +69,7 @@ The caller is not the super-user. The number specified in the .Fa ngroups argument is larger than the -.Dv NGROUPS +.Dv {NGROUPS_MAX}+1 limit. .It Bq Er EFAULT The address specified for Modified: stable/7/usr.bin/id/id.c ============================================================================== --- stable/7/usr.bin/id/id.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.bin/id/id.c Fri Jul 24 21:42:10 2009 (r195859) @@ -258,7 +258,8 @@ id_print(struct passwd *pw, int use_ggl, gid_t gid, egid, lastgid; uid_t uid, euid; int cnt, ngroups; - gid_t groups[NGROUPS + 1]; + long ngroups_max; + gid_t *groups; const char *fmt; if (pw != NULL) { @@ -270,12 +271,16 @@ id_print(struct passwd *pw, int use_ggl, gid = getgid(); } + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL) + err(1, "malloc"); + if (use_ggl && pw != NULL) { - ngroups = NGROUPS + 1; + ngroups = ngroups_max; getgrouplist(pw->pw_name, gid, groups, &ngroups); } else { - ngroups = getgroups(NGROUPS + 1, groups); + ngroups = getgroups(ngroups_max, groups); } if (pw != NULL) @@ -306,6 +311,7 @@ id_print(struct passwd *pw, int use_ggl, lastgid = gid; } printf("\n"); + free(groups); } #ifdef USE_BSM_AUDIT @@ -361,15 +367,19 @@ group(struct passwd *pw, int nflag) { struct group *gr; int cnt, id, lastid, ngroups; - gid_t groups[NGROUPS + 1]; + long ngroups_max; + gid_t *groups; const char *fmt; + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups = malloc(sizeof(gid_t) * (ngroups_max))) == NULL) + err(1, "malloc"); + if (pw) { - ngroups = NGROUPS + 1; + ngroups = ngroups_max; (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); } else { - groups[0] = getgid(); - ngroups = getgroups(NGROUPS, groups + 1) + 1; + ngroups = getgroups(ngroups_max, groups); } fmt = nflag ? "%s" : "%u"; for (lastid = -1, cnt = 0; cnt < ngroups; ++cnt) { @@ -389,6 +399,7 @@ group(struct passwd *pw, int nflag) lastid = id; } (void)printf("\n"); + free(groups); } void Modified: stable/7/usr.bin/newgrp/newgrp.c ============================================================================== --- stable/7/usr.bin/newgrp/newgrp.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.bin/newgrp/newgrp.c Fri Jul 24 21:42:10 2009 (r195859) @@ -146,8 +146,8 @@ restoregrps(void) static void addgroup(const char *grpname) { - gid_t grps[NGROUPS_MAX]; - long lgid; + gid_t *grps; + long lgid, ngrps_max; int dbmember, i, ngrps; gid_t egid; struct group *grp; @@ -185,7 +185,10 @@ addgroup(const char *grpname) } } - if ((ngrps = getgroups(NGROUPS_MAX, (gid_t *)grps)) < 0) { + ngrps_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((grps = malloc(sizeof(gid_t) * ngrps_max)) == NULL) + err(1, "malloc"); + if ((ngrps = getgroups(ngrps_max, (gid_t *)grps)) < 0) { warn("getgroups"); return; } @@ -217,7 +220,7 @@ addgroup(const char *grpname) /* Add old effective gid to supp. list if it does not exist. */ if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) { - if (ngrps == NGROUPS_MAX) + if (ngrps == ngrps_max) warnx("too many groups"); else { grps[ngrps++] = egid; @@ -231,6 +234,7 @@ addgroup(const char *grpname) } } + free(grps); } static int Modified: stable/7/usr.bin/quota/quota.c ============================================================================== --- stable/7/usr.bin/quota/quota.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.bin/quota/quota.c Fri Jul 24 21:42:10 2009 (r195859) @@ -117,7 +117,8 @@ int main(int argc, char *argv[]) { int ngroups; - gid_t mygid, gidset[NGROUPS]; + long ngroups_max; + gid_t mygid, *gidset; int i, ch, gflag = 0, uflag = 0, errflag = 0; while ((ch = getopt(argc, argv, "f:ghlrquv")) != -1) { @@ -159,13 +160,18 @@ main(int argc, char *argv[]) errflag += showuid(getuid()); if (gflag) { mygid = getgid(); - ngroups = getgroups(NGROUPS, gidset); + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((gidset = malloc(sizeof(gid_t) * ngroups_max)) + == NULL) + err(1, "malloc"); + ngroups = getgroups(ngroups_max, gidset); if (ngroups < 0) err(1, "getgroups"); errflag += showgid(mygid); for (i = 0; i < ngroups; i++) if (gidset[i] != mygid) errflag += showgid(gidset[i]); + free(gidset); } return(errflag); } Modified: stable/7/usr.sbin/chown/chown.c ============================================================================== --- stable/7/usr.sbin/chown/chown.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.sbin/chown/chown.c Fri Jul 24 21:42:10 2009 (r195859) @@ -269,7 +269,8 @@ chownerr(const char *file) { static uid_t euid = -1; static int ngroups = -1; - gid_t groups[NGROUPS_MAX]; + static long ngroups_max; + gid_t *groups; /* Check for chown without being root. */ if (errno != EPERM || (uid != (uid_t)-1 && @@ -281,7 +282,10 @@ chownerr(const char *file) /* Check group membership; kernel just returns EPERM. */ if (gid != (gid_t)-1 && ngroups == -1 && euid == (uid_t)-1 && (euid = geteuid()) != 0) { - ngroups = getgroups(NGROUPS_MAX, groups); + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL) + err(1, "malloc"); + ngroups = getgroups(ngroups_max, groups); while (--ngroups >= 0 && gid != groups[ngroups]); if (ngroups < 0) { warnx("you are not a member of group %s", gname); Modified: stable/7/usr.sbin/chroot/chroot.c ============================================================================== --- stable/7/usr.sbin/chroot/chroot.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.sbin/chroot/chroot.c Fri Jul 24 21:42:10 2009 (r195859) @@ -69,9 +69,10 @@ main(argc, argv) struct passwd *pw; char *endp, *p; const char *shell; - gid_t gid, gidlist[NGROUPS_MAX]; + gid_t gid, *gidlist; uid_t uid; int ch, gids; + long ngroups_max; gid = 0; uid = 0; @@ -117,8 +118,11 @@ main(argc, argv) } } + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((gidlist = malloc(sizeof(gid_t) * ngroups_max)) == NULL) + err(1, "malloc"); for (gids = 0; - (p = strsep(&grouplist, ",")) != NULL && gids < NGROUPS_MAX; ) { + (p = strsep(&grouplist, ",")) != NULL && gids < ngroups_max; ) { if (*p == '\0') continue; @@ -135,7 +139,7 @@ main(argc, argv) } gids++; } - if (p != NULL && gids == NGROUPS_MAX) + if (p != NULL && gids == ngroups_max) errx(1, "too many supplementary groups provided"); if (user != NULL) { Modified: stable/7/usr.sbin/jail/jail.c ============================================================================== --- stable/7/usr.sbin/jail/jail.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.sbin/jail/jail.c Fri Jul 24 21:42:10 2009 (r195859) @@ -68,7 +68,7 @@ STAILQ_HEAD(addr6head, addr6entry) addr6 lcap = login_getpwclass(pwd); \ if (lcap == NULL) \ err(1, "getpwclass: %s", username); \ - ngroups = NGROUPS; \ + ngroups = ngroups_max; \ if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) != 0) \ err(1, "getgrouplist: %s", username); \ } while (0) @@ -79,9 +79,10 @@ main(int argc, char **argv) login_cap_t *lcap = NULL; struct jail j; struct passwd *pwd = NULL; - gid_t groups[NGROUPS]; + gid_t *groups; int ch, error, i, ngroups, securelevel; int hflag, iflag, Jflag, lflag, uflag, Uflag; + long ngroups_max; char path[PATH_MAX], *jailname, *ep, *username, *JidFile, *ip; static char *cleanenv; const char *shell, *p = NULL; @@ -94,6 +95,10 @@ main(int argc, char **argv) jailname = username = JidFile = cleanenv = NULL; fp = NULL; + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL) + err(1, "malloc"); + while ((ch = getopt(argc, argv, "hiln:s:u:U:J:")) != -1) { switch (ch) { case 'h': Modified: stable/7/usr.sbin/jexec/jexec.c ============================================================================== --- stable/7/usr.sbin/jexec/jexec.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.sbin/jexec/jexec.c Fri Jul 24 21:42:10 2009 (r195859) @@ -202,7 +202,7 @@ lookup_jail(int jid, char *jailname) lcap = login_getpwclass(pwd); \ if (lcap == NULL) \ err(1, "getpwclass: %s", username); \ - ngroups = NGROUPS; \ + ngroups = ngroups_max; \ if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) != 0) \ err(1, "getgrouplist: %s", username); \ } while (0) @@ -213,14 +213,19 @@ main(int argc, char *argv[]) int jid; login_cap_t *lcap = NULL; struct passwd *pwd = NULL; - gid_t groups[NGROUPS]; + gid_t *groups = NULL; int ch, ngroups, uflag, Uflag; + long ngroups_max; char *jailname, *username; ch = uflag = Uflag = 0; jailname = username = NULL; jid = -1; + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL) + err(1, "malloc"); + while ((ch = getopt(argc, argv, "i:n:u:U:")) != -1) { switch (ch) { case 'n': Modified: stable/7/usr.sbin/lpr/lpc/lpc.c ============================================================================== --- stable/7/usr.sbin/lpr/lpc/lpc.c Fri Jul 24 21:38:51 2009 (r195858) +++ stable/7/usr.sbin/lpr/lpc/lpc.c Fri Jul 24 21:42:10 2009 (r195859) @@ -356,7 +356,8 @@ ingroup(const char *grname) { static struct group *gptr=NULL; static int ngroups = 0; - static gid_t groups[NGROUPS]; + static long ngroups_max; + static gid_t *groups; register gid_t gid; register int i; @@ -365,7 +366,10 @@ ingroup(const char *grname) warnx("warning: unknown group '%s'", grname); return(0); } - ngroups = getgroups(NGROUPS, groups); + ngroups_max = sysconf(_SC_NGROUPS_MAX); + if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL) + err(1, "malloc"); + ngroups = getgroups(ngroups_max, groups); if (ngroups < 0) err(1, "getgroups"); } From owner-svn-src-stable@FreeBSD.ORG Sat Jul 25 02:22:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6EFF106566B; Sat, 25 Jul 2009 02:22:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA7348FC20; Sat, 25 Jul 2009 02:22:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6P2MAS4027593; Sat, 25 Jul 2009 02:22:10 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6P2MAah027591; Sat, 25 Jul 2009 02:22:10 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200907250222.n6P2MAah027591@svn.freebsd.org> From: Ed Maste Date: Sat, 25 Jul 2009 02:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195860 - in stable/7/sys: . boot/i386/libi386 contrib/pf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2009 02:22:11 -0000 Author: emaste Date: Sat Jul 25 02:22:10 2009 New Revision: 195860 URL: http://svn.freebsd.org/changeset/base/195860 Log: MFC r179825 by olli: Implement a workaround for a long-standing problem in libi386's time(), caused by a qemu bug. The bug might be present in other BIOSes, too. qemu either does not simulate the AT RTC correctly or has a broken BIOS 1A/02 implementation, and will return an incorrect value if the RTC is read while it is being updated. The effect is worsened by the fact that qemu's INT 15/86 function ("wait" a.k.a. usleep) is non-implmeneted or broken and returns immediately, causing beastie.4th to spin in a tight loop calling the "read RTC" function millions of times, triggering the problem quickly. Therefore, we keep reading the BIOS value until we get the same result twice. This change fixes beastie.4th's countdown under qemu. Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/libi386/time.c stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/i386/libi386/time.c ============================================================================== --- stable/7/sys/boot/i386/libi386/time.c Fri Jul 24 21:42:10 2009 (r195859) +++ stable/7/sys/boot/i386/libi386/time.c Sat Jul 25 02:22:10 2009 (r195860) @@ -32,18 +32,16 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libi386.h" +static int bios_seconds(void); + /* - * Return the time in seconds since the beginning of the day. - * - * If we pass midnight, don't wrap back to 0. + * Return the BIOS time-of-day value. * * XXX uses undocumented BCD support from libstand. */ - -time_t -time(time_t *t) +static int +bios_seconds(void) { - static time_t lasttime, now; int hr, minute, sec; v86.ctl = 0; @@ -55,7 +53,33 @@ time(time_t *t) minute = bcd2bin(v86.ecx & 0xff); /* minute in %cl */ sec = bcd2bin((v86.edx & 0xff00) >> 8); /* second in %dh */ - now = hr * 3600 + minute * 60 + sec; + return (hr * 3600 + minute * 60 + sec); +} + +/* + * Return the time in seconds since the beginning of the day. + * + * Some BIOSes (notably qemu) don't correctly read the RTC + * registers in an atomic way, sometimes returning bogus values. + * Therefore we "debounce" the reading by accepting it only when + * we got two identical values in succession. + * + * If we pass midnight, don't wrap back to 0. + */ +time_t +time(time_t *t) +{ + static time_t lasttime; + time_t now, check; + int try; + + try = 0; + check = bios_seconds(); + do { + now = check; + check = bios_seconds(); + } while (now != check && ++try < 1000); + if (now < lasttime) now += 24 * 3600; lasttime = now; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 25 02:37:59 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 889251065672; Sat, 25 Jul 2009 02:37:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4AC8FC14; Sat, 25 Jul 2009 02:37:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6P2bxiL027927; Sat, 25 Jul 2009 02:37:59 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6P2bx4a027925; Sat, 25 Jul 2009 02:37:59 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200907250237.n6P2bx4a027925@svn.freebsd.org> From: Ed Maste Date: Sat, 25 Jul 2009 02:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195861 - in stable/6/sys: . boot/i386/libi386 contrib/pf dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2009 02:38:00 -0000 Author: emaste Date: Sat Jul 25 02:37:59 2009 New Revision: 195861 URL: http://svn.freebsd.org/changeset/base/195861 Log: MFC r179825 by olli: Implement a workaround for a long-standing problem in libi386's time(), caused by a qemu bug. The bug might be present in other BIOSes, too. qemu either does not simulate the AT RTC correctly or has a broken BIOS 1A/02 implementation, and will return an incorrect value if the RTC is read while it is being updated. The effect is worsened by the fact that qemu's INT 15/86 function ("wait" a.k.a. usleep) is non-implmeneted or broken and returns immediately, causing beastie.4th to spin in a tight loop calling the "read RTC" function millions of times, triggering the problem quickly. Therefore, we keep reading the BIOS value until we get the same result twice. This change fixes beastie.4th's countdown under qemu. Modified: stable/6/sys/ (props changed) stable/6/sys/boot/i386/libi386/time.c stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/i386/libi386/time.c ============================================================================== --- stable/6/sys/boot/i386/libi386/time.c Sat Jul 25 02:22:10 2009 (r195860) +++ stable/6/sys/boot/i386/libi386/time.c Sat Jul 25 02:37:59 2009 (r195861) @@ -32,18 +32,16 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libi386.h" +static int bios_seconds(void); + /* - * Return the time in seconds since the beginning of the day. - * - * If we pass midnight, don't wrap back to 0. + * Return the BIOS time-of-day value. * * XXX uses undocumented BCD support from libstand. */ - -time_t -time(time_t *t) +static int +bios_seconds(void) { - static time_t lasttime, now; int hr, minute, sec; v86.ctl = 0; @@ -55,7 +53,33 @@ time(time_t *t) minute = bcd2bin(v86.ecx & 0xff); /* minute in %cl */ sec = bcd2bin((v86.edx & 0xff00) >> 8); /* second in %dh */ - now = hr * 3600 + minute * 60 + sec; + return (hr * 3600 + minute * 60 + sec); +} + +/* + * Return the time in seconds since the beginning of the day. + * + * Some BIOSes (notably qemu) don't correctly read the RTC + * registers in an atomic way, sometimes returning bogus values. + * Therefore we "debounce" the reading by accepting it only when + * we got two identical values in succession. + * + * If we pass midnight, don't wrap back to 0. + */ +time_t +time(time_t *t) +{ + static time_t lasttime; + time_t now, check; + int try; + + try = 0; + check = bios_seconds(); + do { + now = check; + check = bios_seconds(); + } while (now != check && ++try < 1000); + if (now < lasttime) now += 24 * 3600; lasttime = now; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 25 11:10:02 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18DCC106566B; Sat, 25 Jul 2009 11:10:02 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 060CC8FC0A; Sat, 25 Jul 2009 11:10:02 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6PBA1XS039338; Sat, 25 Jul 2009 11:10:01 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6PBA10l039335; Sat, 25 Jul 2009 11:10:01 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200907251110.n6PBA10l039335@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 25 Jul 2009 11:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195866 - in stable/7/sys: . boot/pc98/libpc98 contrib/pf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2009 11:10:02 -0000 Author: nyan Date: Sat Jul 25 11:10:01 2009 New Revision: 195866 URL: http://svn.freebsd.org/changeset/base/195866 Log: MFC: r190126 Reduce diffs against i386. Modified: stable/7/sys/ (props changed) stable/7/sys/boot/pc98/libpc98/time.c stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/pc98/libpc98/time.c ============================================================================== --- stable/7/sys/boot/pc98/libpc98/time.c Sat Jul 25 10:22:51 2009 (r195865) +++ stable/7/sys/boot/pc98/libpc98/time.c Sat Jul 25 11:10:01 2009 (r195866) @@ -33,23 +33,21 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libi386.h" +static int bios_seconds(void); + /* - * Return the time in seconds since the beginning of the day. - * - * If we pass midnight, don't wrap back to 0. + * Return the BIOS time-of-day value. * * XXX uses undocumented BCD support from libstand. */ - -time_t -time(time_t *t) +static int +bios_seconds(void) { - static time_t lasttime, now; int hr, minute, sec; unsigned char bios_time[6]; - + v86.ctl = 0; - v86.addr = 0x1c; /* int 0x1c, function 0 */ + v86.addr = 0x1c; /* int 0x1c, function 0 */ v86.eax = 0x0000; v86.es = VTOPSEG(bios_time); v86.ebx = VTOPOFF(bios_time); @@ -59,7 +57,20 @@ time(time_t *t) minute = bcd2bin(bios_time[4]); sec = bcd2bin(bios_time[5]); - now = hr * 3600 + minute * 60 + sec; + return (hr * 3600 + minute * 60 + sec); +} + +/* + * Return the time in seconds since the beginning of the day. + */ +time_t +time(time_t *t) +{ + static time_t lasttime; + time_t now; + + now = bios_seconds(); + if (now < lasttime) now += 24 * 3600; lasttime = now; From owner-svn-src-stable@FreeBSD.ORG Sat Jul 25 11:10:51 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7106106566C; Sat, 25 Jul 2009 11:10:51 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A44708FC25; Sat, 25 Jul 2009 11:10:51 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6PBApdH039395; Sat, 25 Jul 2009 11:10:51 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6PBApsD039393; Sat, 25 Jul 2009 11:10:51 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200907251110.n6PBApsD039393@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 25 Jul 2009 11:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195867 - in stable/6/sys: . boot/pc98/libpc98 contrib/pf dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2009 11:10:52 -0000 Author: nyan Date: Sat Jul 25 11:10:51 2009 New Revision: 195867 URL: http://svn.freebsd.org/changeset/base/195867 Log: MFC: r190126 Reduce diffs against i386. Modified: stable/6/sys/ (props changed) stable/6/sys/boot/pc98/libpc98/time.c stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/pc98/libpc98/time.c ============================================================================== --- stable/6/sys/boot/pc98/libpc98/time.c Sat Jul 25 11:10:01 2009 (r195866) +++ stable/6/sys/boot/pc98/libpc98/time.c Sat Jul 25 11:10:51 2009 (r195867) @@ -33,23 +33,21 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libi386.h" +static int bios_seconds(void); + /* - * Return the time in seconds since the beginning of the day. - * - * If we pass midnight, don't wrap back to 0. + * Return the BIOS time-of-day value. * * XXX uses undocumented BCD support from libstand. */ - -time_t -time(time_t *t) +static int +bios_seconds(void) { - static time_t lasttime, now; int hr, minute, sec; unsigned char bios_time[6]; - + v86.ctl = 0; - v86.addr = 0x1c; /* int 0x1c, function 0 */ + v86.addr = 0x1c; /* int 0x1c, function 0 */ v86.eax = 0x0000; v86.es = VTOPSEG(bios_time); v86.ebx = VTOPOFF(bios_time); @@ -59,7 +57,20 @@ time(time_t *t) minute = bcd2bin(bios_time[4]); sec = bcd2bin(bios_time[5]); - now = hr * 3600 + minute * 60 + sec; + return (hr * 3600 + minute * 60 + sec); +} + +/* + * Return the time in seconds since the beginning of the day. + */ +time_t +time(time_t *t) +{ + static time_t lasttime; + time_t now; + + now = bios_seconds(); + if (now < lasttime) now += 24 * 3600; lasttime = now;