From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 00:44:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19F4E106566C; Sun, 30 Sep 2012 00:44:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC93F8FC0A; Sun, 30 Sep 2012 00:44:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U0iO5q029105; Sun, 30 Sep 2012 00:44:24 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U0iOKb029092; Sun, 30 Sep 2012 00:44:24 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201209300044.q8U0iOKb029092@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 30 Sep 2012 00:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241059 - in stable/9: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 00:44:25 -0000 Author: pfg Date: Sun Sep 30 00:44:24 2012 New Revision: 241059 URL: http://svn.freebsd.org/changeset/base/241059 Log: MFC r241007, r241008: Complete revert of r239963 (from head). The attempt to merge changes from the linux libtirpc caused rpc.lockd to exit after startup under unclear conditions. Reported by: David Wolfskill Modified: stable/9/include/rpc/auth.h stable/9/include/rpc/auth_unix.h stable/9/lib/libc/rpc/auth_unix.c stable/9/lib/libc/rpc/authunix_prot.c stable/9/lib/libc/rpc/clnt_perror.c stable/9/lib/libc/rpc/rpc_generic.c stable/9/lib/libc/rpc/rpc_soc.3 stable/9/lib/libc/rpc/rpcb_clnt.c stable/9/lib/libc/rpc/svc_auth_unix.c stable/9/lib/libc/rpc/svc_run.c stable/9/sys/rpc/auth.h stable/9/sys/rpc/rpcb_clnt.c Modified: stable/9/include/rpc/auth.h ============================================================================== --- stable/9/include/rpc/auth.h Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/include/rpc/auth.h Sun Sep 30 00:44:24 2012 (r241059) @@ -243,13 +243,14 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * int uid; + * int gid; * int len; - * gid_t *aup_gids; + * int *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, int, int, int, + int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: stable/9/include/rpc/auth_unix.h ============================================================================== --- stable/9/include/rpc/auth_unix.h Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/include/rpc/auth_unix.h Sun Sep 30 00:44:24 2012 (r241059) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - uid_t aup_uid; - gid_t aup_gid; + int aup_uid; + int aup_gid; u_int aup_len; - gid_t *aup_gids; + int *aup_gids; }; #define authsys_parms authunix_parms Modified: stable/9/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/9/lib/libc/rpc/auth_unix.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/auth_unix.c Sun Sep 30 00:44:24 2012 (r241059) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - uid_t uid; - gid_t gid; + int uid; + int gid; int len; - gid_t *aup_gids; + int *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -207,7 +207,9 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; - auth = authunix_create(machname, uid, gid, ngids, gids); + /* XXX: interface problem; those should all have been unsigned */ + auth = authunix_create(machname, (int)uid, (int)gid, ngids, + (int *)gids); free(gids); return (auth); } Modified: stable/9/lib/libc/rpc/authunix_prot.c ============================================================================== --- stable/9/lib/libc/rpc/authunix_prot.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/authunix_prot.c Sun Sep 30 00:44:24 2012 (r241059) @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - gid_t **paup_gids; + int **paup_gids; assert(xdrs != NULL); assert(p != NULL); @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_u_int(xdrs, &(p->aup_uid)) - && xdr_u_int(xdrs, &(p->aup_gid)) + && xdr_int(xdrs, &(p->aup_uid)) + && xdr_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); Modified: stable/9/lib/libc/rpc/clnt_perror.c ============================================================================== --- stable/9/lib/libc/rpc/clnt_perror.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/clnt_perror.c Sun Sep 30 00:44:24 2012 (r241059) @@ -242,7 +242,7 @@ char * clnt_spcreateerror(s) const char *s; { - char *str, *err; + char *str; size_t len, i; assert(s != NULL); @@ -258,21 +258,8 @@ clnt_spcreateerror(s) switch (rpc_createerr.cf_stat) { case RPC_PMAPFAILURE: (void) strncat(str, " - ", len - 1); - err = clnt_sperrno(rpc_createerr.cf_error.re_status); - if (err) - (void) strncat(str, err+5, len-5); - switch(rpc_createerr.cf_error.re_status) { - case RPC_CANTSEND: - case RPC_CANTRECV: - i = strlen(str); - len -= i; - snprintf(str+i, len, ": errno %d (%s)", - rpc_createerr.cf_error.re_errno, - strerror(rpc_createerr.cf_error.re_errno)); - break; - default: - break; - } + (void) strncat(str, + clnt_sperrno(rpc_createerr.cf_error.re_status), len - 4); break; case RPC_SYSTEMERROR: Modified: stable/9/lib/libc/rpc/rpc_generic.c ============================================================================== --- stable/9/lib/libc/rpc/rpc_generic.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/rpc_generic.c Sun Sep 30 00:44:24 2012 (r241059) @@ -269,8 +269,7 @@ __rpc_getconfip(nettype) } while ((nconf = getnetconfig(confighandle)) != NULL) { if (strcmp(nconf->nc_protofmly, NC_INET) == 0) { - if (strcmp(nconf->nc_proto, NC_TCP) == 0 && - netid_tcp == NULL) { + if (strcmp(nconf->nc_proto, NC_TCP) == 0) { netid_tcp = strdup(nconf->nc_netid); if (main_thread) netid_tcp_main = netid_tcp; @@ -278,8 +277,7 @@ __rpc_getconfip(nettype) thr_setspecific(tcp_key, (void *) netid_tcp); } else - if (strcmp(nconf->nc_proto, NC_UDP) == 0 && - netid_udp == NULL) { + if (strcmp(nconf->nc_proto, NC_UDP) == 0) { netid_udp = strdup(nconf->nc_netid); if (main_thread) netid_udp_main = netid_udp; @@ -618,9 +616,6 @@ __rpc_taddr2uaddr_af(int af, const struc #endif u_int16_t port; - if (nbuf->len <= 0) - return NULL; - switch (af) { case AF_INET: sin = nbuf->buf; Modified: stable/9/lib/libc/rpc/rpc_soc.3 ============================================================================== --- stable/9/lib/libc/rpc/rpc_soc.3 Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/rpc_soc.3 Sun Sep 30 00:44:24 2012 (r241059) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids" +.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids" .Xc .Pp Create and return an Modified: stable/9/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/9/lib/libc/rpc/rpcb_clnt.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/rpcb_clnt.c Sun Sep 30 00:44:24 2012 (r241059) @@ -770,13 +770,6 @@ __rpcb_findaddr_timed(program, version, } parms.r_addr = NULL; - parms.r_netid = nconf->nc_netid; - - /* - * According to wire captures, the reference implementation - * (OpenSolaris) sends a blank string here too. - */ - parms.r_owner = ""; /* * Use default total timeout if no timeout is specified. Modified: stable/9/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- stable/9/lib/libc/rpc/svc_auth_unix.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/svc_auth_unix.c Sun Sep 30 00:44:24 2012 (r241059) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - gid_t area_gids[NGRPS]; + int area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: stable/9/lib/libc/rpc/svc_run.c ============================================================================== --- stable/9/lib/libc/rpc/svc_run.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/lib/libc/rpc/svc_run.c Sun Sep 30 00:44:24 2012 (r241059) @@ -60,13 +60,14 @@ svc_run() fd_set readfds, cleanfds; struct timeval timeout; + timeout.tv_sec = 30; + timeout.tv_usec = 0; + for (;;) { rwlock_rdlock(&svc_fd_lock); readfds = svc_fdset; cleanfds = svc_fdset; rwlock_unlock(&svc_fd_lock); - timeout.tv_sec = 30; - timeout.tv_usec = 0; switch (_select(svc_maxfd+1, &readfds, NULL, NULL, &timeout)) { case -1: FD_ZERO(&readfds); Modified: stable/9/sys/rpc/auth.h ============================================================================== --- stable/9/sys/rpc/auth.h Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/sys/rpc/auth.h Sun Sep 30 00:44:24 2012 (r241059) @@ -234,17 +234,18 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * int uid; + * int gid; * int len; - * gid_t *aup_gids; + * int *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, int, int, int, + int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ Modified: stable/9/sys/rpc/rpcb_clnt.c ============================================================================== --- stable/9/sys/rpc/rpcb_clnt.c Sat Sep 29 22:28:00 2012 (r241058) +++ stable/9/sys/rpc/rpcb_clnt.c Sun Sep 30 00:44:24 2012 (r241059) @@ -780,13 +780,6 @@ __rpcb_findaddr_timed(program, version, } parms.r_addr = NULL; - parms.r_netid = nconf->nc_netid; - - /* - * According to wire captures, the reference implementation - * (OpenSolaris) sends a blank string here too. - */ - parms.r_owner = ""; /* * Use default total timeout if no timeout is specified. From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 00:44:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 748C210657C2; Sun, 30 Sep 2012 00:44:54 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D8498FC08; Sun, 30 Sep 2012 00:44:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U0isOX029213; Sun, 30 Sep 2012 00:44:54 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U0is91029200; Sun, 30 Sep 2012 00:44:54 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201209300044.q8U0is91029200@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 30 Sep 2012 00:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241060 - in stable/8: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 00:44:54 -0000 Author: pfg Date: Sun Sep 30 00:44:53 2012 New Revision: 241060 URL: http://svn.freebsd.org/changeset/base/241060 Log: MFC r241007, r241008: Complete revert of r239963 (from head). The attempt to merge changes from the linux libtirpc caused rpc.lockd to exit after startup under unclear conditions. Reported by: David Wolfskill Modified: stable/8/include/rpc/auth.h stable/8/include/rpc/auth_unix.h stable/8/lib/libc/rpc/auth_unix.c stable/8/lib/libc/rpc/authunix_prot.c stable/8/lib/libc/rpc/clnt_perror.c stable/8/lib/libc/rpc/rpc_generic.c stable/8/lib/libc/rpc/rpc_soc.3 stable/8/lib/libc/rpc/rpcb_clnt.c stable/8/lib/libc/rpc/svc_auth_unix.c stable/8/lib/libc/rpc/svc_run.c stable/8/sys/rpc/auth.h stable/8/sys/rpc/rpcb_clnt.c Directory Properties: stable/8/include/rpc/ (props changed) stable/8/lib/libc/rpc/ (props changed) stable/8/sys/rpc/ (props changed) Modified: stable/8/include/rpc/auth.h ============================================================================== --- stable/8/include/rpc/auth.h Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/include/rpc/auth.h Sun Sep 30 00:44:53 2012 (r241060) @@ -243,13 +243,14 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * int uid; + * int gid; * int len; - * gid_t *aup_gids; + * int *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, int, int, int, + int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: stable/8/include/rpc/auth_unix.h ============================================================================== --- stable/8/include/rpc/auth_unix.h Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/include/rpc/auth_unix.h Sun Sep 30 00:44:53 2012 (r241060) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - uid_t aup_uid; - gid_t aup_gid; + int aup_uid; + int aup_gid; u_int aup_len; - gid_t *aup_gids; + int *aup_gids; }; #define authsys_parms authunix_parms Modified: stable/8/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/8/lib/libc/rpc/auth_unix.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/auth_unix.c Sun Sep 30 00:44:53 2012 (r241060) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - uid_t uid; - gid_t gid; + int uid; + int gid; int len; - gid_t *aup_gids; + int *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -207,7 +207,9 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; - auth = authunix_create(machname, uid, gid, ngids, gids); + /* XXX: interface problem; those should all have been unsigned */ + auth = authunix_create(machname, (int)uid, (int)gid, ngids, + (int *)gids); free(gids); return (auth); } Modified: stable/8/lib/libc/rpc/authunix_prot.c ============================================================================== --- stable/8/lib/libc/rpc/authunix_prot.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/authunix_prot.c Sun Sep 30 00:44:53 2012 (r241060) @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - gid_t **paup_gids; + int **paup_gids; assert(xdrs != NULL); assert(p != NULL); @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_u_int(xdrs, &(p->aup_uid)) - && xdr_u_int(xdrs, &(p->aup_gid)) + && xdr_int(xdrs, &(p->aup_uid)) + && xdr_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); Modified: stable/8/lib/libc/rpc/clnt_perror.c ============================================================================== --- stable/8/lib/libc/rpc/clnt_perror.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/clnt_perror.c Sun Sep 30 00:44:53 2012 (r241060) @@ -242,7 +242,7 @@ char * clnt_spcreateerror(s) const char *s; { - char *str, *err; + char *str; size_t len, i; assert(s != NULL); @@ -258,21 +258,8 @@ clnt_spcreateerror(s) switch (rpc_createerr.cf_stat) { case RPC_PMAPFAILURE: (void) strncat(str, " - ", len - 1); - err = clnt_sperrno(rpc_createerr.cf_error.re_status); - if (err) - (void) strncat(str, err+5, len-5); - switch(rpc_createerr.cf_error.re_status) { - case RPC_CANTSEND: - case RPC_CANTRECV: - i = strlen(str); - len -= i; - snprintf(str+i, len, ": errno %d (%s)", - rpc_createerr.cf_error.re_errno, - strerror(rpc_createerr.cf_error.re_errno)); - break; - default: - break; - } + (void) strncat(str, + clnt_sperrno(rpc_createerr.cf_error.re_status), len - 4); break; case RPC_SYSTEMERROR: Modified: stable/8/lib/libc/rpc/rpc_generic.c ============================================================================== --- stable/8/lib/libc/rpc/rpc_generic.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/rpc_generic.c Sun Sep 30 00:44:53 2012 (r241060) @@ -269,8 +269,7 @@ __rpc_getconfip(nettype) } while ((nconf = getnetconfig(confighandle)) != NULL) { if (strcmp(nconf->nc_protofmly, NC_INET) == 0) { - if (strcmp(nconf->nc_proto, NC_TCP) == 0 && - netid_tcp == NULL) { + if (strcmp(nconf->nc_proto, NC_TCP) == 0) { netid_tcp = strdup(nconf->nc_netid); if (main_thread) netid_tcp_main = netid_tcp; @@ -278,8 +277,7 @@ __rpc_getconfip(nettype) thr_setspecific(tcp_key, (void *) netid_tcp); } else - if (strcmp(nconf->nc_proto, NC_UDP) == 0 && - netid_udp == NULL) { + if (strcmp(nconf->nc_proto, NC_UDP) == 0) { netid_udp = strdup(nconf->nc_netid); if (main_thread) netid_udp_main = netid_udp; @@ -618,9 +616,6 @@ __rpc_taddr2uaddr_af(int af, const struc #endif u_int16_t port; - if (nbuf->len <= 0) - return NULL; - switch (af) { case AF_INET: sin = nbuf->buf; Modified: stable/8/lib/libc/rpc/rpc_soc.3 ============================================================================== --- stable/8/lib/libc/rpc/rpc_soc.3 Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/rpc_soc.3 Sun Sep 30 00:44:53 2012 (r241060) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids" +.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids" .Xc .Pp Create and return an Modified: stable/8/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/8/lib/libc/rpc/rpcb_clnt.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/rpcb_clnt.c Sun Sep 30 00:44:53 2012 (r241060) @@ -770,13 +770,6 @@ __rpcb_findaddr_timed(program, version, } parms.r_addr = NULL; - parms.r_netid = nconf->nc_netid; - - /* - * According to wire captures, the reference implementation - * (OpenSolaris) sends a blank string here too. - */ - parms.r_owner = ""; /* * Use default total timeout if no timeout is specified. Modified: stable/8/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- stable/8/lib/libc/rpc/svc_auth_unix.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/svc_auth_unix.c Sun Sep 30 00:44:53 2012 (r241060) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - gid_t area_gids[NGRPS]; + int area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: stable/8/lib/libc/rpc/svc_run.c ============================================================================== --- stable/8/lib/libc/rpc/svc_run.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/lib/libc/rpc/svc_run.c Sun Sep 30 00:44:53 2012 (r241060) @@ -60,13 +60,14 @@ svc_run() fd_set readfds, cleanfds; struct timeval timeout; + timeout.tv_sec = 30; + timeout.tv_usec = 0; + for (;;) { rwlock_rdlock(&svc_fd_lock); readfds = svc_fdset; cleanfds = svc_fdset; rwlock_unlock(&svc_fd_lock); - timeout.tv_sec = 30; - timeout.tv_usec = 0; switch (_select(svc_maxfd+1, &readfds, NULL, NULL, &timeout)) { case -1: FD_ZERO(&readfds); Modified: stable/8/sys/rpc/auth.h ============================================================================== --- stable/8/sys/rpc/auth.h Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/sys/rpc/auth.h Sun Sep 30 00:44:53 2012 (r241060) @@ -234,17 +234,18 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * int uid; + * int gid; * int len; - * gid_t *aup_gids; + * int *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, int, int, int, + int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ Modified: stable/8/sys/rpc/rpcb_clnt.c ============================================================================== --- stable/8/sys/rpc/rpcb_clnt.c Sun Sep 30 00:44:24 2012 (r241059) +++ stable/8/sys/rpc/rpcb_clnt.c Sun Sep 30 00:44:53 2012 (r241060) @@ -780,13 +780,6 @@ __rpcb_findaddr_timed(program, version, } parms.r_addr = NULL; - parms.r_netid = nconf->nc_netid; - - /* - * According to wire captures, the reference implementation - * (OpenSolaris) sends a blank string here too. - */ - parms.r_owner = ""; /* * Use default total timeout if no timeout is specified. From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 03:21:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88DFB106566C; Sun, 30 Sep 2012 03:21:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 748EE8FC0A; Sun, 30 Sep 2012 03:21:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U3LMeU049557; Sun, 30 Sep 2012 03:21:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U3LMKt049555; Sun, 30 Sep 2012 03:21:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209300321.q8U3LMKt049555@svn.freebsd.org> From: Eitan Adler Date: Sun, 30 Sep 2012 03:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241061 - head/usr.sbin/rtprio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 03:21:22 -0000 Author: eadler Date: Sun Sep 30 03:21:21 2012 New Revision: 241061 URL: http://svn.freebsd.org/changeset/base/241061 Log: Document the security.bsd.unprivileged_idprio in idprio(1) in addition to rtprio(2). Approved by: wblock MFC after: 3 days Modified: head/usr.sbin/rtprio/rtprio.1 Modified: head/usr.sbin/rtprio/rtprio.1 ============================================================================== --- head/usr.sbin/rtprio/rtprio.1 Sun Sep 30 00:44:53 2012 (r241060) +++ head/usr.sbin/rtprio/rtprio.1 Sun Sep 30 03:21:21 2012 (r241061) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 1994 +.Dd September 29, 2012 .Dt RTPRIO 1 .Os .Sh NAME @@ -113,6 +113,14 @@ highest priority of 0 means "the current process". .Pp Only root is allowed to set realtime or idle priority for a process. +A user may modify the idle priority of their own processes if the +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_idprio +is set to non-zero. +Note that this increases the chance that a deadlock can occur +if a process locks a required resource and then does +not get to run. .Sh EXIT STATUS If .Nm From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 03:25:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B616F106564A; Sun, 30 Sep 2012 03:25:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16E58FC15; Sun, 30 Sep 2012 03:25:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U3P4Wa050090; Sun, 30 Sep 2012 03:25:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U3P4RJ050088; Sun, 30 Sep 2012 03:25:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209300325.q8U3P4RJ050088@svn.freebsd.org> From: Eitan Adler Date: Sun, 30 Sep 2012 03:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241062 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 03:25:04 -0000 Author: eadler Date: Sun Sep 30 03:25:04 2012 New Revision: 241062 URL: http://svn.freebsd.org/changeset/base/241062 Log: clarify the wording for 'first' and 'last' Approved by: wblock MFC after: 3 days Modified: head/lib/libc/string/ffs.3 Modified: head/lib/libc/string/ffs.3 ============================================================================== --- head/lib/libc/string/ffs.3 Sun Sep 30 03:21:21 2012 (r241061) +++ head/lib/libc/string/ffs.3 Sun Sep 30 03:25:04 2012 (r241062) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd September 29, 2012 .Dt FFS 3 .Os .Sh NAME @@ -63,8 +63,7 @@ The .Fn ffsl and .Fn ffsll -functions find the first bit set -(beginning with the least significant bit) +functions find the first (least significant) bit set in .Fa value and return the index of that bit. @@ -74,11 +73,11 @@ The .Fn flsl and .Fn flsll -functions find the last bit set in +functions find the last (most significant) bit set in .Fa value and return the index of that bit. .Pp -Bits are numbered starting at 1 (the least significant bit). +Bits are numbered starting at 1, the least significant bit. A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 03:54:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E31211065670; Sun, 30 Sep 2012 03:54:57 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF37C8FC12; Sun, 30 Sep 2012 03:54:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U3svP4054216; Sun, 30 Sep 2012 03:54:57 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U3svar054213; Sun, 30 Sep 2012 03:54:57 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209300354.q8U3svar054213@svn.freebsd.org> From: Alan Cox Date: Sun, 30 Sep 2012 03:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241063 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 03:54:58 -0000 Author: alc Date: Sun Sep 30 03:54:57 2012 New Revision: 241063 URL: http://svn.freebsd.org/changeset/base/241063 Log: Stop calling pmap_remove_write() from pmap_remove_all(). Doing so is not only inefficient but also leads to recursive lock acquisition. Tested by: ray Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sun Sep 30 03:25:04 2012 (r241062) +++ head/sys/arm/arm/pmap-v6.c Sun Sep 30 03:54:57 2012 (r241063) @@ -2307,7 +2307,6 @@ pmap_remove_all(vm_page_t m) if (TAILQ_EMPTY(&m->md.pv_list)) return; rw_wlock(&pvh_global_lock); - pmap_remove_write(m); curpm = vmspace_pmap(curproc->p_vmspace); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { if (flush == FALSE && (pv->pv_pmap == curpm || @@ -2318,6 +2317,8 @@ pmap_remove_all(vm_page_t m) l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); KASSERT(l2b != NULL, ("No l2 bucket")); ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; + if (L2_S_WRITABLE(*ptep)) + vm_page_dirty(m); *ptep = 0; if (pmap_is_current(pv->pv_pmap)) PTE_SYNC(ptep); @@ -2328,6 +2329,7 @@ pmap_remove_all(vm_page_t m) PMAP_UNLOCK(pv->pv_pmap); pmap_free_pv_entry(pv); } + m->md.pvh_attrs &= ~(PVF_MOD | PVF_REF); if (flush) { if (PV_BEEN_EXECD(flags)) From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 07:51:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4A41106566C; Sun, 30 Sep 2012 07:51:57 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF6C28FC14; Sun, 30 Sep 2012 07:51:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U7pvQ8089583; Sun, 30 Sep 2012 07:51:57 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U7pvMO089581; Sun, 30 Sep 2012 07:51:57 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209300751.q8U7pvMO089581@svn.freebsd.org> From: Joel Dahl Date: Sun, 30 Sep 2012 07:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241064 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 07:51:58 -0000 Author: joel (doc committer) Date: Sun Sep 30 07:51:57 2012 New Revision: 241064 URL: http://svn.freebsd.org/changeset/base/241064 Log: mdoc: remove superfluous paragraph macro. Modified: head/share/man/man9/drbr.9 Modified: head/share/man/man9/drbr.9 ============================================================================== --- head/share/man/man9/drbr.9 Sun Sep 30 03:54:57 2012 (r241063) +++ head/share/man/man9/drbr.9 Sun Sep 30 07:51:57 2012 (r241064) @@ -119,7 +119,6 @@ there will not be more mbufs when .Fn drbr_dequeue is actually called. Provided the tx queue lock is held there will not be less. -.Pp .Sh RETURN VALUES The .Fn drbr_enqueue From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 07:52:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3289A106566C; Sun, 30 Sep 2012 07:52:41 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4A78FC15; Sun, 30 Sep 2012 07:52:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U7qe6w089729; Sun, 30 Sep 2012 07:52:40 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U7qex3089727; Sun, 30 Sep 2012 07:52:40 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209300752.q8U7qex3089727@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 07:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241065 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 07:52:41 -0000 Author: ae Date: Sun Sep 30 07:52:40 2012 New Revision: 241065 URL: http://svn.freebsd.org/changeset/base/241065 Log: Fix disk_cleanup() to work without DISK_DEBUG too. Modified: head/sys/boot/common/disk.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Sun Sep 30 07:51:57 2012 (r241064) +++ head/sys/boot/common/disk.c Sun Sep 30 07:52:40 2012 (r241065) @@ -373,7 +373,9 @@ disk_close(struct disk_devdesc *dev) void disk_cleanup(const struct devsw *d_dev) { +#ifdef DISK_DEBUG struct disk_devdesc dev; +#endif struct dentry *entry, *tmp; STAILQ_FOREACH_SAFE(entry, &opened_disks, entry, tmp) { @@ -385,10 +387,10 @@ disk_cleanup(const struct devsw *d_dev) dev.d_unit = entry->d_unit; dev.d_slice = entry->d_slice; dev.d_partition = entry->d_partition; - STAILQ_REMOVE(&opened_disks, entry, dentry, entry); DEBUG("%s was freed => %p [%d]", disk_fmtdev(&dev), entry->od, entry->od->rcnt); #endif + STAILQ_REMOVE(&opened_disks, entry, dentry, entry); if (entry->od->rcnt < 1) { if (entry->od->table != NULL) ptable_close(entry->od->table); From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 09:21:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28259106564A; Sun, 30 Sep 2012 09:21:11 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED7758FC15; Sun, 30 Sep 2012 09:21:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U9LAgC002265; Sun, 30 Sep 2012 09:21:10 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U9LA1T002259; Sun, 30 Sep 2012 09:21:10 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209300921.q8U9LA1T002259@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 09:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241066 - in head/sys: dev/ie dev/sound/pci i386/bios x86/bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 09:21:11 -0000 Author: kevlo Date: Sun Sep 30 09:21:10 2012 New Revision: 241066 URL: http://svn.freebsd.org/changeset/base/241066 Log: Free result of device_get_children(9). Modified: head/sys/dev/ie/if_ie_isa.c head/sys/dev/sound/pci/hdspe-pcm.c head/sys/dev/sound/pci/hdspe.c head/sys/i386/bios/smapi.c head/sys/x86/bios/smbios.c Modified: head/sys/dev/ie/if_ie_isa.c ============================================================================== --- head/sys/dev/ie/if_ie_isa.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/dev/ie/if_ie_isa.c Sun Sep 30 09:21:10 2012 (r241066) @@ -875,6 +875,7 @@ ie_modevent (mod, what, arg) devclass_get_devices(ie_devclass, &devs, &count); for (i = 0; i < count; i++) device_delete_child(device_get_parent(devs[i]), devs[i]); + free(devs, M_TEMP); break; default: break; Modified: head/sys/dev/sound/pci/hdspe-pcm.c ============================================================================== --- head/sys/dev/sound/pci/hdspe-pcm.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/dev/sound/pci/hdspe-pcm.c Sun Sep 30 09:21:10 2012 (r241066) @@ -207,6 +207,7 @@ hdspe_running(struct sc_info *sc) } } + free(devlist, M_TEMP); return 0; bad: @@ -214,6 +215,7 @@ bad: device_printf(sc->dev,"hdspe is running\n"); #endif + free(devlist, M_TEMP); return 1; } Modified: head/sys/dev/sound/pci/hdspe.c ============================================================================== --- head/sys/dev/sound/pci/hdspe.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/dev/sound/pci/hdspe.c Sun Sep 30 09:21:10 2012 (r241066) @@ -107,6 +107,7 @@ hdspe_intr(void *p) } hdspe_write_1(sc, HDSPE_INTERRUPT_ACK, 0); + free(devlist, M_TEMP); } snd_mtxunlock(sc->lock); Modified: head/sys/i386/bios/smapi.c ============================================================================== --- head/sys/i386/bios/smapi.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/i386/bios/smapi.c Sun Sep 30 09:21:10 2012 (r241066) @@ -292,6 +292,7 @@ smapi_modevent (module_t mod, int what, for (i = 0; i < count; i++) { device_delete_child(device_get_parent(devs[i]), devs[i]); } + free(devs, M_TEMP); break; default: break; Modified: head/sys/x86/bios/smbios.c ============================================================================== --- head/sys/x86/bios/smbios.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/x86/bios/smbios.c Sun Sep 30 09:21:10 2012 (r241066) @@ -204,6 +204,7 @@ smbios_modevent (mod, what, arg) for (i = 0; i < count; i++) { device_delete_child(device_get_parent(devs[i]), devs[i]); } + free(devs, M_TEMP); break; default: break; From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 09:26:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 545C51065670; Sun, 30 Sep 2012 09:26:27 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FA098FC0C; Sun, 30 Sep 2012 09:26:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U9QRA8003071; Sun, 30 Sep 2012 09:26:27 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U9QRDo003069; Sun, 30 Sep 2012 09:26:27 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209300926.q8U9QRDo003069@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 09:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241067 - head/sys/dev/mmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 09:26:28 -0000 Author: kevlo Date: Sun Sep 30 09:26:26 2012 New Revision: 241067 URL: http://svn.freebsd.org/changeset/base/241067 Log: Remove an unneeded NULL check after M_WAITOK. Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sun Sep 30 09:21:10 2012 (r241066) +++ head/sys/dev/mmc/mmc.c Sun Sep 30 09:26:26 2012 (r241067) @@ -1261,8 +1261,6 @@ mmc_discover_cards(struct mmc_softc *sc) if (newcard) { ivar = malloc(sizeof(struct mmc_ivars), M_DEVBUF, M_WAITOK | M_ZERO); - if (!ivar) - return; memcpy(ivar->raw_cid, raw_cid, sizeof(raw_cid)); } if (mmcbr_get_ro(sc->dev)) From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 12:24:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B668510656A6; Sun, 30 Sep 2012 12:24:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98F4E8FC08; Sun, 30 Sep 2012 12:24:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UCOGsc029240; Sun, 30 Sep 2012 12:24:16 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UCOG5o029237; Sun, 30 Sep 2012 12:24:16 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209301224.q8UCOG5o029237@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 12:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241068 - head/sys/boot/i386/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 12:24:17 -0000 Author: ae Date: Sun Sep 30 12:24:15 2012 New Revision: 241068 URL: http://svn.freebsd.org/changeset/base/241068 Log: Reduce the number of attempts to detect proper kld format for the amd64 loader. Modified: head/sys/boot/i386/loader/Makefile head/sys/boot/i386/loader/conf.c Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Sun Sep 30 09:26:26 2012 (r241067) +++ head/sys/boot/i386/loader/Makefile Sun Sep 30 12:24:15 2012 (r241068) @@ -125,6 +125,7 @@ LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZF .if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine CLEANFILES+= machine +CFLAGS+= -DLOADER_PREFER_AMD64 machine: ln -sf ${.CURDIR}/../../../i386/include machine .endif Modified: head/sys/boot/i386/loader/conf.c ============================================================================== --- head/sys/boot/i386/loader/conf.c Sun Sep 30 09:26:26 2012 (r241067) +++ head/sys/boot/i386/loader/conf.c Sun Sep 30 12:24:15 2012 (r241068) @@ -109,10 +109,16 @@ extern struct file_format amd64_elf; extern struct file_format amd64_elf_obj; struct file_format *file_formats[] = { +#ifdef LOADER_PREFER_AMD64 + &amd64_elf, + &amd64_elf_obj, +#endif &i386_elf, &i386_elf_obj, +#ifndef LOADER_PREFER_AMD64 &amd64_elf, &amd64_elf_obj, +#endif NULL }; From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 13:14:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A87A106564A; Sun, 30 Sep 2012 13:14:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 666788FC0A; Sun, 30 Sep 2012 13:14:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UDEcUY036010; Sun, 30 Sep 2012 13:14:38 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UDEbQd036007; Sun, 30 Sep 2012 13:14:37 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209301314.q8UDEbQd036007@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 13:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241069 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 13:14:38 -0000 Author: ae Date: Sun Sep 30 13:14:37 2012 New Revision: 241069 URL: http://svn.freebsd.org/changeset/base/241069 Log: Remember the file format of the last loaded module and try to use it for next files. Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Sun Sep 30 12:24:15 2012 (r241068) +++ head/sys/boot/common/module.c Sun Sep 30 13:14:37 2012 (r241069) @@ -271,6 +271,7 @@ command_lsmod(int argc, char *argv[]) int file_load(char *filename, vm_offset_t dest, struct preloaded_file **result) { + static int last_file_format = 0; struct preloaded_file *fp; int error; int i; @@ -279,12 +280,18 @@ file_load(char *filename, vm_offset_t de dest = archsw.arch_loadaddr(LOAD_RAW, filename, dest); error = EFTYPE; - for (i = 0, fp = NULL; file_formats[i] && fp == NULL; i++) { + for (i = last_file_format, fp = NULL; + file_formats[i] && fp == NULL; i++) { error = (file_formats[i]->l_load)(filename, dest, &fp); if (error == 0) { - fp->f_loader = i; /* remember the loader */ + fp->f_loader = last_file_format = i; /* remember the loader */ *result = fp; break; + } else if (last_file_format == i && i != 0) { + /* Restart from the beginning */ + last_file_format = i = 0; + fp = NULL; + continue; } if (error == EFTYPE) continue; /* Unknown to this handler? */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 13:17:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E0D9106566B; Sun, 30 Sep 2012 13:17:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89DDB8FC08; Sun, 30 Sep 2012 13:17:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UDHYmA036465; Sun, 30 Sep 2012 13:17:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UDHYjb036463; Sun, 30 Sep 2012 13:17:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209301317.q8UDHYjb036463@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 13:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241070 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 13:17:34 -0000 Author: ae Date: Sun Sep 30 13:17:33 2012 New Revision: 241070 URL: http://svn.freebsd.org/changeset/base/241070 Log: Fix the style. Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Sun Sep 30 13:14:37 2012 (r241069) +++ head/sys/boot/common/module.c Sun Sep 30 13:17:33 2012 (r241070) @@ -288,10 +288,10 @@ file_load(char *filename, vm_offset_t de *result = fp; break; } else if (last_file_format == i && i != 0) { - /* Restart from the beginning */ - last_file_format = i = 0; - fp = NULL; - continue; + /* Restart from the beginning */ + last_file_format = i = 0; + fp = NULL; + continue; } if (error == EFTYPE) continue; /* Unknown to this handler? */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 13:32:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67E95106566B; Sun, 30 Sep 2012 13:32:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 530628FC08; Sun, 30 Sep 2012 13:32:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UDWnNw038512; Sun, 30 Sep 2012 13:32:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UDWn7R038510; Sun, 30 Sep 2012 13:32:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209301332.q8UDWn7R038510@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 30 Sep 2012 13:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241071 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 13:32:49 -0000 Author: kib Date: Sun Sep 30 13:32:48 2012 New Revision: 241071 URL: http://svn.freebsd.org/changeset/base/241071 Log: MFC r240813: Do not skip two elements of the tid_buffer when reusing the buffer slot. This eventually results in exhaustion of the tid space, causing new threads get tid -1 as identifier. MFC r240951: Make the updates of the tid ring buffer' head and tail pointers explicit by moving them into separate statements from the buffer element accesses. Modified: stable/9/sys/kern/kern_thread.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_thread.c ============================================================================== --- stable/9/sys/kern/kern_thread.c Sun Sep 30 13:17:33 2012 (r241070) +++ stable/9/sys/kern/kern_thread.c Sun Sep 30 13:32:48 2012 (r241071) @@ -102,8 +102,8 @@ tid_alloc(void) mtx_unlock(&tid_lock); return (-1); } - tid = tid_buffer[tid_head++]; - tid_head %= TID_BUFFER_SIZE; + tid = tid_buffer[tid_head]; + tid_head = (tid_head + 1) % TID_BUFFER_SIZE; mtx_unlock(&tid_lock); return (tid); } @@ -115,11 +115,11 @@ tid_free(lwpid_t tid) mtx_lock(&tid_lock); if ((tid_tail + 1) % TID_BUFFER_SIZE == tid_head) { - tmp_tid = tid_buffer[tid_head++]; + tmp_tid = tid_buffer[tid_head]; tid_head = (tid_head + 1) % TID_BUFFER_SIZE; } - tid_buffer[tid_tail++] = tid; - tid_tail %= TID_BUFFER_SIZE; + tid_buffer[tid_tail] = tid; + tid_tail = (tid_tail + 1) % TID_BUFFER_SIZE; mtx_unlock(&tid_lock); if (tmp_tid != -1) free_unr(tid_unrhdr, tmp_tid); From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 15:33:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE385106564A; Sun, 30 Sep 2012 15:33:53 +0000 (UTC) (envelope-from issyl0@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B78188FC08; Sun, 30 Sep 2012 15:33:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UFXrRu056259; Sun, 30 Sep 2012 15:33:53 GMT (envelope-from issyl0@svn.freebsd.org) Received: (from issyl0@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UFXrRZ056256; Sun, 30 Sep 2012 15:33:53 GMT (envelope-from issyl0@svn.freebsd.org) Message-Id: <201209301533.q8UFXrRZ056256@svn.freebsd.org> From: Isabell Long Date: Sun, 30 Sep 2012 15:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241072 - stable/9/sbin/ipf/ipf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 15:33:53 -0000 Author: issyl0 (doc committer) Date: Sun Sep 30 15:33:53 2012 New Revision: 241072 URL: http://svn.freebsd.org/changeset/base/241072 Log: MFC r239775 from HEAD: - Link ipfilter(4) and ipfilter(5) to the build to stop the wrong man page displaying for 'man 4 ipfilter'. PR: docs/118020 Approved by: gabor (mentor) Modified: stable/9/sbin/ipf/ipf/Makefile Directory Properties: stable/9/sbin/ipf/ (props changed) Modified: stable/9/sbin/ipf/ipf/Makefile ============================================================================== --- stable/9/sbin/ipf/ipf/Makefile Sun Sep 30 13:32:48 2012 (r241071) +++ stable/9/sbin/ipf/ipf/Makefile Sun Sep 30 15:33:53 2012 (r241072) @@ -2,8 +2,8 @@ PROG= ipf SRCS= ${GENHDRS} ipf.c ipfcomp.c ipf_y.c ipf_l.c bpf_filter.c -MAN= ipf.8 ipf.4 ipf.5 ipl.4 -MLINKS= ipl.4 ipfilter.4 ipf.5 ipf.conf.5 ipf.5 ipf6.conf.5 +MAN= ipfilter.4 ipfilter.5 ipf.8 ipf.4 ipf.5 ipl.4 +MLINKS= ipf.5 ipf.conf.5 ipf.5 ipf6.conf.5 CFLAGS+= -I. -DIPFILTER_BPF GENHDRS= ipf_l.h ipf_y.h From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 15:42:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88986106566B; Sun, 30 Sep 2012 15:42:21 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 730C68FC0C; Sun, 30 Sep 2012 15:42:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UFgLge057716; Sun, 30 Sep 2012 15:42:21 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UFgLFo057713; Sun, 30 Sep 2012 15:42:21 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209301542.q8UFgLFo057713@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 15:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241073 - in head/sys: i386/bios x86/bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 15:42:21 -0000 Author: kevlo Date: Sun Sep 30 15:42:20 2012 New Revision: 241073 URL: http://svn.freebsd.org/changeset/base/241073 Log: Add missing header needed by free(9). Spotted by: David Wolfskill Modified: head/sys/i386/bios/smapi.c head/sys/x86/bios/smbios.c Modified: head/sys/i386/bios/smapi.c ============================================================================== --- head/sys/i386/bios/smapi.c Sun Sep 30 15:33:53 2012 (r241072) +++ head/sys/i386/bios/smapi.c Sun Sep 30 15:42:20 2012 (r241073) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/x86/bios/smbios.c ============================================================================== --- head/sys/x86/bios/smbios.c Sun Sep 30 15:33:53 2012 (r241072) +++ head/sys/x86/bios/smbios.c Sun Sep 30 15:42:20 2012 (r241073) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 16:11:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E909106566B; Sun, 30 Sep 2012 16:11:51 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECFDA8FC17; Sun, 30 Sep 2012 16:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UGBo57062665; Sun, 30 Sep 2012 16:11:50 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UGBolB062663; Sun, 30 Sep 2012 16:11:50 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209301611.q8UGBolB062663@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 16:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241074 - stable/9/lib/libedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 16:11:51 -0000 Author: kevlo Date: Sun Sep 30 16:11:50 2012 New Revision: 241074 URL: http://svn.freebsd.org/changeset/base/241074 Log: MFC r240982: Initialize the num variable to avoid uninitialized data. This fixes the bug introduced by r238378. Reviewed by: pfg Modified: stable/9/lib/libedit/read.c Directory Properties: stable/9/lib/libedit/ (props changed) Modified: stable/9/lib/libedit/read.c ============================================================================== --- stable/9/lib/libedit/read.c Sun Sep 30 15:42:20 2012 (r241073) +++ stable/9/lib/libedit/read.c Sun Sep 30 16:11:50 2012 (r241074) @@ -426,7 +426,7 @@ el_gets(EditLine *el, int *nread) char *cp = el->el_line.buffer; size_t idx; - while ((*el->el_read.read_char)(el, cp) == 1) { + while ((num = (*el->el_read.read_char)(el, cp)) == 1) { /* make sure there is space for next character */ if (cp + 1 >= el->el_line.limit) { idx = (cp - el->el_line.buffer); @@ -479,7 +479,7 @@ el_gets(EditLine *el, int *nread) term__flush(el); - while ((*el->el_read.read_char)(el, cp) == 1) { + while ((num = (*el->el_read.read_char)(el, cp)) == 1) { /* make sure there is space next character */ if (cp + 1 >= el->el_line.limit) { idx = (cp - el->el_line.buffer); From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 16:17:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8097C106566B; Sun, 30 Sep 2012 16:17:55 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 514008FC0A; Sun, 30 Sep 2012 16:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UGHtsg063833; Sun, 30 Sep 2012 16:17:55 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UGHtmg063831; Sun, 30 Sep 2012 16:17:55 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209301617.q8UGHtmg063831@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 16:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241075 - stable/9/usr.bin/getent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 16:17:55 -0000 Author: kevlo Date: Sun Sep 30 16:17:54 2012 New Revision: 241075 URL: http://svn.freebsd.org/changeset/base/241075 Log: MFC r240954: Teach getent(1) to look up a hostname and find IPv6 addresses. PR: bin/161548 Submitted by: matthew Modified: stable/9/usr.bin/getent/getent.c Directory Properties: stable/9/usr.bin/ (props changed) Modified: stable/9/usr.bin/getent/getent.c ============================================================================== --- stable/9/usr.bin/getent/getent.c Sun Sep 30 16:11:50 2012 (r241074) +++ stable/9/usr.bin/getent/getent.c Sun Sep 30 16:17:54 2012 (r241075) @@ -277,7 +277,7 @@ hostsprint(const struct hostent *he) static int hosts(int argc, char *argv[]) { - struct hostent *he; + struct hostent *he4, *he6; char addr[IN6ADDRSZ]; int i, rv; @@ -285,21 +285,31 @@ hosts(int argc, char *argv[]) assert(argv != NULL); sethostent(1); + he4 = he6 = NULL; rv = RV_OK; if (argc == 2) { - while ((he = gethostent()) != NULL) - hostsprint(he); + while ((he4 = gethostent()) != NULL) + hostsprint(he4); } else { for (i = 2; i < argc; i++) { - if (inet_pton(AF_INET6, argv[i], (void *)addr) > 0) - he = gethostbyaddr(addr, IN6ADDRSZ, AF_INET6); - else if (inet_pton(AF_INET, argv[i], (void *)addr) > 0) - he = gethostbyaddr(addr, INADDRSZ, AF_INET); - else - he = gethostbyname(argv[i]); - if (he != NULL) - hostsprint(he); - else { + if (inet_pton(AF_INET6, argv[i], (void *)addr) > 0) { + he6 = gethostbyaddr(addr, IN6ADDRSZ, AF_INET6); + if (he6 != NULL) + hostsprint(he6); + } else if (inet_pton(AF_INET, argv[i], + (void *)addr) > 0) { + he4 = gethostbyaddr(addr, INADDRSZ, AF_INET); + if (he4 != NULL) + hostsprint(he4); + } else { + he6 = gethostbyname2(argv[i], AF_INET6); + if (he6 != NULL) + hostsprint(he6); + he4 = gethostbyname(argv[i]); + if (he4 != NULL) + hostsprint(he4); + } + if ( he4 == NULL && he6 == NULL ) { rv = RV_NOTFOUND; break; } From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 16:21:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F8CE1065673; Sun, 30 Sep 2012 16:21:13 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A84F8FC12; Sun, 30 Sep 2012 16:21:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UGLDJU064463; Sun, 30 Sep 2012 16:21:13 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UGLDhW064461; Sun, 30 Sep 2012 16:21:13 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209301621.q8UGLDhW064461@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 16:21:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241076 - stable/9/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 16:21:13 -0000 Author: kevlo Date: Sun Sep 30 16:21:12 2012 New Revision: 241076 URL: http://svn.freebsd.org/changeset/base/241076 Log: MFC r240630: Add missing break Modified: stable/9/sys/netipsec/xform_ipip.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/xform_ipip.c ============================================================================== --- stable/9/sys/netipsec/xform_ipip.c Sun Sep 30 16:17:54 2012 (r241075) +++ stable/9/sys/netipsec/xform_ipip.c Sun Sep 30 16:21:12 2012 (r241076) @@ -577,6 +577,7 @@ ipip_output( itos = ntohl(itos32) >> 20; ip6o->ip6_nxt = IPPROTO_IPV6; + break; } default: goto nofamily; From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 17:33:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7F51065673; Sun, 30 Sep 2012 17:33:31 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FBDC8FC0A; Sun, 30 Sep 2012 17:33:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UHXUpB078189; Sun, 30 Sep 2012 17:33:30 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UHXUa9078187; Sun, 30 Sep 2012 17:33:30 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201209301733.q8UHXUa9078187@svn.freebsd.org> From: Tijl Coosemans Date: Sun, 30 Sep 2012 17:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241077 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 17:33:31 -0000 Author: tijl Date: Sun Sep 30 17:33:30 2012 New Revision: 241077 URL: http://svn.freebsd.org/changeset/base/241077 Log: - Simplify the implementation of atomic_compare_exchange_strong_explicit. - Evaluate the memory order argument in atomic_fetch_*_explicit macros. - Implement atomic_store_explicit using atomic_exchange_explicit instead of a plain assignment. Reviewed by: theraven MFC after: 2 weeks Modified: head/include/stdatomic.h Modified: head/include/stdatomic.h ============================================================================== --- head/include/stdatomic.h Sun Sep 30 16:21:12 2012 (r241076) +++ head/include/stdatomic.h Sun Sep 30 17:33:30 2012 (r241077) @@ -234,19 +234,12 @@ typedef _Atomic(__uintmax_t) atomic_uin #else #define atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) __extension__ ({ \ - __typeof__((object)->__val) __v; \ - __typeof__(expected) __e; \ - _Bool __r; \ - __e = (expected); \ - (void)(success); \ - (void)(failure); \ - __v = __sync_val_compare_and_swap(&(object)->__val, \ - *__e, (desired)); \ - __r = (*__e == __v); \ - *__e = __v; \ - __r; \ + __typeof__(expected) __ep = (expected); \ + __typeof__(*__ep) __e = *__ep; \ + (void)(success); (void)(failure); \ + (*__ep = __sync_val_compare_and_swap(&(object)->__val, \ + __e, desired)) == __e; \ }) - #define atomic_compare_exchange_weak_explicit(object, expected, \ desired, success, failure) \ atomic_compare_exchange_strong_explicit(object, expected, \ @@ -271,25 +264,19 @@ __extension__ ({ \ }) #endif #define atomic_fetch_add_explicit(object, operand, order) \ - __sync_fetch_and_add(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_add(&(object)->__val, operand)) #define atomic_fetch_and_explicit(object, operand, order) \ - __sync_fetch_and_and(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_and(&(object)->__val, operand)) #define atomic_fetch_or_explicit(object, operand, order) \ - __sync_fetch_and_or(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_or(&(object)->__val, operand)) #define atomic_fetch_sub_explicit(object, operand, order) \ - __sync_fetch_and_sub(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_sub(&(object)->__val, operand)) #define atomic_fetch_xor_explicit(object, operand, order) \ - __sync_fetch_and_xor(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_xor(&(object)->__val, operand)) #define atomic_load_explicit(object, order) \ - __sync_fetch_and_add(&(object)->__val, 0) -#define atomic_store_explicit(object, desired, order) __extension__ ({ \ - __typeof__(object) __o = (object); \ - __typeof__(desired) __d = (desired); \ - (void)(order); \ - __sync_synchronize(); \ - __o->__val = __d; \ - __sync_synchronize(); \ -}) + ((void)(order), __sync_fetch_and_add(&(object)->__val, 0)) +#define atomic_store_explicit(object, desired, order) \ + ((void)atomic_exchange_explicit(object, desired, order)) #endif /* From owner-svn-src-all@FreeBSD.ORG Sun Sep 30 19:31:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78D94106566B; Sun, 30 Sep 2012 19:31:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28CEC8FC08; Sun, 30 Sep 2012 19:31:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UJVLoN099406; Sun, 30 Sep 2012 19:31:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UJVKfD099403; Sun, 30 Sep 2012 19:31:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209301931.q8UJVKfD099403@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 30 Sep 2012 19:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241078 - head/sys/netgraph/bluetooth/drivers/ubt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 19:31:21 -0000 Author: hselasky Date: Sun Sep 30 19:31:20 2012 New Revision: 241078 URL: http://svn.freebsd.org/changeset/base/241078 Log: The USB Bluetooth driver should only grab its own interfaces. This allows the USB bluetooth driver to co-exist with other USB device classes and drivers. Reported by: Geoffrey Levand MFC after: 1 week Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Sep 30 17:33:30 2012 (r241077) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Sep 30 19:31:20 2012 (r241078) @@ -439,6 +439,7 @@ ubt_attach(device_t dev) struct ubt_softc *sc = device_get_softc(dev); struct usb_endpoint_descriptor *ed; struct usb_interface_descriptor *id; + struct usb_interface *iface; uint16_t wMaxPacketSize; uint8_t alt_index, i, j; uint8_t iface_index[2] = { 0, 1 }; @@ -554,10 +555,21 @@ ubt_attach(device_t dev) goto detach; } - /* Claim all interfaces on the device */ - for (i = 1; usbd_get_iface(uaa->device, i) != NULL; i ++) - usbd_set_parent_iface(uaa->device, i, uaa->info.bIfaceIndex); + /* Claim all interfaces belonging to the Bluetooth part */ + for (i = 1;; i++) { + iface = usbd_get_iface(uaa->device, i); + if (iface == NULL) + break; + id = usbd_get_interface_descriptor(iface); + if ((id != NULL) && + (id->bInterfaceClass == UICLASS_WIRELESS) && + (id->bInterfaceSubClass == UISUBCLASS_RF) && + (id->bInterfaceProtocol == UIPROTO_BLUETOOTH)) { + usbd_set_parent_iface(uaa->device, i, + uaa->info.bIfaceIndex); + } + } return (0); /* success */ detach: From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 03:17:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF779106564A; Mon, 1 Oct 2012 03:17:23 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA21A8FC0A; Mon, 1 Oct 2012 03:17:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q913HNa8070647; Mon, 1 Oct 2012 03:17:23 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q913HNdP070645; Mon, 1 Oct 2012 03:17:23 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201210010317.q913HNdP070645@svn.freebsd.org> From: Kevin Lo Date: Mon, 1 Oct 2012 03:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241079 - stable/8/lib/libedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 03:17:24 -0000 Author: kevlo Date: Mon Oct 1 03:17:23 2012 New Revision: 241079 URL: http://svn.freebsd.org/changeset/base/241079 Log: MFC r240982: Initialize the num variable to avoid uninitialized data. This fixes the bug introduced by r238378. Reviewed by: pfg Modified: stable/8/lib/libedit/read.c Directory Properties: stable/8/lib/libedit/ (props changed) Modified: stable/8/lib/libedit/read.c ============================================================================== --- stable/8/lib/libedit/read.c Sun Sep 30 19:31:20 2012 (r241078) +++ stable/8/lib/libedit/read.c Mon Oct 1 03:17:23 2012 (r241079) @@ -426,7 +426,7 @@ el_gets(EditLine *el, int *nread) char *cp = el->el_line.buffer; size_t idx; - while ((*el->el_read.read_char)(el, cp) == 1) { + while ((num = (*el->el_read.read_char)(el, cp)) == 1) { /* make sure there is space for next character */ if (cp + 1 >= el->el_line.limit) { idx = (cp - el->el_line.buffer); @@ -479,7 +479,7 @@ el_gets(EditLine *el, int *nread) term__flush(el); - while ((*el->el_read.read_char)(el, cp) == 1) { + while ((num = (*el->el_read.read_char)(el, cp)) == 1) { /* make sure there is space next character */ if (cp + 1 >= el->el_line.limit) { idx = (cp - el->el_line.buffer); From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 05:12:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91F6810656E3; Mon, 1 Oct 2012 05:12:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 737188FC0A; Mon, 1 Oct 2012 05:12:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915CIrR085584; Mon, 1 Oct 2012 05:12:18 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915CIJM085583; Mon, 1 Oct 2012 05:12:18 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201210010512.q915CIJM085583@svn.freebsd.org> From: Andrew Turner Date: Mon, 1 Oct 2012 05:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241080 - head/sys/arm/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 05:12:18 -0000 Author: andrew Date: Mon Oct 1 05:12:17 2012 New Revision: 241080 URL: http://svn.freebsd.org/changeset/base/241080 Log: Fix the clobber list on the atomic operators that do comparisons. Without this some compilers will place a cmp instruction before the atomic operation and expect to be able to use the result afterwards. By adding "cc" to the list of used registers we tell the compiler to not do this. Modified: head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Mon Oct 1 03:17:23 2012 (r241079) +++ head/sys/arm/include/atomic.h Mon Oct 1 05:12:17 2012 (r241080) @@ -123,7 +123,7 @@ atomic_set_32(volatile uint32_t *address "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - , "+r" (address), "+r" (setmask) : : "memory"); + , "+r" (address), "+r" (setmask) : : "cc", "memory"); } @@ -138,7 +138,7 @@ atomic_set_long(volatile u_long *address "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - , "+r" (address), "+r" (setmask) : : "memory"); + , "+r" (address), "+r" (setmask) : : "cc", "memory"); } @@ -153,7 +153,7 @@ atomic_clear_32(volatile uint32_t *addre "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (address), "+r" (setmask) : : "memory"); + ,"+r" (address), "+r" (setmask) : : "cc", "memory"); } static __inline void @@ -167,7 +167,7 @@ atomic_clear_long(volatile u_long *addre "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (address), "+r" (setmask) : : "memory"); + ,"+r" (address), "+r" (setmask) : : "cc", "memory"); } static __inline u_int32_t @@ -185,7 +185,8 @@ atomic_cmpset_32(volatile u_int32_t *p, "moveq %0, #1\n" "2:" : "=&r" (ret) - ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "memory"); + ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "cc", + "memory"); return (ret); } @@ -204,7 +205,8 @@ atomic_cmpset_long(volatile u_long *p, v "moveq %0, #1\n" "2:" : "=&r" (ret) - ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "memory"); + ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "cc", + "memory"); return (ret); } @@ -254,7 +256,7 @@ atomic_add_32(volatile u_int32_t *p, u_i "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } static __inline void @@ -268,7 +270,7 @@ atomic_add_long(volatile u_long *p, u_lo "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } static __inline void @@ -282,7 +284,7 @@ atomic_subtract_32(volatile u_int32_t *p "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } static __inline void @@ -296,7 +298,7 @@ atomic_subtract_long(volatile u_long *p, "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } ATOMIC_ACQ_REL(clear, 32) @@ -322,7 +324,7 @@ atomic_fetchadd_32(volatile uint32_t *p, "cmp %2, #0\n" "bne 1b\n" : "+r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); return (ret); } @@ -337,7 +339,7 @@ atomic_readandclear_32(volatile u_int32_ "cmp %2, #0\n" "bne 1b\n" : "=r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p) : : "memory"); + ,"+r" (p) : : "cc", "memory"); return (ret); } @@ -370,7 +372,7 @@ atomic_fetchadd_long(volatile u_long *p, "cmp %2, #0\n" "bne 1b\n" : "+r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); return (ret); } @@ -385,7 +387,7 @@ atomic_readandclear_long(volatile u_long "cmp %2, #0\n" "bne 1b\n" : "=r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p) : : "memory"); + ,"+r" (p) : : "cc", "memory"); return (ret); } @@ -516,7 +518,7 @@ atomic_cmpset_32(volatile u_int32_t *p, "moveq %1, #1\n" "movne %1, #0\n" : "+r" (ras_start), "=r" (done) - ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "memory"); + ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "cc", "memory"); return (done); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 05:15:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 306F810656E2; Mon, 1 Oct 2012 05:15:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3518FC12; Mon, 1 Oct 2012 05:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915FDlN085974; Mon, 1 Oct 2012 05:15:13 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915FDto085972; Mon, 1 Oct 2012 05:15:13 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201210010515.q915FDto085972@svn.freebsd.org> From: Andrew Turner Date: Mon, 1 Oct 2012 05:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241081 - head/sys/arm/ti/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 05:15:14 -0000 Author: andrew Date: Mon Oct 1 05:15:13 2012 New Revision: 241081 URL: http://svn.freebsd.org/changeset/base/241081 Log: Remove unused variables from the OMAP ehci code. Modified: head/sys/arm/ti/usb/omap_ehci.c Modified: head/sys/arm/ti/usb/omap_ehci.c ============================================================================== --- head/sys/arm/ti/usb/omap_ehci.c Mon Oct 1 05:12:17 2012 (r241080) +++ head/sys/arm/ti/usb/omap_ehci.c Mon Oct 1 05:15:13 2012 (r241081) @@ -665,10 +665,8 @@ omap_ehci_fini(struct omap_ehci_softc *i static int omap_ehci_suspend(device_t dev) { - ehci_softc_t *sc = device_get_softc(dev); int err; - sc = sc; err = bus_generic_suspend(dev); if (err) return (err); @@ -691,8 +689,6 @@ omap_ehci_suspend(device_t dev) static int omap_ehci_resume(device_t dev) { - ehci_softc_t *sc = device_get_softc(dev); - sc = sc; bus_generic_resume(dev); @@ -715,10 +711,8 @@ omap_ehci_resume(device_t dev) static int omap_ehci_shutdown(device_t dev) { - ehci_softc_t *sc = device_get_softc(dev); int err; - sc = sc; err = bus_generic_shutdown(dev); if (err) return (err); From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 05:42:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DCBF10658C9; Mon, 1 Oct 2012 05:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0752B8FC1A; Mon, 1 Oct 2012 05:42:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915gh3H089400; Mon, 1 Oct 2012 05:42:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915gh6H089388; Mon, 1 Oct 2012 05:42:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010542.q915gh6H089388@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 05:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241082 - in head/sys: dev/usb dev/usb/controller mips/cavium/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 05:42:44 -0000 Author: hselasky Date: Mon Oct 1 05:42:43 2012 New Revision: 241082 URL: http://svn.freebsd.org/changeset/base/241082 Log: Inherit USB mode from RootHUB port where the USB device is connected. Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs. This simplifies some checks in the USB controller drivers. MFC after: 1 week Modified: head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/avr32dci.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/usb_hub.c head/sys/mips/cavium/usb/octusb.c Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/at91dci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2277,10 +2277,6 @@ at91dci_ep_init(struct usb_device *udev, if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if (udev->speed != USB_SPEED_FULL) { /* not supported */ return; Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/atmegadci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2112,10 +2112,6 @@ atmegadci_ep_init(struct usb_device *ude if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if (udev->speed != USB_SPEED_FULL) { /* not supported */ return; Modified: head/sys/dev/usb/controller/avr32dci.c ============================================================================== --- head/sys/dev/usb/controller/avr32dci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/avr32dci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2056,10 +2056,6 @@ avr32dci_ep_init(struct usb_device *udev if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if ((udev->speed != USB_SPEED_FULL) && (udev->speed != USB_SPEED_HIGH)) { /* not supported */ Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/ehci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -3701,10 +3701,6 @@ ehci_ep_init(struct usb_device *udev, st edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { if ((udev->speed != USB_SPEED_HIGH) && Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/musb_otg.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2748,10 +2748,6 @@ musbotg_ep_init(struct usb_device *udev, if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if ((udev->speed != USB_SPEED_FULL) && (udev->speed != USB_SPEED_HIGH)) { /* not supported */ Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/ohci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2315,6 +2315,7 @@ ohci_roothub_exec(struct usb_device *ude } v = OREAD4(sc, OHCI_RH_PORT_STATUS(index)); DPRINTFN(9, "port status=0x%04x\n", v); + v &= ~UPS_PORT_MODE_DEVICE; /* force host mode */ USETW(sc->sc_hub_desc.ps.wPortStatus, v); USETW(sc->sc_hub_desc.ps.wPortChange, v >> 16); len = sizeof(sc->sc_hub_desc.ps); @@ -2551,10 +2552,6 @@ ohci_ep_init(struct usb_device *udev, st edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/uhci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -3030,10 +3030,6 @@ uhci_ep_init(struct usb_device *udev, st edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/uss820dci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2333,10 +2333,6 @@ uss820dci_ep_init(struct usb_device *ude if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if (udev->speed != USB_SPEED_FULL) { /* not supported */ return; Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/xhci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -3712,10 +3712,6 @@ xhci_ep_init(struct usb_device *udev, st DPRINTFN(2, "endpoint=%p, addr=%d, endpt=%d, mode=%d\n", ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->parent_hub == NULL) { /* root HUB has special endpoint handling */ return; Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/usb_hub.c Mon Oct 1 05:42:43 2012 (r241082) @@ -518,7 +518,10 @@ repeat: * * NOTE: This part is currently FreeBSD specific. */ - if (sc->sc_st.port_status & UPS_PORT_MODE_DEVICE) + if (udev->parent_hub != NULL) { + /* inherit mode from the parent HUB */ + mode = udev->parent_hub->flags.usb_mode; + } else if (sc->sc_st.port_status & UPS_PORT_MODE_DEVICE) mode = USB_MODE_DEVICE; else mode = USB_MODE_HOST; Modified: head/sys/mips/cavium/usb/octusb.c ============================================================================== --- head/sys/mips/cavium/usb/octusb.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/mips/cavium/usb/octusb.c Mon Oct 1 05:42:43 2012 (r241082) @@ -1860,10 +1860,6 @@ octusb_ep_init(struct usb_device *udev, ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 05:43:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43CC1065713; Mon, 1 Oct 2012 05:43:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96D0F8FC1D; Mon, 1 Oct 2012 05:43:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915hO1u089514; Mon, 1 Oct 2012 05:43:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915hOxm089511; Mon, 1 Oct 2012 05:43:24 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201210010543.q915hOxm089511@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 1 Oct 2012 05:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241083 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 05:43:25 -0000 Author: pjd Date: Mon Oct 1 05:43:24 2012 New Revision: 241083 URL: http://svn.freebsd.org/changeset/base/241083 Log: - Enforce CAP_MKFIFO on mkfifoat(2), not on mknodat(2). Without this change mkfifoat(2) was not restricted. - Introduce CAP_MKNOD and enforce it on mknodat(2). Sponsored by: FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_syscalls.c head/sys/sys/capability.h Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Oct 1 05:42:43 2012 (r241082) +++ head/sys/kern/vfs_syscalls.c Mon Oct 1 05:43:24 2012 (r241083) @@ -1334,7 +1334,7 @@ restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, pathseg, path, fd, - CAP_MKFIFO, td); + CAP_MKNOD, td); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); @@ -1458,8 +1458,9 @@ kern_mkfifoat(struct thread *td, int fd, AUDIT_ARG_MODE(mode); restart: bwillwrite(); - NDINIT_AT(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, - pathseg, path, fd, td); + NDINIT_ATRIGHTS(&nd, CREATE, + LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, pathseg, path, fd, + CAP_MKFIFO, td); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); Modified: head/sys/sys/capability.h ============================================================================== --- head/sys/sys/capability.h Mon Oct 1 05:42:43 2012 (r241082) +++ head/sys/sys/capability.h Mon Oct 1 05:43:24 2012 (r241083) @@ -81,6 +81,7 @@ #define CAP_MKDIR 0x0000000000200000ULL #define CAP_RMDIR 0x0000000000400000ULL #define CAP_MKFIFO 0x0000000000800000ULL +#define CAP_MKNOD 0x0080000000000000ULL /* Lookups - used to constrain *at() calls. */ #define CAP_LOOKUP 0x0000000001000000ULL @@ -137,7 +138,7 @@ #define CAP_PDKILL 0x0040000000000000ULL /* The mask of all valid method rights. */ -#define CAP_MASK_VALID 0x007fffffffffffffULL +#define CAP_MASK_VALID 0x00ffffffffffffffULL #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 05:48:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F49106564A; Mon, 1 Oct 2012 05:48:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B25778FC17; Mon, 1 Oct 2012 05:48:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915mkPG090294; Mon, 1 Oct 2012 05:48:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915mkvC090291; Mon, 1 Oct 2012 05:48:46 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010548.q915mkvC090291@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 05:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241084 - in stable/9: etc usr.sbin/moused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 05:48:47 -0000 Author: hselasky Date: Mon Oct 1 05:48:46 2012 New Revision: 241084 URL: http://svn.freebsd.org/changeset/base/241084 Log: MFC r240891: Improve moused when used with USB mouse devices. Modified: stable/9/etc/devd.conf stable/9/usr.sbin/moused/moused.c Directory Properties: stable/9/etc/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/moused/ (props changed) Modified: stable/9/etc/devd.conf ============================================================================== --- stable/9/etc/devd.conf Mon Oct 1 05:43:24 2012 (r241083) +++ stable/9/etc/devd.conf Mon Oct 1 05:48:46 2012 (r241084) @@ -114,14 +114,22 @@ detach 100 { action "/etc/rc.d/syscons setkeyboard /dev/kbd0"; }; -attach 100 { - device-name "ums[0-9]+"; - action "/etc/rc.d/moused quietstart $device-name"; +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "ums[0-9]+"; + + action "/etc/rc.d/moused quietstart $cdev"; }; -detach 100 { - device-name "ums[0-9]+"; - action "/etc/rc.d/moused stop $device-name"; +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "DESTROY"; + match "cdev" "ums[0-9]+"; + + action "/etc/rc.d/moused stop $cdev"; }; # Firmware download into the ActiveWire board. After the firmware download is Modified: stable/9/usr.sbin/moused/moused.c ============================================================================== --- stable/9/usr.sbin/moused/moused.c Mon Oct 1 05:43:24 2012 (r241083) +++ stable/9/usr.sbin/moused/moused.c Mon Oct 1 05:48:46 2012 (r241084) @@ -408,6 +408,7 @@ static struct rodentparam { int cfd; /* /dev/consolectl file descriptor */ int mremsfd; /* mouse remote server file descriptor */ int mremcfd; /* mouse remote client file descriptor */ + int is_removable; /* set if device is removable, like USB */ long clickthreshold; /* double click speed in msec */ long button2timeout; /* 3 button emulation timeout */ mousehw_t hw; /* mouse device hardware information */ @@ -434,6 +435,7 @@ static struct rodentparam { .cfd = -1, .mremsfd = -1, .mremcfd = -1, + .is_removable = 0, .clickthreshold = DFLT_CLICKTHRESHOLD, .button2timeout = DFLT_BUTTON2TIMEOUT, .accelx = 1.0, @@ -570,7 +572,6 @@ main(int argc, char *argv[]) int c; int i; int j; - static int retry; for (i = 0; i < MOUSE_MAXBUTTON; ++i) mstate[i] = &bstate[i]; @@ -876,10 +877,8 @@ main(int argc, char *argv[]) usage(); } - retry = 1; - if (strncmp(rodent.portname, "/dev/ums", 8) == 0) { - retry = 5; - } + if (strncmp(rodent.portname, "/dev/ums", 8) == 0) + rodent.is_removable = 1; for (;;) { if (setjmp(env) == 0) { @@ -888,13 +887,8 @@ main(int argc, char *argv[]) signal(SIGQUIT, cleanup); signal(SIGTERM, cleanup); signal(SIGUSR1, pause_mouse); - for (i = 0; i < retry; ++i) { - if (i > 0) - sleep(2); - rodent.mfd = open(rodent.portname, O_RDWR | O_NONBLOCK); - if (rodent.mfd != -1 || errno != ENOENT) - break; - } + + rodent.mfd = open(rodent.portname, O_RDWR | O_NONBLOCK); if (rodent.mfd == -1) logerr(1, "unable to open %s", rodent.portname); if (r_identify() == MOUSE_PROTO_UNKNOWN) { @@ -944,6 +938,8 @@ main(int argc, char *argv[]) if (rodent.cfd != -1) close(rodent.cfd); rodent.mfd = rodent.cfd = -1; + if (rodent.is_removable) + exit(0); } /* NOT REACHED */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 05:57:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC88C1065670; Mon, 1 Oct 2012 05:57:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9679F8FC1A; Mon, 1 Oct 2012 05:57:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915vnmv091451; Mon, 1 Oct 2012 05:57:49 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915vnBt091448; Mon, 1 Oct 2012 05:57:49 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010557.q915vnBt091448@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 05:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241085 - in stable/8: etc usr.sbin/moused X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 05:57:49 -0000 Author: hselasky Date: Mon Oct 1 05:57:48 2012 New Revision: 241085 URL: http://svn.freebsd.org/changeset/base/241085 Log: MFC r233090 and r240891: The UMS module is now loaded by rules in /etc/devd/usb.conf. Improve moused when used with USB mouse devices. Modified: stable/8/etc/devd.conf stable/8/usr.sbin/moused/moused.c Directory Properties: stable/8/etc/ (props changed) stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/moused/ (props changed) Modified: stable/8/etc/devd.conf ============================================================================== --- stable/8/etc/devd.conf Mon Oct 1 05:48:46 2012 (r241084) +++ stable/8/etc/devd.conf Mon Oct 1 05:57:48 2012 (r241085) @@ -114,14 +114,22 @@ detach 100 { action "/etc/rc.d/syscons setkeyboard /dev/kbd0"; }; -attach 100 { - device-name "ums[0-9]+"; - action "/etc/rc.d/moused quietstart $device-name"; +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "ums[0-9]+"; + + action "/etc/rc.d/moused quietstart $cdev"; }; -detach 100 { - device-name "ums[0-9]+"; - action "/etc/rc.d/moused stop $device-name"; +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "DESTROY"; + match "cdev" "ums[0-9]+"; + + action "/etc/rc.d/moused stop $cdev"; }; # Firmware download into the ActiveWire board. After the firmware download is Modified: stable/8/usr.sbin/moused/moused.c ============================================================================== --- stable/8/usr.sbin/moused/moused.c Mon Oct 1 05:48:46 2012 (r241084) +++ stable/8/usr.sbin/moused/moused.c Mon Oct 1 05:57:48 2012 (r241085) @@ -408,6 +408,7 @@ static struct rodentparam { int cfd; /* /dev/consolectl file descriptor */ int mremsfd; /* mouse remote server file descriptor */ int mremcfd; /* mouse remote client file descriptor */ + int is_removable; /* set if device is removable, like USB */ long clickthreshold; /* double click speed in msec */ long button2timeout; /* 3 button emulation timeout */ mousehw_t hw; /* mouse device hardware information */ @@ -434,6 +435,7 @@ static struct rodentparam { .cfd = -1, .mremsfd = -1, .mremcfd = -1, + .is_removable = 0, .clickthreshold = DFLT_CLICKTHRESHOLD, .button2timeout = DFLT_BUTTON2TIMEOUT, .accelx = 1.0, @@ -564,15 +566,12 @@ static void mremote_clientchg(int add); static int kidspad(u_char rxc, mousestatus_t *act); static int gtco_digipad(u_char, mousestatus_t *); -static int usbmodule(void); - int main(int argc, char *argv[]) { int c; int i; int j; - static int retry; for (i = 0; i < MOUSE_MAXBUTTON; ++i) mstate[i] = &bstate[i]; @@ -878,11 +877,8 @@ main(int argc, char *argv[]) usage(); } - retry = 1; - if (strncmp(rodent.portname, "/dev/ums", 8) == 0) { - if (usbmodule() != 0) - retry = 5; - } + if (strncmp(rodent.portname, "/dev/ums", 8) == 0) + rodent.is_removable = 1; for (;;) { if (setjmp(env) == 0) { @@ -891,13 +887,8 @@ main(int argc, char *argv[]) signal(SIGQUIT, cleanup); signal(SIGTERM, cleanup); signal(SIGUSR1, pause_mouse); - for (i = 0; i < retry; ++i) { - if (i > 0) - sleep(2); - rodent.mfd = open(rodent.portname, O_RDWR | O_NONBLOCK); - if (rodent.mfd != -1 || errno != ENOENT) - break; - } + + rodent.mfd = open(rodent.portname, O_RDWR | O_NONBLOCK); if (rodent.mfd == -1) logerr(1, "unable to open %s", rodent.portname); if (r_identify() == MOUSE_PROTO_UNKNOWN) { @@ -947,18 +938,14 @@ main(int argc, char *argv[]) if (rodent.cfd != -1) close(rodent.cfd); rodent.mfd = rodent.cfd = -1; + if (rodent.is_removable) + exit(0); } /* NOT REACHED */ exit(0); } -static int -usbmodule(void) -{ - return (kld_isloaded("uhub/ums") || kld_load("ums") != -1); -} - /* * Function to calculate linear acceleration. * From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 06:00:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 060391065670; Mon, 1 Oct 2012 06:00:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCAF98FC15; Mon, 1 Oct 2012 06:00:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91608gb091779; Mon, 1 Oct 2012 06:00:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q916084m091778; Mon, 1 Oct 2012 06:00:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010600.q916084m091778@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 06:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241086 - stable/8/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 06:00:09 -0000 Author: hselasky Date: Mon Oct 1 06:00:08 2012 New Revision: 241086 URL: http://svn.freebsd.org/changeset/base/241086 Log: MFC r240856: Correct driver name. Modified: stable/8/sys/dev/usb/serial/uchcom.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uchcom.c Mon Oct 1 05:57:48 2012 (r241085) +++ stable/8/sys/dev/usb/serial/uchcom.c Mon Oct 1 06:00:08 2012 (r241086) @@ -847,7 +847,7 @@ static device_method_t uchcom_methods[] }; static driver_t uchcom_driver = { - .name = "ucom", + .name = "uchcom", .methods = uchcom_methods, .size = sizeof(struct uchcom_softc) }; From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 06:01:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 960ED1065674; Mon, 1 Oct 2012 06:01:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8014C8FC08; Mon, 1 Oct 2012 06:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9161Ld5092002; Mon, 1 Oct 2012 06:01:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9161Lnc092000; Mon, 1 Oct 2012 06:01:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010601.q9161Lnc092000@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 06:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241087 - stable/9/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 06:01:21 -0000 Author: hselasky Date: Mon Oct 1 06:01:20 2012 New Revision: 241087 URL: http://svn.freebsd.org/changeset/base/241087 Log: MFC r240856: Correct driver name. Modified: stable/9/sys/dev/usb/serial/uchcom.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/9/sys/dev/usb/serial/uchcom.c Mon Oct 1 06:00:08 2012 (r241086) +++ stable/9/sys/dev/usb/serial/uchcom.c Mon Oct 1 06:01:20 2012 (r241087) @@ -870,7 +870,7 @@ static device_method_t uchcom_methods[] }; static driver_t uchcom_driver = { - .name = "ucom", + .name = "uchcom", .methods = uchcom_methods, .size = sizeof(struct uchcom_softc) }; From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 06:42:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9149F1065674; Mon, 1 Oct 2012 06:42:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 730348FC17; Mon, 1 Oct 2012 06:42:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q916g8HT097048; Mon, 1 Oct 2012 06:42:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q916g8PO097041; Mon, 1 Oct 2012 06:42:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010642.q916g8PO097041@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 06:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241088 - in stable/9/sys: cddl/contrib/opensolaris/uts/common/dtrace dev/drm dev/drm2 dev/ksyms fs/devfs ofed/include/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 06:42:08 -0000 Author: hselasky Date: Mon Oct 1 06:42:07 2012 New Revision: 241088 URL: http://svn.freebsd.org/changeset/base/241088 Log: MFC r239303: Streamline use of cdevpriv and correct some corner cases. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/dev/drm/drm_fops.c stable/9/sys/dev/drm2/drm_fops.c stable/9/sys/dev/ksyms/ksyms.c stable/9/sys/fs/devfs/devfs_vnops.c stable/9/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Oct 1 06:01:20 2012 (r241087) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Oct 1 06:42:07 2012 (r241088) @@ -15517,8 +15517,6 @@ dtrace_close(struct cdev *dev, int flags kmem_free(state, 0); #if __FreeBSD_version < 800039 dev->si_drv1 = NULL; -#else - devfs_clear_cdevpriv(); #endif #endif } Modified: stable/9/sys/dev/drm/drm_fops.c ============================================================================== --- stable/9/sys/dev/drm/drm_fops.c Mon Oct 1 06:01:20 2012 (r241087) +++ stable/9/sys/dev/drm/drm_fops.c Mon Oct 1 06:42:07 2012 (r241088) @@ -57,12 +57,6 @@ int drm_open_helper(struct cdev *kdev, i return ENOMEM; } - retcode = devfs_set_cdevpriv(priv, drm_close); - if (retcode != 0) { - free(priv, DRM_MEM_FILES); - return retcode; - } - DRM_LOCK(); priv->dev = dev; priv->uid = p->td_ucred->cr_svuid; @@ -76,7 +70,6 @@ int drm_open_helper(struct cdev *kdev, i /* shared code returns -errno */ retcode = -dev->driver->open(dev, priv); if (retcode != 0) { - devfs_clear_cdevpriv(); free(priv, DRM_MEM_FILES); DRM_UNLOCK(); return retcode; @@ -89,7 +82,12 @@ int drm_open_helper(struct cdev *kdev, i TAILQ_INSERT_TAIL(&dev->files, priv, link); DRM_UNLOCK(); kdev->si_drv1 = dev; - return 0; + + retcode = devfs_set_cdevpriv(priv, drm_close); + if (retcode != 0) + drm_close(priv); + + return (retcode); } Modified: stable/9/sys/dev/drm2/drm_fops.c ============================================================================== --- stable/9/sys/dev/drm2/drm_fops.c Mon Oct 1 06:01:20 2012 (r241087) +++ stable/9/sys/dev/drm2/drm_fops.c Mon Oct 1 06:42:07 2012 (r241088) @@ -57,12 +57,6 @@ int drm_open_helper(struct cdev *kdev, i return ENOMEM; } - retcode = devfs_set_cdevpriv(priv, drm_close); - if (retcode != 0) { - free(priv, DRM_MEM_FILES); - return retcode; - } - DRM_LOCK(dev); priv->dev = dev; priv->uid = p->td_ucred->cr_svuid; @@ -83,7 +77,6 @@ int drm_open_helper(struct cdev *kdev, i /* shared code returns -errno */ retcode = -dev->driver->open(dev, priv); if (retcode != 0) { - devfs_clear_cdevpriv(); free(priv, DRM_MEM_FILES); DRM_UNLOCK(dev); return retcode; @@ -96,7 +89,12 @@ int drm_open_helper(struct cdev *kdev, i TAILQ_INSERT_TAIL(&dev->files, priv, link); DRM_UNLOCK(dev); kdev->si_drv1 = dev; - return 0; + + retcode = devfs_set_cdevpriv(priv, drm_close); + if (retcode != 0) + drm_close(priv); + + return (retcode); } static bool Modified: stable/9/sys/dev/ksyms/ksyms.c ============================================================================== --- stable/9/sys/dev/ksyms/ksyms.c Mon Oct 1 06:01:20 2012 (r241087) +++ stable/9/sys/dev/ksyms/ksyms.c Mon Oct 1 06:42:07 2012 (r241088) @@ -579,8 +579,6 @@ ksyms_close(struct cdev *dev, int flags /* Unmap the buffer from the process address space. */ error = copyout_unmap(td, sc->sc_uaddr, sc->sc_usize); - devfs_clear_cdevpriv(); - return (error); } Modified: stable/9/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/9/sys/fs/devfs/devfs_vnops.c Mon Oct 1 06:01:20 2012 (r241087) +++ stable/9/sys/fs/devfs/devfs_vnops.c Mon Oct 1 06:42:07 2012 (r241088) @@ -1081,6 +1081,9 @@ devfs_open(struct vop_open_args *ap) error = dsw->d_fdopen(dev, ap->a_mode, td, fp); else error = dsw->d_open(dev, ap->a_mode, S_IFCHR, td); + /* cleanup any cdevpriv upon error */ + if (error != 0) + devfs_clear_cdevpriv(); td->td_fpop = fpop; vn_lock(vp, vlocked | LK_RETRY); Modified: stable/9/sys/ofed/include/linux/linux_compat.c ============================================================================== --- stable/9/sys/ofed/include/linux/linux_compat.c Mon Oct 1 06:01:20 2012 (r241087) +++ stable/9/sys/ofed/include/linux/linux_compat.c Mon Oct 1 06:42:07 2012 (r241088) @@ -263,7 +263,6 @@ linux_dev_close(struct cdev *dev, int ff if ((error = devfs_get_cdevpriv((void **)&filp)) != 0) return (error); filp->f_flags = file->f_flag; - devfs_clear_cdevpriv(); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 06:49:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C4E110656D6; Mon, 1 Oct 2012 06:49:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 073338FC14; Mon, 1 Oct 2012 06:49:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q916mxli097888; Mon, 1 Oct 2012 06:48:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q916mxbg097886; Mon, 1 Oct 2012 06:48:59 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010648.q916mxbg097886@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 06:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241089 - head/etc/devd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 06:49:00 -0000 Author: hselasky Date: Mon Oct 1 06:48:59 2012 New Revision: 241089 URL: http://svn.freebsd.org/changeset/base/241089 Log: Regenerate usb.conf MFC after: 1 week Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Mon Oct 1 06:42:07 2012 (r241088) +++ head/etc/devd/usb.conf Mon Oct 1 06:48:59 2012 (r241089) @@ -157,7 +157,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeee c|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeee b|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -2061,7 +2061,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784|0x1790)"; + match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784|0x1790|0x179d)"; action "kldload -n if_run"; }; @@ -3861,7 +3861,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1a86"; - match "product" "0x7523"; + match "product" "(0x5523|0x7523)"; action "kldload -n uchcom"; }; @@ -4600,5 +4600,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2271 USB entries processed +# 2274 USB entries processed From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 08:33:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7712F106564A; Mon, 1 Oct 2012 08:33:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61A3D8FC16; Mon, 1 Oct 2012 08:33:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q918Xe7a011315; Mon, 1 Oct 2012 08:33:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q918XerP011312; Mon, 1 Oct 2012 08:33:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210010833.q918XerP011312@svn.freebsd.org> From: Alexander Motin Date: Mon, 1 Oct 2012 08:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241091 - stable/9/sys/dev/drm2/i915 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 08:33:40 -0000 Author: mav Date: Mon Oct 1 08:33:39 2012 New Revision: 241091 URL: http://svn.freebsd.org/changeset/base/241091 Log: MFC r240917: Reduce delays in several wait loops from 10ms to 10us, same is it is done in Linux. This substantially increases graphics performance on Ivy Bridge. Submitted by: avg@ Reviewed by: kib@ Modified: stable/9/sys/dev/drm2/i915/i915_drv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- stable/9/sys/dev/drm2/i915/i915_drv.c Mon Oct 1 08:32:05 2012 (r241090) +++ stable/9/sys/dev/drm2/i915/i915_drv.c Mon Oct 1 08:33:39 2012 (r241091) @@ -486,14 +486,14 @@ __gen6_gt_force_wake_get(struct drm_i915 count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1)) - DELAY(10000); + DELAY(10); I915_WRITE_NOTRACE(FORCEWAKE, 1); POSTING_READ(FORCEWAKE); count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1) == 0) - DELAY(10000); + DELAY(10); } void @@ -503,14 +503,14 @@ __gen6_gt_force_wake_mt_get(struct drm_i count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_MT_ACK) & 1)) - DELAY(10000); + DELAY(10); I915_WRITE_NOTRACE(FORCEWAKE_MT, (1<<16) | 1); POSTING_READ(FORCEWAKE_MT); count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_MT_ACK) & 1) == 0) - DELAY(10000); + DELAY(10); } void @@ -572,7 +572,7 @@ __gen6_gt_wait_for_fifo(struct drm_i915_ int loop = 500; u32 fifo = I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES); while (fifo <= GT_FIFO_NUM_RESERVED_ENTRIES && loop--) { - DELAY(10000); + DELAY(10); fifo = I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES); } if (loop < 0 && fifo <= GT_FIFO_NUM_RESERVED_ENTRIES) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 10:46:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4110D106566C; Mon, 1 Oct 2012 10:46:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1168FC15; Mon, 1 Oct 2012 10:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91AkaoV030263; Mon, 1 Oct 2012 10:46:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91AkZ27030261; Mon, 1 Oct 2012 10:46:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210011046.q91AkZ27030261@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 1 Oct 2012 10:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241092 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 10:46:36 -0000 Author: kib Date: Mon Oct 1 10:46:35 2012 New Revision: 241092 URL: http://svn.freebsd.org/changeset/base/241092 Log: Add the UPDATING note about padlock rng support requiring the config change. Requested by: Dewayne Geraghty MFC after: 3 days Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Oct 1 08:33:39 2012 (r241091) +++ head/UPDATING Mon Oct 1 10:46:35 2012 (r241092) @@ -24,6 +24,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20120913: + The random(4) support for the VIA hardware random number + generator (`PADLOCK') is no longer enabled unconditionally. + Add the PADLOCK_RNG option in the custom kernel config if + needed. The GENERIC kernels on i386 and amd64 do include the + option, so the change only affects the custom kernel + configurations. + 20120908: The pf(4) packet filter ABI has been changed. pfctl(8) and snmp_pf module need to be recompiled to work with new kernel. From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 10:52:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6686A106564A; Mon, 1 Oct 2012 10:52:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50DF48FC12; Mon, 1 Oct 2012 10:52:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91AqBjH032104; Mon, 1 Oct 2012 10:52:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91AqBeE032101; Mon, 1 Oct 2012 10:52:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210011052.q91AqBeE032101@svn.freebsd.org> From: Alexander Motin Date: Mon, 1 Oct 2012 10:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241093 - releng/9.1/sys/dev/drm2/i915 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 10:52:11 -0000 Author: mav Date: Mon Oct 1 10:52:10 2012 New Revision: 241093 URL: http://svn.freebsd.org/changeset/base/241093 Log: MFC r240917: Reduce delays in several wait loops from 10ms to 10us, same is it is done in Linux. This substantially increases graphics performance on Ivy Bridge. Submitted by: avg@ Reviewed by: kib@ Approved by: re (kib) Modified: releng/9.1/sys/dev/drm2/i915/i915_drv.c Directory Properties: releng/9.1/sys/ (props changed) releng/9.1/sys/dev/ (props changed) Modified: releng/9.1/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- releng/9.1/sys/dev/drm2/i915/i915_drv.c Mon Oct 1 10:46:35 2012 (r241092) +++ releng/9.1/sys/dev/drm2/i915/i915_drv.c Mon Oct 1 10:52:10 2012 (r241093) @@ -486,14 +486,14 @@ __gen6_gt_force_wake_get(struct drm_i915 count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1)) - DELAY(10000); + DELAY(10); I915_WRITE_NOTRACE(FORCEWAKE, 1); POSTING_READ(FORCEWAKE); count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1) == 0) - DELAY(10000); + DELAY(10); } void @@ -503,14 +503,14 @@ __gen6_gt_force_wake_mt_get(struct drm_i count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_MT_ACK) & 1)) - DELAY(10000); + DELAY(10); I915_WRITE_NOTRACE(FORCEWAKE_MT, (1<<16) | 1); POSTING_READ(FORCEWAKE_MT); count = 0; while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_MT_ACK) & 1) == 0) - DELAY(10000); + DELAY(10); } void @@ -572,7 +572,7 @@ __gen6_gt_wait_for_fifo(struct drm_i915_ int loop = 500; u32 fifo = I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES); while (fifo <= GT_FIFO_NUM_RESERVED_ENTRIES && loop--) { - DELAY(10000); + DELAY(10); fifo = I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES); } if (loop < 0 && fifo <= GT_FIFO_NUM_RESERVED_ENTRIES) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 10:54:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF727106564A; Mon, 1 Oct 2012 10:54:04 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8D968FC19; Mon, 1 Oct 2012 10:54:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91As4Ct032426; Mon, 1 Oct 2012 10:54:04 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91As4gr032424; Mon, 1 Oct 2012 10:54:04 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210011054.q91As4gr032424@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 1 Oct 2012 10:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241094 - stable/9/sys/ofed/drivers/infiniband/ulp/ipoib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 10:54:04 -0000 Author: melifaro Date: Mon Oct 1 10:54:04 2012 New Revision: 241094 URL: http://svn.freebsd.org/changeset/base/241094 Log: Merge r240082. Remove unneeded ipfw headers introduced in r213447 from Infiniband code. Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Mon Oct 1 10:52:10 2012 (r241093) +++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Mon Oct 1 10:54:04 2012 (r241094) @@ -67,8 +67,6 @@ #include #include #include -#include -#include #endif #ifdef INET6 #include From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 11:16:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D14B11065726; Mon, 1 Oct 2012 11:16:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB2CC8FC0C; Mon, 1 Oct 2012 11:16:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91BGMcw035776; Mon, 1 Oct 2012 11:16:22 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91BGMlM035774; Mon, 1 Oct 2012 11:16:22 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210011116.q91BGMlM035774@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 1 Oct 2012 11:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241095 - stable/9/usr.bin/rctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 11:16:23 -0000 Author: trasz Date: Mon Oct 1 11:16:22 2012 New Revision: 241095 URL: http://svn.freebsd.org/changeset/base/241095 Log: MFC r240575: Remove references to userstat(1) and jailstat(1). Those tools were never merged from the Perforce branch. They might be brought in when %CPU limits go into the tree. PR: docs/171240 Modified: stable/9/usr.bin/rctl/rctl.8 Directory Properties: stable/9/usr.bin/rctl/ (props changed) Modified: stable/9/usr.bin/rctl/rctl.8 ============================================================================== --- stable/9/usr.bin/rctl/rctl.8 Mon Oct 1 10:54:04 2012 (r241094) +++ stable/9/usr.bin/rctl/rctl.8 Mon Oct 1 11:16:22 2012 (r241095) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2012 +.Dd September 16, 2012 .Dt RCTL 8 .Os .Sh NAME @@ -184,9 +184,7 @@ Display resource usage information for j .Pp Display all the rules applicable to process with PID 512. .Sh SEE ALSO -.Xr rctl.conf 5 , -.Xr jailstat 8 , -.Xr userstat 8 +.Xr rctl.conf 5 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 11:26:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A1481065A55; Mon, 1 Oct 2012 11:26:52 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E155F8FC08; Mon, 1 Oct 2012 11:26:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91BQpn1037220; Mon, 1 Oct 2012 11:26:51 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91BQpia037155; Mon, 1 Oct 2012 11:26:51 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210011126.q91BQpia037155@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 1 Oct 2012 11:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241096 - in head/release/doc: . de_DE.ISO8859-1/early-adopter de_DE.ISO8859-1/errata de_DE.ISO8859-1/hardware/alpha de_DE.ISO8859-1/hardware/common de_DE.ISO8859-1/hardware/i386 de_DE.... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 11:26:53 -0000 Author: gabor Date: Mon Oct 1 11:26:49 2012 New Revision: 241096 URL: http://svn.freebsd.org/changeset/base/241096 Log: - Rename .sgml files to .xml to track the recent doc changes MFC after: 1 day Added: head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml head/release/doc/de_DE.ISO8859-1/errata/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/errata/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/installation/common/install.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml head/release/doc/de_DE.ISO8859-1/installation/common/layout.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml head/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/trouble.sgml head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.sgml head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml head/release/doc/de_DE.ISO8859-1/readme/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/readme/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/share/xml/ - copied from r241094, head/release/doc/de_DE.ISO8859-1/share/sgml/ head/release/doc/en_US.ISO8859-1/errata/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/errata/article.sgml head/release/doc/en_US.ISO8859-1/hardware/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/en_US.ISO8859-1/readme/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/readme/article.sgml head/release/doc/en_US.ISO8859-1/relnotes/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/relnotes/article.sgml head/release/doc/en_US.ISO8859-1/share/xml/ - copied from r241094, head/release/doc/en_US.ISO8859-1/share/sgml/ head/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml head/release/doc/fr_FR.ISO8859-1/errata/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/errata/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/install.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml head/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/share/xml/ - copied from r241094, head/release/doc/fr_FR.ISO8859-1/share/sgml/ head/release/doc/ja_JP.eucJP/errata/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/errata/article.sgml head/release/doc/ja_JP.eucJP/hardware/alpha/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/alpha/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/amd64/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml head/release/doc/ja_JP.eucJP/hardware/common/artheader.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml head/release/doc/ja_JP.eucJP/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/ja_JP.eucJP/hardware/common/dev.sgml head/release/doc/ja_JP.eucJP/hardware/common/intro.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/common/intro.sgml head/release/doc/ja_JP.eucJP/hardware/i386/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/i386/article.sgml head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/ia64/article.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/pc98/article.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/sparc64/article.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.sgml head/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/alpha/article.sgml head/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/amd64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/common/new.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ja_JP.eucJP/relnotes/common/new.sgml head/release/doc/ja_JP.eucJP/relnotes/i386/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/i386/article.sgml head/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/ia64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/pc98/article.sgml head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.sgml head/release/doc/ja_JP.eucJP/share/xml/ - copied from r241094, head/release/doc/ja_JP.eucJP/share/sgml/ head/release/doc/ja_JP.eucJP/share/xml/dev-auto-ja.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/share/sgml/dev-auto-ja.sgml head/release/doc/ru_RU.KOI8-R/errata/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/errata/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/common/intro.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/i386/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml head/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/abstract.sgml head/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/installation/common/install.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/install.sgml head/release/doc/ru_RU.KOI8-R/installation/common/layout.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml head/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.sgml head/release/doc/ru_RU.KOI8-R/installation/i386/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/i386/article.sgml head/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/readme/article.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/readme/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/share/xml/ - copied from r241094, head/release/doc/ru_RU.KOI8-R/share/sgml/ head/release/doc/ru_RU.KOI8-R/share/xml/dev-auto-ru.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/share/sgml/dev-auto-ru.sgml head/release/doc/share/xml/ - copied from r241094, head/release/doc/share/sgml/ head/release/doc/zh_CN.GB2312/errata/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/errata/article.sgml head/release/doc/zh_CN.GB2312/hardware/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/hardware/article.sgml head/release/doc/zh_CN.GB2312/readme/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/readme/article.sgml head/release/doc/zh_CN.GB2312/relnotes/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/relnotes/article.sgml head/release/doc/zh_CN.GB2312/share/xml/ - copied from r241094, head/release/doc/zh_CN.GB2312/share/sgml/ Deleted: head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml head/release/doc/de_DE.ISO8859-1/errata/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml head/release/doc/de_DE.ISO8859-1/installation/common/trouble.sgml head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.sgml head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml head/release/doc/de_DE.ISO8859-1/readme/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/share/sgml/ head/release/doc/en_US.ISO8859-1/errata/article.sgml head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/en_US.ISO8859-1/readme/article.sgml head/release/doc/en_US.ISO8859-1/relnotes/article.sgml head/release/doc/en_US.ISO8859-1/share/sgml/ head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml head/release/doc/fr_FR.ISO8859-1/errata/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/share/sgml/ head/release/doc/ja_JP.eucJP/errata/article.sgml head/release/doc/ja_JP.eucJP/hardware/alpha/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml head/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml head/release/doc/ja_JP.eucJP/hardware/common/dev.sgml head/release/doc/ja_JP.eucJP/hardware/common/intro.sgml head/release/doc/ja_JP.eucJP/hardware/i386/article.sgml head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/article.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/article.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/article.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.sgml head/release/doc/ja_JP.eucJP/relnotes/alpha/article.sgml head/release/doc/ja_JP.eucJP/relnotes/amd64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/common/new.sgml head/release/doc/ja_JP.eucJP/relnotes/i386/article.sgml head/release/doc/ja_JP.eucJP/relnotes/ia64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/pc98/article.sgml head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.sgml head/release/doc/ja_JP.eucJP/share/sgml/ head/release/doc/ja_JP.eucJP/share/xml/dev-auto-ja.sgml head/release/doc/ru_RU.KOI8-R/errata/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/intro.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml head/release/doc/ru_RU.KOI8-R/installation/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/installation/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/common/abstract.sgml head/release/doc/ru_RU.KOI8-R/installation/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/installation/common/install.sgml head/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml head/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.sgml head/release/doc/ru_RU.KOI8-R/installation/i386/article.sgml head/release/doc/ru_RU.KOI8-R/installation/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/readme/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/share/sgml/ head/release/doc/ru_RU.KOI8-R/share/xml/dev-auto-ru.sgml head/release/doc/share/sgml/ head/release/doc/zh_CN.GB2312/errata/article.sgml head/release/doc/zh_CN.GB2312/hardware/article.sgml head/release/doc/zh_CN.GB2312/readme/article.sgml head/release/doc/zh_CN.GB2312/relnotes/article.sgml head/release/doc/zh_CN.GB2312/share/sgml/ Modified: head/release/doc/Makefile head/release/doc/README head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile head/release/doc/de_DE.ISO8859-1/errata/Makefile head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile head/release/doc/de_DE.ISO8859-1/hardware/common/hw.ent head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile head/release/doc/de_DE.ISO8859-1/installation/common/install.ent head/release/doc/de_DE.ISO8859-1/installation/i386/Makefile head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile head/release/doc/de_DE.ISO8859-1/readme/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile head/release/doc/de_DE.ISO8859-1/share/xml/catalog head/release/doc/de_DE.ISO8859-1/share/xml/release.dsl head/release/doc/en_US.ISO8859-1/errata/Makefile head/release/doc/en_US.ISO8859-1/hardware/Makefile head/release/doc/en_US.ISO8859-1/readme/Makefile head/release/doc/en_US.ISO8859-1/relnotes/Makefile head/release/doc/fr_FR.ISO8859-1/early-adopter/Makefile head/release/doc/fr_FR.ISO8859-1/errata/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/common/hw.ent head/release/doc/fr_FR.ISO8859-1/hardware/i386/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/ia64/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/pc98/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/Makefile head/release/doc/fr_FR.ISO8859-1/installation/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/installation/common/install.ent head/release/doc/fr_FR.ISO8859-1/installation/i386/Makefile head/release/doc/fr_FR.ISO8859-1/installation/pc98/Makefile head/release/doc/fr_FR.ISO8859-1/installation/sparc64/Makefile head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/relnotes/common/relnotes.ent head/release/doc/fr_FR.ISO8859-1/relnotes/i386/Makefile head/release/doc/ja_JP.eucJP/errata/Makefile head/release/doc/ja_JP.eucJP/hardware/alpha/Makefile head/release/doc/ja_JP.eucJP/hardware/amd64/Makefile head/release/doc/ja_JP.eucJP/hardware/common/hw.ent head/release/doc/ja_JP.eucJP/hardware/i386/Makefile head/release/doc/ja_JP.eucJP/hardware/ia64/Makefile head/release/doc/ja_JP.eucJP/hardware/pc98/Makefile head/release/doc/ja_JP.eucJP/hardware/sparc64/Makefile head/release/doc/ja_JP.eucJP/relnotes/alpha/Makefile head/release/doc/ja_JP.eucJP/relnotes/amd64/Makefile head/release/doc/ja_JP.eucJP/relnotes/common/relnotes.ent head/release/doc/ja_JP.eucJP/relnotes/i386/Makefile head/release/doc/ja_JP.eucJP/relnotes/ia64/Makefile head/release/doc/ja_JP.eucJP/relnotes/pc98/Makefile head/release/doc/ja_JP.eucJP/relnotes/sparc64/Makefile head/release/doc/ja_JP.eucJP/share/xml/catalog head/release/doc/ru_RU.KOI8-R/errata/Makefile head/release/doc/ru_RU.KOI8-R/hardware/alpha/Makefile head/release/doc/ru_RU.KOI8-R/hardware/amd64/Makefile head/release/doc/ru_RU.KOI8-R/hardware/common/hw.ent head/release/doc/ru_RU.KOI8-R/hardware/i386/Makefile head/release/doc/ru_RU.KOI8-R/hardware/ia64/Makefile head/release/doc/ru_RU.KOI8-R/hardware/pc98/Makefile head/release/doc/ru_RU.KOI8-R/hardware/sparc64/Makefile head/release/doc/ru_RU.KOI8-R/installation/alpha/Makefile head/release/doc/ru_RU.KOI8-R/installation/amd64/Makefile head/release/doc/ru_RU.KOI8-R/installation/common/install.ent head/release/doc/ru_RU.KOI8-R/installation/i386/Makefile head/release/doc/ru_RU.KOI8-R/installation/ia64/Makefile head/release/doc/ru_RU.KOI8-R/installation/pc98/Makefile head/release/doc/ru_RU.KOI8-R/installation/sparc64/Makefile head/release/doc/ru_RU.KOI8-R/readme/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/alpha/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/amd64/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/common/relnotes.ent head/release/doc/ru_RU.KOI8-R/relnotes/i386/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/ia64/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/pc98/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/Makefile head/release/doc/ru_RU.KOI8-R/share/examples/dev-auto-translate.pl head/release/doc/ru_RU.KOI8-R/share/xml/catalog head/release/doc/ru_RU.KOI8-R/share/xml/release.dsl head/release/doc/share/mk/doc.relnotes.mk head/release/doc/share/xml/Makefile head/release/doc/share/xml/catalog head/release/doc/zh_CN.GB2312/errata/Makefile head/release/doc/zh_CN.GB2312/hardware/Makefile head/release/doc/zh_CN.GB2312/readme/Makefile head/release/doc/zh_CN.GB2312/relnotes/Makefile Modified: head/release/doc/Makefile ============================================================================== --- head/release/doc/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -8,7 +8,7 @@ SUBDIR+= ${RELNOTES_LANG} .else SUBDIR+= en_US.ISO8859-1 .endif -SUBDIR+= share/sgml +SUBDIR+= share/xml RELN_ROOT?= ${.CURDIR} Modified: head/release/doc/README ============================================================================== --- head/release/doc/README Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/README Mon Oct 1 11:26:49 2012 (r241096) @@ -24,34 +24,34 @@ share/mk/doc.relnotes.mk Common Makefile definitions for RELNOTESng. These definitions mostly accommodate the fact that we're building DocProj-like documents outside the doc/ tree. -share/sgml/catalog +share/xml/catalog Main SGML catalog for all language-neutral (and default EN) stylesheet and entity files. Can be overridden if needed for translations. -share/sgml/default.dsl +share/xml/default.dsl All documents build with this file as a stylesheet. All it does is to make it possible to use the document catalogs to locate the "real" stylesheet by reference, rather than having to specify it by pathname. -share/sgml/release.dsl +share/xml/release.dsl Language-neutral stylesheet. This stylesheet supports the arch= attribute on (all?) DocBook elements; elements with an arch= attribute are only included in the output if their value is equal to the value of the &arch; entity. In the future, arch= could be a list of possible &arch; entity values that match, such as "i386,sparc64". -share/sgml/release.ent +share/xml/release.ent Release information. Need to update the entry definitions in this file when rolling new revisions; these should take effect in all documents. -en_US.ISO8859-1/share/sgml/release.dsl +en_US.ISO8859-1/share/xml/release.dsl Language-dependent stylesheet for en, but also the default for translations if they don't override the settings here. This stylesheet sets the email footer at the bottom of HTML pages, as well as a few other parameters. If necessary for translations, this file can be overridden with - */share/sgml/release.dsl and */share/sgml/catalog. + */share/xml/release.dsl and */share/xml/catalog. */relnotes/common/ Directory for multi-architecture release notes files. @@ -88,7 +88,7 @@ tree. For example: % make DOC_PREFIX=/usr/doc all All definition of the "current" version of FreeBSD is contained in the -share/sgml/release.ent file; release engineers should peruse the +share/xml/release.ent file; release engineers should peruse the contents of this file carefully when doing version number bumps. When creating content for the architecture-dependent files, authors @@ -108,9 +108,9 @@ When creating a translation, make a new directory with a language code (paralleling the DocProj directory structure). If necessary, new language-dependent HTML footers can be generated by making a new language-dependent -${LANG}/share/sgml/release.dsl, a ${LANG}/share/sgml/catalog that +${LANG}/share/xml/release.dsl, a ${LANG}/share/xml/catalog that points to it, and a new definition in the Makefiles that adds -${LANG}/share/sgml/catalog to EXTRA_CATALOGS. Except for the Makefile +${LANG}/share/xml/catalog to EXTRA_CATALOGS. Except for the Makefile changes, this is the same procedure that is used for creating a new translation for DocProj files. Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -17,7 +17,7 @@ FORMATS?= html INSTALL_COMPRESSED?=gz INSTALL_ONLY_COMPRESSED?= -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -13,7 +13,7 @@ The FreeBSD Documentation Project The FreeBSD German Documentation Project $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/early-adopter/article.sgml,v 1.24 2003/05/25 12:44:41 mheinen Exp $ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/early-adopter/article.xml,v 1.24 2003/05/25 12:44:41 mheinen Exp $ basiert auf: 1.15 --> Modified: head/release/doc/de_DE.ISO8859-1/errata/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/errata/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/errata/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -16,7 +16,7 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/errata/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/errata/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/errata/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/errata/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -16,7 +16,7 @@ (If we didn't do this, then the file with the datestamp might not be the one that received the last change in the document.) - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/errata/article.sgml,v 1.39 2003/05/24 13:23:46 ue Exp $ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/errata/article.xml,v 1.39 2003/05/24 13:23:46 ue Exp $ basiert auf: 1.38 --> Modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,11 +13,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-alpha.sgml +SRCS+= article.xml +SRCS+= proc-alpha.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ - - - - - - - - + + + + + + + + Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,11 +13,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-i386.sgml +SRCS+= article.xml +SRCS+= proc-i386.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,11 +13,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -# SRCS+= proc-ia64.sgml +SRCS+= article.xml +# SRCS+= proc-ia64.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,11 +12,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-pc98.sgml +SRCS+= article.xml +SRCS+= proc-pc98.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,11 +12,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-sparc64.sgml +SRCS+= article.xml +SRCS+= proc-sparc64.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -11,13 +11,13 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/abstract.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml -SRCS+= ../common/trouble.sgml -SRCS+= ../common/upgrade.sgml +SRCS+= article.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/abstract.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml +SRCS+= ../common/trouble.xml +SRCS+= ../common/upgrade.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,7 +1,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/common/install.ent ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/install.ent Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/common/install.ent Mon Oct 1 11:26:49 2012 (r241096) @@ -11,10 +11,10 @@ - - - - - - + + + + + + Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/common/install.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/common/install.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,10 +1,10 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -10,13 +10,13 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/abstract.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml -SRCS+= ../common/trouble.sgml -SRCS+= ../common/upgrade.sgml +SRCS+= article.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/abstract.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml +SRCS+= ../common/trouble.xml +SRCS+= ../common/upgrade.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -10,13 +10,13 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/abstract.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml -SRCS+= ../common/trouble.sgml -SRCS+= ../common/upgrade.sgml +SRCS+= article.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/abstract.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml +SRCS+= ../common/trouble.xml +SRCS+= ../common/upgrade.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -10,11 +10,11 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= install.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml +SRCS+= article.xml +SRCS+= install.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -15,7 +15,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/readme/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/readme/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/readme/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -21,7 +21,7 @@ INSTALL_ONLY_COMPRESSED?= # # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/readme/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/readme/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/readme/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -9,7 +9,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,9 +13,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,5 +1,5 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent Mon Oct 1 11:26:49 2012 (r241096) @@ -16,4 +16,4 @@ - + Modified: head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,9 +13,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -15,7 +15,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,9 +12,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -13,7 +13,7 @@ ]> Modified: head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,9 +12,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -15,7 +15,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,9 +13,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/share/xml/catalog ============================================================================== --- head/release/doc/de_DE.ISO8859-1/share/sgml/catalog Mon Oct 1 10:54:04 2012 (r241094) +++ head/release/doc/de_DE.ISO8859-1/share/xml/catalog Mon Oct 1 11:26:49 2012 (r241096) @@ -2,7 +2,7 @@ -- Language-specific -- -- $FreeBSD$ -- - -- $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/share/sgml/catalog,v 1.6 2002/10/12 18:02:25 ue Exp $ -- + -- $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/share/xml/catalog,v 1.6 2002/10/12 18:02:25 ue Exp $ -- -- basiert auf: 1.1 -- PUBLIC "-//FreeBSD//DOCUMENT Release Notes DocBook Stylesheet//EN" Modified: head/release/doc/de_DE.ISO8859-1/share/xml/release.dsl ============================================================================== --- head/release/doc/de_DE.ISO8859-1/share/sgml/release.dsl Mon Oct 1 10:54:04 2012 (r241094) +++ head/release/doc/de_DE.ISO8859-1/share/xml/release.dsl Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/en_US.ISO8859-1/errata/Makefile ============================================================================== --- head/release/doc/en_US.ISO8859-1/errata/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/en_US.ISO8859-1/errata/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,7 +13,7 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied: head/release/doc/en_US.ISO8859-1/errata/article.xml (from r241094, head/release/doc/en_US.ISO8859-1/errata/article.sgml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/doc/en_US.ISO8859-1/errata/article.xml Mon Oct 1 11:26:49 2012 (r241096, copy of r241094, head/release/doc/en_US.ISO8859-1/errata/article.sgml) @@ -0,0 +1,180 @@ + + +%entities; + + +%release; + + +]]> + +]]> + +]]> +]> + + + +
+ + &os; &release; Errata + + + The &os; Project + + + $FreeBSD$ + + + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + The &os; Documentation Project + + + + &tm-attrib.freebsd; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + + This document lists errata items for &os; + + + + containing significant information discovered after the release + or too late in the release cycle to be otherwise included in the + release documentation. + This information includes security advisories, as well as news + relating to the software or documentation that could affect its + operation or usability. An up-to-date version of this document + should always be consulted before installing this version of + &os;. + + This errata document for &os; + + + + will be maintained until the release of &os; &release.next;. + + + + Introduction + + This errata document contains late-breaking news + about &os; + + + + Before installing this version, it is important to consult this + document to learn about any post-release discoveries or problems + that may already have been found and fixed. + + Any version of this errata document actually distributed + with the release (for example, on a CDROM distribution) will be + out of date by definition, but other copies are kept updated on + the Internet and should be consulted as the current + errata for this release. These other copies of the + errata are located at , plus any sites + which keep up-to-date mirrors of this location. + + Source and binary snapshots of &os; &release.branch; also + contain up-to-date copies of this document (as of the time of + the snapshot). + + For a list of all &os; CERT security advisories, see or . + + + + + Security Advisories + +No advisories. +]]> + +No advisories. +]]> + +No advisories. +]]> + + + + + Open Issues + +No open issues. +]]> + +No open issues. +]]> + +No open issues. +]]> + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 12:28:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 229CD106566C; Mon, 1 Oct 2012 12:28:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DCBB8FC14; Mon, 1 Oct 2012 12:28:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91CSw4G046364; Mon, 1 Oct 2012 12:28:58 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91CSwJA046362; Mon, 1 Oct 2012 12:28:58 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210011228.q91CSwJA046362@svn.freebsd.org> From: Rick Macklem Date: Mon, 1 Oct 2012 12:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241097 - head/sys/rpc/rpcsec_gss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 12:28:59 -0000 Author: rmacklem Date: Mon Oct 1 12:28:58 2012 New Revision: 241097 URL: http://svn.freebsd.org/changeset/base/241097 Log: Attila Bogar and Herbert Poeckl both reported similar problems w.r.t. a Linux NFS client doing a krb5 NFS mount against the FreeBSD server. We determined this was a Linux bug: http://www.spinics.net/lists/linux-nfs/msg32466.html, however the mount failed to work, because the Destroy operation with a bogus encrypted checksum destroyed the authenticator handle. This patch changes the rpcsec_gss code so that it doesn't Destroy the authenticator handle for this case and, as such, the Linux mount will work. Tested by: Attila Bogar and Herbert Poeckl MFC after: 2 weeks Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 1 11:26:49 2012 (r241096) +++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 1 12:28:58 2012 (r241097) @@ -984,7 +984,7 @@ svc_rpc_gss_accept_sec_context(struct sv static bool_t svc_rpc_gss_validate(struct svc_rpc_gss_client *client, struct rpc_msg *msg, - gss_qop_t *qop) + gss_qop_t *qop, rpc_gss_proc_t gcproc) { struct opaque_auth *oa; gss_buffer_desc rpcbuf, checksum; @@ -1024,7 +1024,8 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ if (maj_stat != GSS_S_COMPLETE) { rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); - client->cl_state = CLIENT_STALE; + if (gcproc != RPCSEC_GSS_DESTROY) + client->cl_state = CLIENT_STALE; return (FALSE); } @@ -1358,7 +1359,7 @@ svc_rpc_gss(struct svc_req *rqst, struct break; } - if (!svc_rpc_gss_validate(client, msg, &qop)) { + if (!svc_rpc_gss_validate(client, msg, &qop, gc.gc_proc)) { result = RPCSEC_GSS_CREDPROBLEM; break; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 12:58:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCFC1065672; Mon, 1 Oct 2012 12:58:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A198E8FC18; Mon, 1 Oct 2012 12:58:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 084FAB939; Mon, 1 Oct 2012 08:58:16 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Date: Mon, 1 Oct 2012 07:53:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201209291647.q8TGlvbr058837@svn.freebsd.org> In-Reply-To: <201209291647.q8TGlvbr058837@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210010753.59816.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Oct 2012 08:58:16 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 12:58:16 -0000 On Saturday, September 29, 2012 12:47:57 pm Andrey V. Elsukov wrote: > Author: ae > Date: Sat Sep 29 16:47:56 2012 > New Revision: 241053 > URL: http://svn.freebsd.org/changeset/base/241053 > > Log: > Almost each time when loader opens a file, this leads to calling > disk_open(). Very often this is called several times for one file. > This leads to reading partition table metadata for each call. To > reduce the number of disk I/O we have a simple block cache, but it > is very dumb and more than half of I/O operations related to reading > metadata, misses this cache. > > Introduce new cache layer to resolve this problem. It is independent > and doesn't need initialization like bcache, and will work by default > for all loaders which use the new DISK API. A successful disk_open() > call to each new disk or partition produces new entry in the cache. > Even more, when disk was already open, now opening of any nested > partitions does not require reading top level partition table. > So, if without this cache, partition table metadata was read around > 20-50 times during boot, now it reads only once. This affects the booting > from GPT and MBR from the UFS. ...and removes support for removable media like floppies. That may be the proper thing to do at this stage (though I think that affects PC98 still perhaps?) However, removing suppot for removable media should be an intentional decision, not a side effect. The bcache was simplistic precisely to support floppies. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 12:58:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 873611065674; Mon, 1 Oct 2012 12:58:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 218D88FC15; Mon, 1 Oct 2012 12:58:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7AFFCB949; Mon, 1 Oct 2012 08:58:16 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Date: Mon, 1 Oct 2012 07:56:27 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201209301224.q8UCOG5o029237@svn.freebsd.org> In-Reply-To: <201209301224.q8UCOG5o029237@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210010756.27565.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Oct 2012 08:58:16 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241068 - head/sys/boot/i386/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 12:58:17 -0000 On Sunday, September 30, 2012 8:24:16 am Andrey V. Elsukov wrote: > Author: ae > Date: Sun Sep 30 12:24:15 2012 > New Revision: 241068 > URL: http://svn.freebsd.org/changeset/base/241068 > > Log: > Reduce the number of attempts to detect proper kld format for the amd64 > loader. Why not just put amd64 first always? To date the amd64 and i386 loaders have been identical (rather on purpose). If amd64 is the more common use case and worth optimizing for, I think it would be fine to just put amd64 first all the time (that order also makes the list sorted). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 14:52:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D136106566B; Mon, 1 Oct 2012 14:52:35 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA288FC08; Mon, 1 Oct 2012 14:52:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91EqYe6065616; Mon, 1 Oct 2012 14:52:34 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91EqYbf065614; Mon, 1 Oct 2012 14:52:34 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210011452.q91EqYbf065614@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 1 Oct 2012 14:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241098 - stable/8/usr.sbin/lpr/common_source X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 14:52:35 -0000 Author: jh Date: Mon Oct 1 14:52:34 2012 New Revision: 241098 URL: http://svn.freebsd.org/changeset/base/241098 Log: MFC r238546: Remove trailing whitespace. Modified: stable/8/usr.sbin/lpr/common_source/common.c Directory Properties: stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/lpr/lpd/ (props changed) Modified: stable/8/usr.sbin/lpr/common_source/common.c ============================================================================== --- stable/8/usr.sbin/lpr/common_source/common.c Mon Oct 1 12:28:58 2012 (r241097) +++ stable/8/usr.sbin/lpr/common_source/common.c Mon Oct 1 14:52:34 2012 (r241098) @@ -136,7 +136,7 @@ getq(const struct printer *pp, struct jo /* * Estimate the array size by taking the size of the directory file - * and dividing it by a multiple of the minimum size entry. + * and dividing it by a multiple of the minimum size entry. */ arraysz = (stbuf.st_size / 24); queue = (struct jobqueue **)malloc(arraysz * sizeof(struct jobqueue *)); @@ -641,7 +641,7 @@ trstat_write(struct printer *pp, tr_send * secs= - seconds it took to transfer the file * bytes= - number of bytes transfered (ie, "bytecount") * bps=e - Bytes/sec (if the transfer was "big enough" - * for this to be useful) + * for this to be useful) * ! top= - type of printer (if the type is defined in * printcap, and if this statline is for sending * a file to that ptr) @@ -719,7 +719,7 @@ trstat_write(struct printer *pp, tr_send if (remspace > 1) { strcpy(eostat, "\n"); } else { - /* probably should back up to just before the final " x=".. */ + /* probably should back up to just before the final " x=".. */ strcpy(statline+STATLINE_SIZE-2, "\n"); } statfile = open(statfname, O_WRONLY|O_APPEND, 0664); @@ -732,7 +732,7 @@ trstat_write(struct printer *pp, tr_send close(statfile); return; -#undef UPD_EOSTAT +#undef UPD_EOSTAT } #include From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 14:55:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0684910656B2; Mon, 1 Oct 2012 14:55:23 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E465C8FC0C; Mon, 1 Oct 2012 14:55:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91EtMhw065957; Mon, 1 Oct 2012 14:55:22 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91EtMn0065955; Mon, 1 Oct 2012 14:55:22 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210011455.q91EtMn0065955@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 1 Oct 2012 14:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241099 - stable/8/usr.sbin/lpr/common_source X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 14:55:23 -0000 Author: jh Date: Mon Oct 1 14:55:22 2012 New Revision: 241099 URL: http://svn.freebsd.org/changeset/base/241099 Log: MFC r238547: Make sure that arraysz is initialized to a value larger than zero. arraysz could get initialized to zero on ZFS because ZFS reports directory sizes differently compared to UFS. PR: bin/169493 Modified: stable/8/usr.sbin/lpr/common_source/common.c Directory Properties: stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/lpr/lpd/ (props changed) Modified: stable/8/usr.sbin/lpr/common_source/common.c ============================================================================== --- stable/8/usr.sbin/lpr/common_source/common.c Mon Oct 1 14:52:34 2012 (r241098) +++ stable/8/usr.sbin/lpr/common_source/common.c Mon Oct 1 14:55:22 2012 (r241099) @@ -139,6 +139,8 @@ getq(const struct printer *pp, struct jo * and dividing it by a multiple of the minimum size entry. */ arraysz = (stbuf.st_size / 24); + if (arraysz < 16) + arraysz = 16; queue = (struct jobqueue **)malloc(arraysz * sizeof(struct jobqueue *)); if (queue == NULL) goto errdone; From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 14:56:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 996A3106567A; Mon, 1 Oct 2012 14:56:49 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8520D8FC2E; Mon, 1 Oct 2012 14:56:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91Eunff066300; Mon, 1 Oct 2012 14:56:49 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91EunJT066298; Mon, 1 Oct 2012 14:56:49 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210011456.q91EunJT066298@svn.freebsd.org> From: Tim Kientzle Date: Mon, 1 Oct 2012 14:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241100 - head/sys/arm/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 14:56:49 -0000 Author: kientzle Date: Mon Oct 1 14:56:48 2012 New Revision: 241100 URL: http://svn.freebsd.org/changeset/base/241100 Log: Support kernel options from ubldr. Modified: head/sys/arm/conf/BEAGLEBONE Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Oct 1 14:55:22 2012 (r241099) +++ head/sys/arm/conf/BEAGLEBONE Mon Oct 1 14:56:48 2012 (r241100) @@ -46,6 +46,7 @@ options SYSVSEM #SYSV-style semaphore options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options PREEMPTION +options FREEBSD_BOOT_LOADER # Debugging makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 15:22:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52677106564A; Mon, 1 Oct 2012 15:22:44 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2h.mail.yandex.net (forward2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::2]) by mx1.freebsd.org (Postfix) with ESMTP id A727C8FC08; Mon, 1 Oct 2012 15:22:43 +0000 (UTC) Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [84.201.187.145]) by forward2h.mail.yandex.net (Yandex) with ESMTP id 0FE797009FA; Mon, 1 Oct 2012 19:22:41 +0400 (MSK) Received: from smtp2h.mail.yandex.net (localhost [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 94B611700058; Mon, 1 Oct 2012 19:22:41 +0400 (MSK) Received: from dynamic-178-141-5-77.kirov.comstar-r.ru (dynamic-178-141-5-77.kirov.comstar-r.ru [178.141.5.77]) by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id MeomAQX8-MfoWF5IQ; Mon, 1 Oct 2012 19:22:41 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1349104961; bh=FL2i8shoYO4qJgS3tqRV6g7iAhkccuifw33QZQLW1pU=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:X-Enigmail-Version:Content-Type: Content-Transfer-Encoding; b=j4YzVZ//w+qxX0SOW7cxA/BdX20vjNYP9UtJap5LXue56pTHbkTr9ymS9/NFve6tN KkFcodImyF7lJnLNsk+mOX8x7/r8/qiHf2nfWI9q9a4rLFYHiRpVc7hHNZK974KjSX HmhY46Bqz6XNVwaIJ8j2PYSx2+DSSALL0OMfiwOQ= Message-ID: <5069B53F.5040004@yandex.ru> Date: Mon, 01 Oct 2012 19:22:39 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120406 Thunderbird/10.0.3 MIME-Version: 1.0 To: John Baldwin References: <201209291647.q8TGlvbr058837@svn.freebsd.org> <201210010753.59816.jhb@freebsd.org> In-Reply-To: <201210010753.59816.jhb@freebsd.org> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 01 Oct 2012 15:29:12 +0000 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:22:44 -0000 On 01.10.2012 15:53, John Baldwin wrote: >> Introduce new cache layer to resolve this problem. It is independent >> and doesn't need initialization like bcache, and will work by default >> for all loaders which use the new DISK API. A successful disk_open() >> call to each new disk or partition produces new entry in the cache. >> Even more, when disk was already open, now opening of any nested >> partitions does not require reading top level partition table. >> So, if without this cache, partition table metadata was read around >> 20-50 times during boot, now it reads only once. This affects the booting >> from GPT and MBR from the UFS. > > ...and removes support for removable media like floppies. That may be the > proper thing to do at this stage (though I think that affects PC98 still > perhaps?) However, removing suppot for removable media should be an > intentional decision, not a side effect. The bcache was simplistic > precisely to support floppies. Hi, John, I think it shouldn't affect floppies support. I'm unable to test this, and I don't remember exactly, but floppies don't have partition tables, or just have simple MBR. So, when access to the floppy will be performed first time, the following cache entry will be created "disk0: -> some_offset", probably an offset will be zero. And when you change the floppy this offset still remain the same. There is a lot of other places in the libstand, where similar behavior still remain (i mean, one operation initiates several unneeded reads): * Each open() call initiates read file system metadata. * We have the support of different file systems. Some of those are real file systems, other aren't - gzip, bzip, split. During boot loader tries to open several files, which don't exists by default. Each this attempt initiates reading of metadata of each file system several times. Why? When we do first read we can determine that we have UFS on this media, why do we trying search msdos or ext2fs here? Ok, when we fail to open this file on the all of file systems, we are going to try them again with ".gz" extension... Make a new loader is very hard task, but we can optimize this and don't do these unneeded operations. I have added rdtsc() call at the beginning of the main() and before the kernel start, and I did several tests with today's loader and with old one (before all my changes). So, the results are: UFS+GPT ZFS+GPT ZFS+GPT+several disks new_loader 7,203s 20,584s 26,079s old_loader 4,334s 9,422s 11,245s -- WBR, Andrey V. Elsukov From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 15:31:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id A88821065678; Mon, 1 Oct 2012 15:31:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 3494F1509C9; Mon, 1 Oct 2012 15:31:01 +0000 (UTC) Message-ID: <5069B733.2010704@FreeBSD.org> Date: Mon, 01 Oct 2012 19:30:59 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120406 Thunderbird/10.0.3 MIME-Version: 1.0 To: John Baldwin References: <201209291647.q8TGlvbr058837@svn.freebsd.org> <201210010753.59816.jhb@freebsd.org> <5069B53F.5040004@yandex.ru> In-Reply-To: <5069B53F.5040004@yandex.ru> X-Enigmail-Version: 1.4 OpenPGP: id=10C8A17A Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:31:10 -0000 On 01.10.2012 19:22, Andrey V. Elsukov wrote: > UFS+GPT ZFS+GPT ZFS+GPT+several disks > new_loader 7,203s 20,584s 26,079s > old_loader 4,334s 9,422s 11,245s Of course, new_loader and old_loader should switch places :) -- WBR, Andrey V. Elsukov From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 15:47:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D9C3106566C; Mon, 1 Oct 2012 15:47:02 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D24DF8FC0A; Mon, 1 Oct 2012 15:47:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91Fl1RV073036; Mon, 1 Oct 2012 15:47:01 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91Fl1fe073032; Mon, 1 Oct 2012 15:47:01 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210011547.q91Fl1fe073032@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 1 Oct 2012 15:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241101 - in stable/9: sys/dev/pci usr.sbin/pciconf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:47:02 -0000 Author: gavin Date: Mon Oct 1 15:47:01 2012 New Revision: 241101 URL: http://svn.freebsd.org/changeset/base/241101 Log: Merge the following from head: r240694 Add PCI subclass for NVM Express devices. r240699, r240739 Recognise NVM devices and pretty-print their name. Modified: stable/9/sys/dev/pci/pci.c stable/9/sys/dev/pci/pcireg.h stable/9/usr.sbin/pciconf/pciconf.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/9/sys/dev/pci/pci.c ============================================================================== --- stable/9/sys/dev/pci/pci.c Mon Oct 1 14:56:48 2012 (r241100) +++ stable/9/sys/dev/pci/pci.c Mon Oct 1 15:47:01 2012 (r241101) @@ -3590,6 +3590,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, Modified: stable/9/sys/dev/pci/pcireg.h ============================================================================== --- stable/9/sys/dev/pci/pcireg.h Mon Oct 1 14:56:48 2012 (r241100) +++ stable/9/sys/dev/pci/pcireg.h Mon Oct 1 15:47:01 2012 (r241101) @@ -263,6 +263,7 @@ #define PCIS_STORAGE_SATA 0x06 #define PCIP_STORAGE_SATA_AHCI_1_0 0x01 #define PCIS_STORAGE_SAS 0x07 +#define PCIS_STORAGE_NVM 0x08 #define PCIS_STORAGE_OTHER 0x80 #define PCIC_NETWORK 0x02 Modified: stable/9/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/9/usr.sbin/pciconf/pciconf.c Mon Oct 1 14:56:48 2012 (r241100) +++ stable/9/usr.sbin/pciconf/pciconf.c Mon Oct 1 15:47:01 2012 (r241101) @@ -345,6 +345,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 15:47:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 156E910656AB; Mon, 1 Oct 2012 15:47:14 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D98F68FC12; Mon, 1 Oct 2012 15:47:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91FlD3w073102; Mon, 1 Oct 2012 15:47:13 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91FlDjJ073098; Mon, 1 Oct 2012 15:47:13 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210011547.q91FlDjJ073098@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 1 Oct 2012 15:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241102 - in stable/8: sys/dev/pci usr.sbin/pciconf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:47:14 -0000 Author: gavin Date: Mon Oct 1 15:47:13 2012 New Revision: 241102 URL: http://svn.freebsd.org/changeset/base/241102 Log: Merge the following from head: r240694 Add PCI subclass for NVM Express devices. r240699, r240739 Recognise NVM devices and pretty-print their name. Modified: stable/8/sys/dev/pci/pci.c stable/8/sys/dev/pci/pcireg.h stable/8/usr.sbin/pciconf/pciconf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/pci/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/8/sys/dev/pci/pci.c ============================================================================== --- stable/8/sys/dev/pci/pci.c Mon Oct 1 15:47:01 2012 (r241101) +++ stable/8/sys/dev/pci/pci.c Mon Oct 1 15:47:13 2012 (r241102) @@ -3343,6 +3343,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Mon Oct 1 15:47:01 2012 (r241101) +++ stable/8/sys/dev/pci/pcireg.h Mon Oct 1 15:47:13 2012 (r241102) @@ -263,6 +263,7 @@ #define PCIS_STORAGE_SATA 0x06 #define PCIP_STORAGE_SATA_AHCI_1_0 0x01 #define PCIS_STORAGE_SAS 0x07 +#define PCIS_STORAGE_NVM 0x08 #define PCIS_STORAGE_OTHER 0x80 #define PCIC_NETWORK 0x02 Modified: stable/8/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/8/usr.sbin/pciconf/pciconf.c Mon Oct 1 15:47:01 2012 (r241101) +++ stable/8/usr.sbin/pciconf/pciconf.c Mon Oct 1 15:47:13 2012 (r241102) @@ -345,6 +345,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 15:47:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D51110656D0; Mon, 1 Oct 2012 15:47:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D20F8FC12; Mon, 1 Oct 2012 15:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91FlaV0073185; Mon, 1 Oct 2012 15:47:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91FlaXo073181; Mon, 1 Oct 2012 15:47:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210011547.q91FlaXo073181@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 1 Oct 2012 15:47:36 +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: r241103 - in stable/7: sys/dev/pci usr.sbin/pciconf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:47:36 -0000 Author: gavin Date: Mon Oct 1 15:47:35 2012 New Revision: 241103 URL: http://svn.freebsd.org/changeset/base/241103 Log: Merge the following from head: r240694 Add PCI subclass for NVM Express devices. r240699, r240739 Recognise NVM devices and pretty-print their name. Modified: stable/7/sys/dev/pci/pci.c stable/7/sys/dev/pci/pcireg.h stable/7/usr.sbin/pciconf/pciconf.c Directory Properties: stable/7/sys/ (props changed) stable/7/usr.sbin/pciconf/ (props changed) Modified: stable/7/sys/dev/pci/pci.c ============================================================================== --- stable/7/sys/dev/pci/pci.c Mon Oct 1 15:47:13 2012 (r241102) +++ stable/7/sys/dev/pci/pci.c Mon Oct 1 15:47:35 2012 (r241103) @@ -3071,6 +3071,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Mon Oct 1 15:47:13 2012 (r241102) +++ stable/7/sys/dev/pci/pcireg.h Mon Oct 1 15:47:35 2012 (r241103) @@ -263,6 +263,7 @@ #define PCIS_STORAGE_SATA 0x06 #define PCIP_STORAGE_SATA_AHCI_1_0 0x01 #define PCIS_STORAGE_SAS 0x07 +#define PCIS_STORAGE_NVM 0x08 #define PCIS_STORAGE_OTHER 0x80 #define PCIC_NETWORK 0x02 Modified: stable/7/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/7/usr.sbin/pciconf/pciconf.c Mon Oct 1 15:47:13 2012 (r241102) +++ stable/7/usr.sbin/pciconf/pciconf.c Mon Oct 1 15:47:35 2012 (r241103) @@ -337,6 +337,7 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, + {PCIC_STORAGE, PCIS_STORAGE_NVM, "NVM"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 15:50:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31E23106566B; Mon, 1 Oct 2012 15:50:17 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C0BE8FC1A; Mon, 1 Oct 2012 15:50:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91FoGp5073608; Mon, 1 Oct 2012 15:50:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91FoGRS073606; Mon, 1 Oct 2012 15:50:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210011550.q91FoGRS073606@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 1 Oct 2012 15:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241104 - stable/9/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:50:17 -0000 Author: gavin Date: Mon Oct 1 15:50:16 2012 New Revision: 241104 URL: http://svn.freebsd.org/changeset/base/241104 Log: Merge r240683 from head Add entries for two USB devices I have locally. Modified: stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Mon Oct 1 15:47:35 2012 (r241103) +++ stable/9/sys/dev/usb/usbdevs Mon Oct 1 15:50:16 2012 (r241104) @@ -407,6 +407,7 @@ vendor ALLIEDCABLE 0x07e6 Allied Cable vendor STSN 0x07ef STSN vendor CENTURY 0x07f7 Century Corp vendor NEWLINK 0x07ff NEWlink +vendor MAGTEK 0x0801 Mag-Tek vendor ZOOM 0x0803 Zoom Telephonics vendor PCS 0x0810 Personal Communication Systems vendor ALPHASMART 0x081e AlphaSmart, Inc. @@ -2492,6 +2493,9 @@ product LUWEN EASYDISK 0x0005 EasyDisc /* Macally products */ product MACALLY MOUSE1 0x0101 mouse +/* Mag-Tek products */ +product MAGTEK USBSWIPE 0x0002 USB Mag Stripe Swipe Reader + /* Marvell Technology Group, Ltd. products */ product MARVELL SHEEVAPLUG 0x9e8f SheevaPlug serial interface @@ -3445,6 +3449,7 @@ product RALINK RT3071 0x3071 RT3071 product RALINK RT3072 0x3072 RT3072 product RALINK RT3370 0x3370 RT3370 product RALINK RT3572 0x3572 RT3572 +product RALINK RT5370 0x5370 RT5370 product RALINK RT8070 0x8070 RT8070 product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 15:50:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7664B106564A; Mon, 1 Oct 2012 15:50:19 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 609AB8FC08; Mon, 1 Oct 2012 15:50:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91FoJ8E073647; Mon, 1 Oct 2012 15:50:19 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91FoJoY073645; Mon, 1 Oct 2012 15:50:19 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210011550.q91FoJoY073645@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 1 Oct 2012 15:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241105 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 15:50:19 -0000 Author: gavin Date: Mon Oct 1 15:50:18 2012 New Revision: 241105 URL: http://svn.freebsd.org/changeset/base/241105 Log: Merge r240683 from head Add entries for two USB devices I have locally. Modified: stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Mon Oct 1 15:50:16 2012 (r241104) +++ stable/8/sys/dev/usb/usbdevs Mon Oct 1 15:50:18 2012 (r241105) @@ -404,6 +404,7 @@ vendor ALLIEDCABLE 0x07e6 Allied Cable vendor STSN 0x07ef STSN vendor CENTURY 0x07f7 Century Corp vendor NEWLINK 0x07ff NEWlink +vendor MAGTEK 0x0801 Mag-Tek vendor ZOOM 0x0803 Zoom Telephonics vendor PCS 0x0810 Personal Communication Systems vendor ALPHASMART 0x081e AlphaSmart, Inc. @@ -2160,6 +2161,9 @@ product LUWEN EASYDISK 0x0005 EasyDisc /* Macally products */ product MACALLY MOUSE1 0x0101 mouse +/* Mag-Tek products */ +product MAGTEK USBSWIPE 0x0002 USB Mag Stripe Swipe Reader + /* Marvell Technology Group, Ltd. products */ product MARVELL SHEEVAPLUG 0x9e8f SheevaPlug serial interface @@ -2811,6 +2815,7 @@ product RALINK RT3071 0x3071 RT3071 product RALINK RT3072 0x3072 RT3072 product RALINK RT3370 0x3370 RT3370 product RALINK RT3572 0x3572 RT3572 +product RALINK RT5370 0x5370 RT5370 product RALINK RT8070 0x8070 RT8070 product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 16:34:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47C041065674; Mon, 1 Oct 2012 16:34:13 +0000 (UTC) (envelope-from issyl0@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 326348FC0A; Mon, 1 Oct 2012 16:34:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91GYDhT079212; Mon, 1 Oct 2012 16:34:13 GMT (envelope-from issyl0@svn.freebsd.org) Received: (from issyl0@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91GYCSg079210; Mon, 1 Oct 2012 16:34:13 GMT (envelope-from issyl0@svn.freebsd.org) Message-Id: <201210011634.q91GYCSg079210@svn.freebsd.org> From: Isabell Long Date: Mon, 1 Oct 2012 16:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241106 - stable/9/usr.sbin/portsnap/portsnap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 16:34:13 -0000 Author: issyl0 (doc committer) Date: Mon Oct 1 16:34:12 2012 New Revision: 241106 URL: http://svn.freebsd.org/changeset/base/241106 Log: MFC r241024 and r241026 from HEAD: - Add a note to portsnap(8) about the behaviour of the example cron command. - Change "only only" to "only" in portsnap(8). PR: docs/171759 Approved by: gjb (mentor) Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.8 Directory Properties: stable/9/usr.sbin/portsnap/ (props changed) Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.8 ============================================================================== --- stable/9/usr.sbin/portsnap/portsnap/portsnap.8 Mon Oct 1 15:50:18 2012 (r241105) +++ stable/9/usr.sbin/portsnap/portsnap/portsnap.8 Mon Oct 1 16:34:12 2012 (r241106) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2008 +.Dd September 28, 2012 .Dt PORTSNAP 8 .Os FreeBSD .Sh NAME @@ -174,6 +174,23 @@ can quickly be extracted into If your clock is set to UTC, please pick a random time other than 3AM, to avoid overly imposing an uneven load on the server(s) hosting the snapshots. +.Pp +Note that running +.Nm +.Cm cron +or +.Nm +.Cm fetch +does not apply the changes that were received: they only download +them. +To apply the changes, you must follow these commands with +.Nm +.Cm update . +The +.Nm +.Cm update +command is normally run by hand at a time when you are sure that +no one is manually working in the ports tree. .It Running .Nm From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 16:42:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6D231065670; Mon, 1 Oct 2012 16:42:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C21148FC15; Mon, 1 Oct 2012 16:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91Gg7BF080181; Mon, 1 Oct 2012 16:42:07 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91Gg7xR080179; Mon, 1 Oct 2012 16:42:07 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210011642.q91Gg7xR080179@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 1 Oct 2012 16:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241107 - head/usr.sbin/pw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 16:42:08 -0000 Author: bapt Date: Mon Oct 1 16:42:07 2012 New Revision: 241107 URL: http://svn.freebsd.org/changeset/base/241107 Log: Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is a number. This also allow pw user show to work as expected. PR: bin/172112 Submitted by: "Ilya A. Arkhipov" MFC after: 1 month Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Mon Oct 1 16:34:12 2012 (r241106) +++ head/usr.sbin/pw/pw_user.c Mon Oct 1 16:42:07 2012 (r241107) @@ -314,8 +314,7 @@ pw_user(struct userconf * cnf, int mode, * know. */ if (mode != M_ADD && pwd == NULL - && strspn(a_name->val, "0123456789") == strlen(a_name->val) - && atoi(a_name->val) > 0) { /* Assume uid */ + && strspn(a_name->val, "0123456789") == strlen(a_name->val)) { (a_uid = a_name)->ch = 'u'; a_name = NULL; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 17:00:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0334106564A; Mon, 1 Oct 2012 17:00:33 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8F88FC17; Mon, 1 Oct 2012 17:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91H0XPD082543; Mon, 1 Oct 2012 17:00:33 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91H0XhY082541; Mon, 1 Oct 2012 17:00:33 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210011700.q91H0XhY082541@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 1 Oct 2012 17:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241108 - head/usr.sbin/pw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 17:00:33 -0000 Author: bapt Date: Mon Oct 1 17:00:33 2012 New Revision: 241108 URL: http://svn.freebsd.org/changeset/base/241108 Log: Do not treat empty name as an uid 0 Reported by: Robert Bonomi Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Mon Oct 1 16:42:07 2012 (r241107) +++ head/usr.sbin/pw/pw_user.c Mon Oct 1 17:00:33 2012 (r241108) @@ -314,7 +314,8 @@ pw_user(struct userconf * cnf, int mode, * know. */ if (mode != M_ADD && pwd == NULL - && strspn(a_name->val, "0123456789") == strlen(a_name->val)) { + && strspn(a_name->val, "0123456789") == strlen(a_name->val) + && *a_name->val) { (a_uid = a_name)->ch = 'u'; a_name = NULL; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 17:45:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDF68106564A; Mon, 1 Oct 2012 17:45:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEF958FC08; Mon, 1 Oct 2012 17:45:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91HjukE088245; Mon, 1 Oct 2012 17:45:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91HjubE088241; Mon, 1 Oct 2012 17:45:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210011745.q91HjubE088241@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Oct 2012 17:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241109 - in stable/9/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 17:45:57 -0000 Author: jhb Date: Mon Oct 1 17:45:56 2012 New Revision: 241109 URL: http://svn.freebsd.org/changeset/base/241109 Log: MFC 239771: Fix misspelled "Infiniband". Modified: stable/9/sys/amd64/conf/NOTES stable/9/sys/i386/conf/NOTES Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/amd64/conf/NOTES ============================================================================== --- stable/9/sys/amd64/conf/NOTES Mon Oct 1 17:00:33 2012 (r241108) +++ stable/9/sys/amd64/conf/NOTES Mon Oct 1 17:45:56 2012 (r241109) @@ -98,7 +98,7 @@ options OFED_DEBUG_INIT options SDP options SDP_DEBUG -# IP over Inifiband +# IP over Infiniband options IPOIB options IPOIB_DEBUG options IPOIB_CM Modified: stable/9/sys/i386/conf/NOTES ============================================================================== --- stable/9/sys/i386/conf/NOTES Mon Oct 1 17:00:33 2012 (r241108) +++ stable/9/sys/i386/conf/NOTES Mon Oct 1 17:45:56 2012 (r241109) @@ -268,7 +268,7 @@ options OFED_DEBUG_INIT options SDP options SDP_DEBUG -# IP over Inifiband +# IP over Infiniband options IPOIB options IPOIB_DEBUG options IPOIB_CM From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 18:38:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D44B2106568C; Mon, 1 Oct 2012 18:38:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8F3118FC12; Mon, 1 Oct 2012 18:38:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F16CDB91E; Mon, 1 Oct 2012 14:38:06 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Date: Mon, 1 Oct 2012 14:07:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201209291647.q8TGlvbr058837@svn.freebsd.org> <201210010753.59816.jhb@freebsd.org> <5069B53F.5040004@yandex.ru> In-Reply-To: <5069B53F.5040004@yandex.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <201210011407.41767.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Oct 2012 14:38:07 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 18:38:08 -0000 On Monday, October 01, 2012 11:22:39 am Andrey V. Elsukov wrote: > On 01.10.2012 15:53, John Baldwin wrote: > >> Introduce new cache layer to resolve this problem. It is independent > >> and doesn't need initialization like bcache, and will work by default > >> for all loaders which use the new DISK API. A successful disk_open() > >> call to each new disk or partition produces new entry in the cache. > >> Even more, when disk was already open, now opening of any nested > >> partitions does not require reading top level partition table. > >> So, if without this cache, partition table metadata was read around > >> 20-50 times during boot, now it reads only once. This affects the booting > >> from GPT and MBR from the UFS. > > > > ...and removes support for removable media like floppies. That may be the > > proper thing to do at this stage (though I think that affects PC98 still > > perhaps?) However, removing suppot for removable media should be an > > intentional decision, not a side effect. The bcache was simplistic > > precisely to support floppies. > > Hi, John, > > I think it shouldn't affect floppies support. I'm unable to test this, > and I don't remember exactly, but floppies don't have partition tables, > or just have simple MBR. So, when access to the floppy will be > performed first time, the following cache entry will be created > "disk0: -> some_offset", probably an offset will be zero. And when you > change the floppy this offset still remain the same. There is a lot of > other places in the libstand, where similar behavior still remain (i > mean, one operation initiates several unneeded reads): The floppies used in BSD either have BSD labels or are a DOS floppy with no partition table. > * Each open() call initiates read file system metadata. > > * We have the support of different file systems. Some of those are real > file systems, other aren't - gzip, bzip, split. During boot loader tries > to open several files, which don't exists by default. Each this attempt > initiates reading of metadata of each file system several times. Why? > When we do first read we can determine that we have UFS on this media, > why do we trying search msdos or ext2fs here? Think about removable media. If you have replaced the media (such as a floppy), then what was once UFS may now be FAT16. > Ok, when we fail to open this file on the all of file systems, we are > going to try them again with ".gz" extension... Yes, the current code is not very optimal. The focus on it to date has been to make sure it works. It is only used for bootstrapping, not once the main system is up and running, so at least in the past performance has been less important than correctness. One could perhaps differentiate removable vs non-removable media (and allow more caching on non-removable media) so long as one distinguish a USB stick so as to mark it as removable media. (Either that or we say that we no longer support swapping removable media during the boot process.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 19:09:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB89B106564A; Mon, 1 Oct 2012 19:09:25 +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 D52DC8FC17; Mon, 1 Oct 2012 19:09:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91J9Pdb098823; Mon, 1 Oct 2012 19:09:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91J9PCb098820; Mon, 1 Oct 2012 19:09:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210011909.q91J9PCb098820@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Oct 2012 19:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241110 - in stable/9/sys: powerpc/powerpc x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 19:09:26 -0000 Author: jhb Date: Mon Oct 1 19:09:25 2012 New Revision: 241110 URL: http://svn.freebsd.org/changeset/base/241110 Log: MFC 239008,239020: Improve the handling of static DMA buffers that use non-default memory attributes (currently just BUS_DMA_NOCACHE): - Don't call pmap_change_attr() on the returned address, instead use kmem_alloc_contig() to ask the VM system for memory with the requested attribute. - As a result, always use kmem_alloc_contig() for non-default memory attributes, even for sub-page allocations. This requires adjusting bus_dmamem_free()'s logic for determining which free routine to use. - For x86, add a new dummy bus_dmamap that is used for static DMA buffers allocated via kmem_alloc_contig(). bus_dmamem_free() can then use the map pointer to determine which free routine to use. - For powerpc, add a new flag to the allocated map (bus_dmamem_alloc() always creates a real map on powerpc) to indicate which free routine should be used. Note that the BUS_DMA_NOCACHE handling in powerpc is currently #ifdef'd out. I have left it disabled but updated it to match x86. Modified: stable/9/sys/powerpc/powerpc/busdma_machdep.c stable/9/sys/x86/x86/busdma_machdep.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- stable/9/sys/powerpc/powerpc/busdma_machdep.c Mon Oct 1 17:45:56 2012 (r241109) +++ stable/9/sys/powerpc/powerpc/busdma_machdep.c Mon Oct 1 19:09:25 2012 (r241110) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -129,6 +131,7 @@ struct bus_dmamap { bus_dmamap_callback_t *callback; void *callback_arg; STAILQ_ENTRY(bus_dmamap) links; + int contigalloc; }; static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; @@ -488,6 +491,7 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, bus_dmamap_t *mapp) { + vm_memattr_t attr; int mflags; if (flags & BUS_DMA_NOWAIT) @@ -499,6 +503,12 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (flags & BUS_DMA_ZERO) mflags |= M_ZERO; +#ifdef NOTYET + if (flags & BUS_DMA_NOCACHE) + attr = VM_MEMATTR_UNCACHEABLE; + else +#endif + attr = VM_MEMATTR_DEFAULT; /* * XXX: @@ -510,7 +520,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi */ if ((dmat->maxsize <= PAGE_SIZE) && (dmat->alignment < dmat->maxsize) && - dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) { + dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem) && + attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); } else { /* @@ -519,9 +530,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * multi-seg allocations yet though. * XXX Certain AGP hardware does. */ - *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, mflags, - 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul, - dmat->boundary); + *vaddr = (void *)kmem_alloc_contig(kernel_map, dmat->maxsize, + mflags, 0ul, dmat->lowaddr, dmat->alignment ? + dmat->alignment : 1ul, dmat->boundary, attr); + (*mapp)->contigalloc = 1; } if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", @@ -530,11 +542,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi } else if (vtophys(*vaddr) & (dmat->alignment - 1)) { printf("bus_dmamem_alloc failed to align memory properly.\n"); } -#ifdef NOTYET - if (flags & BUS_DMA_NOCACHE) - pmap_change_attr((vm_offset_t)*vaddr, dmat->maxsize, - VM_MEMATTR_UNCACHEABLE); -#endif CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, 0); return (0); @@ -547,18 +554,12 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) { - bus_dmamap_destroy(dmat, map); -#ifdef NOTYET - pmap_change_attr((vm_offset_t)vaddr, dmat->maxsize, VM_MEMATTR_DEFAULT); -#endif - if ((dmat->maxsize <= PAGE_SIZE) && - (dmat->alignment < dmat->maxsize) && - dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) + if (!map->contigalloc) free(vaddr, M_DEVBUF); - else { - contigfree(vaddr, dmat->maxsize, M_DEVBUF); - } + else + kmem_free(kernel_map, (vm_offset_t)vaddr, dmat->maxsize); + bus_dmamap_destroy(dmat, map); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } Modified: stable/9/sys/x86/x86/busdma_machdep.c ============================================================================== --- stable/9/sys/x86/x86/busdma_machdep.c Mon Oct 1 17:45:56 2012 (r241109) +++ stable/9/sys/x86/x86/busdma_machdep.c Mon Oct 1 19:09:25 2012 (r241110) @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -131,7 +133,7 @@ struct bus_dmamap { static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; -static struct bus_dmamap nobounce_dmamap; +static struct bus_dmamap nobounce_dmamap, contig_dmamap; static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); @@ -473,7 +475,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) { - if (map != NULL && map != &nobounce_dmamap) { + if (map != NULL && map != &nobounce_dmamap && map != &contig_dmamap) { if (STAILQ_FIRST(&map->bpages) != NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, EBUSY); @@ -498,6 +500,7 @@ int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, bus_dmamap_t *mapp) { + vm_memattr_t attr; int mflags; if (flags & BUS_DMA_NOWAIT) @@ -520,6 +523,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi } if (flags & BUS_DMA_ZERO) mflags |= M_ZERO; + if (flags & BUS_DMA_NOCACHE) + attr = VM_MEMATTR_UNCACHEABLE; + else + attr = VM_MEMATTR_DEFAULT; /* * XXX: @@ -531,7 +538,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi */ if ((dmat->maxsize <= PAGE_SIZE) && (dmat->alignment < dmat->maxsize) && - dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) { + dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem) && + attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); } else { /* @@ -540,9 +548,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * multi-seg allocations yet though. * XXX Certain AGP hardware does. */ - *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, mflags, - 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul, - dmat->boundary); + *vaddr = (void *)kmem_alloc_contig(kernel_map, dmat->maxsize, + mflags, 0ul, dmat->lowaddr, dmat->alignment ? + dmat->alignment : 1ul, dmat->boundary, attr); + *mapp = &contig_dmamap; } if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", @@ -551,9 +560,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi } else if (vtophys(*vaddr) & (dmat->alignment - 1)) { printf("bus_dmamem_alloc failed to align memory properly.\n"); } - if (flags & BUS_DMA_NOCACHE) - pmap_change_attr((vm_offset_t)*vaddr, dmat->maxsize, - PAT_UNCACHEABLE); CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, 0); return (0); @@ -568,18 +574,15 @@ bus_dmamem_free(bus_dma_tag_t dmat, void { /* * dmamem does not need to be bounced, so the map should be - * NULL + * NULL if malloc() was used and contig_dmamap if + * kmem_alloc_contig() was used. */ - if (map != NULL) + if (!(map == NULL || map == &contig_dmamap)) panic("bus_dmamem_free: Invalid map freed\n"); - pmap_change_attr((vm_offset_t)vaddr, dmat->maxsize, PAT_WRITE_BACK); - if ((dmat->maxsize <= PAGE_SIZE) && - (dmat->alignment < dmat->maxsize) && - dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) + if (map == NULL) free(vaddr, M_DEVBUF); - else { - contigfree(vaddr, dmat->maxsize, M_DEVBUF); - } + else + kmem_free(kernel_map, (vm_offset_t)vaddr, dmat->maxsize); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } @@ -670,7 +673,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm vm_offset_t vaddr; int seg, error; - if (map == NULL) + if (map == NULL || map == &contig_dmamap) map = &nobounce_dmamap; if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { @@ -1147,7 +1150,7 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ struct bounce_page *bpage; KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag")); - KASSERT(map != NULL && map != &nobounce_dmamap, + KASSERT(map != NULL && map != &nobounce_dmamap && map != &contig_dmamap, ("add_bounce_page: bad map %p", map)); bz = dmat->bounce_zone; From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 19:13:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD1F6106566C; Mon, 1 Oct 2012 19:13:47 +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 C7EFA8FC16; Mon, 1 Oct 2012 19:13:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91JDlub099457; Mon, 1 Oct 2012 19:13:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91JDlcH099455; Mon, 1 Oct 2012 19:13:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210011913.q91JDlcH099455@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Oct 2012 19:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241111 - stable/9/share/doc/smm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 19:13:48 -0000 Author: jhb Date: Mon Oct 1 19:13:47 2012 New Revision: 241111 URL: http://svn.freebsd.org/changeset/base/241111 Log: MFC 239739: Don't build and install the 07.lpd doc if WITHOUT_LPR is set. Modified: stable/9/share/doc/smm/Makefile Directory Properties: stable/9/share/doc/smm/ (props changed) Modified: stable/9/share/doc/smm/Makefile ============================================================================== --- stable/9/share/doc/smm/Makefile Mon Oct 1 19:09:25 2012 (r241110) +++ stable/9/share/doc/smm/Makefile Mon Oct 1 19:13:47 2012 (r241111) @@ -18,7 +18,7 @@ SUBDIR= title \ 04.quotas \ 05.fastfs \ 06.nfs \ - 07.lpd \ + ${_07.lpd} \ ${_08.sendmailop} \ 11.timedop \ 12.timed \ @@ -28,4 +28,8 @@ SUBDIR= title \ _08.sendmailop= 08.sendmailop .endif +.if ${MK_LPR} != "no" +_07.lpd= 07.lpd +.endif + .include From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 19:22:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 889B51065670; Mon, 1 Oct 2012 19:22:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 739A98FC1C; Mon, 1 Oct 2012 19:22:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91JMrRP000785; Mon, 1 Oct 2012 19:22:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91JMrpS000783; Mon, 1 Oct 2012 19:22:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210011922.q91JMrpS000783@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Oct 2012 19:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241112 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 19:22:53 -0000 Author: jhb Date: Mon Oct 1 19:22:53 2012 New Revision: 241112 URL: http://svn.freebsd.org/changeset/base/241112 Log: MFC 239779: Shorten the name of the fast SWI taskqueue to "fast taskq" so that it fits. Modified: stable/9/sys/kern/subr_taskqueue.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/kern/subr_taskqueue.c ============================================================================== --- stable/9/sys/kern/subr_taskqueue.c Mon Oct 1 19:13:47 2012 (r241111) +++ stable/9/sys/kern/subr_taskqueue.c Mon Oct 1 19:22:53 2012 (r241112) @@ -565,7 +565,7 @@ taskqueue_fast_run(void *dummy) } TASKQUEUE_FAST_DEFINE(fast, taskqueue_fast_enqueue, NULL, - swi_add(NULL, "Fast task queue", taskqueue_fast_run, NULL, + swi_add(NULL, "fast taskq", taskqueue_fast_run, NULL, SWI_TQ_FAST, INTR_MPSAFE, &taskqueue_fast_ih)); int From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 19:43:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E87F0106566B; Mon, 1 Oct 2012 19:43:37 +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 D45AC8FC0A; Mon, 1 Oct 2012 19:43:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91JhbeO003624; Mon, 1 Oct 2012 19:43:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91Jhb6A003622; Mon, 1 Oct 2012 19:43:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210011943.q91Jhb6A003622@svn.freebsd.org> From: John Baldwin Date: Mon, 1 Oct 2012 19:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241113 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 19:43:38 -0000 Author: jhb Date: Mon Oct 1 19:43:37 2012 New Revision: 241113 URL: http://svn.freebsd.org/changeset/base/241113 Log: MFC 239779: Shorten the name of the fast SWI taskqueue to "fast taskq" so that it fits. Modified: stable/8/sys/kern/subr_taskqueue.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/subr_taskqueue.c ============================================================================== --- stable/8/sys/kern/subr_taskqueue.c Mon Oct 1 19:22:53 2012 (r241112) +++ stable/8/sys/kern/subr_taskqueue.c Mon Oct 1 19:43:37 2012 (r241113) @@ -454,7 +454,7 @@ taskqueue_fast_run(void *dummy) } TASKQUEUE_FAST_DEFINE(fast, taskqueue_fast_enqueue, NULL, - swi_add(NULL, "Fast task queue", taskqueue_fast_run, NULL, + swi_add(NULL, "fast taskq", taskqueue_fast_run, NULL, SWI_TQ_FAST, INTR_MPSAFE, &taskqueue_fast_ih)); int From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 21:42:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E056D106566C; Mon, 1 Oct 2012 21:42:32 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7968FC08; Mon, 1 Oct 2012 21:42:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91LgWg2017522; Mon, 1 Oct 2012 21:42:32 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91LgWje017520; Mon, 1 Oct 2012 21:42:32 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201210012142.q91LgWje017520@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 1 Oct 2012 21:42:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241114 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 21:42:33 -0000 Author: ken Date: Mon Oct 1 21:42:32 2012 New Revision: 241114 URL: http://svn.freebsd.org/changeset/base/241114 Log: Add the mps(4) driver to the i386 GENERIC config file. LSI has tested it on i386 and verified that it works. Submitted by: Harald Schmalzbauer, John Baldwin, Kashyap Desai MFC after: 3 days Modified: head/sys/i386/conf/GENERIC Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Mon Oct 1 19:43:37 2012 (r241113) +++ head/sys/i386/conf/GENERIC Mon Oct 1 21:42:32 2012 (r241114) @@ -121,6 +121,7 @@ device hptiop # Highpoint RocketRaid 3 device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters From owner-svn-src-all@FreeBSD.ORG Mon Oct 1 22:27:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86CF7106564A; Mon, 1 Oct 2012 22:27:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 586C18FC08; Mon, 1 Oct 2012 22:27:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91MRZJb023326; Mon, 1 Oct 2012 22:27:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91MRZcO023323; Mon, 1 Oct 2012 22:27:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210012227.q91MRZcO023323@svn.freebsd.org> From: Eitan Adler Date: Mon, 1 Oct 2012 22:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241115 - head/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 22:27:35 -0000 Author: eadler Date: Mon Oct 1 22:27:34 2012 New Revision: 241115 URL: http://svn.freebsd.org/changeset/base/241115 Log: Indicate (loudly) that ports csup is going away. While here clarify some other portions. Approved by: cperciva (implicit) MFC after: 3 days Modified: head/share/examples/cvsup/ports-supfile Modified: head/share/examples/cvsup/ports-supfile ============================================================================== --- head/share/examples/cvsup/ports-supfile Mon Oct 1 21:42:32 2012 (r241114) +++ head/share/examples/cvsup/ports-supfile Mon Oct 1 22:27:34 2012 (r241115) @@ -1,15 +1,20 @@ # $FreeBSD$ # # This file contains all of the "CVSup collections" that make up the -# FreeBSD-current ports collection. +# ports collection. # # csup (CVS Update Protocol) allows you to download the latest CVS # tree (or any branch of development therefrom) to your system easily # and efficiently -# -# To keep your CVS tree up-to-date run: -# -# csup ports-supfile +# _ +# __ ____ _ _ __ _ __ (_)_ __ __ _ +# \ \ /\ / / _` | '__| '_ \| | '_ \ / _` | +# \ V V / (_| | | | | | | | | | | (_| | +# \_/\_/ \__,_|_| |_| |_|_|_| |_|\__, | +# |___/ +# cvsup for ports is being phased out as of 28 February 2013 and its +# use is discouraged. Users are advised to migrate to portsnap +# or svn directly. # # Note that this only updates the tree contents and does not # update what is actually installed. @@ -63,11 +68,13 @@ ports-all # These are the individual collections that make up "ports-all". If you # use these, be sure to comment out "ports-all" above. -# + # Be sure to ALWAYS cvsup the ports-base collection if you use any of the # other individual collections below. ports-base is a mandatory collection # for the ports collection, and your ports may not build correctly if it # is not kept up to date. +# +# Use of individual collections is not a supported configuration. #ports-base #ports-accessibility #ports-arabic From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 00:30:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA3ED1065670; Tue, 2 Oct 2012 00:30:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D545B8FC18; Tue, 2 Oct 2012 00:30:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q920UFlA038026; Tue, 2 Oct 2012 00:30:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q920UFhn038024; Tue, 2 Oct 2012 00:30:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020030.q920UFhn038024@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 00:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241116 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 00:30:16 -0000 Author: eadler Date: Tue Oct 2 00:30:15 2012 New Revision: 241116 URL: http://svn.freebsd.org/changeset/base/241116 Log: Correct the tip about finding all the directories on the system Add a tip about clearing the screen. Make things more consistent by removing quotes around 'make search' Approved by: cperciva MFC after: 3 days Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Mon Oct 1 22:27:34 2012 (r241115) +++ head/games/fortune/datfiles/freebsd-tips Tue Oct 2 00:30:15 2012 (r241116) @@ -272,8 +272,11 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | less - -- Dru + find / -type d | less + +All the files? + + find / -type f | less % To see how long it takes a command to run, type the word "time" before the command name. @@ -315,9 +318,9 @@ and they can be combined as "ls -FG". Want to find a specific port, just type the following under /usr/ports or one its subdirectories: - "make search name=" + make search name= or - "make search key=" + make search key= % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -422,6 +425,8 @@ You can press Ctrl-D to quickly exit fro login shell. -- Konstantinos Konstantinidis % +You can press Ctrl-L while in the shell to clear the screen. +% You can press up-arrow or down-arrow to walk through a list of previous commands in tcsh. % From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 00:30:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB99106568D; Tue, 2 Oct 2012 00:30:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 545D68FC24; Tue, 2 Oct 2012 00:30:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q920ULv7038077; Tue, 2 Oct 2012 00:30:21 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q920ULZw038075; Tue, 2 Oct 2012 00:30:21 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020030.q920ULZw038075@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 00:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241117 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 00:30:21 -0000 Author: eadler Date: Tue Oct 2 00:30:20 2012 New Revision: 241117 URL: http://svn.freebsd.org/changeset/base/241117 Log: add SG state type PR: bin/171664 Submitted by: Jan Beich jbeich@tormail.org Approved by: cperciva MFC after: 1 week Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Tue Oct 2 00:30:15 2012 (r241116) +++ head/usr.bin/procstat/procstat.1 Tue Oct 2 00:30:20 2012 (r241117) @@ -418,6 +418,8 @@ default device .It ph physical +.It sg +scatter/gather .It sw swap .It vn From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 00:30:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4616310657C6; Tue, 2 Oct 2012 00:30:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7CA98FC0C; Tue, 2 Oct 2012 00:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q920UQ38038127; Tue, 2 Oct 2012 00:30:26 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q920UQQ0038124; Tue, 2 Oct 2012 00:30:26 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020030.q920UQQ0038124@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 00:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241118 - head/usr.bin/mktemp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 00:30:29 -0000 Author: eadler Date: Tue Oct 2 00:30:26 2012 New Revision: 241118 URL: http://svn.freebsd.org/changeset/base/241118 Log: Implement the Sun/GNU extension of using a default prefix when no arguments are supplied. Reviewed by: jilles Approved by: cperciva MFC after: 1 week Modified: head/usr.bin/mktemp/mktemp.1 head/usr.bin/mktemp/mktemp.c Modified: head/usr.bin/mktemp/mktemp.1 ============================================================================== --- head/usr.bin/mktemp/mktemp.1 Tue Oct 2 00:30:20 2012 (r241117) +++ head/usr.bin/mktemp/mktemp.1 Tue Oct 2 00:30:26 2012 (r241118) @@ -99,6 +99,14 @@ Care should be taken to ensure that it is appropriate to use an environment variable potentially supplied by the user. .Pp +If no arguments are passed or if only the +.Fl d +flag is passed +.Nm +behaves as if +.Fl t Li tmp +was supplied. +.Pp Any number of temporary files may be created in a single invocation, including one based on the internal template resulting from the .Fl t Modified: head/usr.bin/mktemp/mktemp.c ============================================================================== --- head/usr.bin/mktemp/mktemp.c Tue Oct 2 00:30:20 2012 (r241117) +++ head/usr.bin/mktemp/mktemp.c Tue Oct 2 00:30:26 2012 (r241118) @@ -87,6 +87,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (!tflag && argc < 1) { + tflag = 1; + prefix = "tmp"; + } + if (tflag) { tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) @@ -100,8 +105,6 @@ main(int argc, char **argv) else errx(1, "cannot generate template"); } - } else if (argc < 1) { - usage(); } /* generate all requested files */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 03:33:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85F6E106566B; Tue, 2 Oct 2012 03:33:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70F318FC0A; Tue, 2 Oct 2012 03:33:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q923XgZ3060706; Tue, 2 Oct 2012 03:33:42 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q923Xg4I060704; Tue, 2 Oct 2012 03:33:42 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020333.q923Xg4I060704@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 03:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241119 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 03:33:42 -0000 Author: eadler Date: Tue Oct 2 03:33:41 2012 New Revision: 241119 URL: http://svn.freebsd.org/changeset/base/241119 Log: Provide a generic way to disable devices at boot time PR: kern/119202 Requested by: peterj Reviewed by: sbruno, jhb Approved by: cperciva MFC after: 1 week Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Tue Oct 2 00:30:26 2012 (r241118) +++ head/sys/kern/subr_bus.c Tue Oct 2 03:33:41 2012 (r241119) @@ -2762,6 +2762,13 @@ device_attach(device_t dev) { int error; + if (resource_disabled(dev->driver->name, dev->unit)) { + device_disable(dev); + if (bootverbose) + device_printf(dev, "disabled via hints entry\n"); + return (ENXIO); + } + device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 06:26:46 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 841091065672; Tue, 2 Oct 2012 06:26:46 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 308F18FC0C; Tue, 2 Oct 2012 06:26:45 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 8D4D37E84A; Tue, 2 Oct 2012 16:26:37 +1000 (EST) Message-ID: <506A891D.3040401@freebsd.org> Date: Tue, 02 Oct 2012 16:26:37 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120814 Thunderbird/14.0 MIME-Version: 1.0 To: Jun Kuriyama References: <201208190815.q7J8FWLi049955@svn.freebsd.org> In-Reply-To: <201208190815.q7J8FWLi049955@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r239382 - in head/etc: defaults rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 06:26:46 -0000 Hi Jun, On 08/19/12 18:15, Jun Kuriyama wrote: > Author: kuriyama > Date: Sun Aug 19 08:15:32 2012 > New Revision: 239382 > URL: http://svn.freebsd.org/changeset/base/239382 > > Log: > - Allow to pass extra parameters for each jails. > - To achieve above, convert jail(8) invocation to use new style > command line "-c" flag. > > Reviewed at: freebsd-jail@ > > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/jail Can this change be MFCed without raising any POLA issues (I suspect it can)? If yes, would you be willing to MFC it to stable/8 and stable/9? Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 06:37:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 05E31106564A; Tue, 2 Oct 2012 06:37:48 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDF1D8FC1D; Tue, 2 Oct 2012 06:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q926blp2085187; Tue, 2 Oct 2012 06:37:47 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q926blnB085179; Tue, 2 Oct 2012 06:37:47 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210020637.q926blnB085179@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 2 Oct 2012 06:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241122 - in stable/9/release/doc: . de_DE.ISO8859-1/early-adopter de_DE.ISO8859-1/errata de_DE.ISO8859-1/hardware/alpha de_DE.ISO8859-1/hardware/common de_DE.ISO8859-1/hardware/i386 de... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 06:37:48 -0000 Author: gabor Date: Tue Oct 2 06:37:46 2012 New Revision: 241122 URL: http://svn.freebsd.org/changeset/base/241122 Log: MFC r241096: - Rename .sgml files to .xml to track the recent doc changes Added: stable/9/release/doc/de_DE.ISO8859-1/early-adopter/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml stable/9/release/doc/de_DE.ISO8859-1/errata/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/errata/article.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml stable/9/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml stable/9/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml stable/9/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml stable/9/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml stable/9/release/doc/de_DE.ISO8859-1/installation/common/install.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/install.xml stable/9/release/doc/de_DE.ISO8859-1/installation/common/layout.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/layout.xml stable/9/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml stable/9/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml stable/9/release/doc/de_DE.ISO8859-1/installation/i386/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml stable/9/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml stable/9/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml stable/9/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml stable/9/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml stable/9/release/doc/de_DE.ISO8859-1/readme/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/readme/article.xml stable/9/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml stable/9/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml stable/9/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml stable/9/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml stable/9/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml stable/9/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml stable/9/release/doc/de_DE.ISO8859-1/share/xml/ - copied from r241096, head/release/doc/de_DE.ISO8859-1/share/xml/ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml - copied unchanged from r241096, stable/9/release/doc/en_US.ISO8859-1/errata/article.sgml stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml - copied unchanged from r241096, stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/9/release/doc/en_US.ISO8859-1/installation/article.xml - copied unchanged from r241096, stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml stable/9/release/doc/en_US.ISO8859-1/readme/article.xml - copied unchanged from r241096, stable/9/release/doc/en_US.ISO8859-1/readme/article.sgml stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml - copied unchanged from r241096, stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml stable/9/release/doc/en_US.ISO8859-1/share/xml/ - copied from r241096, head/release/doc/en_US.ISO8859-1/share/xml/ stable/9/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml stable/9/release/doc/fr_FR.ISO8859-1/errata/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/errata/article.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml stable/9/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/install.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/install.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml stable/9/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml stable/9/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml stable/9/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml stable/9/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml stable/9/release/doc/fr_FR.ISO8859-1/share/xml/ - copied from r241096, head/release/doc/fr_FR.ISO8859-1/share/xml/ stable/9/release/doc/ja_JP.eucJP/errata/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/errata/article.xml stable/9/release/doc/ja_JP.eucJP/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/alpha/article.xml stable/9/release/doc/ja_JP.eucJP/hardware/amd64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/amd64/article.xml stable/9/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml stable/9/release/doc/ja_JP.eucJP/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/common/artheader.xml stable/9/release/doc/ja_JP.eucJP/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/common/dev.xml stable/9/release/doc/ja_JP.eucJP/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/common/intro.xml stable/9/release/doc/ja_JP.eucJP/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/i386/article.xml stable/9/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml stable/9/release/doc/ja_JP.eucJP/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/ia64/article.xml stable/9/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml stable/9/release/doc/ja_JP.eucJP/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/pc98/article.xml stable/9/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml stable/9/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml stable/9/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml stable/9/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml stable/9/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml stable/9/release/doc/ja_JP.eucJP/relnotes/common/new.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/common/new.xml stable/9/release/doc/ja_JP.eucJP/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/i386/article.xml stable/9/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml stable/9/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml stable/9/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml stable/9/release/doc/ja_JP.eucJP/share/xml/ - copied from r241096, head/release/doc/ja_JP.eucJP/share/xml/ stable/9/release/doc/ru_RU.KOI8-R/errata/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/errata/article.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml stable/9/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml stable/9/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml stable/9/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml stable/9/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml stable/9/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml stable/9/release/doc/ru_RU.KOI8-R/installation/common/install.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/install.xml stable/9/release/doc/ru_RU.KOI8-R/installation/common/layout.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/layout.xml stable/9/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml stable/9/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml stable/9/release/doc/ru_RU.KOI8-R/installation/i386/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/i386/article.xml stable/9/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml stable/9/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml stable/9/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml stable/9/release/doc/ru_RU.KOI8-R/readme/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/readme/article.xml stable/9/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml stable/9/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml stable/9/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml - copied unchanged from r241096, stable/9/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml stable/9/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml stable/9/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml stable/9/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml stable/9/release/doc/ru_RU.KOI8-R/share/xml/ - copied from r241096, head/release/doc/ru_RU.KOI8-R/share/xml/ stable/9/release/doc/share/xml/ - copied from r241096, head/release/doc/share/xml/ stable/9/release/doc/zh_CN.GB2312/errata/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/errata/article.xml stable/9/release/doc/zh_CN.GB2312/hardware/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/hardware/article.xml stable/9/release/doc/zh_CN.GB2312/readme/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/readme/article.xml stable/9/release/doc/zh_CN.GB2312/relnotes/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/relnotes/article.xml stable/9/release/doc/zh_CN.GB2312/share/xml/ - copied from r241096, head/release/doc/zh_CN.GB2312/share/xml/ Deleted: stable/9/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml stable/9/release/doc/de_DE.ISO8859-1/errata/article.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml stable/9/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/common/install.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/common/trouble.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/common/upgrade.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml stable/9/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml stable/9/release/doc/de_DE.ISO8859-1/readme/article.sgml stable/9/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml stable/9/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml stable/9/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml stable/9/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml stable/9/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml stable/9/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml stable/9/release/doc/de_DE.ISO8859-1/share/sgml/ stable/9/release/doc/en_US.ISO8859-1/errata/article.sgml stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml stable/9/release/doc/en_US.ISO8859-1/readme/article.sgml stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml stable/9/release/doc/en_US.ISO8859-1/share/sgml/ stable/9/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/errata/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/common/intro.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.sgml stable/9/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/abstract.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/artheader.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml stable/9/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml stable/9/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml stable/9/release/doc/fr_FR.ISO8859-1/share/sgml/ stable/9/release/doc/ja_JP.eucJP/errata/article.sgml stable/9/release/doc/ja_JP.eucJP/hardware/alpha/article.sgml stable/9/release/doc/ja_JP.eucJP/hardware/amd64/article.sgml stable/9/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml stable/9/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml stable/9/release/doc/ja_JP.eucJP/hardware/common/dev.sgml stable/9/release/doc/ja_JP.eucJP/hardware/common/intro.sgml stable/9/release/doc/ja_JP.eucJP/hardware/i386/article.sgml stable/9/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml stable/9/release/doc/ja_JP.eucJP/hardware/ia64/article.sgml stable/9/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml stable/9/release/doc/ja_JP.eucJP/hardware/pc98/article.sgml stable/9/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml stable/9/release/doc/ja_JP.eucJP/hardware/sparc64/article.sgml stable/9/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.sgml stable/9/release/doc/ja_JP.eucJP/relnotes/alpha/article.sgml stable/9/release/doc/ja_JP.eucJP/relnotes/amd64/article.sgml stable/9/release/doc/ja_JP.eucJP/relnotes/common/new.sgml stable/9/release/doc/ja_JP.eucJP/relnotes/i386/article.sgml stable/9/release/doc/ja_JP.eucJP/relnotes/ia64/article.sgml stable/9/release/doc/ja_JP.eucJP/relnotes/pc98/article.sgml stable/9/release/doc/ja_JP.eucJP/relnotes/sparc64/article.sgml stable/9/release/doc/ja_JP.eucJP/share/sgml/ stable/9/release/doc/ru_RU.KOI8-R/errata/article.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/alpha/article.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/amd64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/common/artheader.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/common/intro.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/i386/article.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/ia64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/pc98/article.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/alpha/article.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/amd64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/common/abstract.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/common/artheader.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/common/install.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/common/upgrade.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/i386/article.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/ia64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/pc98/article.sgml stable/9/release/doc/ru_RU.KOI8-R/installation/sparc64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/readme/article.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/i386/article.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.sgml stable/9/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.sgml stable/9/release/doc/ru_RU.KOI8-R/share/sgml/ stable/9/release/doc/share/sgml/ stable/9/release/doc/zh_CN.GB2312/errata/article.sgml stable/9/release/doc/zh_CN.GB2312/hardware/article.sgml stable/9/release/doc/zh_CN.GB2312/readme/article.sgml stable/9/release/doc/zh_CN.GB2312/relnotes/article.sgml stable/9/release/doc/zh_CN.GB2312/share/sgml/ Modified: stable/9/release/doc/Makefile stable/9/release/doc/README stable/9/release/doc/de_DE.ISO8859-1/early-adopter/Makefile stable/9/release/doc/de_DE.ISO8859-1/errata/Makefile stable/9/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile stable/9/release/doc/de_DE.ISO8859-1/hardware/common/hw.ent stable/9/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile stable/9/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile stable/9/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile stable/9/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile stable/9/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile stable/9/release/doc/de_DE.ISO8859-1/installation/common/install.ent stable/9/release/doc/de_DE.ISO8859-1/installation/i386/Makefile stable/9/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile stable/9/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile stable/9/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile stable/9/release/doc/de_DE.ISO8859-1/readme/Makefile stable/9/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile stable/9/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent stable/9/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile stable/9/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile stable/9/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile stable/9/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile stable/9/release/doc/en_US.ISO8859-1/errata/Makefile stable/9/release/doc/en_US.ISO8859-1/hardware/Makefile stable/9/release/doc/en_US.ISO8859-1/installation/Makefile stable/9/release/doc/en_US.ISO8859-1/readme/Makefile stable/9/release/doc/en_US.ISO8859-1/relnotes/Makefile stable/9/release/doc/fr_FR.ISO8859-1/early-adopter/Makefile stable/9/release/doc/fr_FR.ISO8859-1/errata/Makefile stable/9/release/doc/fr_FR.ISO8859-1/hardware/alpha/Makefile stable/9/release/doc/fr_FR.ISO8859-1/hardware/common/hw.ent stable/9/release/doc/fr_FR.ISO8859-1/hardware/i386/Makefile stable/9/release/doc/fr_FR.ISO8859-1/hardware/ia64/Makefile stable/9/release/doc/fr_FR.ISO8859-1/hardware/pc98/Makefile stable/9/release/doc/fr_FR.ISO8859-1/hardware/sparc64/Makefile stable/9/release/doc/fr_FR.ISO8859-1/installation/alpha/Makefile stable/9/release/doc/fr_FR.ISO8859-1/installation/common/install.ent stable/9/release/doc/fr_FR.ISO8859-1/installation/i386/Makefile stable/9/release/doc/fr_FR.ISO8859-1/installation/pc98/Makefile stable/9/release/doc/fr_FR.ISO8859-1/installation/sparc64/Makefile stable/9/release/doc/fr_FR.ISO8859-1/relnotes/alpha/Makefile stable/9/release/doc/fr_FR.ISO8859-1/relnotes/common/relnotes.ent stable/9/release/doc/fr_FR.ISO8859-1/relnotes/i386/Makefile stable/9/release/doc/ja_JP.eucJP/errata/Makefile stable/9/release/doc/ja_JP.eucJP/hardware/alpha/Makefile stable/9/release/doc/ja_JP.eucJP/hardware/amd64/Makefile stable/9/release/doc/ja_JP.eucJP/hardware/common/hw.ent stable/9/release/doc/ja_JP.eucJP/hardware/i386/Makefile stable/9/release/doc/ja_JP.eucJP/hardware/ia64/Makefile stable/9/release/doc/ja_JP.eucJP/hardware/pc98/Makefile stable/9/release/doc/ja_JP.eucJP/hardware/sparc64/Makefile stable/9/release/doc/ja_JP.eucJP/relnotes/alpha/Makefile stable/9/release/doc/ja_JP.eucJP/relnotes/amd64/Makefile stable/9/release/doc/ja_JP.eucJP/relnotes/common/relnotes.ent stable/9/release/doc/ja_JP.eucJP/relnotes/i386/Makefile stable/9/release/doc/ja_JP.eucJP/relnotes/ia64/Makefile stable/9/release/doc/ja_JP.eucJP/relnotes/pc98/Makefile stable/9/release/doc/ja_JP.eucJP/relnotes/sparc64/Makefile stable/9/release/doc/ru_RU.KOI8-R/errata/Makefile stable/9/release/doc/ru_RU.KOI8-R/hardware/alpha/Makefile stable/9/release/doc/ru_RU.KOI8-R/hardware/amd64/Makefile stable/9/release/doc/ru_RU.KOI8-R/hardware/common/hw.ent stable/9/release/doc/ru_RU.KOI8-R/hardware/i386/Makefile stable/9/release/doc/ru_RU.KOI8-R/hardware/ia64/Makefile stable/9/release/doc/ru_RU.KOI8-R/hardware/pc98/Makefile stable/9/release/doc/ru_RU.KOI8-R/hardware/sparc64/Makefile stable/9/release/doc/ru_RU.KOI8-R/installation/alpha/Makefile stable/9/release/doc/ru_RU.KOI8-R/installation/amd64/Makefile stable/9/release/doc/ru_RU.KOI8-R/installation/common/install.ent stable/9/release/doc/ru_RU.KOI8-R/installation/i386/Makefile stable/9/release/doc/ru_RU.KOI8-R/installation/ia64/Makefile stable/9/release/doc/ru_RU.KOI8-R/installation/pc98/Makefile stable/9/release/doc/ru_RU.KOI8-R/installation/sparc64/Makefile stable/9/release/doc/ru_RU.KOI8-R/readme/Makefile stable/9/release/doc/ru_RU.KOI8-R/relnotes/alpha/Makefile stable/9/release/doc/ru_RU.KOI8-R/relnotes/amd64/Makefile stable/9/release/doc/ru_RU.KOI8-R/relnotes/common/relnotes.ent stable/9/release/doc/ru_RU.KOI8-R/relnotes/i386/Makefile stable/9/release/doc/ru_RU.KOI8-R/relnotes/ia64/Makefile stable/9/release/doc/ru_RU.KOI8-R/relnotes/pc98/Makefile stable/9/release/doc/ru_RU.KOI8-R/relnotes/sparc64/Makefile stable/9/release/doc/ru_RU.KOI8-R/share/examples/dev-auto-translate.pl stable/9/release/doc/share/mk/doc.relnotes.mk stable/9/release/doc/zh_CN.GB2312/errata/Makefile stable/9/release/doc/zh_CN.GB2312/hardware/Makefile stable/9/release/doc/zh_CN.GB2312/readme/Makefile stable/9/release/doc/zh_CN.GB2312/relnotes/Makefile Directory Properties: stable/9/release/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/Makefile ============================================================================== --- stable/9/release/doc/Makefile Tue Oct 2 04:41:43 2012 (r241121) +++ stable/9/release/doc/Makefile Tue Oct 2 06:37:46 2012 (r241122) @@ -8,7 +8,7 @@ SUBDIR+= ${RELNOTES_LANG} .else SUBDIR+= en_US.ISO8859-1 .endif -SUBDIR+= share/sgml +SUBDIR+= share/xml RELN_ROOT?= ${.CURDIR} Modified: stable/9/release/doc/README ============================================================================== --- stable/9/release/doc/README Tue Oct 2 04:41:43 2012 (r241121) +++ stable/9/release/doc/README Tue Oct 2 06:37:46 2012 (r241122) @@ -24,34 +24,34 @@ share/mk/doc.relnotes.mk Common Makefile definitions for RELNOTESng. These definitions mostly accommodate the fact that we're building DocProj-like documents outside the doc/ tree. -share/sgml/catalog +share/xml/catalog Main SGML catalog for all language-neutral (and default EN) stylesheet and entity files. Can be overridden if needed for translations. -share/sgml/default.dsl +share/xml/default.dsl All documents build with this file as a stylesheet. All it does is to make it possible to use the document catalogs to locate the "real" stylesheet by reference, rather than having to specify it by pathname. -share/sgml/release.dsl +share/xml/release.dsl Language-neutral stylesheet. This stylesheet supports the arch= attribute on (all?) DocBook elements; elements with an arch= attribute are only included in the output if their value is equal to the value of the &arch; entity. In the future, arch= could be a list of possible &arch; entity values that match, such as "i386,sparc64". -share/sgml/release.ent +share/xml/release.ent Release information. Need to update the entry definitions in this file when rolling new revisions; these should take effect in all documents. -en_US.ISO8859-1/share/sgml/release.dsl +en_US.ISO8859-1/share/xml/release.dsl Language-dependent stylesheet for en, but also the default for translations if they don't override the settings here. This stylesheet sets the email footer at the bottom of HTML pages, as well as a few other parameters. If necessary for translations, this file can be overridden with - */share/sgml/release.dsl and */share/sgml/catalog. + */share/xml/release.dsl and */share/xml/catalog. */relnotes/common/ Directory for multi-architecture release notes files. @@ -88,7 +88,7 @@ tree. For example: % make DOC_PREFIX=/usr/doc all All definition of the "current" version of FreeBSD is contained in the -share/sgml/release.ent file; release engineers should peruse the +share/xml/release.ent file; release engineers should peruse the contents of this file carefully when doing version number bumps. When creating content for the architecture-dependent files, authors @@ -108,9 +108,9 @@ When creating a translation, make a new directory with a language code (paralleling the DocProj directory structure). If necessary, new language-dependent HTML footers can be generated by making a new language-dependent -${LANG}/share/sgml/release.dsl, a ${LANG}/share/sgml/catalog that +${LANG}/share/xml/release.dsl, a ${LANG}/share/xml/catalog that points to it, and a new definition in the Makefiles that adds -${LANG}/share/sgml/catalog to EXTRA_CATALOGS. Except for the Makefile +${LANG}/share/xml/catalog to EXTRA_CATALOGS. Except for the Makefile changes, this is the same procedure that is used for creating a new translation for DocProj files. Modified: stable/9/release/doc/de_DE.ISO8859-1/early-adopter/Makefile ============================================================================== --- stable/9/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Tue Oct 2 04:41:43 2012 (r241121) +++ stable/9/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Tue Oct 2 06:37:46 2012 (r241122) @@ -17,7 +17,7 @@ FORMATS?= html INSTALL_COMPRESSED?=gz INSTALL_ONLY_COMPRESSED?= -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied: stable/9/release/doc/de_DE.ISO8859-1/early-adopter/article.xml (from r241096, head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/release/doc/de_DE.ISO8859-1/early-adopter/article.xml Tue Oct 2 06:37:46 2012 (r241122, copy of r241096, head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml) @@ -0,0 +1,544 @@ + + +%entities; + +%release; + +X"> +X"> +]> + + + +
+ + Hinweise für die ersten Anwender von &os; + &release.current; + + + The &os; Release Engineering Team + + + $FreeBSD$ + + + 2002 + 2003 + The &os; Release + Engineering Team + + + + Dieser Artikel enthält Informationen über den + Status von &os; &release.current; für die Anwender, die + bisher noch keine Erfahrung mit den &release.5x; Versionen + oder &os; sammeln konnten. Er enthält einige + Hintergrundinformationen über die vor und während + einer Veröffentlichung ablaufende Prozesse, nennt die + wichtigsten Neuerungen und die Stellen, an denen die ersten + Anwender Probleme haben könnten. Weiterhin gibt es + Informationen über die Pläne für weitere + Veröffentlichungen im Entwicklungszweig 4-STABLE und + ein paar Hinweise für die Aktualisierung bestehender + Systeme. + + + + + Einführung + + Nach über zwei Jahren steht mit &os; &release.5x; + wieder eine komplett neue &os;-Version zur Verfügung. Sie + bietet nicht nur diverse neue Möglichkeiten, auch und + gerade unter der Haube hat sich einiges + verbessert. Der Nachteil dieser Neuerungen ist, daß + große Teile des Systems neu und nicht ausreichend getestet + sind. Im Vergleich zu den existierenden &release.4x; Versionen + kann der Schritt zu den ersten &release.5x; Versionen zu + Verschlechterungen in den Bereichen Stabilität, Leistung + und teilweise auch Funktionalität führen. + + Aus diesen Gründen warnen wir alle Anwender, ihre + Systeme nicht von älteren &os;-Versionen auf 5.0 zu + aktualisieren, wenn sie die "Problemzonen" nicht kennen + oder nicht bereit sind, die Einschränkungen in den neuesten + Versionen in Kauf zu nehmen. Gerade konservative Anwender + sollten in der nahen Zukunft &release.4x;-Versionen (wie + 4.8-RELEASE) benutzen. Wir meinen, daß diese Anwender + erst zu &release.5x; wechseln sollten, nachdem der + Entwicklungszweig 5-STABLE existiert; dies wird wahrscheinlich + nach der Veröffentlichung von 5.2-RELEASE + passieren. + + Hier zeigt sich das Henne und Ei Problem bei + der Veröffentlichung von &os; &release.5x;. Alle am &os; + Project beteiligten Personen wollen ein &os;, das möglichst + stabil und zuverlässig ist. Um dieses Ziel zu erreichen, + müssen die neue Version und speziell die neuen Komponenten + von möglichst vielen Anwendern getestet werden. + Dummerweise gibt es bei realistischer Betrachtung nur eine + Möglichkeit, eine größere Anzahl an Anwender + für einen Test zu gewinnen: Die Veröffentlichung der + zu testenden Version! + + Dieser Artikel beschreibt einige der Probleme, die bei der + Installation und Benutzung von &os; &release.current; auftreten + können. Zuerst wird beschrieben, wie eine neue FreeBSD + Version veröffentlicht wird. Dann werden die + interessanteren Neuerungen in FreeBSD &release.current; und die + Bereiche, in denen (gerade für unvorsichtige Anwender) + Probleme auftreten können, vorgestellt. Anwender, die erst + einmal bei Systemen auf Basis von 4-STABLE bleiben möchten, + erhalten einen kurzen Ausblick auf die kurz- und mittelfristigen + Planungen für diesen Entwicklungszweig. Zuletzt wird + besprochen, was bei einer Aktualisierung eines existierenden + &release.4x; Systems auf 5.0 beachtet werden muß. + + + + Veröffentlichung neuer &os;-Versionen + + Das Prinzip der &os;-Entwicklung ist die Verwendung mehrerer + Entwicklungszweige innerhalb eines CVS + Repository. Der Hauptzweig wird CURRENT + genannt und innerhalb des Repository mit dem symbolischen Namen + HEAD referenziert. Neuerungen werden + zunächst in diesen Zweig eingebracht. Das bedeutet zwar, + daß neue Möglichkeiten zunächst einmal nur in + CURRENT zur Verfügung stehen, es bedeutet allerdings auch, + daß dieser Zweig von Zeit zu Zeit Kummer bereitet, + während die Neuerungen getestet und ihre Fehler entfernt + werden. + + Wenn eine neue &os;-Version veröffentlicht wird, + basiert diese in der Regel auf einem der STABLE + (stabil) genannten Entwicklungszweige. Neuerungen werden nur in + diese Entwicklungszweige übernommen, nachdem sie in CURRENT + getestet wurden. Zur Zeit gibt es nur einen aktiven STABLE + Entwicklungszweig: 4-STABLE; dieser Zweig war + die Grundlage für alle &release.4x; Versionen. Dieser + Zweig wird innerhalb des CVS Repository durch den symbolischen + Namen RELENG_4 gekennzeichnet. + + Die Basis für &os; 5.0 und 5.1 ist der + Entwicklungszweig CURRENT. Damit wird zum ersten Mal nach + über zwei Jahren eine neue Version auf Basis dieses + Entwicklungszweiges erscheinen (die letzte war &os; 4.0, im + März 2000). + + Einige Zeit nach der Veröffentlichung von &os; 5.0 wird + im &os; CVS Repository der Zweig 5-STABLE mit dem + symbolischen Namen RELENG_5 erzeugt werden. + Die letzten beiden Entwicklungszweige dieser Art (3-STABLE und + 4-STABLE) wurden unmittelbar nach der Veröffentlichung der + jeweiligen Punkt Null Versionen (3.0 bzw. 4.0) + erzeugt. Rückblickend müssen wir feststellen, + daß dadurch in beiden Fällen nicht genug Zeit war, um + CURRENT zu stabilisieren, bevor der neue Entwicklungszweig + eingerichtet wurde. Dies führte zu unnötiger + Mehrarbeit, da Fehlerkorrekturen von einem Zweig in den anderen + Zweig übertragen werden mußten; außerdem kam + es zu einigen Änderungen in der Architektur, die nicht in + den jeweils anderen Zweig übernommen werden konnten. + + Aus diesem Grund wird das Release Engineering Team den neuen + 5-STABLE Entwicklungszweig erst dann im CVS Repository + einrichten, wenn eine solide Grundlage zur Verfügung steht. + Es ist sehr wahrscheinlich, daß vorher mehrere + &release.5x; Versionen erscheinen werden; zur Zeit rechnen wir + damit, daß 5-STABLE nach dem Erscheinen von 5.2-RELEASE + erzeugt werden wird. + + Weitere Informationen über den Ablauf bei der + Veröffentlichung einer neuen &os; Version finden Sie auf + den Release + Engineering Web pages und im Artikel &os; + Release Engineering. Informationen über den + geplanten Entwicklungszweig 5-STABLE finden Sie auf der The + Roadmap for 5-STABLE. + + + + Neuerungen + + Die Glanzpunkte von &os; &release.5x; sind die vielen Neuerungen. + Diese Neuerungen und die neue Funktionalität basieren zum + größten Teil auf massiven Änderungen der + Systemarchitektur, die nicht in den Entwicklungszweig 4-STABLE + eingepflegt wurden. Viele in sich abgeschlossene + Änderungen wie Treiber für neue Geräte oder neue + Benutzerprogramme wurden dagegen schon nach 4-STABLE + übernommen. Die folgende Liste enthält eine kurze + Übersicht über die wichtigsten Neuerungen in &os; + 5.0: + + + + SMPng: Die nächste Generation der + Unterstützung für Systeme mit mehreren Prozessoren + (noch nicht abgeschlossen). Es ist jetzt möglich, + daß mehrere Prozessoren gleichzeitig den Kernel + nutzen. + + + + KSE: Die Kernel Scheduled Entities + erlauben es einem Prozess, mehrere Threads auf Kernel-Ebene + zu nutzen, analog zur Aktivierung via Scheduler. Die + (experimentellen) Bibliotheken libkse + und libthr erlauben auch normalen + Programmen mit mehreren Threads, diese Erweiterung zu + nutzen. + + + + Neue Plattformen: Zusätzlich zu i386, pc98 und + Alpha werden jetzt auch sparc64 und ia64 Systeme + unterstützt. + + + + GCC: Der Compiler und die dazugehörigen Werkzeuge + basieren jetzt auf GCC 3.2.2 und nicht mehr auf GCC + 2.95.X. + + + + MAC: Unterstützung für erweiterbare + Mandatory Access Control Regelwerke. + + + + GEOM: Ein flexibles Gerüst zur Manipulation von + Daten beim Transfer von und zu Festplatten. Auf dieser + Basis wurde ein experimentelles Modul zur + Verschlüsselung des Festplatteninhaltes + entwickelt. + + + + FFS: Das Dateisystem unterstützt jetzt + Hintergrund-&man.fsck.8; (um das System nach einem Absturz + schneller verfügbar zu machen) sowie + Schnappschüsse. + + + + UFS2: Dieses neue Dateisystem unterstützt + größere Dateien und zusätzliche + Dateiberechtigungen. &man.newfs.8; erzeugt jetzt + standardmäßig UFS2 Dateisysteme und auf allen + Plattformen außer PC98 gilt dies auch für + Dateisysteme, die mit &man.sysinstall.8; erzeugt + werden. + + + + Cardbus: Cardbus wird jetzt unterstützt. + + + + Eine ausführlichere Übersicht über die + Neuerungen finden Sie in den Release Notes + für &os; &release.prev; und &release.current;. + + + + Nachteile für frühe Anwender + + Ein Nachteil der Neuerungen in &os; &release.5x; ist, + daß es in einigen Bereichen auf Grund der noch nicht + abgeschlossenen Entwicklung zu Problemen oder zu unerwarteten + Effekten kommen kann. Einige (aber nicht alle) der Problemzonen + sind in der folgenden Liste zusammengefaßt: + + + + Die Arbeit an diversen Neuerungen ist noch nicht + abgeschlossen, dazu gehören unter anderem SMPng und + KSE. Diese Erweiterungen sind zwar für Test- und + Experimentalzwecke ausreichend stabil, aber unter + Umständen nicht stabil genug für den + Produktionsbetrieb. + + + + Durch die Änderungen in den Datenstrukturen des + Kernels und der Schnittstellen für Anwendungen und + Programmierer (ABI/API), müssen Treiber anderer + Hersteller angepaßt werden, damit sie korrekt mit &os; + 5.0 zusammenarbeiten. Es ist nicht ausgeschlossen, + daß es bis zum Erscheinen des Entwicklungszweiges + 5-STABLE weitere kleinere Änderungen am ABI/API geben + wird. + + + + Einige Teile des &os; Basissystems wurden in die Ports + Collection verschoben. Dazu gehören insbesondere + Perl, + UUCP und die meisten (nicht alle) + Spiele. Diese Programme werden zwar weiterhin entwickelt + und unterstützt, es kann aber verwirren, daß sie + nicht mehr Teil des Basissystems sind. + + + + Einige Teile des &os;-Basissystems wurden nicht mehr + gepflegt, weil es nicht genügend Anwender und/oder + Entwickler gab. Diese Teile mußten entfernt werden, + dazu zählen unter anderem die Erzeugung von Programmen + im Format a.out;, die XNS-Netzwerkprotokolle und der Treiber + für den X-10 Controller. + + + + Viele Ports und Packages, die mit &os; 4-STABLE noch + korrekt liefen, können mit &os; 5.0 nicht genutzt oder + nicht kompiliert werden. Der Grund ist in der Regel der + neue Compiler oder die Aufräumarbeiten in den + Header-Dateien. + + + + Viele der Neuerungen in &os; &release.5x; wurden bisher + nur auf relativ wenigen Systemen getestet. Viele dieser + Neuerungen (wie SMPng) haben Auswirkungen auf große + Bereiche des Kernels. + + + + Die Neuerungen in &os; 5.0 enthalten noch Routinen + zur Unterstützung bei der Fehlersuche und Diagnose. + Dadurch kann es dazu kommen, daß ein System mit + &os; 5.0 langsamer ist als mit 4-STABLE. + + + + Neuerungen werden erst in den Entwicklungszweig 4-STABLE + übernommen, nachdem sie eine Zeit lang in -CURRENT + gereift sind. Bei &os; 5.0 fehlt dieser + stabilisierende Effekt eines -STABLE Entwicklungszweiges. + Der Entwicklungszweig 5-STABLE wird wahrscheinlich erst + einige Zeit nach der Veröffentlichung von 5.2-RELEASE + eingerichtet werden. + + + + Die Dokumentation (wie z.B. das &os; Handbuch + und der FAQ) + ist teilweise noch nicht auf dem Stand von + &os; &release.5x;. + + + + Da einige dieser Probleme auch negative Auswirkungen auf die + Stabilität des Systems haben, rät das Release + Engineering Team konservativen Anwendern und Firmen, Versionen + aus dem Entwicklungszweig 4-STABLE zu verwenden, bis die + &release.5x; Versionen zuverlässiger + geworden sind. + + + + Die Zukunft des Entwicklungszweiges 4-STABLE + + Die Veröffentlichung von &os; 5.0 bedeutete nicht das + Ende des Entwicklungszweiges 4-STABLE: &os; 4.8 erschien im + April 2003, zwei Monate nach der Veröffentlichung von &os; + 5.0. Es wird wahrscheinlich noch eine weitere Version auf der + Basis dieses Entwicklungszweiges geben: Das für den Sommer + 2003 geplante 4.9-RELEASE. Auch eine Version 4.10 liegt im + Bereich des Möglichen. Dies hängt von mehreren + Faktoren ab, der wichtigste davon ist die Existenz und + Stabilität des Entwicklungszweiges 5-STABLE. Wenn CURRENT + nicht stabil genug ist, um einen Entwicklungszweig 5-STABLE zu + rechtfertigen, werden weitere Versionen auf Basis des + Entwicklungszweiges 4-STABLE möglich und notwendig sein. + Bis zum Erscheinen der offiziell letzten Version auf Basis von + 4-STABLE bleibt es den Entwicklern überlassen, ob sie + Neuerungen aus HEAD in 4-STABLE einpflegen + (im Rahmen der schon bestehenden Regelungen). + + Bis zu einem gewissen Grad werden das Release Engineering + Team und die Entwickler auch die Wünsche der Benutzer nach + weiteren Versionen auf Basis von 4-STABLE beachten. Allerdings + nur, so weit dies im Rahmen der beschränkten Ressourcen + möglich ist. + + Neue Versionen auf Basis des Entwicklungszweiges 4-STABLE + werden vom &a.security-officer; im üblichen Rahmen + unterstützt werden, genauere Informationen dazu finden Sie + auf der Security + page auf der &os; Webseite. In der Regel werden die + letzten beiden Versionen jedes Entwicklungszweiges durch die + Veröffentlichung von Sicherheitshinweisen und Patches + unterstützt; dem Team ist es allerdings freigestellt, diese + Unterstützung auf weitere Versionen oder spezielle Probleme + auszudehnen. + + + + Hinweise für die Aktualisierung von &os; &release.4x; + + Dieses Kapitel enthält Hinweise für Anwender, die + ihr bestehendes &os; &release.4x; System auf &os; &release.5x; + aktualisieren wollen. Wie bei jeder Aktualisierung ist es auf + jeden Fall notwendig, vorher die Release Notes und die Errata der + neuen Version zu lesen; bei Aktualisierung über den + Quellcode ist src/UPDATING + Pflichtlektüre. + + + Aktualisierung ohne Quellcode + + Der einfachste Ansatz ist immer noch + Sicherheitskopien erstellen, Platte formatieren, neues + System installieren, Daten wieder einspielen. Dadurch + werden alle Probleme mit veralteten und nicht kompatiblen + Programmen und Konfigurationsdateien umgangen. Die neuen + Dateisysteme können maximalen Nutzen aus den diversen + Neuerungen (speziell UFS2) ziehen. + + Zum gegenwärtigen Zeitpunkt hat noch niemand + ausführlich getestet, ob und wie gut die + Upgrade-Option in &man.sysinstall.8; bei einem + Update von 4.0 zu 5.0 funktioniert. Wir raten daher dringend + von der Verwendung dieser Funktion ab. Eines der + Hauptprobleme ist, daß bei dieser Variante diverse + Dateien nicht gelöscht werden, die zwar von &release.4x; + genutzt wurden, aber in &release.5x; nicht mehr vorhanden + sind. Diese Altlasten können zu Problemen + führen. + + Auf i386 und pc98 Systemen kann die Konfiguration von ISA + Geräten beim Systemstart mit dem Werkzeug UserConfig + eingestellt werden, dies gilt auch beim Start von einem + Installations-Medium. Dieses Programm wurde in &os; 5.0 durch + &man.device.hints.5; ersetzt; dieses stellt zwar die gleiche + Funktionalität bereit, ist aber von der Bedienung her + völlig verschieden. + + Bei einer Installation von Diskette kann es notwendig + werden, die neue Treiber-Diskette zu benutzen. Das + drivers.flp Diskettenimage sollte im + allgemeinen überall dort verfügbar sein, wo auch + schon die bekannten kern.flp und + mfsroot.flp verfügbar sind. + + Bei einer Installation von CD-ROM auf einem i386-System + wird jetzt ein neues Startprogramm mit dem Namen + no-emulation boot loader genutzt. Dadurch ist + es unter anderem möglich, auf der CD den Standardkernel + (GENERIC) statt des auf den Disketten + verwendeten Mini-Kernels zu nutzen. Jedes System, das von den + Installations-CDs für Windows NT 4.0 booten kann, sollte + auch mit den &os; &release.5x; CD-ROMs zurechtkommen. + + + + Aktualisierung mit Quellcode + + Es ist auf jeden Fall erforderlich, vor der Aktualisierung + src/UPDATING zu lesen. Der Abschnitt + To upgrade from 4.x-stable to current + enthält eine Schritt-für-Schritt Anleitung, der Sie + unbedingt folgen müssen, die Nutzung der üblichen + Abkürzungen ist nicht + möglich. + + + + Allgemeine Hinweise + + Perl wurde aus dem Basissystem + entfernt und sollte entweder als Package oder über die + Ports Collection installiert werden. Die bisher übliche + Praxis, Perl als Teil des Basissystems zu behandeln und mit ihm + zusammen zu kompilieren, führte zu diversen Problemen, + die eine Aktualisierung von Perl erschwerten. Die im + Standardsystem vorhandenen Programme, die Perl + benötigten, wurden entweder in einer anderen Sprache neu + geschrieben (wenn sie noch benötigt wurden) oder + ersatzlos entfernt (wenn sie überflüssig waren). Da + &man.sysinstall.8; das Perl Package bei den meisten + Distributionen automatisch mit installiert, sollte diese + Änderung kaum Auswirkungen auf die Anwender + haben. + + Einige Scripte verlassen sich darauf, daß der + Perl-Interpreter als /usr/bin/perl + verfügbar ist. Der Perl Port enthält das Programm + use.perl, mit dem ein passender Satz + symbolischer Links für diese Scripte erzeugt werden kann. + Nach dem Aufruf von use.perl port sollte + alles wie erwartet funktionieren. + + Es ist zwar möglich, für &release.4x; + geschriebene Programme unter &release.5x; zu nutzen, + allerdings muß dazu die Distribution + compat4x installiert sein. Damit + könnte es auch möglich sein, + alte Ports zu benutzen. + + Bei der Aktualisierung eines bestehenden Systems auf Basis + von 4-STABLE, ist es unbedingt notwendig, die alten Dateien in + /usr/include zu löschen. Im + allgemeinen ist es ausreichend, dieses Verzeichnis vor der + Installation bzw. vor dem + installworld zu entfernen. Wird das + Verzeichnis nicht entfernt, kann es zu Problemen kommen + (speziell mit C++-Programmen), da der Compiler dann einen Mix + aus alten und neuen Headerdateien verwendet. + + Es gibt kein MAKEDEV mehr, weil es + nicht mehr benötigt wird. &os; &release.5x; benutzt ein + spezielles Dateisystem für Geräte, das die + entsprechenden Device Nodes bei Bedarf automatisch erzeugt. + Weitere Informationen finden Sie in &man.devfs.5;. + + Alle mit &man.newfs.8; erzeugten Dateisysteme werden + standardmäßig im Format UFS2 angelegt. Diese gilt + auf allen Plattformen außer PC98 auch für + Dateisysteme, die mit &man.sysinstall.8; erzeugt werden. Da + &os; &release.4x; nur UFS1 lesen kann, müssen alle + Dateisysteme, die sowohl mit &release.4x; als auch mit + &release.5x; nutzbar sein sollen, im Format UFS1 erzeugt + werden. Dieser Fall tritt typischerweise auf Systemen auf, + auf denen &release.4x; und &release.5x; installiert und + abwechselnd betrieben werden. In &man.newfs.8; steht dazu die + Option zur Verfügung, auch + &man.sysinstall.8; enthält eine entsprechende Option. + Bitte beachten Sie, daß es kein Konvertierungsprogramm + zur Umwandlung von UFS1 nach UFS2 (oder umgekehrt) gibt, nur + die Variante Backup, Formatieren, Restore. + + + + + Zusammenfassung + + &os; &release.current; enthält zwar viele interessante + Neuerungen, aber es ist noch nicht für alle Anwender + geeignet. Aus diesem Grund haben wir in diesem Dokument + Informationen über die Abläufe bei der + Veröffentlichung einer neuen Version, die interessantesten + Neuerungen in den &release.5x; Versionen und wahrscheinliche + Probleme gegeben. Weiterhin enthielt er einen Ausblick auf die + Zukunft des Entwicklungszweiges 4-STABLE und Informationen + für Anwender, die schon jetzt umsteigen wollen. + +
Modified: stable/9/release/doc/de_DE.ISO8859-1/errata/Makefile ============================================================================== --- stable/9/release/doc/de_DE.ISO8859-1/errata/Makefile Tue Oct 2 04:41:43 2012 (r241121) +++ stable/9/release/doc/de_DE.ISO8859-1/errata/Makefile Tue Oct 2 06:37:46 2012 (r241122) @@ -16,7 +16,7 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied: stable/9/release/doc/de_DE.ISO8859-1/errata/article.xml (from r241096, head/release/doc/de_DE.ISO8859-1/errata/article.xml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/release/doc/de_DE.ISO8859-1/errata/article.xml Tue Oct 2 06:37:46 2012 (r241122, copy of r241096, head/release/doc/de_DE.ISO8859-1/errata/article.xml) @@ -0,0 +1,406 @@ + + +%entities; + +%release; +]> + + + +
+ + + &os; +<![ %release.type.snapshot [ + &release.prev; +]]> +<![ %release.type.release [ + &release.current; +]]> + Errata + + + Das &os; Projekt + + + $FreeBSD$ + + + 2000 + 2001 + 2002 + 2003 + The FreeBSD Documentation Project + + + + 2001 + 2002 + 2003 + The FreeBSD German Documentation Project + + + + + Dieses Dokument enthält die Errata für &os; + + + + also wichtige Informationen, die kurz vor bzw. erst nach + der Veröffentlichung bekannt wurden. Dazu gehören + Ratschläge zur Sicherheit sowie Änderungen in der + Software oder Dokumentation, welche die Stabilität und die + Nutzung beeinträchtigen könnten. Sie sollten immer + die aktuelle Version dieses Dokumentes lesen, bevor sie diese + Version von &os; installieren. + + Diese Errata für &os; + + + + werden bis zum + Erscheinen von &os; 5.1-RELEASE weiter aktualisiert + werden. + + + + Einleitung + + Diese Errata enthalten brandheiße + Informationen über &os; + + + + Bevor Sie diese + Version installieren, sollten Sie auf jeden Fall dieses Dokument + lesen, um über Probleme informiert zu werden, die erst nach + der Veröffentlichung entdeckt (und vielleicht auch schon + behoben) wurden. + + Die zusammen mit der Veröffentlichung erschienene + Version dieses Dokumentes (zum Beispiel die Version auf der + CDROM) ist per Definition veraltet. Allerdings sind im Internet + aktualisierte Versionen verfügbar, die die aktuellen + Errata für diese Version sind. Diese Versionen + sind bei + und allen aktuellen Mirrors dieser Webseite + verfügbar. + + Die Snapshots von &os; &release.branch; (sowohl die der + Quelltexte als auch die der ausführbaren Programme) + enthalten ebenfalls die zum Zeitpunkt ihrer + Veröffentlichung aktuelle Version dieses + Dokumentes. + + Die Liste der &os; CERT security advisories finden Sie bei + oder + . + + + + Sicherheitshinweise + + Ein über das Netzwerk nutzbarer Fehler in + CVS könnte dazu führen, + daß ein Angreifer beliebige Programme auf dem CVS Server + ausführen kann. Weitere Informationen finden Sie in FreeBSD-SA-03:01. + + Durch Auswertung der Antwortzeiten von + OpenSSL wäre es einem Angreifer + mit sehr viel Rechenleistung möglich gewesen, unter + bestimmten Umständen den Klartext der übermittelten + Daten zu erhalten. Dieser Fehler wurde in &os; + &release.current; durch die neue + OpenSSL Version 0.9.7 behoben. Auf + den für Sicherheitsprobleme unterstützten + Entwicklungszweigen wurde der Fehler durch die neue + OpenSSL Version 0.9.6i behoben. + Weitere Informationen finden Sie in FreeBSD-SA-03:02 + + Es ist theoretisch möglich, daß ein Angreifer den + geheimen Schlüssel ermittelt, der von der Erweiterung + syncookies genutzt wird. Dadurch sinkt deren + Effektivität beim Schutz vor TCP SYN Flood + Denial-of-Service Angriffen. Hinweise, wie sie das Problem + umgehen können und weitere Informationen finden Sie in + FreeBSD-SA-03:03. + + Durch diverse Puffer-Überläufe in den von + sendmail genutzten Routinen zum + Parsen des Headers war es einen Angreifer möglich, eine + speziell konstruierte Nachricht an &man.sendmail.8; zu senden + und so beliebige Programme ausführen zu lassen. Diese + Programme verfügten über die Rechte des Benutzers, + unter dessen Kennung &man.sendmail.8; lief, also typischerweise + root. Weitere Informationen und Verweise + auf Patches finden Sie in FreeBSD-SA-03:04 + und FreeBSD-SA-03:07. + + Durch einen Puffer-Überlauf im XDR Kodierer/Dekodierer + war es einem Angreifer möglich, den Service zum Absturz zu + bringen. Informationen, wie Sie den Fehler beheben, finden Sie + in FreeBSD-SA-03:05. + + OpenSSL enthält zwei + Schwachstellen, die erst vor kurzer Zeit bekannt gemacht wurden. + Informationen, wie Sie die Probleme umgehen können und + weitere Informationen finden Sie in FreeBSD-SA-03:06. + + + + Aktuelle Informationen + + GEOM + + Die auf &man.geom.4; basierenden Routinen des Kernel zur + Partitionierung erlauben es nicht, eine aktive Partition zu + überschreiben. Mit anderen Worten, es ist in der Regel + nicht möglich, den Bootsektor einer Festplatte mit + disklabel -B zu aktualisieren, da die + Partition a auch den Bereich enthält, in + dem die Bootsektoren gespeichert sind. Um dieses Problem zu + umgehen, sollten Sie von einer anderen Platte, einer CD oder der + Fixit-Diskette booten. + + &man.dump.8; + + Werden Festplatten und ähnliche Medien mit einer + Blockgröße von mehr als 512 Byte benutzt (zum + Beispiel mit &man.geom.4; verschlüsselte Partitionen), + behandelt &man.dump.8; die größeren Sektoren nicht + korrekt und kann daher das Dateisystem nicht dumpen. Eine + Möglichkeit, das Problem zu umgehen, ist die Erzeugung einer + rohen Kopie des gesamten Dateisystems, die dann + als Eingabedatei für &man.dump.8; dient. Es ist + möglich, ein komplettes Dateisystem in einer normalen Datei + zu speichern: + + &prompt.root; dd if=/dev/ad0s1d.bde of=/junk/ad0.dd bs=1m +&prompt.root; dump 0f - /junk/ad0.dd | ... + + Eine etwas einfachere Lösung ist, &man.tar.1; oder + &man.cpio.1; zur Erzeugung des Backups zu verwende. + + &man.mly.4; + + Es gibt Berichte, daß sich Systeme bei der + Installation von &os; 5.0 Snapshots auf RAIDs an + &man.mly.4;-kompatiblen Controller aufgehängt haben, obwohl + die Systeme problemlos mit 4.7-RELEASE zusammenarbeiten. Dieser + Fehler wurde in &os; &release.current; bereits behoben. + + NETNCP/Unterstützung des + Dateisystems + + NETNCP und nwfs sind offenbar noch nicht an KSE + angepaßt worden und funktionieren daher nicht. Dieser + Fehler wurde in &os; &release.current; bereits behoben. + + &man.iir.4; Controller + + Bei der Installation scheinen &man.iir.4;-Controller korrekt + erkannt zu werden, allerdings finden Sie keine der + angeschlossenen Festplatten. + + Timing-Probleme in + &man.truss.1; + + Es scheint ein Timing-Problem beim Start des Debuggings mit + &man.truss.1; zu geben, durch das &man.truss.1; manchmal nicht + in der Lage ist, eine Verbindung zu einem Prozeß + aufzubauen, bevor er gestartet wird. In diesem Fall meldet + &man.truss.1;, daß es die &man.procfs.5; Node für den + zu debuggenden Prozeß nicht öffnen kann. Es scheint + einen weiteren Fehler zu geben, durch den &man.truss.1; sich + aufhängt, wenn &man.execve.2; den Wert + ENOENT zurückgibt. Ein weiteres + Timing-Problem führt dazu, daß &man.truss.1; beim + Start manchmal PIOCWAIT: Input/output + error meldet. Es existieren zwar Korrekturen + für diese Probleme, da diese aber zu sehr in die Routinen + zur Ausführung von Prozessen eingreifen, werden sie erst + nach dem Erscheinen von 5.0 ins System aufgenommen. + + Partitionierung von Festplatten durch + das Installationsprogramm + + Es gibt einige Meldungen über Fehler bei der + Partitionierung von Festplatten mit &man.sysinstall.8;. Eines + der Probleme ist, daß &man.sysinstall.8; den freien Platz + auf einer Festplatten nicht neu berechnen kann, nachdem der Typ + einer FDISK-Partition geändert wurde. + + Veraltete Dokumentation + + In einigen Fällen wurde die Dokumentation (wie zum + Beispiel die FAQ und das Handbuch) nicht aktualisiert und geht + nicht auf die Neuerungen in &os; &release.prev; ein. Zum + Beispiel fehlt noch Dokumentation zu &man.gbde.8; und den neuen + fast IPsec Routinen. + + SMB Dateisystem + + Ab und zu kommt beim Versuch, die Verbindung zu einem SMBFS + Share zu trennen, die Meldung Device + busy, obwohl das Share nicht benutzt wird. Die + einzige Lösung für dieses Problem ist, die Operation + so lange zu wiederholen, bis die Verbindung getrennt wird. + Dieser Fehler wurde in &release.current; bereits behoben. + + Der Versuch, die Trennung der Verbindung zu einem SMBFS + Share mit umount -f zu erzwingen, kann zu + einer Kernel Panic führen. Dieser Fehler wurde in + &release.current; bereits behoben. + + &man.fstat.2; + + Wird &man.fstat.2; auf einen Socket angewendet, für den + bereits eine Verbindung besteht, sollte es die Anzahl der zum + Lesen verfügbaren Zeichen in dem Feld + st_size der Struktur struct + stat zurückgeben. Leider wird bei TCP Sockets immer ein + st_size von 0 gemeldet. + Dieser Fehler wurde in &release.current; bereits behoben. + + Kernel Event Queues + + Der zu &man.kqueue.2; gehörende Filter + EVFILT_READ meldet fälschlicherweise + immer, daß an einem TCP Socket 0 + Zeichen zum Lesen bereitstehen, auch wenn in Wirklichkeit + Zeichen zum Lesen verfügbar sind. Die bei + EVFILT_READ verfügbare Option + NOTE_LOWAT arbeitet bei TCP Sockets ebenfalls + fehlerhaft. Dieser Fehler wurde in &release.current; bereits + behoben. + + POSIX Named Semaphores + + Eine der Neuerungen in &os; &release.prev; ist die + Unterstützung für Named Semaphores nach POSIX. Die + Routinen enthalten leider einen Fehler, durch den sich + &man.sem.open.3; falsch verhalten kann, wenn eine Semaphore von + einem Prozeß mehrfach geöffnet wird und durch den + &man.sem.close.3; zum Absturz des Programms führen kann. + Dieser Fehler wurde in &release.current; bereits behoben. + + Zugriffsrechte für + /dev/tty + + &os; &release.prev; enthält einen kleinen Fehler im + Bereich der Berechtigungen von /dev/tty. + Dieser Fehler tritt auf, wenn sich ein Benutzer einloggt, der + weder root noch Mitglied der Gruppe + tty ist. Wechselt dieser Benutzer nun mit + &man.su.1; zu einer anderen Benutzerkennung, die ebenfalls + weder root noch Mitglied der Gruppe + tty ist, kann er &man.ssh.1; nicht + nutzen, da es /dev/tty nicht öffnen + kann. Dieser Fehler wurde in &release.current; bereits + behoben. + + &man.growfs.8; + + &man.growfs.8; funktioniert auf &man.vinum.4; Partitionen + nicht mehr, da auf ihnen kein Disklabel mehr emuliert wird und + &man.growfs.8; das Disklabel analysieren will. Das Problem + betrifft wahrscheinlich auch alle anderen Massenspeicher, + für die &man.geom.4; benutzt wird. + + IPFW + + &man.ipfw.4; skipto Regeln funktionieren + nicht, wenn gleichzeitig das Schlüsselwort + log verwendet wird. Auch die *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 07:14:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ABF11065672; Tue, 2 Oct 2012 07:14:22 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC1E68FC12; Tue, 2 Oct 2012 07:14:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q927EMb7090261; Tue, 2 Oct 2012 07:14:22 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q927EMUX090257; Tue, 2 Oct 2012 07:14:22 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210020714.q927EMUX090257@svn.freebsd.org> From: Alan Cox Date: Tue, 2 Oct 2012 07:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241123 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 07:14:23 -0000 Author: alc Date: Tue Oct 2 07:14:22 2012 New Revision: 241123 URL: http://svn.freebsd.org/changeset/base/241123 Log: Introduce a new TLB invalidation function for efficiently invalidating address ranges, and use this function in pmap_remove(). Tested by: jchandra Modified: head/sys/mips/include/tlb.h head/sys/mips/mips/pmap.c head/sys/mips/mips/tlb.c Modified: head/sys/mips/include/tlb.h ============================================================================== --- head/sys/mips/include/tlb.h Tue Oct 2 06:37:46 2012 (r241122) +++ head/sys/mips/include/tlb.h Tue Oct 2 07:14:22 2012 (r241123) @@ -53,6 +53,7 @@ void tlb_insert_wired(unsigned, vm_offse void tlb_invalidate_address(struct pmap *, vm_offset_t); void tlb_invalidate_all(void); void tlb_invalidate_all_user(struct pmap *); +void tlb_invalidate_range(struct pmap *, vm_offset_t, vm_offset_t); void tlb_save(void); void tlb_update(struct pmap *, vm_offset_t, pt_entry_t); Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Tue Oct 2 06:37:46 2012 (r241122) +++ head/sys/mips/mips/pmap.c Tue Oct 2 07:14:22 2012 (r241123) @@ -190,10 +190,9 @@ static vm_page_t _pmap_allocpte(pmap_t p static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t); static pt_entry_t init_pte_prot(vm_page_t m, vm_prot_t access, vm_prot_t prot); -#ifdef SMP static void pmap_invalidate_page_action(void *arg); +static void pmap_invalidate_range_action(void *arg); static void pmap_update_page_action(void *arg); -#endif #ifndef __mips_n64 /* @@ -711,6 +710,31 @@ pmap_invalidate_page(pmap_t pmap, vm_off pmap_call_on_active_cpus(pmap, pmap_invalidate_page_action, &arg); } +struct pmap_invalidate_range_arg { + pmap_t pmap; + vm_offset_t sva; + vm_offset_t eva; +}; + +static void +pmap_invalidate_range_action(void *arg) +{ + struct pmap_invalidate_range_arg *p = arg; + + tlb_invalidate_range(p->pmap, p->sva, p->eva); +} + +static void +pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + struct pmap_invalidate_range_arg arg; + + arg.pmap = pmap; + arg.sva = sva; + arg.eva = eva; + pmap_call_on_active_cpus(pmap, pmap_invalidate_range_action, &arg); +} + struct pmap_update_page_arg { pmap_t pmap; vm_offset_t va; @@ -1737,12 +1761,15 @@ pmap_remove_page(struct pmap *pmap, vm_o * rounded to the page size. */ void -pmap_remove(struct pmap *pmap, vm_offset_t sva, vm_offset_t eva) +pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - vm_offset_t va_next; pd_entry_t *pde, *pdpe; pt_entry_t *pte; + vm_offset_t va, va_next; + /* + * Perform an unsynchronized read. This is, however, safe. + */ if (pmap->pm_stats.resident_count == 0) return; @@ -1772,17 +1799,36 @@ pmap_remove(struct pmap *pmap, vm_offset va_next = eva; pde = pmap_pdpe_to_pde(pdpe, sva); - if (*pde == 0) + if (*pde == NULL) continue; + + /* + * Limit our scan to either the end of the va represented + * by the current page table page, or to the end of the + * range being removed. + */ if (va_next > eva) va_next = eva; + + va = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, sva += PAGE_SIZE) { - if (!pte_test(pte, PTE_V)) + if (!pte_test(pte, PTE_V)) { + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } continue; - pmap_remove_pte(pmap, pte, sva, *pde); - pmap_invalidate_page(pmap, sva); + } + if (va == va_next) + va = sva; + if (pmap_remove_pte(pmap, pte, sva, *pde)) { + sva += PAGE_SIZE; + break; + } } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); } out: rw_wunlock(&pvh_global_lock); Modified: head/sys/mips/mips/tlb.c ============================================================================== --- head/sys/mips/mips/tlb.c Tue Oct 2 06:37:46 2012 (r241122) +++ head/sys/mips/mips/tlb.c Tue Oct 2 07:14:22 2012 (r241123) @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include @@ -187,6 +187,79 @@ tlb_invalidate_all_user(struct pmap *pma intr_restore(s); } +/* + * Invalidates any TLB entries that map a virtual page from the specified + * address range. If "end" is zero, then every virtual page is considered to + * be within the address range's upper bound. + */ +void +tlb_invalidate_range(pmap_t pmap, vm_offset_t start, vm_offset_t end) +{ + register_t asid, end_hi, hi, hi_pagemask, s, save_asid, start_hi; + int i; + + KASSERT(start < end || (end == 0 && start > 0), + ("tlb_invalidate_range: invalid range")); + + /* + * Truncate the virtual address "start" to an even page frame number, + * and round the virtual address "end" to an even page frame number. + */ + start &= ~((1 << TLBMASK_SHIFT) - 1); + end = (end + (1 << TLBMASK_SHIFT) - 1) & ~((1 << TLBMASK_SHIFT) - 1); + + s = intr_disable(); + save_asid = mips_rd_entryhi() & TLBHI_ASID_MASK; + + asid = pmap_asid(pmap); + start_hi = TLBHI_ENTRY(start, asid); + end_hi = TLBHI_ENTRY(end, asid); + + /* + * Select the fastest method for invalidating the TLB entries. + */ + if (end - start < num_tlbentries << TLBMASK_SHIFT || (end == 0 && + start >= -(num_tlbentries << TLBMASK_SHIFT))) { + /* + * The virtual address range is small compared to the size of + * the TLB. Probe the TLB for each even numbered page frame + * within the virtual address range. + */ + for (hi = start_hi; hi != end_hi; hi += 1 << TLBMASK_SHIFT) { + mips_wr_pagemask(0); + mips_wr_entryhi(hi); + tlb_probe(); + i = mips_rd_index(); + if (i >= 0) + tlb_invalidate_one(i); + } + } else { + /* + * The virtual address range is large compared to the size of + * the TLB. Test every non-wired TLB entry. + */ + for (i = mips_rd_wired(); i < num_tlbentries; i++) { + mips_wr_index(i); + tlb_read(); + hi = mips_rd_entryhi(); + if ((hi & TLBHI_ASID_MASK) == asid && (hi < end_hi || + end == 0)) { + /* + * If "hi" is a large page that spans + * "start_hi", then it must be invalidated. + */ + hi_pagemask = mips_rd_pagemask(); + if (hi >= (start_hi & ~(hi_pagemask << + TLBMASK_SHIFT))) + tlb_invalidate_one(i); + } + } + } + + mips_wr_entryhi(save_asid); + intr_restore(s); +} + /* XXX Only if DDB? */ void tlb_save(void) From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 09:19:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2991D106566B; Tue, 2 Oct 2012 09:19:29 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14AC48FC14; Tue, 2 Oct 2012 09:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q929JS2k008776; Tue, 2 Oct 2012 09:19:28 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q929JSUD008774; Tue, 2 Oct 2012 09:19:28 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201210020919.q929JSUD008774@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 2 Oct 2012 09:19:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241124 - head/usr.sbin/cron/cron X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 09:19:29 -0000 Author: pluknet Date: Tue Oct 2 09:19:28 2012 New Revision: 241124 URL: http://svn.freebsd.org/changeset/base/241124 Log: Fix build with DEBUGGING disabled. Modified: head/usr.sbin/cron/cron/cron.c Modified: head/usr.sbin/cron/cron/cron.c ============================================================================== --- head/usr.sbin/cron/cron/cron.c Tue Oct 2 07:14:22 2012 (r241123) +++ head/usr.sbin/cron/cron/cron.c Tue Oct 2 09:19:28 2012 (r241124) @@ -51,16 +51,20 @@ struct pidfh *pfh; static void usage() { +#if DEBUGGING char **dflags; +#endif fprintf(stderr, "usage: cron [-j jitter] [-J rootjitter] " "[-m mailto] [-s] [-o] [-x debugflag[,...]]\n"); +#if DEBUGGING fprintf(stderr, "\ndebugflags: "); for(dflags = DebugFlagNames; *dflags; dflags++) { fprintf(stderr, "%s ", *dflags); } fprintf(stderr, "\n"); +#endif exit(ERROR_EXIT); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 09:23:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F10EF1065670; Tue, 2 Oct 2012 09:23:16 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC4D28FC12; Tue, 2 Oct 2012 09:23:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q929NGBP009300; Tue, 2 Oct 2012 09:23:16 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q929NGFi009298; Tue, 2 Oct 2012 09:23:16 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201210020923.q929NGFi009298@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 2 Oct 2012 09:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241125 - head/usr.sbin/cron/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 09:23:17 -0000 Author: pluknet Date: Tue Oct 2 09:23:16 2012 New Revision: 241125 URL: http://svn.freebsd.org/changeset/base/241125 Log: Fix build with LOG_FILE undefined and DEBUGGING disabled. Modified: head/usr.sbin/cron/lib/misc.c Modified: head/usr.sbin/cron/lib/misc.c ============================================================================== --- head/usr.sbin/cron/lib/misc.c Tue Oct 2 09:19:28 2012 (r241124) +++ head/usr.sbin/cron/lib/misc.c Tue Oct 2 09:23:16 2012 (r241125) @@ -391,7 +391,9 @@ log_it(username, xpid, event, detail) char *event; char *detail; { +#if defined(LOG_FILE) || DEBUGGING PID_T pid = xpid; +#endif #if defined(LOG_FILE) char *msg; TIME_T now = time((TIME_T) 0); From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 09:53:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2DEE106566C; Tue, 2 Oct 2012 09:53:50 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDB1C8FC0C; Tue, 2 Oct 2012 09:53:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q929roX7012877; Tue, 2 Oct 2012 09:53:50 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q929roWW012875; Tue, 2 Oct 2012 09:53:50 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201210020953.q929roWW012875@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 2 Oct 2012 09:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241126 - head/usr.sbin/fifolog/fifolog_create X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 09:53:50 -0000 Author: pluknet Date: Tue Oct 2 09:53:50 2012 New Revision: 241126 URL: http://svn.freebsd.org/changeset/base/241126 Log: mdoc: point to an existing cross reference. Modified: head/usr.sbin/fifolog/fifolog_create/fifolog.1 Modified: head/usr.sbin/fifolog/fifolog_create/fifolog.1 ============================================================================== --- head/usr.sbin/fifolog/fifolog_create/fifolog.1 Tue Oct 2 09:23:16 2012 (r241125) +++ head/usr.sbin/fifolog/fifolog_create/fifolog.1 Tue Oct 2 09:53:50 2012 (r241126) @@ -203,7 +203,7 @@ One particular useful use of is with .Xr syslogd 8 using a line such as this in -.Xr /etc/syslog.conf 5 : +.Xr syslog.conf 5 : .Pp .Dl "*.* |fifolog_writer /var/log/syslog_fifolog" .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 10:05:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7A81065675; Tue, 2 Oct 2012 10:05:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA38B8FC0C; Tue, 2 Oct 2012 10:05:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92A5dht017398; Tue, 2 Oct 2012 10:05:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92A5dB3017396; Tue, 2 Oct 2012 10:05:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210021005.q92A5dB3017396@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 2 Oct 2012 10:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241127 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 10:05:39 -0000 Author: hselasky Date: Tue Oct 2 10:05:39 2012 New Revision: 241127 URL: http://svn.freebsd.org/changeset/base/241127 Log: Remove unused field. MFC after: 1 week Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Tue Oct 2 09:53:50 2012 (r241126) +++ head/sys/dev/usb/usb_hub.c Tue Oct 2 10:05:39 2012 (r241127) @@ -103,7 +103,6 @@ struct uhub_softc { struct usb_xfer *sc_xfer[UHUB_N_TRANSFER]; /* interrupt xfer */ uint8_t sc_flags; #define UHUB_FLAG_DID_EXPLORE 0x01 - char sc_name[32]; }; #define UHUB_PROTO(sc) ((sc)->sc_udev->ddesc.bDeviceProtocol) @@ -927,9 +926,6 @@ uhub_attach(device_t dev) mtx_init(&sc->sc_mtx, "USB HUB mutex", NULL, MTX_DEF); - snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", - device_get_nameunit(dev)); - device_set_usb_desc(dev); DPRINTFN(2, "depth=%d selfpowered=%d, parent=%p, " From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 10:09:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CD8B106566C; Tue, 2 Oct 2012 10:09:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57C908FC0A; Tue, 2 Oct 2012 10:09:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92A9OB4018073; Tue, 2 Oct 2012 10:09:24 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92A9OHE018071; Tue, 2 Oct 2012 10:09:24 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210021009.q92A9OHE018071@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 2 Oct 2012 10:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241128 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 10:09:24 -0000 Author: hselasky Date: Tue Oct 2 10:09:23 2012 New Revision: 241128 URL: http://svn.freebsd.org/changeset/base/241128 Log: Style. MFC after: 1 week Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Tue Oct 2 10:05:39 2012 (r241127) +++ head/sys/dev/usb/usb_hub.c Tue Oct 2 10:09:23 2012 (r241128) @@ -160,7 +160,7 @@ static device_method_t uhub_methods[] = DEVMETHOD(bus_child_location_str, uhub_child_location_string), DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_string), DEVMETHOD(bus_driver_added, uhub_driver_added), - {0, 0} + DEVMETHOD_END }; static driver_t uhub_driver = { From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 12:03:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAE71065695; Tue, 2 Oct 2012 12:03:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E5F58FC1F; Tue, 2 Oct 2012 12:03:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92C32e5032698; Tue, 2 Oct 2012 12:03:02 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92C3282032695; Tue, 2 Oct 2012 12:03:02 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210021203.q92C3282032695@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 2 Oct 2012 12:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241129 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 12:03:03 -0000 Author: glebius Date: Tue Oct 2 12:03:02 2012 New Revision: 241129 URL: http://svn.freebsd.org/changeset/base/241129 Log: There is a complex race in in_pcblookup_hash() and in_pcblookup_group(). Both functions need to obtain lock on the found PCB, and they can't do classic inter-lock with the PCB hash lock, due to lock order reversal. To keep the PCB stable, these functions put a reference on it and after PCB lock is acquired drop it. If the reference was the last one, this means we've raced with in_pcbfree() and the PCB is no longer valid. This approach works okay only if we are acquiring writer-lock on the PCB. In case of reader-lock, the following scenario can happen: - 2 threads locate pcb, and do in_pcbref() on it. - These 2 threads drop the inp hash lock. - Another thread comes to delete pcb via in_pcbfree(), it obtains hash lock, does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(), which doesn't free the pcb due to two references on it. Then it unlocks the pcb. - 2 aforementioned threads acquire reader lock on the pcb and run in_pcbrele_rlocked(). One gets 1 from in_pcbrele_rlocked() and continues, second gets 0 and considers pcb freed, returns. - The thread that got 1 continutes working with detached pcb, which later leads to panic in the underlying protocol level. To plumb that problem an additional INPCB flag introduced - INP_FREED. We check for that flag in the in_pcbrele_rlocked() and if it is set, we pretend that that was the last reference. Discussed with: rwatson, jhb Reported by: Vladimir Medvedkin Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Tue Oct 2 10:09:23 2012 (r241128) +++ head/sys/netinet/in_pcb.c Tue Oct 2 12:03:02 2012 (r241129) @@ -1105,8 +1105,17 @@ in_pcbrele_rlocked(struct inpcb *inp) INP_RLOCK_ASSERT(inp); - if (refcount_release(&inp->inp_refcount) == 0) + if (refcount_release(&inp->inp_refcount) == 0) { + /* + * If the inpcb has been freed, let the caller know, even if + * this isn't the last reference. + */ + if (inp->inp_flags2 & INP_FREED) { + INP_RUNLOCK(inp); + return (1); + } return (0); + } KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); @@ -1186,6 +1195,7 @@ in_pcbfree(struct inpcb *inp) inp_freemoptions(inp->inp_moptions); #endif inp->inp_vflag = 0; + inp->inp_flags2 |= INP_FREED; crfree(inp->inp_cred); #ifdef MAC mac_inpcb_destroy(inp); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Tue Oct 2 10:09:23 2012 (r241128) +++ head/sys/netinet/in_pcb.h Tue Oct 2 12:03:02 2012 (r241129) @@ -542,6 +542,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_RT_VALID 0x00000002 /* cached rtentry is valid */ #define INP_PCBGROUPWILD 0x00000004 /* in pcbgroup wildcard list */ #define INP_REUSEPORT 0x00000008 /* SO_REUSEPORT option is set */ +#define INP_FREED 0x00000010 /* inp itself is not valid */ /* * Flags passed to in_pcblookup*() functions. From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 12:25:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46D0B106566B; Tue, 2 Oct 2012 12:25:31 +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 3172C8FC08; Tue, 2 Oct 2012 12:25:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92CPVG5036192; Tue, 2 Oct 2012 12:25:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92CPUEW036190; Tue, 2 Oct 2012 12:25:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210021225.q92CPUEW036190@svn.freebsd.org> From: John Baldwin Date: Tue, 2 Oct 2012 12:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241130 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 12:25:31 -0000 Author: jhb Date: Tue Oct 2 12:25:30 2012 New Revision: 241130 URL: http://svn.freebsd.org/changeset/base/241130 Log: Rename the module for 'device enc' to "if_enc" to avoid conflicting with the CAM "enc" peripheral (part of ses(4)). Previously the two modules used the same name, so only one was included in a linked kernel causing enc0 to not be created if you added IPSEC to GENERIC. The new module name follows the pattern of other network interfaces (e.g. "if_loop"). MFC after: 1 week Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Tue Oct 2 12:03:02 2012 (r241129) +++ head/sys/net/if_enc.c Tue Oct 2 12:25:30 2012 (r241130) @@ -179,12 +179,12 @@ enc_modevent(module_t mod, int type, voi } static moduledata_t enc_mod = { - "enc", + "if_enc", enc_modevent, 0 }; -DECLARE_MODULE(enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); +DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); static int enc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 12:44:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98AE21065674; Tue, 2 Oct 2012 12:44:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D988FC17; Tue, 2 Oct 2012 12:44:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92CilN4039039; Tue, 2 Oct 2012 12:44:47 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92CilaR039036; Tue, 2 Oct 2012 12:44:47 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210021244.q92CilaR039036@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 2 Oct 2012 12:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241131 - head/sys/netpfil/pf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 12:44:47 -0000 Author: glebius Date: Tue Oct 2 12:44:46 2012 New Revision: 241131 URL: http://svn.freebsd.org/changeset/base/241131 Log: To reduce volume of pfsync traffic: - Scan request update queue to prevent doubles. - Do not push undersized daragram in pfsync_update_request(). Modified: head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Tue Oct 2 12:25:30 2012 (r241130) +++ head/sys/netpfil/pf/if_pfsync.c Tue Oct 2 12:44:46 2012 (r241131) @@ -1832,9 +1832,15 @@ pfsync_request_update(u_int32_t creatori PFSYNC_LOCK_ASSERT(sc); /* - * This code does nothing to prevent multiple update requests for the - * same state being generated. + * This code does a bit to prevent multiple update requests for the + * same state being generated. It searches current subheader queue, + * but it doesn't lookup into queue of already packed datagrams. */ + TAILQ_FOREACH(item, &sc->sc_upd_req_list, ur_entry) + if (item->ur_msg.id == id && + item->ur_msg.creatorid == creatorid) + return; + item = malloc(sizeof(*item), M_PFSYNC, M_NOWAIT); if (item == NULL) return; /* XXX stats */ @@ -1854,8 +1860,6 @@ pfsync_request_update(u_int32_t creatori TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry); sc->sc_len += nlen; - - pfsync_push(sc); } static void From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 12:57:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7AF7106566C; Tue, 2 Oct 2012 12:57:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9824E8FC08; Tue, 2 Oct 2012 12:57:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92CvmK8040963; Tue, 2 Oct 2012 12:57:48 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92CvmuT040961; Tue, 2 Oct 2012 12:57:48 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210021257.q92CvmuT040961@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 2 Oct 2012 12:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241132 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 12:57:48 -0000 Author: glebius Date: Tue Oct 2 12:57:47 2012 New Revision: 241132 URL: http://svn.freebsd.org/changeset/base/241132 Log: Merge r240985 from head: Fix bug in TCP_KEEPCNT setting, which slipped in in the last round of reviewing of r231025. Unlike other options from this family TCP_KEEPCNT doesn't specify time interval, but a count, thus parameter supplied doesn't need to be multiplied by hz. Reported & tested by: amdmi3 Modified: stable/9/sys/netinet/tcp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/9/sys/netinet/tcp_usrreq.c Tue Oct 2 12:44:46 2012 (r241131) +++ stable/9/sys/netinet/tcp_usrreq.c Tue Oct 2 12:57:47 2012 (r241132) @@ -1443,7 +1443,6 @@ tcp_ctloutput(struct socket *so, struct case TCP_KEEPIDLE: case TCP_KEEPINTVL: - case TCP_KEEPCNT: case TCP_KEEPINIT: INP_WUNLOCK(inp); error = sooptcopyin(sopt, &ui, sizeof(ui), sizeof(ui)); @@ -1476,13 +1475,6 @@ tcp_ctloutput(struct socket *so, struct tcp_timer_activate(tp, TT_2MSL, TP_MAXIDLE(tp)); break; - case TCP_KEEPCNT: - tp->t_keepcnt = ui; - if ((tp->t_state == TCPS_FIN_WAIT_2) && - (TP_MAXIDLE(tp) > 0)) - tcp_timer_activate(tp, TT_2MSL, - TP_MAXIDLE(tp)); - break; case TCP_KEEPINIT: tp->t_keepinit = ui; if (tp->t_state == TCPS_SYN_RECEIVED || @@ -1494,6 +1486,21 @@ tcp_ctloutput(struct socket *so, struct INP_WUNLOCK(inp); break; + case TCP_KEEPCNT: + INP_WUNLOCK(inp); + error = sooptcopyin(sopt, &ui, sizeof(ui), sizeof(ui)); + if (error) + return (error); + + INP_WLOCK_RECHECK(inp); + tp->t_keepcnt = ui; + if ((tp->t_state == TCPS_FIN_WAIT_2) && + (TP_MAXIDLE(tp) > 0)) + tcp_timer_activate(tp, TT_2MSL, + TP_MAXIDLE(tp)); + INP_WUNLOCK(inp); + break; + default: INP_WUNLOCK(inp); error = ENOPROTOOPT; From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 13:03:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97872106566B; Tue, 2 Oct 2012 13:03:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68E418FC0A; Tue, 2 Oct 2012 13:03:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92D3Clg041799; Tue, 2 Oct 2012 13:03:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92D3CvV041797; Tue, 2 Oct 2012 13:03:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210021303.q92D3CvV041797@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 2 Oct 2012 13:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241133 - releng/9.1/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 13:03:12 -0000 Author: glebius Date: Tue Oct 2 13:03:11 2012 New Revision: 241133 URL: http://svn.freebsd.org/changeset/base/241133 Log: Merge r240985 from head: Fix bug in TCP_KEEPCNT setting, which slipped in in the last round of reviewing of r231025. Unlike other options from this family TCP_KEEPCNT doesn't specify time interval, but a count, thus parameter supplied doesn't need to be multiplied by hz. Reported & tested by: amdmi3 Approved by: re (kib) Modified: releng/9.1/sys/netinet/tcp_usrreq.c Directory Properties: releng/9.1/sys/ (props changed) Modified: releng/9.1/sys/netinet/tcp_usrreq.c ============================================================================== --- releng/9.1/sys/netinet/tcp_usrreq.c Tue Oct 2 12:57:47 2012 (r241132) +++ releng/9.1/sys/netinet/tcp_usrreq.c Tue Oct 2 13:03:11 2012 (r241133) @@ -1443,7 +1443,6 @@ tcp_ctloutput(struct socket *so, struct case TCP_KEEPIDLE: case TCP_KEEPINTVL: - case TCP_KEEPCNT: case TCP_KEEPINIT: INP_WUNLOCK(inp); error = sooptcopyin(sopt, &ui, sizeof(ui), sizeof(ui)); @@ -1476,13 +1475,6 @@ tcp_ctloutput(struct socket *so, struct tcp_timer_activate(tp, TT_2MSL, TP_MAXIDLE(tp)); break; - case TCP_KEEPCNT: - tp->t_keepcnt = ui; - if ((tp->t_state == TCPS_FIN_WAIT_2) && - (TP_MAXIDLE(tp) > 0)) - tcp_timer_activate(tp, TT_2MSL, - TP_MAXIDLE(tp)); - break; case TCP_KEEPINIT: tp->t_keepinit = ui; if (tp->t_state == TCPS_SYN_RECEIVED || @@ -1494,6 +1486,21 @@ tcp_ctloutput(struct socket *so, struct INP_WUNLOCK(inp); break; + case TCP_KEEPCNT: + INP_WUNLOCK(inp); + error = sooptcopyin(sopt, &ui, sizeof(ui), sizeof(ui)); + if (error) + return (error); + + INP_WLOCK_RECHECK(inp); + tp->t_keepcnt = ui; + if ((tp->t_state == TCPS_FIN_WAIT_2) && + (TP_MAXIDLE(tp) > 0)) + tcp_timer_activate(tp, TT_2MSL, + TP_MAXIDLE(tp)); + INP_WUNLOCK(inp); + break; + default: INP_WUNLOCK(inp); error = ENOPROTOOPT; From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 14:48:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E4B6106566C; Tue, 2 Oct 2012 14:48:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58D5A8FC0A; Tue, 2 Oct 2012 14:48:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92Em4sh055255; Tue, 2 Oct 2012 14:48:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92Em4sJ055252; Tue, 2 Oct 2012 14:48:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210021448.q92Em4sJ055252@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 14:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241134 - head/usr.sbin/ip6addrctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 14:48:04 -0000 Author: eadler Date: Tue Oct 2 14:48:03 2012 New Revision: 241134 URL: http://svn.freebsd.org/changeset/base/241134 Log: Fix alignment related warnings reported by gcc Switch from old style arguments to modern C remove WARNS as a result tested with "make universe" Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/ip6addrctl/Makefile head/usr.sbin/ip6addrctl/ip6addrctl.c Modified: head/usr.sbin/ip6addrctl/Makefile ============================================================================== --- head/usr.sbin/ip6addrctl/Makefile Tue Oct 2 13:03:11 2012 (r241133) +++ head/usr.sbin/ip6addrctl/Makefile Tue Oct 2 14:48:03 2012 (r241134) @@ -3,6 +3,4 @@ PROG= ip6addrctl MAN= ip6addrctl.8 -WARNS?= 2 - .include Modified: head/usr.sbin/ip6addrctl/ip6addrctl.c ============================================================================== --- head/usr.sbin/ip6addrctl/ip6addrctl.c Tue Oct 2 13:03:11 2012 (r241133) +++ head/usr.sbin/ip6addrctl/ip6addrctl.c Tue Oct 2 14:48:03 2012 (r241134) @@ -71,12 +71,10 @@ static void plen2mask(struct sockaddr_in static void set_policy(void); static void add_policy(char *, char *, char *); static void delete_policy(char *); -static void flush_policy(); +static void flush_policy(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { TAILQ_INIT(&policyhead); @@ -107,11 +105,11 @@ main(argc, argv) } static void -get_policy() +get_policy(void) { int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_ADDRCTLPOLICY }; size_t l; - char *buf; + struct in6_addrpolicy *buf; struct in6_addrpolicy *pol, *ep; if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) { @@ -131,8 +129,8 @@ get_policy() /* NOTREACHED */ } - ep = (struct in6_addrpolicy *)(buf + l); - for (pol = (struct in6_addrpolicy *)buf; pol + 1 <= ep; pol++) { + ep = buf + l/sizeof(*buf); + for (pol = buf; pol + 1 <= ep; pol++) { struct policyqueue *new; if ((new = malloc(sizeof(*new))) == NULL) @@ -145,7 +143,7 @@ get_policy() } static void -dump_policy() +dump_policy(void) { size_t addrlen; char addrbuf[NI_MAXHOST]; @@ -201,8 +199,7 @@ dump_policy() } while (0); static void -make_policy_fromfile(conf) - char *conf; +make_policy_fromfile(char *conf) { char line[_POSIX2_LINE_MAX], *cp; char *addrstr; @@ -257,9 +254,7 @@ make_policy_fromfile(conf) } static int -parse_prefix(prefix0, pol) - const char *prefix0; - struct in6_addrpolicy *pol; +parse_prefix(const char *prefix0, struct in6_addrpolicy *pol) { int e = 0, plen; char *prefix, *plenstr; @@ -299,11 +294,9 @@ parse_prefix(prefix0, pol) } static void -plen2mask(mask, plen) - struct sockaddr_in6 *mask; - int plen; +plen2mask(struct sockaddr_in6 *mask, int plen) { - u_char *cp = (char *)&mask->sin6_addr; + u_char *cp = (unsigned char *)&mask->sin6_addr; memset(mask, 0, sizeof(*mask)); mask->sin6_family = AF_INET6; /* just in case */ @@ -316,7 +309,7 @@ plen2mask(mask, plen) } static void -set_policy() +set_policy(void) { struct policyqueue *ent; int s; @@ -334,8 +327,7 @@ set_policy() } static int -mask2plen(mask) - struct sockaddr_in6 *mask; +mask2plen(struct sockaddr_in6 *mask) { int masklen, final = 0; u_char *p, *lim; @@ -394,8 +386,7 @@ mask2plen(mask) } static void -add_policy(prefix, prec, label) - char *prefix, *prec, *label; +add_policy(char *prefix, char *prec, char *label) { struct in6_addrpolicy p; int s; @@ -416,8 +407,7 @@ add_policy(prefix, prec, label) } static void -delete_policy(prefix) - char *prefix; +delete_policy(char *prefix) { struct in6_addrpolicy p; int s; @@ -436,7 +426,7 @@ delete_policy(prefix) } static void -flush_policy() +flush_policy(void) { struct policyqueue *ent; int s; @@ -454,7 +444,7 @@ flush_policy() } static void -usage() +usage(void) { fprintf(stderr, "usage: ip6addrctl [show]\n"); fprintf(stderr, " ip6addrctl add " From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 17:04:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DC14106564A; Tue, 2 Oct 2012 17:04:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34C7D8FC0A; Tue, 2 Oct 2012 17:04:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92H4sH2072801; Tue, 2 Oct 2012 17:04:54 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92H4r6K072792; Tue, 2 Oct 2012 17:04:53 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210021704.q92H4r6K072792@svn.freebsd.org> From: Baptiste Daroussin Date: Tue, 2 Oct 2012 17:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241135 - in stable/9/usr.sbin/pkg_install: add create info lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 17:04:54 -0000 Author: bapt Date: Tue Oct 2 17:04:53 2012 New Revision: 241135 URL: http://svn.freebsd.org/changeset/base/241135 Log: MFC r240682 if a file in plist starts with / then do not prefix it with "prefix" [1] pkg info -g returns 1 if a file mismatch [2] flush stdout in pkg info -g [3] clean up quiet mode (-q | --quiet) output of pkg_version(1) [4] fix missing error call in uname check added to pkg_version(1) [5] fix pkg_add(1) fails to install with -C from bad path [6] only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7] PR: bin/13128 [1] bin/139015 [2] bin/113702 [3] bin/142570 [4] bin/146857 [5] bin/157543 [6] Submitted by: cy [1] Anton Yuzhaninov [2] Ighighi [3] "N.J. Mann" [4] gcooper [5] David Naylor [6] netchild [7] Modified: stable/9/usr.sbin/pkg_install/add/main.c stable/9/usr.sbin/pkg_install/create/perform.c stable/9/usr.sbin/pkg_install/info/info.h stable/9/usr.sbin/pkg_install/info/perform.c stable/9/usr.sbin/pkg_install/info/show.c stable/9/usr.sbin/pkg_install/lib/lib.h stable/9/usr.sbin/pkg_install/lib/plist.c stable/9/usr.sbin/pkg_install/version/perform.c Directory Properties: stable/9/usr.sbin/pkg_install/ (props changed) stable/9/usr.sbin/pkg_install/add/ (props changed) stable/9/usr.sbin/pkg_install/info/ (props changed) Modified: stable/9/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/9/usr.sbin/pkg_install/add/main.c Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/add/main.c Tue Oct 2 17:04:53 2012 (r241135) @@ -288,7 +288,9 @@ main(int argc, char **argv) } /* Perform chroot if requested */ if (Chroot != NULL) { - if (chroot(Chroot)) + if (chdir(Chroot)) + errx(1, "chdir to %s failed", Chroot); + if (chroot(".")) errx(1, "chroot to %s failed", Chroot); } /* Make sure the sub-execs we invoke get found */ Modified: stable/9/usr.sbin/pkg_install/create/perform.c ============================================================================== --- stable/9/usr.sbin/pkg_install/create/perform.c Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/create/perform.c Tue Oct 2 17:04:53 2012 (r241135) @@ -215,10 +215,14 @@ pkg_perform(char **pkgs) /* Prefix should add an @cwd to the packing list */ if (Prefix) { - char resolved_prefix[PATH_MAX]; - if (realpath(Prefix, resolved_prefix) == NULL) - err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix); - add_plist_top(&plist, PLIST_CWD, resolved_prefix); + if (Prefix[0] != '/') { + char resolved_prefix[PATH_MAX]; + if (realpath(Prefix, resolved_prefix) == NULL) + err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix); + add_plist_top(&plist, PLIST_CWD, resolved_prefix); + } else { + add_plist_top(&plist, PLIST_CWD, Prefix); + } } /* Add the origin if asked, at the top */ Modified: stable/9/usr.sbin/pkg_install/info/info.h ============================================================================== --- stable/9/usr.sbin/pkg_install/info/info.h Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/info/info.h Tue Oct 2 17:04:53 2012 (r241135) @@ -77,7 +77,7 @@ extern void show_plist(const char *, Pac extern void show_files(const char *, Package *); extern void show_index(const char *, const char *); extern void show_size(const char *, Package *); -extern void show_cksum(const char *, Package *); +extern int show_cksum(const char *, Package *); extern void show_origin(const char *, Package *); extern void show_fmtrev(const char *, Package *); Modified: stable/9/usr.sbin/pkg_install/info/perform.c ============================================================================== --- stable/9/usr.sbin/pkg_install/info/perform.c Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/info/perform.c Tue Oct 2 17:04:53 2012 (r241135) @@ -221,7 +221,7 @@ pkg_do(char *pkg) if ((Flags & SHOW_SIZE) && installed) show_size("Package Size:\n", &plist); if ((Flags & SHOW_CKSUM) && installed) - show_cksum("Mismatched Checksums:\n", &plist); + code += show_cksum("Mismatched Checksums:\n", &plist); if (Flags & SHOW_ORIGIN) show_origin("Origin:\n", &plist); if (Flags & SHOW_FMTREV) @@ -234,7 +234,7 @@ pkg_do(char *pkg) leave_playpen(); if (isTMP) unlink(fname); - return code; + return (code ? 1 : 0); } void Modified: stable/9/usr.sbin/pkg_install/info/show.c ============================================================================== --- stable/9/usr.sbin/pkg_install/info/show.c Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/info/show.c Tue Oct 2 17:04:53 2012 (r241135) @@ -61,8 +61,10 @@ show_index(const char *title, const char strlcpy(line, "???\n", sizeof(line)); - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } fp = fopen(fname, "r"); if (fp == (FILE *) NULL) { warnx("show_file: can't open '%s' for reading", fname); @@ -88,8 +90,10 @@ show_plist(const char *title, Package *p Boolean ign = FALSE; char *prefix = NULL; - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } p = plist->head; while (p) { if (p->type != type && showall != TRUE) { @@ -272,8 +276,10 @@ show_size(const char *title, Package *pl char *prefix = NULL; descr = getbsize(&headerlen, &blksize); - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } for (p = plist->head; p != NULL; p = p->next) { switch (p->type) { case PLIST_FILE: @@ -316,16 +322,19 @@ show_size(const char *title, Package *pl } /* Show files that don't match the recorded checksum */ -void +int show_cksum(const char *title, Package *plist) { PackingList p; const char *dir = "."; char *prefix = NULL; char tmp[FILENAME_MAX]; + int errcode = 0; - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } for (p = plist->head; p != NULL; p = p->next) if (p->type == PLIST_CWD) { @@ -337,9 +346,10 @@ show_cksum(const char *title, Package *p dir = p->name; } else if (p->type == PLIST_FILE) { snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name); - if (!fexists(tmp)) + if (!fexists(tmp)) { warnx("%s doesn't exist", tmp); - else if (p->next && p->next->type == PLIST_COMMENT && + errcode = 1; + } else if (p->next && p->next->type == PLIST_COMMENT && (strncmp(p->next->name, "MD5:", 4) == 0)) { char *cp = NULL, buf[33]; @@ -366,6 +376,7 @@ show_cksum(const char *title, Package *p } } } + return (errcode); } /* Show an "origin" path (usually category/portname) */ @@ -373,8 +384,10 @@ void show_origin(const char *title, Package *plist) { - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } printf("%s\n", plist->origin != NULL ? plist->origin : ""); } @@ -383,7 +396,9 @@ void show_fmtrev(const char *title, Package *plist) { - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } printf("%d.%d\n", plist->fmtver_maj, plist->fmtver_mnr); } Modified: stable/9/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/9/usr.sbin/pkg_install/lib/lib.h Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/lib/lib.h Tue Oct 2 17:04:53 2012 (r241135) @@ -99,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20120913 +#define PKG_INSTALL_VERSION 20120918 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: stable/9/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- stable/9/usr.sbin/pkg_install/lib/plist.c Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/lib/plist.c Tue Oct 2 17:04:53 2012 (r241135) @@ -458,7 +458,10 @@ delete_package(Boolean ign_err, Boolean case PLIST_FILE: last_file = p->name; - sprintf(tmp, "%s/%s", Where, p->name); + if (*p->name == '/') + strlcpy(tmp, p->name, FILENAME_MAX); + else + sprintf(tmp, "%s/%s", Where, p->name); if (isdir(tmp) && fexists(tmp) && !issymlink(tmp)) { warnx("cannot delete specified file '%s' - it is a directory!\n" "this packing list is incorrect - ignoring delete request", tmp); Modified: stable/9/usr.sbin/pkg_install/version/perform.c ============================================================================== --- stable/9/usr.sbin/pkg_install/version/perform.c Tue Oct 2 14:48:03 2012 (r241134) +++ stable/9/usr.sbin/pkg_install/version/perform.c Tue Oct 2 17:04:53 2012 (r241135) @@ -56,10 +56,11 @@ pkg_perform(char **indexarg) struct utsname u; if (uname(&u) == -1) { - warn("%s(): failed to determine uname information", __func__); + warn("%s: failed to determine uname information", __func__); return 1; } else if ((rel_major_ver = (int) strtol(u.release, NULL, 10)) <= 0) { - + warnx("%s: bad release version specified: %s", __func__, u.release); + return 1; } /* @@ -321,19 +322,31 @@ show_version(Package plist, const char * ver = strrchr(latest, '-'); ver = ver ? &ver[1] : latest; if (cmp < 0 && OUTPUT('<')) { - printf("%-34s %c", tmp, Quiet ? '\0' : '<'); - if (Verbose) - printf(" needs updating (%s has %s)", source, ver); + if (Quiet) + printf("%s", tmp); + else { + printf("%-34s <", tmp); + if (Verbose) + printf(" needs updating (%s has %s)", source, ver); + } printf("\n"); } else if (cmp == 0 && OUTPUT('=')) { - printf("%-34s %c", tmp, Quiet ? '\0' : '='); - if (Verbose) - printf(" up-to-date with %s", source); + if (Quiet) + printf("%s", tmp); + else { + printf("%-34s =", tmp); + if (Verbose) + printf(" up-to-date with %s", source); + } printf("\n"); } else if (cmp > 0 && OUTPUT('>')) { - printf("%-34s %c", tmp, Quiet ? '\0' : '>'); - if (Verbose) - printf(" succeeds %s (%s has %s)", source, source, ver); + if (Quiet) + printf("%s", tmp); + else { + printf("%-34s >", tmp); + if (Verbose) + printf(" succeeds %s (%s has %s)", source, source, ver); + } printf("\n"); } } From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 17:05:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29A6E1065807; Tue, 2 Oct 2012 17:05:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0AB48FC1A; Tue, 2 Oct 2012 17:05:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92H5KxI072885; Tue, 2 Oct 2012 17:05:20 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92H5KM9072875; Tue, 2 Oct 2012 17:05:20 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210021705.q92H5KM9072875@svn.freebsd.org> From: Baptiste Daroussin Date: Tue, 2 Oct 2012 17:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241136 - in stable/8/usr.sbin/pkg_install: add create info lib version X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 17:05:21 -0000 Author: bapt Date: Tue Oct 2 17:05:20 2012 New Revision: 241136 URL: http://svn.freebsd.org/changeset/base/241136 Log: MFC r240682 if a file in plist starts with / then do not prefix it with "prefix" [1] pkg info -g returns 1 if a file mismatch [2] flush stdout in pkg info -g [3] clean up quiet mode (-q | --quiet) output of pkg_version(1) [4] fix missing error call in uname check added to pkg_version(1) [5] fix pkg_add(1) fails to install with -C from bad path [6] only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7] PR: bin/13128 [1] bin/139015 [2] bin/113702 [3] bin/142570 [4] bin/146857 [5] bin/157543 [6] Submitted by: cy [1] Anton Yuzhaninov [2] Ighighi [3] "N.J. Mann" [4] gcooper [5] David Naylor [6] netchild [7] Modified: stable/8/usr.sbin/pkg_install/add/main.c stable/8/usr.sbin/pkg_install/create/perform.c stable/8/usr.sbin/pkg_install/info/info.h stable/8/usr.sbin/pkg_install/info/perform.c stable/8/usr.sbin/pkg_install/info/show.c stable/8/usr.sbin/pkg_install/lib/lib.h stable/8/usr.sbin/pkg_install/lib/plist.c stable/8/usr.sbin/pkg_install/version/perform.c Directory Properties: stable/8/usr.sbin/pkg_install/ (props changed) stable/8/usr.sbin/pkg_install/add/ (props changed) stable/8/usr.sbin/pkg_install/info/ (props changed) Modified: stable/8/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/main.c Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/add/main.c Tue Oct 2 17:05:20 2012 (r241136) @@ -288,7 +288,9 @@ main(int argc, char **argv) } /* Perform chroot if requested */ if (Chroot != NULL) { - if (chroot(Chroot)) + if (chdir(Chroot)) + errx(1, "chdir to %s failed", Chroot); + if (chroot(".")) errx(1, "chroot to %s failed", Chroot); } /* Make sure the sub-execs we invoke get found */ Modified: stable/8/usr.sbin/pkg_install/create/perform.c ============================================================================== --- stable/8/usr.sbin/pkg_install/create/perform.c Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/create/perform.c Tue Oct 2 17:05:20 2012 (r241136) @@ -215,10 +215,14 @@ pkg_perform(char **pkgs) /* Prefix should add an @cwd to the packing list */ if (Prefix) { - char resolved_prefix[PATH_MAX]; - if (realpath(Prefix, resolved_prefix) == NULL) - err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix); - add_plist_top(&plist, PLIST_CWD, resolved_prefix); + if (Prefix[0] != '/') { + char resolved_prefix[PATH_MAX]; + if (realpath(Prefix, resolved_prefix) == NULL) + err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix); + add_plist_top(&plist, PLIST_CWD, resolved_prefix); + } else { + add_plist_top(&plist, PLIST_CWD, Prefix); + } } /* Add the origin if asked, at the top */ Modified: stable/8/usr.sbin/pkg_install/info/info.h ============================================================================== --- stable/8/usr.sbin/pkg_install/info/info.h Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/info/info.h Tue Oct 2 17:05:20 2012 (r241136) @@ -77,7 +77,7 @@ extern void show_plist(const char *, Pac extern void show_files(const char *, Package *); extern void show_index(const char *, const char *); extern void show_size(const char *, Package *); -extern void show_cksum(const char *, Package *); +extern int show_cksum(const char *, Package *); extern void show_origin(const char *, Package *); extern void show_fmtrev(const char *, Package *); Modified: stable/8/usr.sbin/pkg_install/info/perform.c ============================================================================== --- stable/8/usr.sbin/pkg_install/info/perform.c Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/info/perform.c Tue Oct 2 17:05:20 2012 (r241136) @@ -221,7 +221,7 @@ pkg_do(char *pkg) if ((Flags & SHOW_SIZE) && installed) show_size("Package Size:\n", &plist); if ((Flags & SHOW_CKSUM) && installed) - show_cksum("Mismatched Checksums:\n", &plist); + code += show_cksum("Mismatched Checksums:\n", &plist); if (Flags & SHOW_ORIGIN) show_origin("Origin:\n", &plist); if (Flags & SHOW_FMTREV) @@ -234,7 +234,7 @@ pkg_do(char *pkg) leave_playpen(); if (isTMP) unlink(fname); - return code; + return (code ? 1 : 0); } void Modified: stable/8/usr.sbin/pkg_install/info/show.c ============================================================================== --- stable/8/usr.sbin/pkg_install/info/show.c Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/info/show.c Tue Oct 2 17:05:20 2012 (r241136) @@ -61,8 +61,10 @@ show_index(const char *title, const char strlcpy(line, "???\n", sizeof(line)); - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } fp = fopen(fname, "r"); if (fp == (FILE *) NULL) { warnx("show_file: can't open '%s' for reading", fname); @@ -88,8 +90,10 @@ show_plist(const char *title, Package *p Boolean ign = FALSE; char *prefix = NULL; - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } p = plist->head; while (p) { if (p->type != type && showall != TRUE) { @@ -272,8 +276,10 @@ show_size(const char *title, Package *pl char *prefix = NULL; descr = getbsize(&headerlen, &blksize); - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } for (p = plist->head; p != NULL; p = p->next) { switch (p->type) { case PLIST_FILE: @@ -316,16 +322,19 @@ show_size(const char *title, Package *pl } /* Show files that don't match the recorded checksum */ -void +int show_cksum(const char *title, Package *plist) { PackingList p; const char *dir = "."; char *prefix = NULL; char tmp[FILENAME_MAX]; + int errcode = 0; - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } for (p = plist->head; p != NULL; p = p->next) if (p->type == PLIST_CWD) { @@ -337,9 +346,10 @@ show_cksum(const char *title, Package *p dir = p->name; } else if (p->type == PLIST_FILE) { snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name); - if (!fexists(tmp)) + if (!fexists(tmp)) { warnx("%s doesn't exist", tmp); - else if (p->next && p->next->type == PLIST_COMMENT && + errcode = 1; + } else if (p->next && p->next->type == PLIST_COMMENT && (strncmp(p->next->name, "MD5:", 4) == 0)) { char *cp = NULL, buf[33]; @@ -366,6 +376,7 @@ show_cksum(const char *title, Package *p } } } + return (errcode); } /* Show an "origin" path (usually category/portname) */ @@ -373,8 +384,10 @@ void show_origin(const char *title, Package *plist) { - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } printf("%s\n", plist->origin != NULL ? plist->origin : ""); } @@ -383,7 +396,9 @@ void show_fmtrev(const char *title, Package *plist) { - if (!Quiet) + if (!Quiet) { printf("%s%s", InfoPrefix, title); + fflush(stdout); + } printf("%d.%d\n", plist->fmtver_maj, plist->fmtver_mnr); } Modified: stable/8/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/lib.h Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/lib/lib.h Tue Oct 2 17:05:20 2012 (r241136) @@ -99,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20120913 +#define PKG_INSTALL_VERSION 20120918 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: stable/8/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/plist.c Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/lib/plist.c Tue Oct 2 17:05:20 2012 (r241136) @@ -458,7 +458,10 @@ delete_package(Boolean ign_err, Boolean case PLIST_FILE: last_file = p->name; - sprintf(tmp, "%s/%s", Where, p->name); + if (*p->name == '/') + strlcpy(tmp, p->name, FILENAME_MAX); + else + sprintf(tmp, "%s/%s", Where, p->name); if (isdir(tmp) && fexists(tmp) && !issymlink(tmp)) { warnx("cannot delete specified file '%s' - it is a directory!\n" "this packing list is incorrect - ignoring delete request", tmp); Modified: stable/8/usr.sbin/pkg_install/version/perform.c ============================================================================== --- stable/8/usr.sbin/pkg_install/version/perform.c Tue Oct 2 17:04:53 2012 (r241135) +++ stable/8/usr.sbin/pkg_install/version/perform.c Tue Oct 2 17:05:20 2012 (r241136) @@ -56,10 +56,11 @@ pkg_perform(char **indexarg) struct utsname u; if (uname(&u) == -1) { - warn("%s(): failed to determine uname information", __func__); + warn("%s: failed to determine uname information", __func__); return 1; } else if ((rel_major_ver = (int) strtol(u.release, NULL, 10)) <= 0) { - + warnx("%s: bad release version specified: %s", __func__, u.release); + return 1; } /* @@ -321,19 +322,31 @@ show_version(Package plist, const char * ver = strrchr(latest, '-'); ver = ver ? &ver[1] : latest; if (cmp < 0 && OUTPUT('<')) { - printf("%-34s %c", tmp, Quiet ? '\0' : '<'); - if (Verbose) - printf(" needs updating (%s has %s)", source, ver); + if (Quiet) + printf("%s", tmp); + else { + printf("%-34s <", tmp); + if (Verbose) + printf(" needs updating (%s has %s)", source, ver); + } printf("\n"); } else if (cmp == 0 && OUTPUT('=')) { - printf("%-34s %c", tmp, Quiet ? '\0' : '='); - if (Verbose) - printf(" up-to-date with %s", source); + if (Quiet) + printf("%s", tmp); + else { + printf("%-34s =", tmp); + if (Verbose) + printf(" up-to-date with %s", source); + } printf("\n"); } else if (cmp > 0 && OUTPUT('>')) { - printf("%-34s %c", tmp, Quiet ? '\0' : '>'); - if (Verbose) - printf(" succeeds %s (%s has %s)", source, source, ver); + if (Quiet) + printf("%s", tmp); + else { + printf("%-34s >", tmp); + if (Verbose) + printf(" succeeds %s (%s has %s)", source, source, ver); + } printf("\n"); } } From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 17:44:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32BCE106566C; Tue, 2 Oct 2012 17:44:09 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6418FC08; Tue, 2 Oct 2012 17:44:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92Hi8hO077998; Tue, 2 Oct 2012 17:44:08 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92Hi8dt077996; Tue, 2 Oct 2012 17:44:08 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201210021744.q92Hi8dt077996@svn.freebsd.org> From: "Andrey A. Chernov" Date: Tue, 2 Oct 2012 17:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241137 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 17:44:09 -0000 Author: ache Date: Tue Oct 2 17:44:08 2012 New Revision: 241137 URL: http://svn.freebsd.org/changeset/base/241137 Log: Using putenv() and later direct pointer contents modification it is possibe to craft environment variables with similar names like that: a=1 a=2 ... unsetenv("a") should remove them all to make later getenv("a") impossible. Fix it to do so (this is GNU autoconf test #3 failure too). PR: 172273 MFC after: 1 week Modified: head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/stdlib/getenv.c ============================================================================== --- head/lib/libc/stdlib/getenv.c Tue Oct 2 17:05:20 2012 (r241136) +++ head/lib/libc/stdlib/getenv.c Tue Oct 2 17:44:08 2012 (r241137) @@ -675,11 +675,13 @@ unsetenv(const char *name) /* Deactivate specified variable. */ envNdx = envVarsTotal - 1; - if (__findenv(name, nameLen, &envNdx, true) != NULL) { + /* Remove all occurrences. */ + while (__findenv(name, nameLen, &envNdx, true) != NULL) { envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); __rebuild_environ(envActive - 1); + envNdx = envVarsTotal - 1; } return (0); From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 17:45:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66377106566B; Tue, 2 Oct 2012 17:45:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 502598FC12; Tue, 2 Oct 2012 17:45:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92HjKEJ078193; Tue, 2 Oct 2012 17:45:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92HjKlK078184; Tue, 2 Oct 2012 17:45:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210021745.q92HjKlK078184@svn.freebsd.org> From: Adrian Chadd Date: Tue, 2 Oct 2012 17:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241138 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 17:45:20 -0000 Author: adrian Date: Tue Oct 2 17:45:19 2012 New Revision: 241138 URL: http://svn.freebsd.org/changeset/base/241138 Log: Migrate the power-save functions to be overridable VAP methods. This turns ieee80211_node_pwrsave(), ieee80211_sta_pwrsave() and ieee80211_recv_pspoll() into methods. The intent is to let drivers override these and tie into the power save management pathway. For ath(4), this is the beginning of forcing a node software queue to stop and start as needed, as well as supporting "leaking" single frames from the software queue to the hardware. Right now, ieee80211_recv_pspoll() will attempt to transmit a single frame to the hardware (whether it be a data frame on the power-save queue or a NULL data frame) but the driver may have hardware/software queued frames queued up. This initial work is an attempt at providing the hooks required to implement correct behaviour. Allowing ieee80211_node_pwrsave() to be overridden allows the ath(4) driver to pause and unpause the entire software queue for a given node. It doesn't make sense to transmit anything whilst the node is asleep. Please note that there are other corner cases to correctly handle - specifically, setting the MORE data bit correctly on frames to a station, as well as keeping the TIM updated. Those particular issues can be addressed later. Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_hostap.h head/sys/net80211/ieee80211_power.c head/sys/net80211/ieee80211_power.h head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_adhoc.c Tue Oct 2 17:45:19 2012 (r241138) @@ -242,7 +242,7 @@ adhoc_newstate(struct ieee80211vap *vap, ic->ic_newassoc(ni, ostate != IEEE80211_S_RUN); break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); break; default: invalid: Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_hostap.c Tue Oct 2 17:45:19 2012 (r241138) @@ -73,7 +73,6 @@ static void hostap_deliver_data(struct i static void hostap_recv_mgmt(struct ieee80211_node *, struct mbuf *, int subtype, int rssi, int nf); static void hostap_recv_ctl(struct ieee80211_node *, struct mbuf *, int); -static void hostap_recv_pspoll(struct ieee80211_node *, struct mbuf *); void ieee80211_hostap_attach(struct ieee80211com *ic) @@ -100,6 +99,7 @@ hostap_vattach(struct ieee80211vap *vap) vap->iv_recv_ctl = hostap_recv_ctl; vap->iv_opdetach = hostap_vdetach; vap->iv_deliver_data = hostap_deliver_data; + vap->iv_recv_pspoll = ieee80211_recv_pspoll; } static void @@ -645,7 +645,7 @@ hostap_input(struct ieee80211_node *ni, */ if (((wh->i_fc[1] & IEEE80211_FC1_PWR_MGT) ^ (ni->ni_flags & IEEE80211_NODE_PWR_MGT))) - ieee80211_node_pwrsave(ni, + vap->iv_node_ps(ni, wh->i_fc[1] & IEEE80211_FC1_PWR_MGT); /* * For 4-address packets handle WDS discovery @@ -2240,7 +2240,7 @@ hostap_recv_ctl(struct ieee80211_node *n { switch (subtype) { case IEEE80211_FC0_SUBTYPE_PS_POLL: - hostap_recv_pspoll(ni, m); + ni->ni_vap->iv_recv_pspoll(ni, m); break; case IEEE80211_FC0_SUBTYPE_BAR: ieee80211_recv_bar(ni, m); @@ -2251,8 +2251,8 @@ hostap_recv_ctl(struct ieee80211_node *n /* * Process a received ps-poll frame. */ -static void -hostap_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0) +void +ieee80211_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame_min *wh; Modified: head/sys/net80211/ieee80211_hostap.h ============================================================================== --- head/sys/net80211/ieee80211_hostap.h Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_hostap.h Tue Oct 2 17:45:19 2012 (r241138) @@ -32,4 +32,10 @@ */ void ieee80211_hostap_attach(struct ieee80211com *); void ieee80211_hostap_detach(struct ieee80211com *); + +/* + * This method can be overridden + */ +void ieee80211_recv_pspoll(struct ieee80211_node *, struct mbuf *); + #endif /* !_NET80211_IEEE80211_HOSTAP_H_ */ Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_power.c Tue Oct 2 17:45:19 2012 (r241138) @@ -69,6 +69,8 @@ ieee80211_power_vattach(struct ieee80211 vap->iv_update_ps = ieee80211_update_ps; vap->iv_set_tim = ieee80211_set_tim; } + vap->iv_node_ps = ieee80211_node_pwrsave; + vap->iv_sta_ps = ieee80211_sta_pwrsave; } void Modified: head/sys/net80211/ieee80211_power.h ============================================================================== --- head/sys/net80211/ieee80211_power.h Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_power.h Tue Oct 2 17:45:19 2012 (r241138) @@ -71,6 +71,11 @@ void ieee80211_power_latevattach(struct struct mbuf *ieee80211_node_psq_dequeue(struct ieee80211_node *ni, int *qlen); int ieee80211_node_psq_drain(struct ieee80211_node *); int ieee80211_node_psq_age(struct ieee80211_node *); + +/* + * Don't call these directly from the stack; they are vap methods + * that should be overridden. + */ int ieee80211_pwrsave(struct ieee80211_node *, struct mbuf *); void ieee80211_node_pwrsave(struct ieee80211_node *, int enable); void ieee80211_sta_pwrsave(struct ieee80211vap *, int enable); Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_scan.c Tue Oct 2 17:45:19 2012 (r241138) @@ -866,7 +866,7 @@ scan_task(void *arg, int pending) vap->iv_state == IEEE80211_S_RUN) { if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { /* Enable station power save mode */ - ieee80211_sta_pwrsave(vap, 1); + vap->iv_sta_ps(vap, 1); /* * Use an 1ms delay so the null data frame has a chance * to go out. @@ -1047,7 +1047,7 @@ done: * waiting for us. */ if (scandone) { - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); if (ss->ss_next >= ss->ss_last) { ieee80211_notify_scan_done(vap); ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_sta.c Tue Oct 2 17:45:19 2012 (r241138) @@ -402,7 +402,7 @@ sta_newstate(struct ieee80211vap *vap, e arg == IEEE80211_FC0_SUBTYPE_ASSOC_RESP); break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); break; default: goto invalid; @@ -438,7 +438,7 @@ sta_newstate(struct ieee80211vap *vap, e goto invalid; break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 1); + vap->iv_sta_ps(vap, 1); break; default: invalid: @@ -1396,7 +1396,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, * we are expecting data. */ ic->ic_lastdata = ticks; - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); } #endif ni->ni_dtim_count = tim->tim_count; Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_var.h Tue Oct 2 17:45:19 2012 (r241138) @@ -486,6 +486,11 @@ struct ieee80211vap { /* power save handling */ void (*iv_update_ps)(struct ieee80211vap *, int); int (*iv_set_tim)(struct ieee80211_node *, int); + void (*iv_node_ps)(struct ieee80211_node *, int); + void (*iv_sta_ps)(struct ieee80211vap *, int); + void (*iv_recv_pspoll)(struct ieee80211_node *, + struct mbuf *); + /* state machine processing */ int (*iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 17:46:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 760D61065675; Tue, 2 Oct 2012 17:46:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 613778FC17; Tue, 2 Oct 2012 17:46:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92HkXWP078388; Tue, 2 Oct 2012 17:46:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92HkX9T078386; Tue, 2 Oct 2012 17:46:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210021746.q92HkX9T078386@svn.freebsd.org> From: Adrian Chadd Date: Tue, 2 Oct 2012 17:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241139 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 17:46:33 -0000 Author: adrian Date: Tue Oct 2 17:46:32 2012 New Revision: 241139 URL: http://svn.freebsd.org/changeset/base/241139 Log: Update UPDATING with the ABI change for net80211. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Oct 2 17:45:19 2012 (r241138) +++ head/UPDATING Tue Oct 2 17:46:32 2012 (r241139) @@ -24,6 +24,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121001: + The net80211(4) ABI has been changed to allow for improved driver + PS-POLL and power-save support. All wireless drivers need to be + recompiled to work with the new kernel. + 20120913: The random(4) support for the VIA hardware random number generator (`PADLOCK') is no longer enabled unconditionally. From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 18:38:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 419241065672; Tue, 2 Oct 2012 18:38:06 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BEE08FC19; Tue, 2 Oct 2012 18:38:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92Ic6fj085390; Tue, 2 Oct 2012 18:38:06 GMT (envelope-from wollman@svn.freebsd.org) Received: (from wollman@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92Ic55R085388; Tue, 2 Oct 2012 18:38:05 GMT (envelope-from wollman@svn.freebsd.org) Message-Id: <201210021838.q92Ic55R085388@svn.freebsd.org> From: Garrett Wollman Date: Tue, 2 Oct 2012 18:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241140 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 18:38:06 -0000 Author: wollman Date: Tue Oct 2 18:38:05 2012 New Revision: 241140 URL: http://svn.freebsd.org/changeset/base/241140 Log: Fix spelling of the function name in two assertion messages. Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Oct 2 17:46:32 2012 (r241139) +++ head/sys/kern/uipc_socket.c Tue Oct 2 18:38:05 2012 (r241140) @@ -995,9 +995,9 @@ sosend_dgram(struct socket *so, struct s int atomic = sosendallatonce(so) || top; #endif - KASSERT(so->so_type == SOCK_DGRAM, ("sodgram_send: !SOCK_DGRAM")); + KASSERT(so->so_type == SOCK_DGRAM, ("sosend_dgram: !SOCK_DGRAM")); KASSERT(so->so_proto->pr_flags & PR_ATOMIC, - ("sodgram_send: !PR_ATOMIC")); + ("sosend_dgram: !PR_ATOMIC")); if (uio != NULL) resid = uio->uio_resid; From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 19:00:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7DD1106564A; Tue, 2 Oct 2012 19:00:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A820A8FC08; Tue, 2 Oct 2012 19:00:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92J0uMI088557; Tue, 2 Oct 2012 19:00:56 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92J0uHT088549; Tue, 2 Oct 2012 19:00:56 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210021900.q92J0uHT088549@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 2 Oct 2012 19:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241141 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 19:00:56 -0000 Author: pfg Date: Tue Oct 2 19:00:56 2012 New Revision: 241141 URL: http://svn.freebsd.org/changeset/base/241141 Log: RPC: Convert all uid and gid variables of the type uid_t and gid_t. This matches what upstream (OpenSolaris) does. Tested by: David Wolfskill Obtained from: Bull GNU/Linux NFSv4 project (libtirpc) MFC after: 3 days Modified: head/include/rpc/auth.h head/include/rpc/auth_unix.h head/lib/libc/rpc/auth_unix.c head/lib/libc/rpc/authunix_prot.c head/lib/libc/rpc/rpc_soc.3 head/lib/libc/rpc/svc_auth_unix.c head/sys/rpc/auth.h Modified: head/include/rpc/auth.h ============================================================================== --- head/include/rpc/auth.h Tue Oct 2 18:38:05 2012 (r241140) +++ head/include/rpc/auth.h Tue Oct 2 19:00:56 2012 (r241141) @@ -243,14 +243,13 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * uid_t uid; + * gid_t gid; * int len; - * int *aup_gids; + * gid_t *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: head/include/rpc/auth_unix.h ============================================================================== --- head/include/rpc/auth_unix.h Tue Oct 2 18:38:05 2012 (r241140) +++ head/include/rpc/auth_unix.h Tue Oct 2 19:00:56 2012 (r241141) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - int aup_uid; - int aup_gid; + uid_t aup_uid; + gid_t aup_gid; u_int aup_len; - int *aup_gids; + gid_t *aup_gids; }; #define authsys_parms authunix_parms Modified: head/lib/libc/rpc/auth_unix.c ============================================================================== --- head/lib/libc/rpc/auth_unix.c Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/auth_unix.c Tue Oct 2 19:00:56 2012 (r241141) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - int uid; - int gid; + uid_t uid; + gid_t gid; int len; - int *aup_gids; + gid_t *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -207,9 +207,7 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; - /* XXX: interface problem; those should all have been unsigned */ - auth = authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids); + auth = authunix_create(machname, uid, gid, ngids, gids); free(gids); return (auth); } Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/authunix_prot.c Tue Oct 2 19:00:56 2012 (r241141) @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - int **paup_gids; + gid_t **paup_gids; assert(xdrs != NULL); assert(p != NULL); @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_int(xdrs, &(p->aup_uid)) - && xdr_int(xdrs, &(p->aup_gid)) + && xdr_u_int(xdrs, &(p->aup_uid)) + && xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); Modified: head/lib/libc/rpc/rpc_soc.3 ============================================================================== --- head/lib/libc/rpc/rpc_soc.3 Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/rpc_soc.3 Tue Oct 2 19:00:56 2012 (r241141) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids" +.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids" .Xc .Pp Create and return an Modified: head/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- head/lib/libc/rpc/svc_auth_unix.c Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/svc_auth_unix.c Tue Oct 2 19:00:56 2012 (r241141) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - int area_gids[NGRPS]; + gid_t area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: head/sys/rpc/auth.h ============================================================================== --- head/sys/rpc/auth.h Tue Oct 2 18:38:05 2012 (r241140) +++ head/sys/rpc/auth.h Tue Oct 2 19:00:56 2012 (r241141) @@ -234,18 +234,17 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * uid_t uid; + * gid_t gid; * int len; - * int *aup_gids; + * gid_t *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 19:03:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 042B0106566B; Tue, 2 Oct 2012 19:03:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E37BA8FC14; Tue, 2 Oct 2012 19:03:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92J3L7g088931; Tue, 2 Oct 2012 19:03:21 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92J3LIe088928; Tue, 2 Oct 2012 19:03:21 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210021903.q92J3LIe088928@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 2 Oct 2012 19:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241142 - head/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 19:03:22 -0000 Author: pfg Date: Tue Oct 2 19:03:21 2012 New Revision: 241142 URL: http://svn.freebsd.org/changeset/base/241142 Log: Fix __rpc_getconfip __rpc_getconfip is supposed to return the first netconf entry supporting tcp or udp, respectively. The code will currently return the *last* entry, plus it will leak memory when there is more than one such entry. This change matches the reference (OpenSolaris) implementation. Tested by: David Wolfskill Obtained from: Bull GNU/linux NFSv4 Project (libtirpc) MFC after: 1 week Modified: head/lib/libc/rpc/rpc_generic.c Modified: head/lib/libc/rpc/rpc_generic.c ============================================================================== --- head/lib/libc/rpc/rpc_generic.c Tue Oct 2 19:00:56 2012 (r241141) +++ head/lib/libc/rpc/rpc_generic.c Tue Oct 2 19:03:21 2012 (r241142) @@ -269,7 +269,8 @@ __rpc_getconfip(nettype) } while ((nconf = getnetconfig(confighandle)) != NULL) { if (strcmp(nconf->nc_protofmly, NC_INET) == 0) { - if (strcmp(nconf->nc_proto, NC_TCP) == 0) { + if (strcmp(nconf->nc_proto, NC_TCP) == 0 && + netid_tcp == NULL) { netid_tcp = strdup(nconf->nc_netid); if (main_thread) netid_tcp_main = netid_tcp; @@ -277,7 +278,8 @@ __rpc_getconfip(nettype) thr_setspecific(tcp_key, (void *) netid_tcp); } else - if (strcmp(nconf->nc_proto, NC_UDP) == 0) { + if (strcmp(nconf->nc_proto, NC_UDP) == 0 && + netid_udp == NULL) { netid_udp = strdup(nconf->nc_netid); if (main_thread) netid_udp_main = netid_udp; From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 19:10:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632CB106566B; Tue, 2 Oct 2012 19:10:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EACA8FC08; Tue, 2 Oct 2012 19:10:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92JAKEx089967; Tue, 2 Oct 2012 19:10:20 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92JAKAL089964; Tue, 2 Oct 2012 19:10:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210021910.q92JAKAL089964@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 2 Oct 2012 19:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241143 - in head: lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 19:10:20 -0000 Author: pfg Date: Tue Oct 2 19:10:19 2012 New Revision: 241143 URL: http://svn.freebsd.org/changeset/base/241143 Log: libtirpc: be sure to free cl_netid and cl_tp When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. This change matches the reference (OpenSolaris) implementation. Tested by: David Wolfskill Obtained from: Bull GNU/Linux NFSv4 Project (libtirpc) MFC after: 2 weeks Modified: head/lib/libc/rpc/clnt_vc.c head/sys/rpc/clnt_vc.c Modified: head/lib/libc/rpc/clnt_vc.c ============================================================================== --- head/lib/libc/rpc/clnt_vc.c Tue Oct 2 19:03:21 2012 (r241142) +++ head/lib/libc/rpc/clnt_vc.c Tue Oct 2 19:10:19 2012 (r241143) @@ -672,6 +672,10 @@ clnt_vc_destroy(cl) if (ct->ct_addr.buf) free(ct->ct_addr.buf); mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Tue Oct 2 19:03:21 2012 (r241142) +++ head/sys/rpc/clnt_vc.c Tue Oct 2 19:10:19 2012 (r241143) @@ -836,6 +836,10 @@ clnt_vc_destroy(CLIENT *cl) soclose(so); } mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 19:38:49 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02E2B106566C; Tue, 2 Oct 2012 19:38:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 7100F8FC08; Tue, 2 Oct 2012 19:38:48 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q92JckeF030613; Tue, 2 Oct 2012 23:38:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q92Jck7V030612; Tue, 2 Oct 2012 23:38:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 2 Oct 2012 23:38:46 +0400 From: Gleb Smirnoff To: Garrett Wollman Message-ID: <20121002193846.GX50433@FreeBSD.org> References: <201210021838.q92Ic55R085388@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210021838.q92Ic55R085388@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241140 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 19:38:49 -0000 On Tue, Oct 02, 2012 at 06:38:05PM +0000, Garrett Wollman wrote: G> Author: wollman G> Date: Tue Oct 2 18:38:05 2012 G> New Revision: 241140 G> URL: http://svn.freebsd.org/changeset/base/241140 G> G> Log: G> Fix spelling of the function name in two assertion messages. G> G> Modified: G> head/sys/kern/uipc_socket.c G> G> Modified: head/sys/kern/uipc_socket.c G> ============================================================================== G> --- head/sys/kern/uipc_socket.c Tue Oct 2 17:46:32 2012 (r241139) G> +++ head/sys/kern/uipc_socket.c Tue Oct 2 18:38:05 2012 (r241140) G> @@ -995,9 +995,9 @@ sosend_dgram(struct socket *so, struct s G> int atomic = sosendallatonce(so) || top; G> #endif G> G> - KASSERT(so->so_type == SOCK_DGRAM, ("sodgram_send: !SOCK_DGRAM")); G> + KASSERT(so->so_type == SOCK_DGRAM, ("sosend_dgram: !SOCK_DGRAM")); G> KASSERT(so->so_proto->pr_flags & PR_ATOMIC, G> - ("sodgram_send: !PR_ATOMIC")); G> + ("sosend_dgram: !PR_ATOMIC")); G> G> if (uio != NULL) G> resid = uio->uio_resid; Why not to use just __func__ here? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 20:50:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BFBC106564A; Tue, 2 Oct 2012 20:50:03 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE31B8FC0A; Tue, 2 Oct 2012 20:50:02 +0000 (UTC) Received: by ieak10 with SMTP id k10so14636518iea.13 for ; Tue, 02 Oct 2012 13:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=avfHUzGBqaRGl64d/c2cscE44H74ZoA3zoa9Tat3+wE=; b=SbZleYT5VoamMNgtOhf4Owqu8suYkQ5SS0Q/PQQTr019nURGx+Qbv4IHU4EpGFr0Du +OLp8wDk43HSEijoFzli1S4NtTlTUvRE4tGotQX+IKzvnBN81BxYbyDKO6RrRb4Bd2Ka YcKSZe7ELvOwV6k8uZR7RgycO7qFEIpdlxEUbeJjV5++jLVux1yBY2q1Ccjtozv4HG3c CiGBrB1GBnVmgTefJZj6nZ641ME4IxCe+5jJQAv9nu7oDq1krB+i+B+4jK9cceX/dKVR v8AUeqBETYCZ7a9LZdj0c+PDaFsaSHMmDMPRVqSuuEmKKwThbt9LmdWRZ7HSoJ/ev78C r5Dw== MIME-Version: 1.0 Received: by 10.50.184.129 with SMTP id eu1mr13743igc.0.1349211001880; Tue, 02 Oct 2012 13:50:01 -0700 (PDT) Received: by 10.64.51.39 with HTTP; Tue, 2 Oct 2012 13:50:01 -0700 (PDT) In-Reply-To: <20121002193846.GX50433@FreeBSD.org> References: <201210021838.q92Ic55R085388@svn.freebsd.org> <20121002193846.GX50433@FreeBSD.org> Date: Tue, 2 Oct 2012 13:50:01 -0700 Message-ID: From: Garrett Cooper To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Wollman Subject: Re: svn commit: r241140 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 20:50:03 -0000 On Tue, Oct 2, 2012 at 12:38 PM, Gleb Smirnoff wrote: > On Tue, Oct 02, 2012 at 06:38:05PM +0000, Garrett Wollman wrote: > G> Author: wollman > G> Date: Tue Oct 2 18:38:05 2012 > G> New Revision: 241140 > G> URL: http://svn.freebsd.org/changeset/base/241140 > G> > G> Log: > G> Fix spelling of the function name in two assertion messages. > G> > G> Modified: > G> head/sys/kern/uipc_socket.c > G> > G> Modified: head/sys/kern/uipc_socket.c > G> ============================================================================== > G> --- head/sys/kern/uipc_socket.c Tue Oct 2 17:46:32 2012 (r241139) > G> +++ head/sys/kern/uipc_socket.c Tue Oct 2 18:38:05 2012 (r241140) > G> @@ -995,9 +995,9 @@ sosend_dgram(struct socket *so, struct s > G> int atomic = sosendallatonce(so) || top; > G> #endif > G> > G> - KASSERT(so->so_type == SOCK_DGRAM, ("sodgram_send: !SOCK_DGRAM")); > G> + KASSERT(so->so_type == SOCK_DGRAM, ("sosend_dgram: !SOCK_DGRAM")); > G> KASSERT(so->so_proto->pr_flags & PR_ATOMIC, > G> - ("sodgram_send: !PR_ATOMIC")); > G> + ("sosend_dgram: !PR_ATOMIC")); > G> > G> if (uio != NULL) > G> resid = uio->uio_resid; > > Why not to use just __func__ here? Just reiterating the argument that was posed before: it's harder to grep that way (even though, technically one could do better with __func__ and __LINE__, etc if they were truly looking for readability). Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 22:03:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FA3C10656D0; Tue, 2 Oct 2012 22:03:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 100AB8FC12; Tue, 2 Oct 2012 22:03:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92M3Lxg011913; Tue, 2 Oct 2012 22:03:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92M3LBk011908; Tue, 2 Oct 2012 22:03:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210022203.q92M3LBk011908@svn.freebsd.org> From: Alexander Motin Date: Tue, 2 Oct 2012 22:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241144 - in head: share/man/man4 sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 22:03:22 -0000 Author: mav Date: Tue Oct 2 22:03:21 2012 New Revision: 241144 URL: http://svn.freebsd.org/changeset/base/241144 Log: Implement SATA revision (speed) control for legacy SATA controller for both boot (via loader tunables) and run-time (via `camcontrol negotiate`). Tested to work at least on NVIDIA MCP55 chipset. H/w provided by: glebius Modified: head/share/man/man4/ata.4 head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-sata.c Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Tue Oct 2 19:10:19 2012 (r241143) +++ head/share/man/man4/ata.4 Tue Oct 2 22:03:21 2012 (r241144) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2012 +.Dd October 3, 2012 .Dt ATA 4 .Os .Sh NAME @@ -99,7 +99,7 @@ set to 0 to disable the 80pin cable chec set to 1 to allow Message Signalled Interrupts (MSI) to be used by the specified PCI ATA controller, if supported. .It Va hint.ata.X.devX.mode -limits the initial ATA mode for the specified device on specified the channel. +limits the initial ATA mode for the specified device on the specified channel. .It Va hint.ata.X.mode limits the initial ATA mode for every device on the specified channel. .It Va hint.ata.X.pm_level @@ -120,6 +120,12 @@ host initiates SLUMBER PM state transiti .El .Pp Modes 2 and 3 are only supported for AHCI. +.It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev +limits the initial SATA revision (speed) for the specified device +on the specified channel. +Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. +.It Va hint.ata. Ns Ar X Ns Va .sata_rev +Same, but for every device on the specified channel. .El .Sh DESCRIPTION The Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Tue Oct 2 19:10:19 2012 (r241143) +++ head/sys/dev/ata/ata-all.c Tue Oct 2 22:03:21 2012 (r241144) @@ -172,6 +172,15 @@ ata_attach(device_t dev) TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); #ifdef ATA_CAM for (i = 0; i < 16; i++) { + ch->user[i].revision = 0; + snprintf(buf, sizeof(buf), "dev%d.sata_rev", i); + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), buf, &mode) != 0 && + resource_int_value(device_get_name(dev), + device_get_unit(dev), "sata_rev", &mode) != 0) + mode = -1; + if (mode >= 0) + ch->user[i].revision = mode; ch->user[i].mode = 0; snprintf(buf, sizeof(buf), "dev%d.mode", i); if (resource_string_value(device_get_name(dev), Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Tue Oct 2 19:10:19 2012 (r241143) +++ head/sys/dev/ata/ata-all.h Tue Oct 2 22:03:21 2012 (r241144) @@ -142,6 +142,7 @@ #define ATA_SC_SPD_NO_SPEED 0x00000000 #define ATA_SC_SPD_SPEED_GEN1 0x00000010 #define ATA_SC_SPD_SPEED_GEN2 0x00000020 +#define ATA_SC_SPD_SPEED_GEN3 0x00000040 #define ATA_SC_IPM_MASK 0x00000f00 #define ATA_SC_IPM_NONE 0x00000000 Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Tue Oct 2 19:10:19 2012 (r241143) +++ head/sys/dev/ata/ata-sata.c Tue Oct 2 22:03:21 2012 (r241144) @@ -152,8 +152,12 @@ int ata_sata_phy_reset(device_t dev, int port, int quick) { struct ata_channel *ch = device_get_softc(dev); - int loop, retry; - uint32_t val; + int loop, retry, sata_rev; + uint32_t val, val1; + + sata_rev = ch->user[port < 0 ? 0 : port].revision; + if (sata_rev > 0) + quick = 0; if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) @@ -173,9 +177,18 @@ ata_sata_phy_reset(device_t dev, int por device_printf(dev, "p%d: hard reset ...\n", port); } } + if (sata_rev == 1) + val1 = ATA_SC_SPD_SPEED_GEN1; + else if (sata_rev == 2) + val1 = ATA_SC_SPD_SPEED_GEN2; + else if (sata_rev == 3) + val1 = ATA_SC_SPD_SPEED_GEN3; + else + val1 = 0; for (retry = 0; retry < 10; retry++) { for (loop = 0; loop < 10; loop++) { - if (ata_sata_scr_write(ch, port, ATA_SCONTROL, ATA_SC_DET_RESET)) + if (ata_sata_scr_write(ch, port, ATA_SCONTROL, ATA_SC_DET_RESET | + val1 | ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)) goto fail; ata_udelay(100); if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) @@ -186,7 +199,7 @@ ata_sata_phy_reset(device_t dev, int por ata_udelay(5000); for (loop = 0; loop < 10; loop++) { if (ata_sata_scr_write(ch, port, ATA_SCONTROL, - ATA_SC_DET_IDLE | ((ch->pm_level > 0) ? 0 : + ATA_SC_DET_IDLE | val1 | ((ch->pm_level > 0) ? 0 : ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))) goto fail; ata_udelay(100); From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 22:19:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36FE2106566B; Tue, 2 Oct 2012 22:19:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id BED308FC0C; Tue, 2 Oct 2012 22:19:37 +0000 (UTC) Received: from c122-106-157-84.carlnfd1.nsw.optusnet.com.au (c122-106-157-84.carlnfd1.nsw.optusnet.com.au [122.106.157.84]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q92MJYD8017365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Oct 2012 08:19:35 +1000 Date: Wed, 3 Oct 2012 08:19:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" In-Reply-To: <201210021900.q92J0uHT088549@svn.freebsd.org> Message-ID: <20121003075143.N938@besplex.bde.org> References: <201210021900.q92J0uHT088549@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241141 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 22:19:38 -0000 On Tue, 2 Oct 2012, Pedro F. Giffuni wrote: > Log: > RPC: Convert all uid and gid variables of the type uid_t and gid_t. > > This matches what upstream (OpenSolaris) does. > > Tested by: David Wolfskill > Obtained from: Bull GNU/Linux NFSv4 project (libtirpc) > MFC after: 3 days This still assumes that uid_t and gid_t are precisely u_int, in stronger ways than before. > Modified: head/lib/libc/rpc/authunix_prot.c > ============================================================================== > --- head/lib/libc/rpc/authunix_prot.c Tue Oct 2 18:38:05 2012 (r241140) > +++ head/lib/libc/rpc/authunix_prot.c Tue Oct 2 19:00:56 2012 (r241141) > @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) > XDR *xdrs; > struct authunix_parms *p; > { > - int **paup_gids; > + gid_t **paup_gids; > > assert(xdrs != NULL); > assert(p != NULL); > @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) > > if (xdr_u_long(xdrs, &(p->aup_time)) > && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) > - && xdr_int(xdrs, &(p->aup_uid)) > - && xdr_int(xdrs, &(p->aup_gid)) > + && xdr_u_int(xdrs, &(p->aup_uid)) > + && xdr_u_int(xdrs, &(p->aup_gid)) > && xdr_array(xdrs, (char **) paup_gids, > &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { > return (TRUE); > xdr doesn't support arbitrary types. Here the very name of xdr_u_int() indicates that it only works on u_int's. Its second arg must be a pointer to u_int (misspelled unsigned in the man page, so it doesn't match the function name in a different, harmless way). The arg used to be a pointer to an int, and the call to xdr_int() used to match that. The arg is now a pointer to a uid_t or gid_t, and the call to xdr_u_int() only matches that accidentally. (The types happen to be uint32_t, which happens to be u_int.) More careful code would select an xdr translation function based on sizeof(uid_t) etc. The above xdr_array() call takes a element size arg that is necessary for stepping through the array, but isn't careful to use sizeof() on the correct type. It uses sizeof() on a hard-coded type, and you just changed the element type without changing the hard-coded type. It used to match (int == int), but now doesn't (int != gid_t). sizeof() should be applied to objects and not types to get the object size right without hard-coding its type. The first type of type error should be detected at compile time. The second one (the hard-coded sizeof(int)) probably cannot be. And there is yet another new type error in the xdr_array() call. It takes a pointer to a translation function. The function used to match the elemennt type, but now doesn't (int != gid_t, and also int != underlying type of gid_t == u_int). The API requires casting the pointer to a generic one using an obfuscated typedef, so the compiler cannot detect this type mismatch at compile time (without breaking the API generally). Bruce From owner-svn-src-all@FreeBSD.ORG Tue Oct 2 23:04:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0CCE106566C; Tue, 2 Oct 2012 23:04:12 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC64E8FC0A; Tue, 2 Oct 2012 23:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92N4C1u019484; Tue, 2 Oct 2012 23:04:12 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92N4CHB019481; Tue, 2 Oct 2012 23:04:12 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201210022304.q92N4CHB019481@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 2 Oct 2012 23:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241145 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 23:04:13 -0000 Author: ken Date: Tue Oct 2 23:04:12 2012 New Revision: 241145 URL: http://svn.freebsd.org/changeset/base/241145 Log: Add casts to unbreak the i386 PAE build for the mps(4) driver. MFC after: 3 days Prompted by: Garrett Cooper Modified: head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Tue Oct 2 22:03:21 2012 (r241144) +++ head/sys/dev/mps/mps_sas.c Tue Oct 2 23:04:12 2012 (r241145) @@ -2730,7 +2730,7 @@ mpssas_send_smpcmd(struct mpssas_softc * bus_dma_segment_t *req_sg; req_sg = (bus_dma_segment_t *)ccb->smpio.smp_request; - request = (uint8_t *)req_sg[0].ds_addr; + request = (uint8_t *)(uintptr_t)req_sg[0].ds_addr; } else request = ccb->smpio.smp_request; @@ -2738,7 +2738,7 @@ mpssas_send_smpcmd(struct mpssas_softc * bus_dma_segment_t *rsp_sg; rsp_sg = (bus_dma_segment_t *)ccb->smpio.smp_response; - response = (uint8_t *)rsp_sg[0].ds_addr; + response = (uint8_t *)(uintptr_t)rsp_sg[0].ds_addr; } else response = ccb->smpio.smp_response; } else { From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 00:41:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23AE5106564A; Wed, 3 Oct 2012 00:41:47 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9AB88FC15; Wed, 3 Oct 2012 00:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q930fkIw030096; Wed, 3 Oct 2012 00:41:46 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q930fk9r030075; Wed, 3 Oct 2012 00:41:46 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210030041.q930fk9r030075@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 3 Oct 2012 00:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241146 - head/contrib/bmake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 00:41:47 -0000 Author: marcel Date: Wed Oct 3 00:41:46 2012 New Revision: 241146 URL: http://svn.freebsd.org/changeset/base/241146 Log: Merge bmake-20120831 from vendor/NetBSD/bmake/dist. Provenance: ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg Added: head/contrib/bmake/ - copied from r241077, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 01:52:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0136B1065672 for ; Wed, 3 Oct 2012 01:52:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm3-vm2.bullet.mail.ne1.yahoo.com (nm3-vm2.bullet.mail.ne1.yahoo.com [98.138.91.19]) by mx1.freebsd.org (Postfix) with SMTP id BED618FC15 for ; Wed, 3 Oct 2012 01:52:31 +0000 (UTC) Received: from [98.138.90.52] by nm3.bullet.mail.ne1.yahoo.com with NNFMP; 03 Oct 2012 01:47:03 -0000 Received: from [98.138.226.124] by tm5.bullet.mail.ne1.yahoo.com with NNFMP; 03 Oct 2012 01:47:03 -0000 Received: from [127.0.0.1] by smtp203.mail.ne1.yahoo.com with NNFMP; 03 Oct 2012 01:47:03 -0000 X-Yahoo-Newman-Id: 103667.39632.bm@smtp203.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: BvwRHK0VM1mGHOwifzX1J.Sj_1TxxEn68J6GfEm2DGeeKAq kttTPVL3wuYGgYvAwZwoPL7M6L9bOllY_vAuCC.4v23ojHwKEqzZHQr5u6D6 Ggg1kbFlOz3B4pcgS_1VDNUciG2GcRjEt9vpvfPeR1wgYx24fhCXEttWIeXC 0DnUHbxNt_9.GJpLFCFYJ.i8zKp9a4kR2_kEQ.dYG_eNv6.bzrcSwvOonLvP ylQ9ng86.XPwbInPrHgMzOL_fzPoslcbiM1FZDIZeZHUQEgb4t7boH_CigNY V6C9u2AJmpLgePJHwXzTPIe1rQxXA1XQyHggAPPfoF1KpgfGv0cQU8l1I5mh d0gnXy0TQ34KNhlheEHBgPGcY9pH6.7IfuA0HdaGBB6hiAJAEYYvC9Ch0qQc z5YQeXkprdzSLOJsLrSDUKEiB1CH7KFjjlBV.kUbc9f18OMIlBYpW1ca5Bzr B1bGIS0ygz7k- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.101] (pfg@200.118.157.7 with plain) by smtp203.mail.ne1.yahoo.com with SMTP; 02 Oct 2012 18:47:02 -0700 PDT Message-ID: <506B991E.6010207@FreeBSD.org> Date: Tue, 02 Oct 2012 20:47:10 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Bruce Evans References: <201210021900.q92J0uHT088549@svn.freebsd.org> <20121003075143.N938@besplex.bde.org> In-Reply-To: <20121003075143.N938@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241141 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 01:52:32 -0000 Thank you Bruce; On 10/02/2012 17:19, Bruce Evans wrote: > On Tue, 2 Oct 2012, Pedro F. Giffuni wrote: > >> Log: >> RPC: Convert all uid and gid variables of the type uid_t and gid_t. >> >> This matches what upstream (OpenSolaris) does. >> >> Tested by: David Wolfskill >> Obtained from: Bull GNU/Linux NFSv4 project (libtirpc) >> MFC after: 3 days > > This still assumes that uid_t and gid_t are precisely u_int, in stronger > ways than before. > >> Modified: head/lib/libc/rpc/authunix_prot.c >> ============================================================================== >> >> --- head/lib/libc/rpc/authunix_prot.c Tue Oct 2 18:38:05 2012 >> (r241140) >> +++ head/lib/libc/rpc/authunix_prot.c Tue Oct 2 19:00:56 2012 >> (r241141) >> @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) >> XDR *xdrs; >> struct authunix_parms *p; >> { >> - int **paup_gids; >> + gid_t **paup_gids; >> >> assert(xdrs != NULL); >> assert(p != NULL); >> @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) >> >> if (xdr_u_long(xdrs, &(p->aup_time)) >> && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) >> - && xdr_int(xdrs, &(p->aup_uid)) >> - && xdr_int(xdrs, &(p->aup_gid)) >> + && xdr_u_int(xdrs, &(p->aup_uid)) >> + && xdr_u_int(xdrs, &(p->aup_gid)) >> && xdr_array(xdrs, (char **) paup_gids, >> &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { >> return (TRUE); >> > > xdr doesn't support arbitrary types. Here the very name of xdr_u_int() > indicates that it only works on u_int's. Its second arg must be a > pointer to u_int (misspelled unsigned in the man page, so it doesn't > match the function name in a different, harmless way). The arg used > to be a pointer to an int, and the call to xdr_int() used to match that. > The arg is now a pointer to a uid_t or gid_t, and the call to xdr_u_int() > only matches that accidentally. (The types happen to be uint32_t, which > happens to be u_int.) > OK, to solve this I was thinking of adding a cast to uint32_t, but this is ugly and doesn't really do nothing. Looking at OpenSolaris they do a cast but more than a cosmetical fix it is a requirement because they still use xdr_int there. This sounds like a better approach for us too. > More careful code would select an xdr translation function based on > sizeof(uid_t) etc. > > The above xdr_array() call takes a element size arg that is necessary > for stepping through the array, but isn't careful to use sizeof() on > the correct type. It uses sizeof() on a hard-coded type, and you just > changed the element type without changing the hard-coded type. It used > to match (int == int), but now doesn't (int != gid_t). sizeof() should > be applied to objects and not types to get the object size right without > hard-coding its type. > Nice catch, that is certainly wrong, and libtirpc still has it. This isn't necessary when adopting the solution above though. > The first type of type error should be detected at compile time. The > second one (the hard-coded sizeof(int)) probably cannot be. And there > is yet another new type error in the xdr_array() call. It takes a > pointer to a translation function. The function used to match the > elemennt > type, but now doesn't (int != gid_t, and also int != underlying type > of gid_t == u_int). The API requires casting the pointer to a generic > one using an obfuscated typedef, so the compiler cannot detect this > type mismatch at compile time (without breaking the API generally). > I only changed authunix_create and its parameters, any other underlying issue is preexistent :). Pedro. From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 02:32:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE8DE106564A; Wed, 3 Oct 2012 02:32:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7E408FC12; Wed, 3 Oct 2012 02:32:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q932Wl3G044302; Wed, 3 Oct 2012 02:32:47 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q932Wlfs044296; Wed, 3 Oct 2012 02:32:47 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210030232.q932Wlfs044296@svn.freebsd.org> From: Devin Teske Date: Wed, 3 Oct 2012 02:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 02:32:48 -0000 Author: dteske Date: Wed Oct 3 02:32:47 2012 New Revision: 241149 URL: http://svn.freebsd.org/changeset/base/241149 Log: Import sysutils/sysrc from the ports tree (current version 5.1). Importing disconnected under the WITH_BSDCONFIG flag (a good idea since this version of sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)). Multiple reasons sysrc should not simply continue to live in ports. The most important being that it is tightly coupled with the base. Approved by: adrian (co-mentor) Added: head/usr.sbin/sysrc/ head/usr.sbin/sysrc/Makefile (contents, props changed) head/usr.sbin/sysrc/sysrc (contents, props changed) head/usr.sbin/sysrc/sysrc.8 (contents, props changed) Modified: head/usr.sbin/Makefile head/usr.sbin/bsdconfig/share/sysrc.subr Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Wed Oct 3 01:18:51 2012 (r241148) +++ head/usr.sbin/Makefile Wed Oct 3 02:32:47 2012 (r241149) @@ -147,6 +147,7 @@ SUBDIR+= bluetooth .if ${MK_BSDCONFIG} != "no" SUBDIR+= bsdconfig +SUBDIR+= sysrc .endif .if ${MK_BSNMP} != "no" Modified: head/usr.sbin/bsdconfig/share/sysrc.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/sysrc.subr Wed Oct 3 01:18:51 2012 (r241148) +++ head/usr.sbin/bsdconfig/share/sysrc.subr Wed Oct 3 02:32:47 2012 (r241149) @@ -29,10 +29,10 @@ if [ ! "$_SYSRC_SUBR" ]; then _SYSRC_SUB ############################################################ INCLUDES BSDCFG_SHARE="/usr/share/bsdconfig" -. $BSDCFG_SHARE/common.subr || exit 1 +[ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1 BSDCFG_LIBE="/usr/libexec/bsdconfig" -f_include_lang $BSDCFG_LIBE/include/messages.subr +[ ! "$_SYSRC_JAILED" ] && f_include_lang $BSDCFG_LIBE/include/messages.subr ############################################################ CONFIGURATION Added: head/usr.sbin/sysrc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sysrc/Makefile Wed Oct 3 02:32:47 2012 (r241149) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +NO_OBJ= + +SCRIPTS= sysrc + +MAN= sysrc.8 + +beforeinstall: + mkdir -p ${DESTDIR}${SCRIPTSDIR} + mkdir -p ${DESTDIR}${MANDIR}8 + +.include Added: head/usr.sbin/sysrc/sysrc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sysrc/sysrc Wed Oct 3 02:32:47 2012 (r241149) @@ -0,0 +1,618 @@ +#!/bin/sh +#- +# Copyright (c) 2010-2012 Devin Teske +# 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$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +[ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1 +[ "$_SYSRC_SUBR" ] || f_include $BSDCFG_SHARE/sysrc.subr + +############################################################ CONFIGURATION + +# +# Default verbosity. +# +: ${SYSRC_VERBOSE:=} + +############################################################ GLOBALS + +# +# Options +# +DELETE= +DESCRIBE= +IGNORE_UNKNOWNS= +JAIL= +QUIET= +ROOTDIR= +SHOW_ALL= +SHOW_EQUALS= +SHOW_FILE= +SHOW_NAME=1 +SHOW_VALUE=1 + +############################################################ FUNCTIONS + +# die [ $fmt [ $opts ... ]] +# +# Optionally print a message to stderr before exiting with failure status. +# +die() +{ + local fmt="$1" + [ $# -gt 0 ] && shift 1 + [ "$fmt" ] && f_err "$fmt\n" "$@" + + exit $FAILURE +} + +# usage +# +# Prints a short syntax statement and exits. +# +usage() +{ + f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + f_err "Try \`%s --help' for more information.\n" "$pgm" + die +} + +# help +# +# Prints a full syntax statement and exits. +# +help() +{ + local optfmt="\t%-11s%s\n" + local envfmt="\t%-17s%s\n" + + f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + + f_err "OPTIONS:\n" + f_err "$optfmt" "-a" \ + "Dump a list of all non-default configuration variables." + f_err "$optfmt" "-A" \ + "Dump a list of all configuration variables (incl. defaults)." + f_err "$optfmt" "-d" \ + "Print a description of the given variable." + f_err "$optfmt" "-D" \ + "Show default value(s) only (this is the same as setting" + f_err "$optfmt" "" \ + "RC_CONFS to NULL or passing \`-f' with a NULL file-argument)." + f_err "$optfmt" "-e" \ + "Print query results as \`var=value' (useful for producing" + f_err "$optfmt" "" \ + "output to be fed back in). Ignored if \`-n' is specified." + f_err "$optfmt" "-f file" \ + "Operate on the specified file(s) instead of rc_conf_files." + f_err "$optfmt" "" \ + "Can be specified multiple times for additional files." + f_err "$optfmt" "-F" \ + "Show only the last rc.conf(5) file each directive is in." + f_err "$optfmt" "-h" \ + "Print a short usage statement to stderr and exit." + f_err "$optfmt" "--help" \ + "Print this message to stderr and exit." + f_err "$optfmt" "-i" \ + "Ignore unknown variables." + f_err "$optfmt" "-j jail" \ + "The jid or name of the jail to operate within (overrides" + f_err "$optfmt" "" \ + "\`-R dir'; requires jexec(8))." + f_err "$optfmt" "-n" \ + "Show only variable values, not their names." + f_err "$optfmt" "-N" \ + "Show only variable names, not their values." + f_err "$optfmt" "-q" \ + "Quiet. Ignore previous \`-v' and/or SYSRC_VERBOSE." + f_err "$optfmt" "-R dir" \ + "Operate within the root directory \`dir' rather than \`/'." + f_err "$optfmt" "-v" \ + "Verbose. Print the pathname of the specific rc.conf(5)" + f_err "$optfmt" "" \ + "file where the directive was found." + f_err "$optfmt" "-x" \ + "Remove variable(s) from specified file(s)." + f_err "\n" + + f_err "ENVIRONMENT:\n" + f_err "$envfmt" "RC_CONFS" \ + "Override default rc_conf_files (even if set to NULL)." + f_err "$envfmt" "RC_DEFAULTS" \ + "Location of \`/etc/defaults/rc.conf' file." + f_err "$envfmt" "SYSRC_VERBOSE" \ + "Default verbosity. Set to non-NULL to enable." + + die +} + +# jail_depend +# +# Dump dependencies such as language-file variables and include files to stdout +# to be piped-into sh(1) running via jexec(8)/chroot(8). As a security measure, +# this prevents existing language files and library files from being loaded in +# the jail. This also relaxes the requirement to have these files in every jail +# before sysrc can be used on said jail. +# +jail_depend() +{ + # + # Indicate that we are jailed + # + echo export _SYSRC_JAILED=1 + + # + # Print i18n language variables (their current values are sanitized + # and re-printed for interpretation so that the i18n language files + # do not need to exist within the jail). + # + local var val + for var in \ + msg_cannot_create_permission_denied \ + msg_permission_denied \ + msg_previous_syntax_errors \ + ; do + val=$( eval echo \"\$$var\" | + awk '{ gsub(/'\''/, "'\''\\'\'\''"); print }' ) + echo $var="'$val'" + done + + # + # Print include dependencies + # + cat $BSDCFG_SHARE/common.subr + cat $BSDCFG_SHARE/sysrc.subr +} + +############################################################ MAIN SOURCE + +# +# Perform sanity checks +# +[ $# -gt 0 ] || usage + +# +# Check for `--help' command-line option +# +( # Operate in sub-shell to protect $@ in parent + while [ $# -gt 0 ]; do + case "$1" in + --help) exit 1;; + -[fRj]) # These flags take an argument + shift 1;; + esac + shift 1 + done + exit 0 +) || help + +# +# Process command-line flags +# +while getopts aAdDef:Fhij:nNqR:vxX flag; do + case "$flag" in + a) SHOW_ALL=${SHOW_ALL:-1};; + A) SHOW_ALL=2;; + d) DESCRIBE=1;; + D) RC_CONFS=;; + e) SHOW_EQUALS=1;; + f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG";; + F) SHOW_FILE=1;; + h) usage;; + i) IGNORE_UNKNOWNS=1;; + j) [ "$OPTARG" ] || die \ + "%s: Missing or null argument to \`-j' flag" "$pgm" + JAIL="$OPTARG";; + n) SHOW_NAME=;; + N) SHOW_VALUE=;; + q) QUIET=1 SYSRC_VERBOSE=;; + R) [ "$OPTARG" ] || die \ + "%s: Missing or null argument to \`-R' flag" "$pgm" + ROOTDIR="$OPTARG";; + v) SYSRC_VERBOSE=1 QUIET=;; + x) DELETE=${DELETE:-1};; + X) DELETE=2;; + \?) usage;; + esac +done +shift $(( $OPTIND - 1 )) + +# +# [More] Sanity checks (e.g., "sysrc --") +# +[ $# -eq 0 -a ! "$SHOW_ALL" ] && usage + +# +# Taint-check all rc.conf(5) files +# +errmsg="$pgm: Exiting due to previous syntax errors" +if ( : ${RC_CONFS?} ) > /dev/null 2>&1; then + ( for i in $RC_CONFS; do + [ -e "$i" ] || continue + /bin/sh -n "$i" || exit $FAILURE + done + exit $SUCCESS + ) || die "$errmsg" +else + /bin/sh -n "$RC_DEFAULTS" || die "$errmsg" + ( . "$RC_DEFAULTS" + for i in $rc_conf_files; do + [ -e "$i" ] || continue + /bin/sh -n "$i" || exit $FAILURE + done + exit $SUCCESS + ) || die "$errmsg" +fi + +# +# Process `-x' (and secret `-X') command-line options +# +errmsg="$pgm: \`-x' option incompatible with \`-a'/\`-A' options" +errmsg="$errmsg (use \`-X' to override)" +if [ "$DELETE" -a "$SHOW_ALL" ]; then + [ "$DELETE" = "2" ] || die "$errmsg" +fi + +# +# Process `-e', `-n', and `-N' command-line options +# +SEP=': ' +[ "$SHOW_EQUALS" ] && SEP='="' +[ "$SHOW_NAME" ] || SHOW_EQUALS= +[ "$SYSRC_VERBOSE" = "0" ] && SYSRC_VERBOSE= +if [ ! "$SHOW_VALUE" ]; then + SHOW_NAME=1 + SHOW_EQUALS= +fi + +# +# Process `-j jail' and `-R dir' command-line options +# +if [ "$JAIL" -o "$ROOTDIR" ]; then + # + # Reconstruct the arguments that we want to carry-over + # + args=" + ${SYSRC_VERBOSE:+-v} + ${QUIET:+-q} + $( [ "$DELETE" = "1" ] && echo \ -x ) + $( [ "$DELETE" = "2" ] && echo \ -X ) + $( [ "$SHOW_ALL" = "1" ] && echo \ -a ) + $( [ "$SHOW_ALL" = "2" ] && echo \ -A ) + ${DESCRIBE:+-d} + ${SHOW_EQUALS:+-e} + ${IGNORE_UNKNOWNS:+-i} + $( [ "$SHOW_NAME" ] || echo \ -n ) + $( [ "$SHOW_VALUE" ] || echo \ -N ) + $( [ "$SHOW_FILE" ] && echo \ -F ) + " + if ( : ${RC_CONFS?} ) > /dev/null 2>&1; then + args="$args -f '$RC_CONFS'" + fi + for arg in "$@"; do + args="$args '$arg'" + done + + # + # If both are supplied, `-j jail' supercedes `-R dir' + # + if [ "$JAIL" ]; then + # + # Re-execute ourselves with sh(1) via jexec(8) + # + ( echo set -- $args + jail_depend + cat $0 + ) | env - RC_DEFAULTS="$RC_DEFAULTS" \ + /usr/sbin/jexec "$JAIL" /bin/sh + exit $? + elif [ "$ROOTDIR" ]; then + # + # Make sure that the root directory specified is not to any + # running jails. + # + # NOTE: To maintain backward compatibility with older jails on + # older systems, we will not perform this check if either the + # jls(1) or jexec(8) utilities are missing. + # + if f_have jexec && f_have jls; then + jid="`jls jid path | \ + ( + while read JID JROOT; do + [ "$JROOT" = "$ROOTDIR" ] || continue + echo $JID + done + )`" + + # + # If multiple running jails match the specified root + # directory, exit with error. + # + if [ "$jid" -a "${jid%[$IFS]*}" != "$jid" ]; then + die "%s: %s: %s" "$pgm" "$ROOTDIR" \ + "$( echo "Multiple jails claim this" \ + "directory as their root." \ + "(use \`-j jail' instead)" )" + fi + + # + # If only a single running jail matches the specified + # root directory, implicitly use `-j jail'. + # + if [ "$jid" ]; then + # + # Re-execute outselves with sh(1) via jexec(8) + # + ( echo set -- $args + jail_depend + cat $0 + ) | env - RC_DEFAULTS="$RC_DEFAULTS" \ + /usr/sbin/jexec "$jid" /bin/sh + exit $? + fi + + # Otherwise, fall through and allow chroot(8) + fi + + # + # Re-execute ourselves with sh(1) via chroot(8) + # + ( echo set -- $args + jail_depend + cat $0 + ) | env - RC_DEFAULTS="$RC_DEFAULTS" \ + /usr/sbin/chroot "$ROOTDIR" /bin/sh + exit $? + fi +fi + +# +# Process `-a' or `-A' command-line options +# +if [ "$SHOW_ALL" ]; then + # + # Get a list of variables that are currently set in the rc.conf(5) + # files (included `/etc/defaults/rc.conf') by performing a call to + # source_rc_confs() in a clean environment. + # + ( # Operate in a sub-shell to protect the parent environment + # + # Set which variables we want to preserve in the environment. + # Append the pipe-character (|) to the list of internal field + # separation (IFS) characters, allowing us to use the below + # list both as an extended grep (-E) pattern and argument list + # (required to first get f_clean_env() to preserve these in the + # environment and then later to prune them from the list of + # variables produced by set(1)). + # + IFS="$IFS|" + EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP" + EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME" + EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|SYSRC_VERBOSE|RC_CONFS" + EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE" + EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk" + + # + # Clean the environment (except for our required variables) + # and then source the required files. + # + f_clean_env --except $EXCEPT + if [ -f "$RC_DEFAULTS" -a -r "$RC_DEFAULTS" ]; then + . "$RC_DEFAULTS" + + # + # If passed `-a' (rather than `-A'), re-purge the + # environment, removing the rc.conf(5) defaults. + # + [ "$SHOW_ALL" = "1" ] \ + && f_clean_env --except rc_conf_files $EXCEPT + + # + # If `-f file' was passed, set $rc_conf_files to an + # explicit value, modifying the default behavior of + # source_rc_confs(). + # + ( : ${RC_CONFS?} ) > /dev/null 2>&1 && + rc_conf_files="$RC_CONFS" + + source_rc_confs + + # + # If passed `-a' (rather than `-A'), remove + # `rc_conf_files' unless it was defined somewhere + # other than rc.conf(5) defaults. + # + [ "$SHOW_ALL" = "1" -a \ + "$( f_sysrc_find rc_conf_files )" = "$RC_DEFAULTS" \ + ] \ + && unset rc_conf_files + fi + + for NAME in $( set | + awk -F= '/^[[:alpha:]_][[:alnum:]_]*=/ {print $1}' | + grep -Ev "^($EXCEPT)$" + ); do + # + # If enabled, describe rather than expand value + # + if [ "$DESCRIBE" ]; then + echo "$NAME: $( f_sysrc_desc "$NAME" )" + continue + fi + + # + # If `-F' is passed, find it and move on + # + if [ "$SHOW_FILE" ]; then + [ "$SHOW_NAME" ] && echo -n "$NAME: " + f_sysrc_find "$NAME" + continue + fi + + # + # If `-X' is passed, delete the variables + # + if [ "$DELETE" = "2" ]; then + f_sysrc_delete "$NAME" + continue + fi + + [ "$SYSRC_VERBOSE" ] && \ + echo -n "$( f_sysrc_find "$NAME" ): " + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + continue + fi + + echo "${SHOW_NAME:+$NAME$SEP}$( + f_sysrc_get "$NAME" )${SHOW_EQUALS:+\"}" + + done + ) + + # + # Ignore the remainder of positional arguments. + # + exit $SUCCESS +fi + +# +# Process command-line arguments +# +while [ $# -gt 0 ]; do + NAME="${1%%=*}" + + [ "$DESCRIBE" ] && \ + echo "$NAME: $( f_sysrc_desc "$NAME" )" + + case "$1" in + *=*) + # + # Like sysctl(8), if both `-d' AND "name=value" is passed, + # first describe, then attempt to set + # + + if [ "$SYSRC_VERBOSE" ]; then + file=$( f_sysrc_find "$NAME" ) + [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ + file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) + echo -n "$file: " + fi + + # + # If `-x' or `-X' is passed, delete the variable and ignore the + # desire to set some value + # + if [ "$DELETE" ]; then + f_sysrc_delete "$NAME" + shift 1 + continue + fi + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + f_sysrc_set "$NAME" "${1#*}" + else + if [ "$SHOW_FILE" ]; then + before=$( f_sysrc_find "$NAME" ) + else + before=$( f_sysrc_get "$NAME" ) + fi + if f_sysrc_set "$NAME" "${1#*=}"; then + if [ "$SHOW_FILE" ]; then + after=$( f_sysrc_find "$NAME" ) + echo -n "${SHOW_NAME:+$NAME$SEP}" + echo -n "$before${SHOW_EQUALS:+\"}" + echo " -> $after" + else + after=$( f_sysrc_get "$NAME" ) + echo -n "${SHOW_NAME:+$NAME$SEP}" + echo "$before -> $after" + fi + fi + fi + ;; + *) + if ! IGNORED="$( f_sysrc_get "$NAME?" )"; then + [ "$IGNORE_UNKNOWNS" ] \ + || echo "$pgm: unknown variable '$NAME'" + shift 1 + continue + fi + + # + # Like sysctl(8), when `-d' is passed, + # desribe it rather than expanding it + # + + if [ "$DESCRIBE" ]; then + shift 1 + continue + fi + + # + # If `-x' or `-X' is passed, delete the variable + # + if [ "$DELETE" ]; then + f_sysrc_delete "$NAME" + shift 1 + continue + fi + + # + # If `-F' is passed, find it and move on + # + if [ "$SHOW_FILE" ]; then + [ "$SHOW_NAME" ] && echo -n "$NAME: " + f_sysrc_find "$NAME" + shift 1 + continue + fi + + [ "$SYSRC_VERBOSE" ] && \ + echo -n "$( f_sysrc_find "$NAME" ): " + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + else + echo "${SHOW_NAME:+$NAME$SEP}$( + f_sysrc_get "$NAME" )${SHOW_EQUALS:+\"}" + fi + esac + shift 1 +done Added: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 02:32:47 2012 (r241149) @@ -0,0 +1,290 @@ +.\" Copyright (c) 2011-2012 Devin Teske +.\" 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$ +.\" +.Dd Aug 24, 2012 +.Dt SYSRC 8 +.Os +.Sh NAME +.Nm sysrc +.Nd safely edit system rc files +.Sh SYNOPSIS +.Nm +.Op Fl dDeFhinNqvx +.Op Fl f Ar file +.Op Fl j Ar jail | Fl R Ar dir +.Ar name Ns Op = Ns Ar value +.Ar ... +.Nm +.Op Fl dDeFhinNqvx +.Op Fl f Ar file +.Op Fl j Ar jail | Fl R Ar dir +.Fl a | A +.Sh DESCRIPTION +The +.Nm +utility retrieves +.Xr rc.conf 5 +variables from the collection of system rc files and allows processes with +appropriate privilege to change values in a safe and effective manner. +.Pp +The following options are available: +.Bl -tag -width indent+ +.It Fl a +Dump a list of all non-default configuration variables. +.It Fl A +Dump a list of all configuration variables +.Pq incl. defaults . +.It Fl d +Print a description of the given variable. +.It Fl D +Show default value(s) only (this is the same as setting RC_CONFS to NULL or +passing `-f' with a NULL file-argument). +.It Fl e +Print query results as +.Ql var=value +.Pq useful for producing output to be fed back in . +Ignored if +.Fl n +is specified. +.It Fl f Ar file +Operate on the specified file(s) instead of the files obtained by reading the +.Sq rc_conf_files +entry in the +.Ev RC_DEFAULTS +file. +This option can be specified multiple times for additional files. +.It Fl F +Show only the last +.Xr rc.conf 5 +file each directive is in. +.It Fl h +Print a short usage message to stderr and exit. +.It Fl -help +Print a full usage statement to stderr and exit. +.It Fl i +Ignore unknown variables. +.It Fl j Ar jail +The +.Ar jid +or name of the +.Ar jail +to operate within +.Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . +.It Fl n +Show only variable values, not their names. +.It Fl N +Show only variable names, not their values. +.It Fl q +Quiet. Ignore previous +.Fl v +and/or +.Ev SYSRC_VERBOSE . +.It Fl R Ar dir +Operate within the root directory +.Pq Sq Ar dir +rather than +.Pq Sq / . +.It Fl v +Verbose. Print the pathname of the specific +.Xr rc.conf 5 +file where the directive was found. +.It Fl x +Remove variable(s) from specified file(s). +.El +.Pp +This utility works similar to +.Xr sysctl 8 . +It shares the `-e' and `-n' options +.Pq detailed above +and also has the same +.Ql name[=value] +syntax for querying/setting configuration options. +.Pp +However, while +.Xr sysctl 8 +serves to query/modify MIBs in the entrant kernel, +.Xr sysrc 8 +instead works on values in the system +.Xr rc.conf 5 +configuration files. +.Pp +The list of system configuration files is configured in the file +.Ql /etc/defaults/rc.conf +within the variable +.Ql rc_conf_files , +which by-default contains a space-separated list of pathnames. On all FreeBSD +systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". Each +pathname is sourced in-order upon startup. It is in the same fashion that +.Nm +sources the configuration files before returning the value of the given +variable. +.Pp +When supplied a variable name, +.Nm +will return the value of the variable. If the variable does not appear in any +of the configured +.Ql rc_conf_files , +an error is printed and error status is returned. +.Pp +When changing values of a given variable, it does not matter if the variable +appears in any of the +.Ql rc_conf_files +or not. If the variable does not appear in any of the files, it is appended to +the end of the first pathname in the +.Ql rc_conf_files +variable. Otherwise, +.Nm +will replace only the last-occurrence in the last-file found to contain the +variable. This gets the value to take effect next boot without heavily +modifying these integral files (yet taking care not to allow the file to +grow unwieldy should +.Nm +be called repeatedly). +.Sh ENVIRONMENT +The following environment variables are referenced by +.Nm : +.Bl -tag -width ".Ev SYSRC_VERBOSE" +.It Ev RC_CONFS +Override default +.Ql rc_conf_files +.Pq even if set to NULL . +.It Ev RC_DEFAULTS +Location of +.Ql /etc/defaults/rc.conf +file. +.It Ev SYSRC_VERBOSE +Default verbosity. Set to non-NULL to enable. +.El +.Sh DEPENDENCIES +The following standard commands are required by +.Nm : +.Pp +.Xr awk 1 , +.Xr cat 1 , +.Xr chmod 1 , +.Xr chown 8 , +.Xr env 1 , +.Xr grep 1 , +.Xr jexec 8 , +.Xr jls 1 , +.Xr mktemp 1 , +.Xr mv 1 , +.Xr rm 1 , +.Xr sh 1 , +.Xr stat 1 , +.Xr tail 1 +.Sh FILES +.Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact +.It Pa /etc/defaults/rc.conf +.It Pa /etc/rc.conf +.It Pa /etc/rc.conf.local +.El +.Sh EXAMPLES +Below are some simple examples of how +.Nm +can be used to query certain values from the +.Xr rc.conf 5 +collection of system configuration files: +.Pp +.Nm +sshd_enable +.Dl returns the value of $sshd_enable, usually YES or NO . +.Pp +.Nm +defaultrouter +.Dl returns IP address of default router Pq if configured . +.Pp +Working on other files, such as +.Xr crontab 5 : +.Pp +.Nm +-f /etc/crontab MAILTO +.Dl returns the value of the MAILTO setting Pq if configured . +.Pp +In addition to the above syntax, +.Nm +also supports inline +.Xr sh 1 +PARAMETER expansion for changing the way values are reported, shown below: +.Pp +.Nm +\&'hostname%%.*' +.Dl returns $hostname up to (but not including) first `.' . +.Pp +.Nm +\&'network_interfaces%%[$IFS]*' +.Dl returns first word of $network_interfaces . +.Pp +.Nm +\&'ntpdate_flags##*[$IFS]' +.Dl returns last word of $ntpdate_flags (time server address) . +.Pp +.Nm +usbd_flags-"default" +.Dl returns $usbd_flags or "default" if unset or NULL . +.Pp +.Nm +cloned_interfaces+"alternate" +.Dl returns "alternate" if $cloned_interfaces is set . +.Pp +.Nm +\&'#kern_securelevel' +.Dl returns length in characters of $kern_securelevel . +.Pp +.Nm +\&'hostname?' +.Dl returns NULL and error status 2 if $hostname is unset Pq or if set, returns the value of $hostname with no error status . +.Pp +.Nm +\&'hostname:?' +.Dl returns NULL and error status 2 if $hostname is unset or NULL Pq or if set and non-NULL, returns value without error status . +.Sh LIMITATIONS +The +.Nm +utility presently does not support the +.Ql rc.conf.d +collection of system configuration files +.Pq which requires a service name to be known during execution . +.Pp +This will be corrected by a future enhancement. +.Sh SEE ALSO +.Xr jail 8 , +.Xr jexec 8 , +.Xr jls 1 , +.Xr rc 8 , +.Xr rc.conf 5 , +.Xr sysctl 8 +.Sh HISTORY +A +.Nm +utility first appeared in +.Bx 10.0 . +.Sh AUTHORS +.An Devin Teske Aq dteske@FreeBSD.org +.Sh THANKS TO +Brandon Gooch, Garrett Cooper, Julian Elischer, Pawel Jakub Dawidek, +Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, and Jilles Tjoelker +for suggestions and help. From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 03:20:58 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D871065670; Wed, 3 Oct 2012 03:20:58 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 3DFCD8FC0A; Wed, 3 Oct 2012 03:20:58 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 60D667E84A; Wed, 3 Oct 2012 13:20:56 +1000 (EST) Message-ID: <506BAF17.7080903@freebsd.org> Date: Wed, 03 Oct 2012 13:20:55 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120814 Thunderbird/14.0 MIME-Version: 1.0 To: Martin Matuska References: <201202231851.q1NIpOxH018329@svn.freebsd.org> In-Reply-To: <201202231851.q1NIpOxH018329@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r232059 - in head: sys/fs/devfs sys/fs/nullfs sys/kern sys/sys usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 03:20:58 -0000 Hi Martin, On 02/24/12 05:51, Martin Matuska wrote: > Author: mm > Date: Thu Feb 23 18:51:24 2012 > New Revision: 232059 > URL: http://svn.freebsd.org/changeset/base/232059 > > Log: > To improve control over the use of mount(8) inside a jail(8), introduce > a new jail parameter node with the following parameters: > > allow.mount.devfs: > allow mounting the devfs filesystem inside a jail > > allow.mount.nullfs: > allow mounting the nullfs filesystem inside a jail > > Both parameters are disabled by default (equals the behavior before > devfs and nullfs in jails). Administrators have to explicitly allow > mounting devfs and nullfs for each jail. The value "-1" of the > devfs_ruleset parameter is removed in favor of the new allow setting. > > Reviewed by: jamie > Suggested by: pjd > MFC after: 2 weeks Is there any reason this and the other related commits (e.g. r232186, 232247,232278,232291,230129 and maybe others I missed) haven't been MFCed to stable/8? I'm seeing an interesting bug on an 8.3-STABLE (built mid August) machine whereby a zfs dataset with jailed=on can be managed and mounted inside the jail with enable_statfs=1, but shows up in the primary host's mount list instead of the jail's. I then can't zfs unmount the filesystem from within the jail or the primary host. The same set up works fine on 9.1-RC1. Would you mind MFCing all relevant jail-related ZFS commits to stable/8 which are currently only in 9 and head? Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 03:44:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74EA1106566B; Wed, 3 Oct 2012 03:44:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 601248FC0C; Wed, 3 Oct 2012 03:44:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q933iOVo054465; Wed, 3 Oct 2012 03:44:24 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q933iOdn054463; Wed, 3 Oct 2012 03:44:24 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210030344.q933iOdn054463@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 3 Oct 2012 03:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241152 - head/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 03:44:24 -0000 Author: pfg Date: Wed Oct 3 03:44:23 2012 New Revision: 241152 URL: http://svn.freebsd.org/changeset/base/241152 Log: rpc: convert all uid and gid variables of the type uid_t and gid_t. As part of the previous commit, uses of xdr_int() were replaced with xdr_u_int(). This has undesired effects as the second argument doesn't match exactly uid_t or gid_t. It also breaks assumptions in the size of the provided types. To work around those issues we revert back to the use of xdr_int() but provide proper casting so the behaviour doesn't change. While here fix a style issue in the affected lines. Reported by: bde Modified: head/lib/libc/rpc/authunix_prot.c Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:00:37 2012 (r241151) +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:44:23 2012 (r241152) @@ -67,11 +67,11 @@ xdr_authunix_parms(xdrs, p) paup_gids = &p->aup_gids; - if (xdr_u_long(xdrs, &(p->aup_time)) - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_u_int(xdrs, &(p->aup_uid)) - && xdr_u_int(xdrs, &(p->aup_gid)) - && xdr_array(xdrs, (char **) paup_gids, + if (xdr_u_long(xdrs, &(p->aup_time)) && + xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && + xdr_int(xdrs, (int *) &(p->aup_uid)) && + xdr_int(xdrs, (int *) &(p->aup_gid)) && + xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 04:46:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AE39106564A; Wed, 3 Oct 2012 04:46:59 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7F78FC12; Wed, 3 Oct 2012 04:46:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q934kwko064504; Wed, 3 Oct 2012 04:46:58 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q934kwKO064502; Wed, 3 Oct 2012 04:46:58 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201210030446.q934kwKO064502@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 3 Oct 2012 04:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241154 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 04:46:59 -0000 Author: ache Date: Wed Oct 3 04:46:58 2012 New Revision: 241154 URL: http://svn.freebsd.org/changeset/base/241154 Log: Optimize prev. commit for speed. 1) Don't iterate the loop from the environment array beginning each time, iterate it under the last place we deactivate instead. 2) Call __rebuild_environ() not on each iteration but once, only at the end of whole loop (of course, only in case if something is changed). MFC after: 1 week Modified: head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/stdlib/getenv.c ============================================================================== --- head/lib/libc/stdlib/getenv.c Wed Oct 3 04:22:39 2012 (r241153) +++ head/lib/libc/stdlib/getenv.c Wed Oct 3 04:46:58 2012 (r241154) @@ -662,6 +662,7 @@ unsetenv(const char *name) { int envNdx; size_t nameLen; + int newEnvActive; /* Check for malformed name. */ if (name == NULL || (nameLen = __strleneq(name)) == 0) { @@ -674,15 +675,18 @@ unsetenv(const char *name) return (-1); /* Deactivate specified variable. */ - envNdx = envVarsTotal - 1; /* Remove all occurrences. */ + envNdx = envVarsTotal - 1; + newEnvActive = envActive; while (__findenv(name, nameLen, &envNdx, true) != NULL) { envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); - __rebuild_environ(envActive - 1); - envNdx = envVarsTotal - 1; + envNdx--; + newEnvActive--; } + if (newEnvActive != envActive) + __rebuild_environ(newEnvActive); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 05:06:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CE94106566B; Wed, 3 Oct 2012 05:06:46 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 055858FC0A; Wed, 3 Oct 2012 05:06:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9356jT6067585; Wed, 3 Oct 2012 05:06:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9356jkU067582; Wed, 3 Oct 2012 05:06:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210030506.q9356jkU067582@svn.freebsd.org> From: Alan Cox Date: Wed, 3 Oct 2012 05:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241155 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 05:06:46 -0000 Author: alc Date: Wed Oct 3 05:06:45 2012 New Revision: 241155 URL: http://svn.freebsd.org/changeset/base/241155 Log: Tidy up a bit: Update some of the comments. In particular, use "sleep" in preference to "block" where appropriate. Eliminate some unnecessary casts. Make a few whitespace changes for consistency. Reviewed by: kib MFC after: 3 days Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Oct 3 04:46:58 2012 (r241154) +++ head/sys/vm/vm_page.c Wed Oct 3 05:06:45 2012 (r241155) @@ -851,11 +851,10 @@ vm_page_splay(vm_pindex_t pindex, vm_pag * * The pagetables are not updated but will presumably fault the page * in if necessary, or if a kernel page the caller will at some point - * enter the page into the kernel's pmap. We are not allowed to block + * enter the page into the kernel's pmap. We are not allowed to sleep * here so we *can't* do this anyway. * - * The object and page must be locked. - * This routine may not block. + * The object must be locked. */ void vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) @@ -899,14 +898,15 @@ vm_page_insert(vm_page_t m, vm_object_t object->root = m; /* - * show that the object has one more resident page. + * Show that the object has one more resident page. */ object->resident_page_count++; + /* * Hold the vnode until the last page is released. */ if (object->resident_page_count == 1 && object->type == OBJT_VNODE) - vhold((struct vnode *)object->handle); + vhold(object->handle); /* * Since we are inserting a new and possibly dirty page, @@ -918,15 +918,14 @@ vm_page_insert(vm_page_t m, vm_object_t /* * vm_page_remove: - * NOTE: used by device pager as well -wfj * * Removes the given mem entry from the object/offset-page * table and the object page list, but do not invalidate/terminate * the backing store. * - * The object and page must be locked. * The underlying pmap entry (if any) is NOT removed here. - * This routine may not block. + * + * The object must be locked. The page must be locked if it is managed. */ void vm_page_remove(vm_page_t m) @@ -989,11 +988,12 @@ vm_page_remove(vm_page_t m) * And show that the object has one fewer resident page. */ object->resident_page_count--; + /* * The vnode may now be recycled. */ if (object->resident_page_count == 0 && object->type == OBJT_VNODE) - vdrop((struct vnode *)object->handle); + vdrop(object->handle); m->object = NULL; } @@ -1005,8 +1005,6 @@ vm_page_remove(vm_page_t m) * pair specified; if none is found, NULL is returned. * * The object must be locked. - * This routine may not block. - * This is a critical path routine */ vm_page_t vm_page_lookup(vm_object_t object, vm_pindex_t pindex) @@ -1029,7 +1027,6 @@ vm_page_lookup(vm_object_t object, vm_pi * greater than or equal to the parameter pindex, or NULL. * * The object must be locked. - * The routine may not block. */ vm_page_t vm_page_find_least(vm_object_t object, vm_pindex_t pindex) @@ -1089,9 +1086,6 @@ vm_page_prev(vm_page_t m) * Move the given memory entry from its * current object to the specified target object/offset. * - * The object must be locked. - * This routine may not block. - * * Note: swap associated with the page must be invalidated by the move. We * have to do this for several reasons: (1) we aren't freeing the * page, (2) we are dirtying the page, (3) the VM system is probably @@ -1103,6 +1097,8 @@ vm_page_prev(vm_page_t m) * swap. If the page is on the cache, we have to deactivate it * or vm_page_dirty() will panic. Dirty pages are not allowed * on the cache. + * + * The objects must be locked. The page must be locked if it is managed. */ void vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) @@ -1828,7 +1824,7 @@ vm_page_alloc_freelist(int flind, int re /* * vm_wait: (also see VM_WAIT macro) * - * Block until free pages are available for allocation + * Sleep until free pages are available for allocation. * - Called in various places before memory allocations. */ void @@ -1853,7 +1849,7 @@ vm_wait(void) /* * vm_waitpfault: (also see VM_WAITPFAULT macro) * - * Block until free pages are available for allocation + * Sleep until free pages are available for allocation. * - Called only in vm_fault so that processes page faulting * can be easily tracked. * - Sleeps at a lower priority than vm_wait() so that vm_wait()ing @@ -1920,7 +1916,6 @@ vm_page_queue_remove(int queue, vm_page_ * Remove a page from its queue. * * The given page must be locked. - * This routine may not block. */ void vm_pageq_remove(vm_page_t m) @@ -1962,7 +1957,6 @@ vm_page_enqueue(int queue, vm_page_t m) * mess with it. * * The page must be locked. - * This routine may not block. */ void vm_page_activate(vm_page_t m) @@ -1997,7 +1991,6 @@ vm_page_activate(vm_page_t m) * queues. * * The page queues must be locked. - * This routine may not block. */ static inline void vm_page_free_wakeup(void) @@ -2030,10 +2023,8 @@ vm_page_free_wakeup(void) * Returns the given page to the free list, * disassociating it with any VM object. * - * Object and page must be locked prior to entry. - * This routine may not block. + * The object must be locked. The page must be locked if it is managed. */ - void vm_page_free_toq(vm_page_t m) { @@ -2051,7 +2042,7 @@ vm_page_free_toq(vm_page_t m) panic("vm_page_free: freeing busy page %p", m); /* - * unqueue, then remove page. Note that we cannot destroy + * Unqueue, then remove page. Note that we cannot destroy * the page here because we do not want to call the pager's * callback routine until after we've put the page on the * appropriate free queue. @@ -2117,7 +2108,6 @@ vm_page_free_toq(vm_page_t m) * If the page is fictitious, then its wire count must remain one. * * The page must be locked. - * This routine may not block. */ void vm_page_wire(vm_page_t m) @@ -2206,7 +2196,7 @@ vm_page_unwire(vm_page_t m, int activate * to 1 if we want this page to be 'as if it were placed in the cache', * except without unmapping it from the process address space. * - * This routine may not block. + * The page must be locked. */ static inline void _vm_page_deactivate(vm_page_t m, int athead) @@ -2298,7 +2288,7 @@ vm_page_try_to_free(vm_page_t m) * * Put the specified page onto the page cache queue (if appropriate). * - * This routine may not block. + * The object and page must be locked. */ void vm_page_cache(vm_page_t m) @@ -2455,6 +2445,8 @@ vm_page_cache(vm_page_t m) * system to balance the queues, potentially recovering other unrelated * space from active. The idea is to not force this to happen too * often. + * + * The object and page must be locked. */ void vm_page_dontneed(vm_page_t m) @@ -2518,7 +2510,10 @@ vm_page_dontneed(vm_page_t m) * The caller must always specify the VM_ALLOC_RETRY flag. This is intended * to facilitate its eventual removal. * - * This routine may block. + * This routine may sleep. + * + * The object must be locked on entry. The lock will, however, be released + * and reacquired if the routine sleeps. */ vm_page_t vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags) @@ -2566,8 +2561,7 @@ retrylookup: } /* - * Mapping function for valid bits or for dirty bits in - * a page. May not block. + * Mapping function for valid or dirty bits in a page. * * Inputs are required to range within a page. */ @@ -2706,8 +2700,6 @@ vm_page_clear_dirty_mask(vm_page_t m, vm * of any partial chunks touched by the range. The invalid portion of * such chunks will be zero'd. * - * This routine may not block. - * * (base + size) must be less then or equal to PAGE_SIZE. */ void @@ -2800,8 +2792,6 @@ vm_page_clear_dirty(vm_page_t m, int bas * * Invalidates DEV_BSIZE'd chunks within a page. Both the * valid and dirty bits for the effected areas are cleared. - * - * May not block. */ void vm_page_set_invalid(vm_page_t m, int base, int size) @@ -2870,8 +2860,6 @@ vm_page_zero_invalid(vm_page_t m, boolea * Is (partial) page valid? Note that the case where size == 0 * will return FALSE in the degenerate case where the page is * entirely invalid, and TRUE otherwise. - * - * May not block. */ int vm_page_is_valid(vm_page_t m, int base, int size) @@ -2887,7 +2875,7 @@ vm_page_is_valid(vm_page_t m, int base, } /* - * update dirty bits from pmap/mmu. May not block. + * Set the page's dirty bits if the page is modified. */ void vm_page_test_dirty(vm_page_t m) From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 05:42:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E91F106564A; Wed, 3 Oct 2012 05:42:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0964D8FC14; Wed, 3 Oct 2012 05:42:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q935gFBd072751; Wed, 3 Oct 2012 05:42:15 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q935gFqQ072749; Wed, 3 Oct 2012 05:42:15 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210030542.q935gFqQ072749@svn.freebsd.org> From: Alan Cox Date: Wed, 3 Oct 2012 05:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241156 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 05:42:16 -0000 Author: alc Date: Wed Oct 3 05:42:15 2012 New Revision: 241156 URL: http://svn.freebsd.org/changeset/base/241156 Log: Reimplement pmap_qremove() using the new TLB invalidation function for efficiently invalidating address ranges. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Oct 3 05:06:45 2012 (r241155) +++ head/sys/mips/mips/pmap.c Wed Oct 3 05:42:15 2012 (r241156) @@ -930,15 +930,19 @@ pmap_qenter(vm_offset_t va, vm_page_t *m void pmap_qremove(vm_offset_t va, int count) { - /* - * No need to wb/inv caches here, - * pmap_kremove will do it for us - */ + pt_entry_t *pte; + vm_offset_t origva; - while (count-- > 0) { - pmap_kremove(va); + if (count < 1) + return; + mips_dcache_wbinv_range_index(va, PAGE_SIZE * count); + origva = va; + do { + pte = pmap_pte(kernel_pmap, va); + *pte = PTE_G; va += PAGE_SIZE; - } + } while (--count > 0); + pmap_invalidate_range(kernel_pmap, origva, va); } /*************************************************** From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 10:06:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12E73106564A; Wed, 3 Oct 2012 10:06:49 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F30F58FC18; Wed, 3 Oct 2012 10:06:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93A6mQq005463; Wed, 3 Oct 2012 10:06:48 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93A6mZg005461; Wed, 3 Oct 2012 10:06:48 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201210031006.q93A6mZg005461@svn.freebsd.org> From: Grzegorz Bernacki Date: Wed, 3 Oct 2012 10:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241157 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 10:06:49 -0000 Author: gber Date: Wed Oct 3 10:06:48 2012 New Revision: 241157 URL: http://svn.freebsd.org/changeset/base/241157 Log: Correct detection of a superblock. Obtained from: Smartcom Bulgaria AD Modified: head/lib/libstand/nandfs.c Modified: head/lib/libstand/nandfs.c ============================================================================== --- head/lib/libstand/nandfs.c Wed Oct 3 05:42:15 2012 (r241156) +++ head/lib/libstand/nandfs.c Wed Oct 3 10:06:48 2012 (r241157) @@ -175,7 +175,7 @@ static int nandfs_find_super_block(struct nandfs *fs, struct open_file *f) { struct nandfs_super_block *sb; - int i, j, n; + int i, j, n, s; int sectors_to_read, error; sb = malloc(fs->nf_sectorsize); @@ -196,23 +196,22 @@ nandfs_find_super_block(struct nandfs *f continue; } n = fs->nf_sectorsize / sizeof(struct nandfs_super_block); + s = 0; if ((i * fs->nf_sectorsize) % fs->nf_fsdata->f_erasesize == 0) { if (fs->nf_sectorsize == sizeof(struct nandfs_fsdata)) continue; else { - sb += (sizeof(struct nandfs_fsdata) / - sizeof(struct nandfs_super_block)); - n -= (sizeof(struct nandfs_fsdata) / + s += (sizeof(struct nandfs_fsdata) / sizeof(struct nandfs_super_block)); } } - for (j = 0; j < n; j++) { + for (j = s; j < n; j++) { if (!nandfs_check_superblock_crc(fs->nf_fsdata, &sb[j])) continue; - NANDFS_DEBUG("magic %x wtime %jd\n", sb->s_magic, - sb->s_wtime); - if (sb[j].s_wtime > fs->nf_sb->s_wtime) + NANDFS_DEBUG("magic %x wtime %jd, lastcp 0x%jx\n", + sb[j].s_magic, sb[j].s_wtime, sb[j].s_last_cno); + if (sb[j].s_last_cno > fs->nf_sb->s_last_cno) memcpy(fs->nf_sb, &sb[j], sizeof(*fs->nf_sb)); } } From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 11:56:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90991106566C; Wed, 3 Oct 2012 11:56:02 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 618288FC12; Wed, 3 Oct 2012 11:56:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93Bu2Hl022751; Wed, 3 Oct 2012 11:56:02 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93Bu2fi022748; Wed, 3 Oct 2012 11:56:02 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201210031156.q93Bu2fi022748@svn.freebsd.org> From: Andrey Zonov Date: Wed, 3 Oct 2012 11:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241158 - stable/9/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 11:56:02 -0000 Author: zont Date: Wed Oct 3 11:56:01 2012 New Revision: 241158 URL: http://svn.freebsd.org/changeset/base/241158 Log: MFC r240645: - Add 'dsiz' and 'ssiz' keywords to show data and stack size respectively. MFC r240649: - Bump date. Approved by: kib (mentor) Modified: stable/9/bin/ps/keyword.c stable/9/bin/ps/ps.1 Directory Properties: stable/9/bin/ps/ (props changed) Modified: stable/9/bin/ps/keyword.c ============================================================================== --- stable/9/bin/ps/keyword.c Wed Oct 3 10:06:48 2012 (r241157) +++ stable/9/bin/ps/keyword.c Wed Oct 3 11:56:01 2012 (r241158) @@ -79,6 +79,7 @@ static VAR var[] = { {"cow", "COW", NULL, 0, kvar, KOFF(ki_cow), UINT, "u", 0}, {"cpu", "CPU", NULL, 0, kvar, KOFF(ki_estcpu), UINT, "d", 0}, {"cputime", "", "time", 0, NULL, 0, CHAR, NULL, 0}, + {"dsiz", "DSIZ", NULL, 0, kvar, KOFF(ki_dsize), PGTOK, "ld", 0}, {"egid", "", "gid", 0, NULL, 0, CHAR, NULL, 0}, {"egroup", "", "group", 0, NULL, 0, CHAR, NULL, 0}, {"emul", "EMUL", NULL, LJUST, emulname, 0, CHAR, NULL, 0}, @@ -141,6 +142,7 @@ static VAR var[] = { UINT, "x", 0}, {"sigmask", "BLOCKED", NULL, 0, kvar, KOFF(ki_sigmask), UINT, "x", 0}, {"sl", "SL", NULL, INF127, kvar, KOFF(ki_slptime), UINT, "d", 0}, + {"ssiz", "SSIZ", NULL, 0, kvar, KOFF(ki_ssize), PGTOK, "ld", 0}, {"start", "STARTED", NULL, LJUST|USER, started, 0, CHAR, NULL, 0}, {"stat", "", "state", 0, NULL, 0, CHAR, NULL, 0}, {"state", "STAT", NULL, LJUST, state, 0, CHAR, NULL, 0}, Modified: stable/9/bin/ps/ps.1 ============================================================================== --- stable/9/bin/ps/ps.1 Wed Oct 3 10:06:48 2012 (r241157) +++ stable/9/bin/ps/ps.1 Wed Oct 3 11:56:01 2012 (r241158) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 20, 2012 +.Dd September 18, 2012 .Dt PS 1 .Os .Sh NAME @@ -496,6 +496,8 @@ command and arguments number of copy-on-write faults .It Cm cpu short-term CPU usage factor (for scheduling) +.It Cm dsiz +data size (in Kbytes) .It Cm emul system-call emulation environment .It Cm etime @@ -606,6 +608,8 @@ blocked signals (alias .Cm blocked ) .It Cm sl sleep time (in seconds; 127 = infinity) +.It Cm ssiz +stack size (in Kbytes) .It Cm start time started .It Cm state From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 11:56:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E8521065689; Wed, 3 Oct 2012 11:56:19 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FAF68FC0A; Wed, 3 Oct 2012 11:56:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93BuJus022831; Wed, 3 Oct 2012 11:56:19 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93BuIma022828; Wed, 3 Oct 2012 11:56:18 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201210031156.q93BuIma022828@svn.freebsd.org> From: Andrey Zonov Date: Wed, 3 Oct 2012 11:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241159 - stable/8/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 11:56:19 -0000 Author: zont Date: Wed Oct 3 11:56:18 2012 New Revision: 241159 URL: http://svn.freebsd.org/changeset/base/241159 Log: MFC r240645: - Add 'dsiz' and 'ssiz' keywords to show data and stack size respectively. MFC r240649: - Bump date. Approved by: kib (mentor) Modified: stable/8/bin/ps/keyword.c stable/8/bin/ps/ps.1 Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/keyword.c ============================================================================== --- stable/8/bin/ps/keyword.c Wed Oct 3 11:56:01 2012 (r241158) +++ stable/8/bin/ps/keyword.c Wed Oct 3 11:56:18 2012 (r241159) @@ -87,6 +87,8 @@ static VAR var[] = { {"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d", 0}, {"cputime", "", "time", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, + {"dsiz", "DSIZ", NULL, 0, kvar, NULL, 4, KOFF(ki_dsize), PGTOK, "ld", + 0}, {"emul", "EMUL", NULL, LJUST, emulname, NULL, EMULLEN, 0, CHAR, NULL, 0}, {"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0}, @@ -179,6 +181,8 @@ static VAR var[] = { UINT, "x", 0}, {"sl", "SL", NULL, INF127, kvar, NULL, 3, KOFF(ki_slptime), UINT, "d", 0}, + {"ssiz", "SSIZ", NULL, 0, kvar, NULL, 4, KOFF(ki_ssize), PGTOK, "ld", + 0}, {"start", "STARTED", NULL, LJUST|USER, started, NULL, 7, 0, CHAR, NULL, 0}, {"stat", "", "state", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, Modified: stable/8/bin/ps/ps.1 ============================================================================== --- stable/8/bin/ps/ps.1 Wed Oct 3 11:56:01 2012 (r241158) +++ stable/8/bin/ps/ps.1 Wed Oct 3 11:56:18 2012 (r241159) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 20, 2012 +.Dd September 18, 2012 .Dt PS 1 .Os .Sh NAME @@ -490,6 +490,8 @@ command and arguments number of copy-on-write faults .It Cm cpu short-term CPU usage factor (for scheduling) +.It Cm dsiz +data size (in Kbytes) .It Cm etime elapsed running time .It Cm flags @@ -587,6 +589,8 @@ blocked signals (alias .Cm blocked ) .It Cm sl sleep time (in seconds; 127 = infinity) +.It Cm ssiz +stack size (in Kbytes) .It Cm start time started .It Cm state From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 12:43:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96440106566C; Wed, 3 Oct 2012 12:43:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81C4A8FC19; Wed, 3 Oct 2012 12:43:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93ChRqH029655; Wed, 3 Oct 2012 12:43:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93ChRQj029653; Wed, 3 Oct 2012 12:43:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210031243.q93ChRQj029653@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Oct 2012 12:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241160 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 12:43:27 -0000 Author: mav Date: Wed Oct 3 12:43:26 2012 New Revision: 241160 URL: http://svn.freebsd.org/changeset/base/241160 Log: Fix build without `options ATA_CAM`, broken by r241144. Modified: head/sys/dev/ata/ata-sata.c Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Wed Oct 3 11:56:18 2012 (r241159) +++ head/sys/dev/ata/ata-sata.c Wed Oct 3 12:43:26 2012 (r241160) @@ -155,9 +155,13 @@ ata_sata_phy_reset(device_t dev, int por int loop, retry, sata_rev; uint32_t val, val1; +#ifdef ATA_CAM sata_rev = ch->user[port < 0 ? 0 : port].revision; if (sata_rev > 0) quick = 0; +#else + sata_rev = 0; +#endif if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 13:49:18 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA84D106564A; Wed, 3 Oct 2012 13:49:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 4DA628FC16; Wed, 3 Oct 2012 13:49:17 +0000 (UTC) Received: from c122-106-157-84.carlnfd1.nsw.optusnet.com.au (c122-106-157-84.carlnfd1.nsw.optusnet.com.au [122.106.157.84]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q93Dn8wj020377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Oct 2012 23:49:09 +1000 Date: Wed, 3 Oct 2012 23:49:08 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" In-Reply-To: <201210030344.q933iOdn054463@svn.freebsd.org> Message-ID: <20121003224737.V46116@besplex.bde.org> References: <201210030344.q933iOdn054463@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241152 - head/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 13:49:18 -0000 On Wed, 3 Oct 2012, Pedro F. Giffuni wrote: > Log: > rpc: convert all uid and gid variables of the type uid_t and gid_t. > > As part of the previous commit, uses of xdr_int() were replaced > with xdr_u_int(). This has undesired effects as the second > argument doesn't match exactly uid_t or gid_t. It also breaks > assumptions in the size of the provided types. > > To work around those issues we revert back to the use of xdr_int() > but provide proper casting so the behaviour doesn't change. Er, this makes the problem worse. It doesn't actually make the argument match, but uses a bogus cast whose main effect is to hide the type mismatch from the compiler (the compiler might still consider the cast invalid). > Modified: head/lib/libc/rpc/authunix_prot.c > ============================================================================== > --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:00:37 2012 (r241151) > +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:44:23 2012 (r241152) > @@ -67,11 +67,11 @@ xdr_authunix_parms(xdrs, p) > > paup_gids = &p->aup_gids; > > - if (xdr_u_long(xdrs, &(p->aup_time)) > - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) > - && xdr_u_int(xdrs, &(p->aup_uid)) > - && xdr_u_int(xdrs, &(p->aup_gid)) > - && xdr_array(xdrs, (char **) paup_gids, > + if (xdr_u_long(xdrs, &(p->aup_time)) && The old code was closer to being correct, and is still used for aup_time. For times it still works almost correctly as follows: - times have type time_t, which is always signed and sometimes 64 bits in FreeBSD - aup_time has type u_long, which is always unsigned and sometimes 64 bits in FreeBSD. It is 64 bits for some arches that don't have 64- bit u_longs (mips and arm), because time_t on these arches was bloated to practice the transition to a 64-bit time_t (this is very unnecessary since 32 bits unsigned work until 2106). - the current time in seconds (in a time_t) is assigned to aup_time, without any bounds checking of course - after that, the time as a u_long in aup_time us usable. Add the overflow checking and it would work correctly. > + xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && > + xdr_int(xdrs, (int *) &(p->aup_uid)) && > + xdr_int(xdrs, (int *) &(p->aup_gid)) && For ids it used to work almost correctly as follows: - ids have type uid_t and gid_t, which are always uint32_t in FreeBSD - aup_uid and aup_gid used to have type int - the ids (in a uid_t or gid_t) were assigned to aup*_idm without any bounds checking of course. The sign mismatch is a larger problem in practice that for times. Times after 2038 shouldn't actually occur, but ids above INT_MAX can. But in practice, the same benign overflow will probably allow both to work when there is a sign error. - after that, the time as a u_long in aup_time us usable. Add the overflow checking and it would work correctly, but u_int's should be used throughout so that supported ids like ((uid_t)-2) don't have to rejected by the bounds check. Now it works very incorrectly: - the types in the assignment are now the same (uid_t or gid_t), so there is no problem in the assignment, but this gives types that are unusable here - despite being unusable here, they are used here. &(p->aup_*id)) is a pointer to a uid_t or a gid_t. Pretending that it is a pointer to an int doesn't make it one. Without the (int *) cast, the compiler would detect the type mismatch as a sign mismatch at certain warning levels (the (int *) taken by xdr_int is incompatible with the object pointer ([ug]id_t *). If the conversion is reasonable, then xdr_int()'s prototype would do it, and the has no effect except to possibly do the same thing without a warning or with a different warning. > + xdr_array(xdrs, (char **) paup_gids, > &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { > return (TRUE); > } It already used a bogus cast on paup_gids. I'm surprised that compiles (paup_gids has type gid_t **). I didn't notice that before, or that the sizeof() always matched the xdr_int. The elements need to be ints to work (as above), but now have type gid_t. If the xdr_array() API had been invented after 1980, then it would have used void ** instead of char **, something like the following: - it apparently wants to pass the array pointer indirectly. The pointer must have type void *, not gid_t *. Then we take its address and get a void **. The pointer must be coverted from its original type to void *, and the code already does a conversion, but with nonsense types: - aup_gids used to have type int * and now has type gid_t * - this must be converted to void * (or char * to match the pre-1980 API). "void *vaup_gids = p->aup_gids;" might work. - now we have a void *, we can point to it using void **. Take the address of the local variable vaup_gids instead of p->aup_gids. - xdr_array() needs to convert from the void ** back to the original pointer. Indirecting the void ** only gives the void *. The technically least incorrect way (without changing the API much) is to switch on the element size. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 13:51:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34BA91065670; Wed, 3 Oct 2012 13:51:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0632A8FC08; Wed, 3 Oct 2012 13:51:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93Dp3Ox038587; Wed, 3 Oct 2012 13:51:03 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93Dp35B038584; Wed, 3 Oct 2012 13:51:03 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201210031351.q93Dp35B038584@svn.freebsd.org> From: Ed Schouten Date: Wed, 3 Oct 2012 13:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241161 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 13:51:04 -0000 Author: ed Date: Wed Oct 3 13:51:03 2012 New Revision: 241161 URL: http://svn.freebsd.org/changeset/base/241161 Log: Fix faulty error code handling in read(2) on TTYs. When performing a non-blocking read(2), on a TTY while no data is available, we should return EAGAIN. But if there's a modem disconnect, we should return 0. Right now we only return 0 when doing a blocking read, which is wrong. MFC after: 1 month Modified: head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Wed Oct 3 12:43:26 2012 (r241160) +++ head/sys/kern/tty_ttydisc.c Wed Oct 3 13:51:03 2012 (r241161) @@ -149,10 +149,10 @@ ttydisc_read_canonical(struct tty *tp, s /* No more data. */ if (clen == 0) { - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_wait(tp, &tp->t_inwait); if (error) @@ -200,10 +200,10 @@ ttydisc_read_raw_no_timer(struct tty *tp return (0); /* We have to wait for more. */ - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_wait(tp, &tp->t_inwait); if (error) @@ -248,10 +248,10 @@ ttydisc_read_raw_read_timer(struct tty * * We have to wait for more. If the timer expires, we * should return a 0-byte read. */ - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_timedwait(tp, &tp->t_inwait, hz); if (error) @@ -293,10 +293,10 @@ ttydisc_read_raw_interbyte_timer(struct break; /* We have to wait for more. */ - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_wait(tp, &tp->t_inwait); if (error) From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 14:28:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 687A51065675; Wed, 3 Oct 2012 14:28:56 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 494328FC2A; Wed, 3 Oct 2012 14:28:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93ESu3s042871; Wed, 3 Oct 2012 14:28:56 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93ESuZU042866; Wed, 3 Oct 2012 14:28:56 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201210031428.q93ESuZU042866@svn.freebsd.org> From: Andrey Zonov Date: Wed, 3 Oct 2012 14:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241162 - stable/9/usr.bin/truss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 14:28:56 -0000 Author: zont Date: Wed Oct 3 14:28:55 2012 New Revision: 241162 URL: http://svn.freebsd.org/changeset/base/241162 Log: MFC r239501: - Use pid_t type instead of just int. MFC r239611: - Put arguments for print_syscall_ret() function in proper order. Bug was introduced in r192025. MFC r239898: - Remove unused variables. - Fix warnings about comparing signed and unsigned ints. MFC r240005: - Style(9) cleanup. MFC r240364: - Remove unused variables. - Remove redundant return after err(3) call. MFC r240393: - Fix detaching under some circumstances. When truss is detaching from very active process it is possible to hang on waitpid(2) in restore_proc() forever, because ptrace(PT_SYSCALL) must be called before detaching, to allow the debugging process to continue execution. Also when truss called with '-c' argument, it does not print anything after detach, because it immediately exits from restore_proc(). To fix these two problems make detaching deferred, but then it is impossible to detach from a process which does not do any system call. To fix this issue use sigaction(2) instead of signal(3) to disable SA_RESTART flag for waitpid(2) that makes it non-restartable. Remove global variable child_pid, because now detaching is handled in context where child's pid is known. MFC r240562: - Make truss thread-aware. Approved by: kib (mentor) Modified: stable/9/usr.bin/truss/amd64-fbsd.c stable/9/usr.bin/truss/amd64-fbsd32.c stable/9/usr.bin/truss/amd64-linux32.c stable/9/usr.bin/truss/extern.h stable/9/usr.bin/truss/i386-fbsd.c stable/9/usr.bin/truss/i386-linux.c stable/9/usr.bin/truss/ia64-fbsd.c stable/9/usr.bin/truss/main.c stable/9/usr.bin/truss/mips-fbsd.c stable/9/usr.bin/truss/powerpc-fbsd.c stable/9/usr.bin/truss/powerpc64-fbsd.c stable/9/usr.bin/truss/setup.c stable/9/usr.bin/truss/sparc64-fbsd.c stable/9/usr.bin/truss/syscall.h stable/9/usr.bin/truss/syscalls.c stable/9/usr.bin/truss/truss.h Directory Properties: stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/truss/amd64-fbsd.c ============================================================================== --- stable/9/usr.bin/truss/amd64-fbsd.c Wed Oct 3 13:51:03 2012 (r241161) +++ stable/9/usr.bin/truss/amd64-fbsd.c Wed Oct 3 14:28:55 2012 (r241162) @@ -62,8 +62,6 @@ static const char rcsid[] = #include "syscall.h" #include "extern.h" -static int cpid = -1; - #include "syscalls.h" static int nsyscalls = sizeof(syscallnames) / sizeof(syscallnames[0]); @@ -77,29 +75,35 @@ static int nsyscalls = sizeof(syscallnam * 'struct syscall' describes the system call; it may be NULL, however, * if we don't know about this particular system call yet. */ -static struct freebsd_syscall { +struct freebsd_syscall { struct syscall *sc; const char *name; int number; unsigned long *args; int nargs; /* number of arguments -- *not* number of words! */ char **s_args; /* the printable arguments */ -} fsc; +}; + +static struct freebsd_syscall * +alloc_fsc(void) +{ + + return (malloc(sizeof(struct freebsd_syscall))); +} /* Clear up and free parts of the fsc structure. */ -static __inline void -clear_fsc(void) { - if (fsc.args) { - free(fsc.args); - } - if (fsc.s_args) { - int i; - for (i = 0; i < fsc.nargs; i++) - if (fsc.s_args[i]) - free(fsc.s_args[i]); - free(fsc.s_args); - } - memset(&fsc, 0, sizeof(fsc)); +static void +free_fsc(struct freebsd_syscall *fsc) +{ + int i; + + free(fsc->args); + if (fsc->s_args) { + for (i = 0; i < fsc->nargs; i++) + free(fsc->s_args[i]); + free(fsc->s_args); + } + free(fsc); } /* @@ -110,147 +114,147 @@ clear_fsc(void) { */ void -amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) { - struct reg regs; - int syscall_num; - int i, reg; - struct syscall *sc; - - cpid = trussinfo->curthread->tid; - - clear_fsc(); - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; - } - - /* - * FreeBSD has two special kinds of system call redirctions -- - * SYS_syscall, and SYS___syscall. The former is the old syscall() - * routine, basically; the latter is for quad-aligned arguments. - */ - reg = 0; - syscall_num = regs.r_rax; - switch (syscall_num) { - case SYS_syscall: - case SYS___syscall: - syscall_num = regs.r_rdi; - reg++; - break; - } - - fsc.number = syscall_num; - fsc.name = - (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : syscallnames[syscall_num]; - if (!fsc.name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); - } - - if (fsc.name && (trussinfo->flags & FOLLOWFORKS) - && ((!strcmp(fsc.name, "fork") - || !strcmp(fsc.name, "rfork") - || !strcmp(fsc.name, "vfork")))) - { - trussinfo->curthread->in_fork = 1; - } - - if (nargs == 0) - return; - - fsc.args = malloc((1+nargs) * sizeof(unsigned long)); - for (i = 0; i < nargs && reg < 6; i++, reg++) { - switch (reg) { - case 0: fsc.args[i] = regs.r_rdi; break; - case 1: fsc.args[i] = regs.r_rsi; break; - case 2: fsc.args[i] = regs.r_rdx; break; - case 3: fsc.args[i] = regs.r_rcx; break; - case 4: fsc.args[i] = regs.r_r8; break; - case 5: fsc.args[i] = regs.r_r9; break; - } - } - if (nargs > i) { - struct ptrace_io_desc iorequest; - iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (void *)(regs.r_rsp + sizeof(register_t)); - iorequest.piod_addr = &fsc.args[i]; - iorequest.piod_len = (nargs - i) * sizeof(register_t); - ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); - if (iorequest.piod_len == 0) - return; - } - - sc = get_syscall(fsc.name); - if (sc) { - fsc.nargs = sc->nargs; - } else { +amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) +{ + struct ptrace_io_desc iorequest; + struct reg regs; + struct freebsd_syscall *fsc; + struct syscall *sc; + lwpid_t tid; + int i, reg, syscall_num; + + tid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return; + } + + /* + * FreeBSD has two special kinds of system call redirctions -- + * SYS_syscall, and SYS___syscall. The former is the old syscall() + * routine, basically; the latter is for quad-aligned arguments. + */ + reg = 0; + syscall_num = regs.r_rax; + switch (syscall_num) { + case SYS_syscall: + case SYS___syscall: + syscall_num = regs.r_rdi; + reg++; + break; + } + + fsc = alloc_fsc(); + if (fsc == NULL) + return; + fsc->number = syscall_num; + fsc->name = (syscall_num < 0 || syscall_num >= nsyscalls) ? + NULL : syscallnames[syscall_num]; + if (!fsc->name) { + fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", + syscall_num); + } + + if (fsc->name && (trussinfo->flags & FOLLOWFORKS) && + (strcmp(fsc->name, "fork") == 0 || + strcmp(fsc->name, "rfork") == 0 || + strcmp(fsc->name, "vfork") == 0)) + trussinfo->curthread->in_fork = 1; + + if (nargs == 0) + return; + + fsc->args = malloc((1 + nargs) * sizeof(unsigned long)); + for (i = 0; i < nargs && reg < 6; i++, reg++) { + switch (reg) { + case 0: fsc->args[i] = regs.r_rdi; break; + case 1: fsc->args[i] = regs.r_rsi; break; + case 2: fsc->args[i] = regs.r_rdx; break; + case 3: fsc->args[i] = regs.r_rcx; break; + case 4: fsc->args[i] = regs.r_r8; break; + case 5: fsc->args[i] = regs.r_r9; break; + } + } + if (nargs > i) { + iorequest.piod_op = PIOD_READ_D; + iorequest.piod_offs = (void *)(regs.r_rsp + sizeof(register_t)); + iorequest.piod_addr = &fsc->args[i]; + iorequest.piod_len = (nargs - i) * sizeof(register_t); + ptrace(PT_IO, tid, (caddr_t)&iorequest, 0); + if (iorequest.piod_len == 0) + return; + } + + sc = get_syscall(fsc->name); + if (sc) + fsc->nargs = sc->nargs; + else { #if DEBUG - fprintf(trussinfo->outfile, "unknown syscall %s -- setting args to %d\n", - fsc.name, nargs); + fprintf(trussinfo->outfile, "unknown syscall %s -- setting " + "args to %d\n", fsc->name, nargs); #endif - fsc.nargs = nargs; - } + fsc->nargs = nargs; + } - fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*)); - fsc.sc = sc; + fsc->s_args = calloc(1, (1 + fsc->nargs) * sizeof(char *)); + fsc->sc = sc; - /* - * At this point, we set up the system call arguments. - * We ignore any OUT ones, however -- those are arguments that - * are set by the system call, and so are probably meaningless - * now. This doesn't currently support arguments that are - * passed in *and* out, however. - */ - - if (fsc.name) { + /* + * At this point, we set up the system call arguments. + * We ignore any OUT ones, however -- those are arguments that + * are set by the system call, and so are probably meaningless + * now. This doesn't currently support arguments that are + * passed in *and* out, however. + */ + if (fsc->name) { #if DEBUG - fprintf(stderr, "syscall %s(", fsc.name); + fprintf(stderr, "syscall %s(", fsc->name); #endif - for (i = 0; i < fsc.nargs; i++) { + for (i = 0; i < fsc->nargs; i++) { #if DEBUG - fprintf(stderr, "0x%lx%s", - sc - ? fsc.args[sc->args[i].offset] - : fsc.args[i], - i < (fsc.nargs - 1) ? "," : ""); + fprintf(stderr, "0x%lx%s", sc ? + fsc->args[sc->args[i].offset] : fsc->args[i], + i < (fsc->nargs - 1) ? "," : ""); #endif - if (sc && !(sc->args[i].type & OUT)) { - fsc.s_args[i] = print_arg(&sc->args[i], fsc.args, 0, trussinfo); - } - } + if (sc && !(sc->args[i].type & OUT)) { + fsc->s_args[i] = print_arg(&sc->args[i], + fsc->args, 0, trussinfo); + } + } #if DEBUG - fprintf(stderr, ")\n"); + fprintf(stderr, ")\n"); #endif - } + } #if DEBUG - fprintf(trussinfo->outfile, "\n"); + fprintf(trussinfo->outfile, "\n"); #endif - if (fsc.name != NULL && - (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) { - - /* XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (!strcmp(fsc.name, "execve")) { - if ((trussinfo->flags & EXECVEARGS) == 0) - if (fsc.s_args[1]) { - free(fsc.s_args[1]); - fsc.s_args[1] = NULL; - } - if ((trussinfo->flags & EXECVEENVS) == 0) - if (fsc.s_args[2]) { - free(fsc.s_args[2]); - fsc.s_args[2] = NULL; - } - } - - } - - return; + if (fsc->name != NULL && (strcmp(fsc->name, "execve") == 0 || + strcmp(fsc->name, "exit") == 0)) { + /* + * XXX + * This could be done in a more general + * manner but it still wouldn't be very pretty. + */ + if (strcmp(fsc->name, "execve") == 0) { + if ((trussinfo->flags & EXECVEARGS) == 0) { + if (fsc->s_args[1]) { + free(fsc->s_args[1]); + fsc->s_args[1] = NULL; + } + } + if ((trussinfo->flags & EXECVEENVS) == 0) { + if (fsc->s_args[2]) { + free(fsc->s_args[2]); + fsc->s_args[2] = NULL; + } + } + } + } + trussinfo->curthread->fsc = fsc; } /* @@ -263,68 +267,72 @@ amd64_syscall_entry(struct trussinfo *tr long amd64_syscall_exit(struct trussinfo *trussinfo, int syscall_num __unused) { - struct reg regs; - long retval; - int i; - int errorp; - struct syscall *sc; - - if (fsc.name == NULL) - return (-1); - - cpid = trussinfo->curthread->tid; - - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return (-1); - } - retval = regs.r_rax; - errorp = !!(regs.r_rflags & PSL_C); - - /* - * This code, while simpler than the initial versions I used, could - * stand some significant cleaning. - */ - - sc = fsc.sc; - if (!sc) { - for (i = 0; i < fsc.nargs; i++) - asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in the syscall_entry function. - */ - for (i = 0; i < sc->nargs; i++) { - char *temp; - if (sc->args[i].type & OUT) { + struct reg regs; + struct freebsd_syscall *fsc; + struct syscall *sc; + lwpid_t tid; + long retval; + int errorp, i; + + if (trussinfo->curthread->fsc == NULL) + return (-1); + + tid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return (-1); + } + + retval = regs.r_rax; + errorp = !!(regs.r_rflags & PSL_C); + /* - * If an error occurred, than don't bothe getting the data; - * it may not be valid. + * This code, while simpler than the initial versions I used, could + * stand some significant cleaning. */ - if (errorp) - asprintf(&temp, "0x%lx", fsc.args[sc->args[i].offset]); - else - temp = print_arg(&sc->args[i], fsc.args, retval, trussinfo); - fsc.s_args[i] = temp; - } - } - } - - if (fsc.name != NULL && - (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) { - trussinfo->curthread->in_syscall = 1; - } - - /* - * It would probably be a good idea to merge the error handling, - * but that complicates things considerably. - */ - - print_syscall_ret(trussinfo, fsc.name, fsc.nargs, fsc.s_args, errorp, - retval, fsc.sc); - clear_fsc(); - return (retval); + fsc = trussinfo->curthread->fsc; + sc = fsc->sc; + if (!sc) { + for (i = 0; i < fsc->nargs; i++) + asprintf(&fsc->s_args[i], "0x%lx", fsc->args[i]); + } else { + /* + * Here, we only look for arguments that have OUT masked in -- + * otherwise, they were handled in the syscall_entry function. + */ + for (i = 0; i < sc->nargs; i++) { + char *temp; + if (sc->args[i].type & OUT) { + /* + * If an error occurred, then don't bother + * getting the data; it may not be valid. + */ + if (errorp) { + asprintf(&temp, "0x%lx", + fsc->args[sc->args[i].offset]); + } else { + temp = print_arg(&sc->args[i], + fsc->args, retval, trussinfo); + } + fsc->s_args[i] = temp; + } + } + } + + if (fsc->name != NULL && (strcmp(fsc->name, "execve") == 0 || + strcmp(fsc->name, "exit") == 0)) + trussinfo->curthread->in_syscall = 1; + + /* + * It would probably be a good idea to merge the error handling, + * but that complicates things considerably. + */ + + print_syscall_ret(trussinfo, fsc->name, fsc->nargs, fsc->s_args, errorp, + retval, fsc->sc); + free_fsc(fsc); + + return (retval); } Modified: stable/9/usr.bin/truss/amd64-fbsd32.c ============================================================================== --- stable/9/usr.bin/truss/amd64-fbsd32.c Wed Oct 3 13:51:03 2012 (r241161) +++ stable/9/usr.bin/truss/amd64-fbsd32.c Wed Oct 3 14:28:55 2012 (r241162) @@ -43,8 +43,8 @@ static const char rcsid[] = */ #include -#include #include +#include #include #include @@ -62,8 +62,6 @@ static const char rcsid[] = #include "syscall.h" #include "extern.h" -static int cpid = -1; - #include "freebsd32_syscalls.h" static int nsyscalls = sizeof(freebsd32_syscallnames) / @@ -78,7 +76,7 @@ static int nsyscalls = sizeof(freebsd32_ * 'struct syscall' describes the system call; it may be NULL, however, * if we don't know about this particular system call yet. */ -static struct freebsd32_syscall { +struct freebsd32_syscall { struct syscall *sc; const char *name; int number; @@ -86,25 +84,29 @@ static struct freebsd32_syscall { unsigned int *args32; int nargs; /* number of arguments -- *not* number of words! */ char **s_args; /* the printable arguments */ -} fsc; +}; + +static struct freebsd32_syscall * +alloc_fsc(void) +{ + + return (malloc(sizeof(struct freebsd32_syscall))); +} /* Clear up and free parts of the fsc structure. */ -static __inline void -clear_fsc(void) { - if (fsc.args) { - free(fsc.args); - } - if (fsc.args32) { - free(fsc.args32); - } - if (fsc.s_args) { - int i; - for (i = 0; i < fsc.nargs; i++) - if (fsc.s_args[i]) - free(fsc.s_args[i]); - free(fsc.s_args); - } - memset(&fsc, 0, sizeof(fsc)); +static void +free_fsc(struct freebsd32_syscall *fsc) +{ + int i; + + free(fsc->args); + free(fsc->args32); + if (fsc->s_args) { + for (i = 0; i < fsc->nargs; i++) + free(fsc->s_args[i]); + free(fsc->s_args); + } + free(fsc); } /* @@ -115,145 +117,145 @@ clear_fsc(void) { */ void -amd64_fbsd32_syscall_entry(struct trussinfo *trussinfo, int nargs) { - struct reg regs; - int syscall_num; - int i; - unsigned long parm_offset; - struct syscall *sc = NULL; - struct ptrace_io_desc iorequest; - cpid = trussinfo->curthread->tid; - - clear_fsc(); - - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; - } - parm_offset = regs.r_rsp + sizeof(int); - - /* - * FreeBSD has two special kinds of system call redirctions -- - * SYS_syscall, and SYS___syscall. The former is the old syscall() - * routine, basically; the latter is for quad-aligned arguments. - */ - syscall_num = regs.r_rax; - switch (syscall_num) { - case SYS_syscall: - syscall_num = ptrace(PT_READ_D, cpid, (caddr_t)parm_offset, 0); - parm_offset += sizeof(int); - break; - case SYS___syscall: - syscall_num = ptrace(PT_READ_D, cpid, (caddr_t)parm_offset, 0); - parm_offset += sizeof(quad_t); - break; - } - - fsc.number = syscall_num; - fsc.name = - (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : - freebsd32_syscallnames[syscall_num]; - if (!fsc.name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); - } - - if (fsc.name && (trussinfo->flags & FOLLOWFORKS) - && ((!strcmp(fsc.name, "fork") - || !strcmp(fsc.name, "rfork") - || !strcmp(fsc.name, "vfork")))) - { - trussinfo->curthread->in_fork = 1; - } - - if (nargs == 0) - return; - - fsc.args32 = malloc((1+nargs) * sizeof(unsigned int)); - iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (void *)parm_offset; - iorequest.piod_addr = fsc.args32; - iorequest.piod_len = (1+nargs) * sizeof(unsigned int); - ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); - if (iorequest.piod_len == 0) - return; - - fsc.args = malloc((1+nargs) * sizeof(unsigned long)); - for (i = 0; i < nargs + 1; i++) - fsc.args[i] = fsc.args32[i]; - - if (fsc.name) - sc = get_syscall(fsc.name); - if (sc) { - fsc.nargs = sc->nargs; - } else { +amd64_fbsd32_syscall_entry(struct trussinfo *trussinfo, int nargs) +{ + struct ptrace_io_desc iorequest; + struct reg regs; + struct freebsd32_syscall *fsc; + struct syscall *sc; + lwpid_t tid; + unsigned long parm_offset; + int i, syscall_num; + + tid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return; + } + parm_offset = regs.r_rsp + sizeof(int); + + /* + * FreeBSD has two special kinds of system call redirctions -- + * SYS_syscall, and SYS___syscall. The former is the old syscall() + * routine, basically; the latter is for quad-aligned arguments. + */ + syscall_num = regs.r_rax; + switch (syscall_num) { + case SYS_syscall: + syscall_num = ptrace(PT_READ_D, tid, (caddr_t)parm_offset, 0); + parm_offset += sizeof(int); + break; + case SYS___syscall: + syscall_num = ptrace(PT_READ_D, tid, (caddr_t)parm_offset, 0); + parm_offset += sizeof(quad_t); + break; + } + + fsc = alloc_fsc(); + if (fsc == NULL) + return; + fsc->number = syscall_num; + fsc->name = (syscall_num < 0 || syscall_num >= nsyscalls) ? + NULL : freebsd32_syscallnames[syscall_num]; + if (!fsc->name) { + fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", + syscall_num); + } + + if (fsc->name && (trussinfo->flags & FOLLOWFORKS) && + (strcmp(fsc->name, "fork") == 0 || + strcmp(fsc->name, "rfork") == 0 || + strcmp(fsc->name, "vfork") == 0)) + trussinfo->curthread->in_fork = 1; + + if (nargs == 0) + return; + + fsc->args32 = malloc((1 + nargs) * sizeof(unsigned int)); + iorequest.piod_op = PIOD_READ_D; + iorequest.piod_offs = (void *)parm_offset; + iorequest.piod_addr = fsc->args32; + iorequest.piod_len = (1 + nargs) * sizeof(unsigned int); + ptrace(PT_IO, tid, (caddr_t)&iorequest, 0); + if (iorequest.piod_len == 0) + return; + + fsc->args = malloc((1 + nargs) * sizeof(unsigned long)); + for (i = 0; i < nargs + 1; i++) + fsc->args[i] = fsc->args32[i]; + + sc = NULL; + if (fsc->name) + sc = get_syscall(fsc->name); + if (sc) + fsc->nargs = sc->nargs; + else { #if DEBUG - fprintf(trussinfo->outfile, "unknown syscall %s -- setting args to %d\n", - fsc.name, nargs); + fprintf(trussinfo->outfile, "unknown syscall %s -- setting " + "args to %d\n", fsc->name, nargs); #endif - fsc.nargs = nargs; - } + fsc->nargs = nargs; + } - fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*)); - fsc.sc = sc; + fsc->s_args = calloc(1, (1 + fsc->nargs) * sizeof(char *)); + fsc->sc = sc; - /* - * At this point, we set up the system call arguments. - * We ignore any OUT ones, however -- those are arguments that - * are set by the system call, and so are probably meaningless - * now. This doesn't currently support arguments that are - * passed in *and* out, however. - */ - - if (fsc.name) { + /* + * At this point, we set up the system call arguments. + * We ignore any OUT ones, however -- those are arguments that + * are set by the system call, and so are probably meaningless + * now. This doesn't currently support arguments that are + * passed in *and* out, however. + */ + if (fsc->name) { #if DEBUG - fprintf(stderr, "syscall %s(", fsc.name); + fprintf(stderr, "syscall %s(", fsc->name); #endif - for (i = 0; i < fsc.nargs; i++) { + for (i = 0; i < fsc->nargs; i++) { #if DEBUG - fprintf(stderr, "0x%x%s", - sc - ? fsc.args[sc->args[i].offset] - : fsc.args[i], - i < (fsc.nargs - 1) ? "," : ""); + fprintf(stderr, "0x%x%s", sc ? + fsc->args[sc->args[i].offset] : fsc->args[i], + i < (fsc->nargs - 1) ? "," : ""); #endif - if (sc && !(sc->args[i].type & OUT)) { - fsc.s_args[i] = print_arg(&sc->args[i], fsc.args, 0, trussinfo); - } - } + if (sc && !(sc->args[i].type & OUT)) { + fsc->s_args[i] = print_arg(&sc->args[i], + fsc->args, 0, trussinfo); + } + } #if DEBUG - fprintf(stderr, ")\n"); + fprintf(stderr, ")\n"); #endif - } + } #if DEBUG - fprintf(trussinfo->outfile, "\n"); + fprintf(trussinfo->outfile, "\n"); #endif - if (fsc.name != NULL && - (!strcmp(fsc.name, "freebsd32_execve") || !strcmp(fsc.name, "exit"))) { - - /* XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (!strcmp(fsc.name, "freebsd32_execve")) { - if ((trussinfo->flags & EXECVEARGS) == 0) - if (fsc.s_args[1]) { - free(fsc.s_args[1]); - fsc.s_args[1] = NULL; - } - if ((trussinfo->flags & EXECVEENVS) == 0) - if (fsc.s_args[2]) { - free(fsc.s_args[2]); - fsc.s_args[2] = NULL; - } - } - - } - - return; + if (fsc->name != NULL && (strcmp(fsc->name, "freebsd32_execve") == 0 || + strcmp(fsc->name, "exit") == 0)) { + /* + * XXX + * This could be done in a more general + * manner but it still wouldn't be very pretty. + */ + if (strcmp(fsc->name, "freebsd32_execve") == 0) { + if ((trussinfo->flags & EXECVEARGS) == 0) { + if (fsc->s_args[1]) { + free(fsc->s_args[1]); + fsc->s_args[1] = NULL; + } + } + if ((trussinfo->flags & EXECVEENVS) == 0) { + if (fsc->s_args[2]) { + free(fsc->s_args[2]); + fsc->s_args[2] = NULL; + } + } + } + } + trussinfo->curthread->fsc = fsc; } /* @@ -266,68 +268,72 @@ amd64_fbsd32_syscall_entry(struct trussi long amd64_fbsd32_syscall_exit(struct trussinfo *trussinfo, int syscall_num __unused) { - struct reg regs; - long retval; - int i; - int errorp; - struct syscall *sc; - - if (fsc.name == NULL) - return (-1); - cpid = trussinfo->curthread->tid; - - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return (-1); - } - - retval = regs.r_rax; - errorp = !!(regs.r_rflags & PSL_C); - - /* - * This code, while simpler than the initial versions I used, could - * stand some significant cleaning. - */ - - sc = fsc.sc; - if (!sc) { - for (i = 0; i < fsc.nargs; i++) - asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in the syscall_entry function. - */ - for (i = 0; i < sc->nargs; i++) { - char *temp; - if (sc->args[i].type & OUT) { + struct reg regs; + struct freebsd32_syscall *fsc; + struct syscall *sc; + lwpid_t tid; + long retval; + int errorp, i; + + if (trussinfo->curthread->fsc == NULL) + return (-1); + + tid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return (-1); + } + + retval = regs.r_rax; + errorp = !!(regs.r_rflags & PSL_C); + /* - * If an error occurred, then don't bother getting the data; - * it may not be valid. + * This code, while simpler than the initial versions I used, could + * stand some significant cleaning. */ - if (errorp) - asprintf(&temp, "0x%lx", fsc.args[sc->args[i].offset]); - else - temp = print_arg(&sc->args[i], fsc.args, retval, trussinfo); - fsc.s_args[i] = temp; - } - } - } - - if (fsc.name != NULL && - (!strcmp(fsc.name, "freebsd32_execve") || !strcmp(fsc.name, "exit"))) { - trussinfo->curthread->in_syscall = 1; - } - - /* - * It would probably be a good idea to merge the error handling, - * but that complicates things considerably. - */ - - print_syscall_ret(trussinfo, fsc.name, fsc.nargs, fsc.s_args, errorp, - retval, fsc.sc); - clear_fsc(); - return (retval); + fsc = trussinfo->curthread->fsc; + sc = fsc->sc; + if (!sc) { + for (i = 0; i < fsc->nargs; i++) + asprintf(&fsc->s_args[i], "0x%lx", fsc->args[i]); + } else { + /* + * Here, we only look for arguments that have OUT masked in -- + * otherwise, they were handled in the syscall_entry function. + */ + for (i = 0; i < sc->nargs; i++) { + char *temp; + if (sc->args[i].type & OUT) { + /* + * If an error occurred, then don't bother + * getting the data; it may not be valid. + */ + if (errorp) { + asprintf(&temp, "0x%lx", + fsc->args[sc->args[i].offset]); + } else { + temp = print_arg(&sc->args[i], + fsc->args, retval, trussinfo); + } + fsc->s_args[i] = temp; + } + } + } + + if (fsc->name != NULL && (strcmp(fsc->name, "freebsd32_execve") == 0 || + strcmp(fsc->name, "exit") == 0)) + trussinfo->curthread->in_syscall = 1; + + /* + * It would probably be a good idea to merge the error handling, + * but that complicates things considerably. + */ + + print_syscall_ret(trussinfo, fsc->name, fsc->nargs, fsc->s_args, errorp, + retval, fsc->sc); + free_fsc(fsc); + + return (retval); } Modified: stable/9/usr.bin/truss/amd64-linux32.c ============================================================================== --- stable/9/usr.bin/truss/amd64-linux32.c Wed Oct 3 13:51:03 2012 (r241161) +++ stable/9/usr.bin/truss/amd64-linux32.c Wed Oct 3 14:28:55 2012 (r241162) @@ -59,8 +59,6 @@ static const char rcsid[] = #include "syscall.h" #include "extern.h" -static int cpid = -1; - #include "linux32_syscalls.h" static int nsyscalls = @@ -75,26 +73,34 @@ static int nsyscalls = * 'struct syscall' describes the system call; it may be NULL, however, * if we don't know about this particular system call yet. */ -static struct linux_syscall { +struct linux_syscall { struct syscall *sc; const char *name; int number; unsigned long args[5]; int nargs; /* number of arguments -- *not* number of words! */ char **s_args; /* the printable arguments */ -} fsc; +}; + +static struct linux_syscall * +alloc_fsc(void) +{ + + return (malloc(sizeof(struct linux_syscall))); +} /* Clear up and free parts of the fsc structure. */ -static __inline void -clear_fsc(void) { - if (fsc.s_args) { - int i; - for (i = 0; i < fsc.nargs; i++) - if (fsc.s_args[i]) - free(fsc.s_args[i]); - free(fsc.s_args); - } - memset(&fsc, 0, sizeof(fsc)); +static void +free_fsc(struct linux_syscall *fsc) +{ + int i; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 16:48:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D1AC106564A; Wed, 3 Oct 2012 16:48:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 377928FC08; Wed, 3 Oct 2012 16:48:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93GmT8N060388; Wed, 3 Oct 2012 16:48:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93GmSET060386; Wed, 3 Oct 2012 16:48:28 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210031648.q93GmSET060386@svn.freebsd.org> From: Dimitry Andric Date: Wed, 3 Oct 2012 16:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241163 - head/contrib/llvm/tools/clang/lib/Driver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 16:48:29 -0000 Author: dim Date: Wed Oct 3 16:48:28 2012 New Revision: 241163 URL: http://svn.freebsd.org/changeset/base/241163 Log: Pull in r164717 from upstream clang trunk: Allow -MF to be used in combination with -E -M or -E -MM. This should help with building the lang/ghc port. MFC after: 1 week Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Wed Oct 3 14:28:55 2012 (r241162) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Wed Oct 3 16:48:28 2012 (r241163) @@ -219,11 +219,11 @@ void Clang::AddPreprocessingOptions(Comp (A = Args.getLastArg(options::OPT_MMD))) { // Determine the output location. const char *DepFile; - if (Output.getType() == types::TY_Dependencies) { - DepFile = Output.getFilename(); - } else if (Arg *MF = Args.getLastArg(options::OPT_MF)) { + if (Arg *MF = Args.getLastArg(options::OPT_MF)) { DepFile = MF->getValue(Args); C.addFailureResultFile(DepFile); + } else if (Output.getType() == types::TY_Dependencies) { + DepFile = Output.getFilename(); } else if (A->getOption().matches(options::OPT_M) || A->getOption().matches(options::OPT_MM)) { DepFile = "-"; From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 16:58:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 090E81065670; Wed, 3 Oct 2012 16:58:43 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [IPv6:2a01:e0c:1:1599::14]) by mx1.freebsd.org (Postfix) with ESMTP id B6F048FC1A; Wed, 3 Oct 2012 16:58:39 +0000 (UTC) Received: from endor.tataz.chchile.org (unknown [82.233.239.98]) by smtp5-g21.free.fr (Postfix) with ESMTP id 68865D4802A; Wed, 3 Oct 2012 18:58:32 +0200 (CEST) Received: from felucia.tataz.chchile.org (felucia.tataz.chchile.org [192.168.1.9]) by endor.tataz.chchile.org (Postfix) with ESMTP id 5129BDBF; Wed, 3 Oct 2012 18:58:31 +0200 (CEST) Received: by felucia.tataz.chchile.org (Postfix, from userid 1000) id 43F1B10A62; Wed, 3 Oct 2012 16:58:31 +0000 (UTC) Date: Wed, 3 Oct 2012 18:58:31 +0200 From: Jeremie Le Hen To: Devin Teske Message-ID: <20121003165831.GA25291@felucia.tataz.chchile.org> Mail-Followup-To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201210030232.q932Wlfs044296@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210030232.q932Wlfs044296@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 16:58:43 -0000 Hi Devin, On Wed, Oct 03, 2012 at 02:32:47AM +0000, Devin Teske wrote: > Author: dteske > Date: Wed Oct 3 02:32:47 2012 > New Revision: 241149 > URL: http://svn.freebsd.org/changeset/base/241149 > > Log: > Import sysutils/sysrc from the ports tree (current version 5.1). Importing > disconnected under the WITH_BSDCONFIG flag (a good idea since this version of > sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)). > > Multiple reasons sysrc should not simply continue to live in ports. The most > important being that it is tightly coupled with the base. > > Approved by: adrian (co-mentor) Don't you expect to MFC this? Thanks. Regards, -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 17:20:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEEFF106564A; Wed, 3 Oct 2012 17:20:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF5A58FC08; Wed, 3 Oct 2012 17:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93HKY7V064476; Wed, 3 Oct 2012 17:20:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93HKYUp064470; Wed, 3 Oct 2012 17:20:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201210031720.q93HKYUp064470@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 3 Oct 2012 17:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241164 - in head/sys/boot/userboot: . test userboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 17:20:35 -0000 Author: ae Date: Wed Oct 3 17:20:34 2012 New Revision: 241164 URL: http://svn.freebsd.org/changeset/base/241164 Log: Replace all references to loader_callbacks_v1 with loader_callbacks. Suggested by: grehan@ Modified: head/sys/boot/userboot/test/test.c head/sys/boot/userboot/userboot.h head/sys/boot/userboot/userboot/libuserboot.h head/sys/boot/userboot/userboot/main.c Modified: head/sys/boot/userboot/test/test.c ============================================================================== --- head/sys/boot/userboot/test/test.c Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/test/test.c Wed Oct 3 17:20:34 2012 (r241164) @@ -364,7 +364,7 @@ test_getmem(void *arg, uint64_t *lowmem, *highmem = 0; } -struct loader_callbacks_v1 cb = { +struct loader_callbacks cb = { .putc = test_putc, .getc = test_getc, .poll = test_poll, @@ -405,7 +405,7 @@ int main(int argc, char** argv) { void *h; - void (*func)(struct loader_callbacks_v1 *, void *, int, int); + void (*func)(struct loader_callbacks *, void *, int, int); int opt; char *disk_image = NULL; Modified: head/sys/boot/userboot/userboot.h ============================================================================== --- head/sys/boot/userboot/userboot.h Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/userboot.h Wed Oct 3 17:20:34 2012 (r241164) @@ -38,7 +38,7 @@ #define USERBOOT_EXIT_QUIT 1 #define USERBOOT_EXIT_REBOOT 2 -struct loader_callbacks_v1 { +struct loader_callbacks { /* * Console i/o */ Modified: head/sys/boot/userboot/userboot/libuserboot.h ============================================================================== --- head/sys/boot/userboot/userboot/libuserboot.h Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/userboot/libuserboot.h Wed Oct 3 17:20:34 2012 (r241164) @@ -28,7 +28,7 @@ #include "userboot.h" -extern struct loader_callbacks_v1 *callbacks; +extern struct loader_callbacks *callbacks; extern void *callbacks_arg; #define CALLBACK(fn, args...) (callbacks->fn(callbacks_arg , ##args)) Modified: head/sys/boot/userboot/userboot/main.c ============================================================================== --- head/sys/boot/userboot/userboot/main.c Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/userboot/main.c Wed Oct 3 17:20:34 2012 (r241164) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #define USERBOOT_VERSION USERBOOT_VERSION_2 -struct loader_callbacks_v1 *callbacks; +struct loader_callbacks *callbacks; void *callbacks_arg; extern char bootprog_name[]; @@ -67,7 +67,7 @@ exit(int v) } void -loader_main(struct loader_callbacks_v1 *cb, void *arg, int version, int ndisks) +loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) { static char malloc[512*1024]; int i; From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 18:51:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 937C51065672; Wed, 3 Oct 2012 18:51:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id DEB0D14E9EF; Wed, 3 Oct 2012 18:50:59 +0000 (UTC) Message-ID: <506C8912.8050301@FreeBSD.org> Date: Wed, 03 Oct 2012 11:50:58 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Devin Teske References: <201210030232.q932Wlfs044296@svn.freebsd.org> In-Reply-To: <201210030232.q932Wlfs044296@svn.freebsd.org> X-Enigmail-Version: 1.4.4 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 18:51:02 -0000 Was this discussed on freebsd-rc@ at some point, and I just missed it? From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 20:18:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6B6C106564A; Wed, 3 Oct 2012 20:18:49 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 88C198FC12; Wed, 3 Oct 2012 20:18:49 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.15]) by ltcfislmsgpa07.fnfis.com (8.14.4/8.14.4) with ESMTP id q93KIjdJ027924 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Oct 2012 15:18:45 -0500 Received: from dtwin (10.14.152.52) by smtp.fisglobal.com (10.132.206.15) with Microsoft SMTP Server (TLS) id 14.2.309.2; Wed, 3 Oct 2012 15:18:14 -0500 From: Sender: Devin Teske To: "'Doug Barton'" , "'Devin Teske'" References: <201210030232.q932Wlfs044296@svn.freebsd.org> <506C8912.8050301@FreeBSD.org> In-Reply-To: <506C8912.8050301@FreeBSD.org> Date: Wed, 3 Oct 2012 13:18:23 -0700 Message-ID: <031a01cda1a4$3db87660$b9296320$@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Content-Language: en-us Thread-index: AQGVzjdEdWWKA4yJI4j6DLfvvhMpDQGnbln5mApuKUA= X-Originating-IP: [10.14.152.52] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-10-03_02:2012-10-03, 2012-10-02, 1970-01-01 signatures=0 Cc: svn-src-head@freebsd.org, Devin Teske , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: RE: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 20:18:49 -0000 > -----Original Message----- > From: Doug Barton [mailto:dougb@FreeBSD.org] > Sent: Wednesday, October 03, 2012 11:51 AM > To: Devin Teske > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc > > Was this discussed on freebsd-rc@ at some point, and I just missed it? Everybody seems to suggest some other list. -arch, -rc, -hackers, -sysinstall, etc. With respect to -rc ... it's very much possible this was discussed there too. I can recall bringing up the topic at least 3 times in the past 2 years (on various lists). It was always met with the same enthusiastic "YES" If we want to rehash this yet again one more time, let's pick a list and have at-it one last time. -- Devin P.S. You'd be right to claim that there aren't any _recent_ discussions on importing this code, and that's entirely because it took me a _really_ long time to prepare the code once it was decided that we were going to import it. I spent more than 6 months reworking the code for this purpose (import to base). _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 20:30:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 849C9106564A; Wed, 3 Oct 2012 20:30:17 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 46E668FC0A; Wed, 3 Oct 2012 20:30:16 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.31]) by ltcfislmsgpa07.fnfis.com (8.14.4/8.14.4) with ESMTP id q93KU72Z011331 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Oct 2012 15:30:16 -0500 Received: from dtwin (10.14.152.52) by smtp.fisglobal.com (10.132.206.31) with Microsoft SMTP Server (TLS) id 14.2.309.2; Wed, 3 Oct 2012 15:30:12 -0500 From: Sender: Devin Teske To: "'Jeremie Le Hen'" , "'Devin Teske'" References: <201210030232.q932Wlfs044296@svn.freebsd.org> <20121003165831.GA25291@felucia.tataz.chchile.org> In-Reply-To: <20121003165831.GA25291@felucia.tataz.chchile.org> Date: Wed, 3 Oct 2012 13:30:20 -0700 Message-ID: <032001cda1a5$e95303e0$bbf90ba0$@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Content-Language: en-us Thread-index: AQGVzjdEdWWKA4yJI4j6DLfvvhMpDQGTqtTemAsOvhA= X-Originating-IP: [10.14.152.52] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-10-03_02:2012-10-03, 2012-10-02, 1970-01-01 signatures=0 Cc: svn-src-head@freebsd.org, Devin Teske , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: RE: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 20:30:17 -0000 > -----Original Message----- > From: Jeremie Le Hen [mailto:jlh@FreeBSD.org] > Sent: Wednesday, October 03, 2012 9:59 AM > To: Devin Teske > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc > > Hi Devin, > > On Wed, Oct 03, 2012 at 02:32:47AM +0000, Devin Teske wrote: > > Author: dteske > > Date: Wed Oct 3 02:32:47 2012 > > New Revision: 241149 > > URL: http://svn.freebsd.org/changeset/base/241149 > > > > Log: > > Import sysutils/sysrc from the ports tree (current version 5.1). Importing > > disconnected under the WITH_BSDCONFIG flag (a good idea since this version > of > > sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)). > > > > Multiple reasons sysrc should not simply continue to live in ports. The most > > important being that it is tightly coupled with the base. > > > > Approved by: adrian (co-mentor) > > Don't you expect to MFC this? > Neither bsdconfig(8) nor sysrc(8) are actually shipping with FreeBSD _yet_, so there's technically nothing to MFC (other than disconnected code). Currently, at the time of this writing, you need to use WITH_BSDCONFIG when compiling/installing the operating system from source to get this great software. The suggestion to import this code "disconnected" was made by both Julian and phk based on the fact that nobody was available (after months of waiting, searching, and pleading) to review the >20k lines of code. Furthermore, the code should not be "connected" (taking away the need to set WITH_BSDCONFIG to get this software) until bsdconfig(8) can function as a "full and complete" replacement to sysinstall(8). Currently, what's missing from bsdconfig(8) that makes it a less-than-ideal replacement for sysinstall is: a. The lack of package management (discussions on -hackers led to the predisposition that we should focus our efforts on embracing PKGNG) b. help-file integration ("*.help" files used by sysinstall(8) need to be brought over and hooked-into bsdconfig(8)) When those two tasks are done, then bsdconfig(8) will be ready to take on active-duty as *the* replacement to sysinstall(8) -- meaning, we'll remove the need to have WITH_BSDCONFIG declared). At that moment, bsdconfig(8) ought to be a candidate for MFC -- but until then, the only thing an MFC buys me is double-work maintaining two disconnected branches instead of one. For those that want to test bsdconfig(8) and sysrc(8) on a STABLE release, never fear: you can simply execute the following to install these to any release (but do note that bsdconfig(8) requires dialog(1) from 9.0 or higher): # Assuming /usr/src holds a HEAD release cd /usr/src/usr.sbin/bsdconfig make all install cd ../sysrc make all install Last, but not least, you may be asking what bsdconfig(8) has to do with sysrc(8). Quite simply, sysrc(8) requires /usr/share/bsdconfig/sysrc.subr as-provided by bsdconfig(8). -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 20:39:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7C591065670; Wed, 3 Oct 2012 20:39:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C38248FC12; Wed, 3 Oct 2012 20:39:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93KdB6C089734; Wed, 3 Oct 2012 20:39:11 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93KdBOr089732; Wed, 3 Oct 2012 20:39:11 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210032039.q93KdBOr089732@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 3 Oct 2012 20:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241165 - head/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 20:39:12 -0000 Author: pfg Date: Wed Oct 3 20:39:11 2012 New Revision: 241165 URL: http://svn.freebsd.org/changeset/base/241165 Log: rpc: convert all uid and gid variables of the type uid_t and gid_t. The previous change (based on Solaris) doesn't work properly either as the casting only has the effect of quieting the compiler. Move back to the previous solution but adjust the sizeof() type in xdr_array(). This should mostly work (by accident). Reported by: bde Modified: head/lib/libc/rpc/authunix_prot.c Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 17:20:34 2012 (r241164) +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 20:39:11 2012 (r241165) @@ -69,10 +69,10 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && - xdr_int(xdrs, (int *) &(p->aup_uid)) && - xdr_int(xdrs, (int *) &(p->aup_gid)) && + xdr_u_int(xdrs, &(p->aup_uid)) && + xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, - &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { + &(p->aup_len), NGRPS, sizeof(gid_t), (xdrproc_t)xdr_int) ) { return (TRUE); } return (FALSE); From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 21:41:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8ECC106564A; Wed, 3 Oct 2012 21:41:20 +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 A4A5E8FC0A; Wed, 3 Oct 2012 21:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93LfKiM097322; Wed, 3 Oct 2012 21:41:20 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93LfK51097319; Wed, 3 Oct 2012 21:41:20 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210032141.q93LfK51097319@svn.freebsd.org> From: Ed Maste Date: Wed, 3 Oct 2012 21:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241166 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 21:41:20 -0000 Author: emaste Date: Wed Oct 3 21:41:20 2012 New Revision: 241166 URL: http://svn.freebsd.org/changeset/base/241166 Log: Cast through void * to silence compiler warning The base netmap pointer and offsets involved are provided by the kernel side of the netmap interface and will have appropriate alignment. Sponsored by: ADARA Networks MFC After: 2 weeks Modified: head/sys/net/netmap_user.h Modified: head/sys/net/netmap_user.h ============================================================================== --- head/sys/net/netmap_user.h Wed Oct 3 20:39:11 2012 (r241165) +++ head/sys/net/netmap_user.h Wed Oct 3 21:41:20 2012 (r241166) @@ -62,15 +62,16 @@ #ifndef _NET_NETMAP_USER_H_ #define _NET_NETMAP_USER_H_ -#define NETMAP_IF(b, o) (struct netmap_if *)((char *)(b) + (o)) +#define _NETMAP_OFFSET(type, ptr, offset) \ + ((type)(void *)((char *)(ptr) + (offset))) -#define NETMAP_TXRING(nifp, index) \ - ((struct netmap_ring *)((char *)(nifp) + \ - (nifp)->ring_ofs[index] ) ) - -#define NETMAP_RXRING(nifp, index) \ - ((struct netmap_ring *)((char *)(nifp) + \ - (nifp)->ring_ofs[index + (nifp)->ni_tx_rings + 1] ) ) +#define NETMAP_IF(b, o) _NETMAP_OFFSET(struct netmap_if *, b, o) + +#define NETMAP_TXRING(nifp, index) _NETMAP_OFFSET(struct netmap_ring *, \ + nifp, (nifp)->ring_ofs[index] ) + +#define NETMAP_RXRING(nifp, index) _NETMAP_OFFSET(struct netmap_ring *, \ + nifp, (nifp)->ring_ofs[index + (nifp)->ni_tx_rings + 1] ) #define NETMAP_BUF(ring, index) \ ((char *)(ring) + (ring)->buf_ofs + ((index)*(ring)->nr_buf_size)) From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 21:42:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23C801065674; Wed, 3 Oct 2012 21:42:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4A09A8FC15; Wed, 3 Oct 2012 21:42:45 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EANywbFCDaFvO/2dsb2JhbABFhg+1JoRRgiABAQUjBFIbDgoCAg0ZAlkGiBilP5JhgSGKAoUogRIDlWmQK4MJgXs X-IronPort-AV: E=Sophos;i="4.80,530,1344225600"; d="scan'208";a="184532583" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 03 Oct 2012 17:42:15 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 553CDB4022; Wed, 3 Oct 2012 17:42:15 -0400 (EDT) Date: Wed, 3 Oct 2012 17:42:15 -0400 (EDT) From: Rick Macklem To: Bruce Evans Message-ID: <740058841.1682948.1349300535316.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20121003224737.V46116@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: svn-src-head@FreeBSD.org, "Pedro F. Giffuni" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241152 - head/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 21:42:46 -0000 Bruce Evans wrote: > On Wed, 3 Oct 2012, Pedro F. Giffuni wrote: > > > Log: > > rpc: convert all uid and gid variables of the type uid_t and gid_t. > > > > As part of the previous commit, uses of xdr_int() were replaced > > with xdr_u_int(). This has undesired effects as the second > > argument doesn't match exactly uid_t or gid_t. It also breaks > > assumptions in the size of the provided types. > > > > To work around those issues we revert back to the use of xdr_int() > > but provide proper casting so the behaviour doesn't change. > > Er, this makes the problem worse. It doesn't actually make the > argument > match, but uses a bogus cast whose main effect is to hide the type > mismatch from the compiler (the compiler might still consider the cast > invalid). > > > Modified: head/lib/libc/rpc/authunix_prot.c > > ============================================================================== > > --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:00:37 2012 > > (r241151) > > +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:44:23 2012 > > (r241152) > > @@ -67,11 +67,11 @@ xdr_authunix_parms(xdrs, p) > > > > paup_gids = &p->aup_gids; > > > > - if (xdr_u_long(xdrs, &(p->aup_time)) > > - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) > > - && xdr_u_int(xdrs, &(p->aup_uid)) > > - && xdr_u_int(xdrs, &(p->aup_gid)) > > - && xdr_array(xdrs, (char **) paup_gids, > > + if (xdr_u_long(xdrs, &(p->aup_time)) && > > The old code was closer to being correct, and is still used for > aup_time. > For times it still works almost correctly as follows: > - times have type time_t, which is always signed and sometimes 64 bits > in FreeBSD > - aup_time has type u_long, which is always unsigned and sometimes 64 > bits in FreeBSD. It is 64 bits for some arches that don't have 64- > bit u_longs (mips and arm), because time_t on these arches was > bloated to practice the transition to a 64-bit time_t (this is very > unnecessary since 32 bits unsigned work until 2106). > - the current time in seconds (in a time_t) is assigned to aup_time, > without any bounds checking of course > - after that, the time as a u_long in aup_time us usable. > Add the overflow checking and it would work correctly. > > > + xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && > > + xdr_int(xdrs, (int *) &(p->aup_uid)) && > > + xdr_int(xdrs, (int *) &(p->aup_gid)) && > > For ids it used to work almost correctly as follows: > - ids have type uid_t and gid_t, which are always uint32_t in FreeBSD > - aup_uid and aup_gid used to have type int > - the ids (in a uid_t or gid_t) were assigned to aup*_idm without any > bounds checking of course. The sign mismatch is a larger problem in > practice that for times. Times after 2038 shouldn't actually occur, > but ids above INT_MAX can. But in practice, the same benign overflow > will probably allow both to work when there is a sign error. > - after that, the time as a u_long in aup_time us usable. > Add the overflow checking and it would work correctly, but u_int's > should > be used throughout so that supported ids like ((uid_t)-2) don't have > to > rejected by the bounds check. > > Now it works very incorrectly: > - the types in the assignment are now the same (uid_t or gid_t), so > there > is no problem in the assignment, but this gives types that are > unusable > here > - despite being unusable here, they are used here. &(p->aup_*id)) is a > pointer to a uid_t or a gid_t. Pretending that it is a pointer to an > int doesn't make it one. Without the (int *) cast, the compiler would > detect the type mismatch as a sign mismatch at certain warning levels > (the (int *) taken by xdr_int is incompatible with the object pointer > ([ug]id_t *). If the conversion is reasonable, then xdr_int()'s > prototype would do it, and the has no effect except to possibly do > the same thing without a warning or with a different warning. > > > + xdr_array(xdrs, (char **) paup_gids, > > &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { > > return (TRUE); > > } > > It already used a bogus cast on paup_gids. I'm surprised that compiles > (paup_gids has type gid_t **). I didn't notice that before, or that > the > sizeof() always matched the xdr_int. The elements need to be ints to > work (as above), but now have type gid_t. > > If the xdr_array() API had been invented after 1980, then it would > have > used void ** instead of char **, something like the following: > - it apparently wants to pass the array pointer indirectly. The > pointer > must have type void *, not gid_t *. Then we take its address and get > a void **. The pointer must be coverted from its original type to > void *, and the code already does a conversion, but with nonsense > types: > - aup_gids used to have type int * and now has type gid_t * > - this must be converted to void * (or char * to match the pre-1980 > API). > "void *vaup_gids = p->aup_gids;" might work. > - now we have a void *, we can point to it using void **. Take the > address > of the local variable vaup_gids instead of p->aup_gids. > - xdr_array() needs to convert from the void ** back to the original > pointer. > Indirecting the void ** only gives the void *. The technically least > incorrect way (without changing the API much) is to switch on the > element > size. > > Bruce I haven't been looking at these patches (and don't really have any time to do so). I was just going to note that Sun RPC puts 32bit uid and gids on the wire. As such, I think you'll want the "on the wire" defined as 32bit #s (maybe uint32_t or int32_t) and the xdr conversion routines should be ones that handle 32bits. (I'd have to look at them to remember which ones are correct for 32bits on all arches. I think they once used the naming where "long" ws considered to be 32bits. Ah, the good old days;-) Anyhow, good luck with it guys, rick From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 21:50:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F210106566B; Wed, 3 Oct 2012 21:50:54 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7165D8FC16; Wed, 3 Oct 2012 21:50:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93Losj0098556; Wed, 3 Oct 2012 21:50:54 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93LosnL098554; Wed, 3 Oct 2012 21:50:54 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201210032150.q93LosnL098554@svn.freebsd.org> From: Niclas Zeising Date: Wed, 3 Oct 2012 21:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241167 - head/usr.sbin/sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 21:50:54 -0000 Author: zeising (doc,ports committer) Date: Wed Oct 3 21:50:53 2012 New Revision: 241167 URL: http://svn.freebsd.org/changeset/base/241167 Log: Remove whitespace at EOL Approved by: joel (mentor) Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:41:20 2012 (r241166) +++ head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:50:53 2012 (r241167) @@ -55,7 +55,7 @@ The following options are available: .It Fl a Dump a list of all non-default configuration variables. .It Fl A -Dump a list of all configuration variables +Dump a list of all configuration variables .Pq incl. defaults . .It Fl d Print a description of the given variable. @@ -66,14 +66,14 @@ passing `-f' with a NULL file-argument). Print query results as .Ql var=value .Pq useful for producing output to be fed back in . -Ignored if +Ignored if .Fl n is specified. .It Fl f Ar file -Operate on the specified file(s) instead of the files obtained by reading the -.Sq rc_conf_files -entry in the -.Ev RC_DEFAULTS +Operate on the specified file(s) instead of the files obtained by reading the +.Sq rc_conf_files +entry in the +.Ev RC_DEFAULTS file. This option can be specified multiple times for additional files. .It Fl F @@ -89,9 +89,9 @@ Ignore unknown variables. .It Fl j Ar jail The .Ar jid -or name of the -.Ar jail -to operate within +or name of the +.Ar jail +to operate within .Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . .It Fl n Show only variable values, not their names. @@ -103,13 +103,13 @@ Quiet. Ignore previous and/or .Ev SYSRC_VERBOSE . .It Fl R Ar dir -Operate within the root directory +Operate within the root directory .Pq Sq Ar dir -rather than +rather than .Pq Sq / . .It Fl v -Verbose. Print the pathname of the specific -.Xr rc.conf 5 +Verbose. Print the pathname of the specific +.Xr rc.conf 5 file where the directive was found. .It Fl x Remove variable(s) from specified file(s). @@ -133,7 +133,7 @@ configuration files. .Pp The list of system configuration files is configured in the file .Ql /etc/defaults/rc.conf -within the variable +within the variable .Ql rc_conf_files , which by-default contains a space-separated list of pathnames. On all FreeBSD systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". Each @@ -172,14 +172,14 @@ Override default .Ql rc_conf_files .Pq even if set to NULL . .It Ev RC_DEFAULTS -Location of +Location of .Ql /etc/defaults/rc.conf file. .It Ev SYSRC_VERBOSE Default verbosity. Set to non-NULL to enable. .El .Sh DEPENDENCIES -The following standard commands are required by +The following standard commands are required by .Nm : .Pp .Xr awk 1 , From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 21:56:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C17F9106566C; Wed, 3 Oct 2012 21:56:16 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAC688FC14; Wed, 3 Oct 2012 21:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93LuGxC099268; Wed, 3 Oct 2012 21:56:16 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93LuG16099266; Wed, 3 Oct 2012 21:56:16 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201210032156.q93LuG16099266@svn.freebsd.org> From: Niclas Zeising Date: Wed, 3 Oct 2012 21:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241168 - head/usr.sbin/sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 21:56:16 -0000 Author: zeising (doc,ports committer) Date: Wed Oct 3 21:56:16 2012 New Revision: 241168 URL: http://svn.freebsd.org/changeset/base/241168 Log: Sort manual page cross references. Approved by: joel (mentor) Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:50:53 2012 (r241167) +++ head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:56:16 2012 (r241168) @@ -185,17 +185,18 @@ The following standard commands are requ .Xr awk 1 , .Xr cat 1 , .Xr chmod 1 , -.Xr chown 8 , .Xr env 1 , .Xr grep 1 , -.Xr jexec 8 , .Xr jls 1 , .Xr mktemp 1 , .Xr mv 1 , .Xr rm 1 , .Xr sh 1 , .Xr stat 1 , -.Xr tail 1 +.Xr tail 1 , +.Xr chown 8 +and +.Xr jexec 8 . .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf @@ -271,11 +272,11 @@ collection of system configuration files .Pp This will be corrected by a future enhancement. .Sh SEE ALSO +.Xr jls 1 , +.Xr rc.conf 5 , .Xr jail 8 , .Xr jexec 8 , -.Xr jls 1 , .Xr rc 8 , -.Xr rc.conf 5 , .Xr sysctl 8 .Sh HISTORY A From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 22:02:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA24D106566C; Wed, 3 Oct 2012 22:02:16 +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 9CDF88FC12; Wed, 3 Oct 2012 22:02:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93M2G9L000142; Wed, 3 Oct 2012 22:02:16 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93M2G6K000140; Wed, 3 Oct 2012 22:02:16 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210032202.q93M2G6K000140@svn.freebsd.org> From: Ed Maste Date: Wed, 3 Oct 2012 22:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241169 - head/tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 22:02:16 -0000 Author: emaste Date: Wed Oct 3 22:02:16 2012 New Revision: 241169 URL: http://svn.freebsd.org/changeset/base/241169 Log: Clean up compiler warnings. More work is needed here but this now builds with WARNS=6. Sponsored by: ADARA Networks MFC after: 2 weeks Modified: head/tools/tools/netmap/pcap.c Modified: head/tools/tools/netmap/pcap.c ============================================================================== --- head/tools/tools/netmap/pcap.c Wed Oct 3 21:56:16 2012 (r241168) +++ head/tools/tools/netmap/pcap.c Wed Oct 3 22:02:16 2012 (r241169) @@ -38,7 +38,7 @@ #define MIN(a, b) ((a) < (b) ? (a) : (b)) -char *version = "$Id$"; +const char *version = "$Id$"; int verbose = 0; /* debug support */ @@ -135,13 +135,12 @@ typedef enum { PCAP_D_OUT } pcap_direction_t; +struct bpf_program; typedef void (*pcap_handler)(u_char *user, const struct pcap_pkthdr *h, const u_char *bytes); -char errbuf[PCAP_ERRBUF_SIZE]; - pcap_t *pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, char *errbuf); @@ -155,6 +154,24 @@ char *pcap_lookupdev(char *errbuf); int pcap_inject(pcap_t *p, const void *buf, size_t size); int pcap_fileno(pcap_t *p); const char *pcap_lib_version(void); +void pcap_freealldevs(pcap_if_t *); +pcap_t *pcap_create(const char *, char *); +int pcap_activate(pcap_t *); +int pcap_can_set_rfmon(pcap_t *); +int pcap_set_snaplen(pcap_t *, int); +int pcap_snapshot(pcap_t *); +int pcap_lookupnet(const char *, uint32_t *, uint32_t *, char *); +int pcap_set_promisc(pcap_t *, int); +int pcap_set_timeout(pcap_t *, int); +int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, + uint32_t); +int pcap_setfilter(pcap_t *, struct bpf_program *); +int pcap_datalink(pcap_t *); +const char *pcap_datalink_val_to_name(int); +const char *pcap_datalink_val_to_description(int); +int pcap_stats(pcap_t *, struct pcap_stat *); +int pcap_loop(pcap_t *, int, pcap_handler, u_char *); +char *pcap_geterr(pcap_t *); struct eproto { @@ -739,7 +756,8 @@ pcap_loop(pcap_t *p, int cnt, pcap_handl #endif /* __PIC__ */ #ifndef __PIC__ -void do_send(u_char *user, const struct pcap_pkthdr *h, const u_char *buf) +static void +do_send(u_char *user, const struct pcap_pkthdr *h, const u_char *buf) { pcap_inject((pcap_t *)user, buf, h->caplen); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 23:23:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EB0D106566B; Wed, 3 Oct 2012 23:23:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 387D78FC0A; Wed, 3 Oct 2012 23:23:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93NNkHi011485; Wed, 3 Oct 2012 23:23:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93NNjAw011479; Wed, 3 Oct 2012 23:23:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210032323.q93NNjAw011479@svn.freebsd.org> From: Adrian Chadd Date: Wed, 3 Oct 2012 23:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241170 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 23:23:46 -0000 Author: adrian Date: Wed Oct 3 23:23:45 2012 New Revision: 241170 URL: http://svn.freebsd.org/changeset/base/241170 Log: Pause and unpause the software queues for a given node based on the net80211 node power save state. * Add an ATH_NODE_UNLOCK_ASSERT() check * Add a new node field - an_is_powersave * Pause/unpause the queue based on the node state * Attempt to handle net80211 concurrency issues so the queue doesn't get paused/unpaused more than once at a time from the net80211 power save code. Whilst here (and breaking my usual rule), set CLRDMASK when a queue is unpaused, regardless of whether the queue has some pending traffic. This means the first frame from that TID (now or later) will hvae CLRDMASK set. Also whilst here, bump the swretrymax counters whenever the filtered frames code expires a frame. Again, breaking my rule, but this is just a statistics thing rather than a functional change. This doesn't fix ps-poll (but it doesn't break it too much worse than it is at the present) or correcting the TID updates. That's next on the list. Tested: * AR9220 AP (Atheros AP96 reference design) * Macbook Pro and LG Optimus 1 Android phone, both setting and clearing power save state (but not using PS-POLL.) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_debug.h head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath.c Wed Oct 3 23:23:45 2012 (r241170) @@ -199,6 +199,7 @@ static void ath_setcurmode(struct ath_so static void ath_announce(struct ath_softc *); static void ath_dfs_tasklet(void *, int); +static void ath_node_powersave(struct ieee80211_node *, int); #ifdef IEEE80211_SUPPORT_TDMA #include @@ -1138,6 +1139,9 @@ ath_vap_create(struct ieee80211com *ic, avp->av_bmiss = vap->iv_bmiss; vap->iv_bmiss = ath_bmiss_vap; + avp->av_node_ps = vap->iv_node_ps; + vap->iv_node_ps = ath_node_powersave; + /* Set default parameters */ /* @@ -5335,6 +5339,37 @@ ath_dfs_tasklet(void *p, int npending) } } +/* + * Enable/disable power save. This must be called with + * no TX driver locks currently held, so it should only + * be called from the RX path (which doesn't hold any + * TX driver locks.) + */ +static void +ath_node_powersave(struct ieee80211_node *ni, int enable) +{ + struct ath_node *an = ATH_NODE(ni); + struct ieee80211com *ic = ni->ni_ic; + struct ath_softc *sc = ic->ic_ifp->if_softc; + struct ath_vap *avp = ATH_VAP(ni->ni_vap); + + ATH_NODE_UNLOCK_ASSERT(an); + /* XXX and no TXQ locks should be held here */ + + DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: ni=%p, enable=%d\n", + __func__, ni, enable); + + /* Suspend or resume software queue handling */ + if (enable) + ath_tx_node_sleep(sc, an); + else + ath_tx_node_wakeup(sc, an); + + /* Update net80211 state */ + avp->av_node_ps(ni, enable); +} + + MODULE_VERSION(if_ath, 1); MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ #if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ) Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath_debug.h Wed Oct 3 23:23:45 2012 (r241170) @@ -66,6 +66,7 @@ enum { ATH_DEBUG_SW_TX_BAR = 0x100000000ULL, /* BAR TX */ ATH_DEBUG_EDMA_RX = 0x200000000ULL, /* RX EDMA state */ ATH_DEBUG_SW_TX_FILT = 0x400000000ULL, /* SW TX FF */ + ATH_DEBUG_NODE_PWRSAVE = 0x800000000ULL, /* node powersave */ ATH_DEBUG_ANY = 0xffffffffffffffffULL }; Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath_tx.c Wed Oct 3 23:23:45 2012 (r241170) @@ -111,6 +111,9 @@ __FBSDID("$FreeBSD$"); */ #define ATH_NONQOS_TID_AC WME_AC_VO +#if 0 +static int ath_tx_node_is_asleep(struct ath_softc *sc, struct ath_node *an); +#endif static int ath_tx_ampdu_pending(struct ath_softc *sc, struct ath_node *an, int tid); static int ath_tx_ampdu_running(struct ath_softc *sc, struct ath_node *an, @@ -2902,9 +2905,17 @@ ath_tx_tid_resume(struct ath_softc *sc, DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: unpaused = %d\n", __func__, tid->paused); - if (tid->paused || tid->axq_depth == 0) { + if (tid->paused) + return; + + /* + * Override the clrdmask configuration for the next frame + * from this TID, just to get the ball rolling. + */ + tid->clrdmask = 1; + + if (tid->axq_depth == 0) return; - } /* XXX isfiltered shouldn't ever be 0 at this point */ if (tid->isfiltered == 1) { @@ -2912,12 +2923,6 @@ ath_tx_tid_resume(struct ath_softc *sc, return; } - /* - * Override the clrdmask configuration for the next frame, - * just to get the ball rolling. - */ - tid->clrdmask = 1; - ath_tx_tid_sched(sc, tid); /* Punt some frames to the hardware if needed */ //ath_txq_sched(sc, sc->sc_ac2q[tid->ac]); @@ -3021,6 +3026,7 @@ ath_tx_tid_filt_comp_single(struct ath_s * Don't allow a filtered frame to live forever. */ if (bf->bf_state.bfs_retries > SWMAX_RETRIES) { + sc->sc_stats.ast_tx_swretrymax++; DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: bf=%p, seqno=%d, exceeded retries\n", __func__, @@ -3073,6 +3079,7 @@ ath_tx_tid_filt_comp_aggr(struct ath_sof * Don't allow a filtered frame to live forever. */ if (bf->bf_state.bfs_retries > SWMAX_RETRIES) { + sc->sc_stats.ast_tx_swretrymax++; DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: bf=%p, seqno=%d, exceeded retries\n", __func__, @@ -5282,6 +5289,145 @@ ath_addba_response_timeout(struct ieee80 ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } +#if 0 +/* + * Check if a node is asleep or not. + */ +static int +ath_tx_node_is_asleep(struct ath_softc *sc, struct ath_node *an) +{ + + ATH_NODE_LOCK_ASSERT(an); + + return (an->an_is_powersave); +} +#endif + +/* + * Mark a node as currently "in powersaving." + * This suspends all traffic on the node. + * + * This must be called with the node/tx locks free. + * + * XXX TODO: the locking silliness below is due to how the node + * locking currently works. Right now, the node lock is grabbed + * to do rate control lookups and these are done with the TX + * queue lock held. This means the node lock can't be grabbed + * first here or a LOR will occur. + * + * Eventually (hopefully!) the TX path code will only grab + * the TXQ lock when transmitting and the ath_node lock when + * doing node/TID operations. There are other complications - + * the sched/unsched operations involve walking the per-txq + * 'active tid' list and this requires both locks to be held. + */ +void +ath_tx_node_sleep(struct ath_softc *sc, struct ath_node *an) +{ + struct ath_tid *atid; + struct ath_txq *txq; + int tid; + + ATH_NODE_UNLOCK_ASSERT(an); + + /* + * It's possible that a parallel call to ath_tx_node_wakeup() + * will unpause these queues. + * + * The node lock can't just be grabbed here, as there's places + * in the driver where the node lock is grabbed _within_ a + * TXQ lock. + * So, we do this delicately and unwind state if needed. + * + * + Pause all the queues + * + Grab the node lock + * + If the queue is already asleep, unpause and quit + * + else just mark as asleep. + * + * A parallel sleep() call will just pause and then + * find they're already paused, so undo it. + * + * A parallel wakeup() call will check if asleep is 1 + * and if it's not (ie, it's 0), it'll treat it as already + * being awake. If it's 1, it'll mark it as 0 and then + * unpause everything. + * + * (Talk about a delicate hack.) + */ + + /* Suspend all traffic on the node */ + for (tid = 0; tid < IEEE80211_TID_SIZE; tid++) { + atid = &an->an_tid[tid]; + txq = sc->sc_ac2q[atid->ac]; + + ATH_TXQ_LOCK(txq); + ath_tx_tid_pause(sc, atid); + ATH_TXQ_UNLOCK(txq); + } + + ATH_NODE_LOCK(an); + + /* In case of concurrency races from net80211.. */ + if (an->an_is_powersave == 1) { + ATH_NODE_UNLOCK(an); + device_printf(sc->sc_dev, + "%s: an=%p: node was already asleep\n", + __func__, an); + for (tid = 0; tid < IEEE80211_TID_SIZE; tid++) { + atid = &an->an_tid[tid]; + txq = sc->sc_ac2q[atid->ac]; + + ATH_TXQ_LOCK(txq); + ath_tx_tid_resume(sc, atid); + ATH_TXQ_UNLOCK(txq); + } + return; + } + + /* Mark node as in powersaving */ + an->an_is_powersave = 1; + + ATH_NODE_UNLOCK(an); +} + +/* + * Mark a node as currently "awake." + * This resumes all traffic to the node. + */ +void +ath_tx_node_wakeup(struct ath_softc *sc, struct ath_node *an) +{ + struct ath_tid *atid; + struct ath_txq *txq; + int tid; + + ATH_NODE_UNLOCK_ASSERT(an); + ATH_NODE_LOCK(an); + + /* In case of concurrency races from net80211.. */ + if (an->an_is_powersave == 0) { + ATH_NODE_UNLOCK(an); + device_printf(sc->sc_dev, + "%s: an=%p: node was already awake\n", + __func__, an); + return; + } + + /* Mark node as awake */ + an->an_is_powersave = 0; + + ATH_NODE_UNLOCK(an); + + for (tid = 0; tid < IEEE80211_TID_SIZE; tid++) { + atid = &an->an_tid[tid]; + txq = sc->sc_ac2q[atid->ac]; + + ATH_TXQ_LOCK(txq); + ath_tx_tid_resume(sc, atid); + ATH_TXQ_UNLOCK(txq); + } +} + static int ath_legacy_dma_txsetup(struct ath_softc *sc) { Modified: head/sys/dev/ath/if_ath_tx.h ============================================================================== --- head/sys/dev/ath/if_ath_tx.h Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath_tx.h Wed Oct 3 23:23:45 2012 (r241170) @@ -124,6 +124,12 @@ extern void ath_addba_response_timeout(s struct ieee80211_tx_ampdu *tap); /* + * AP mode power save handling (of stations) + */ +extern void ath_tx_node_sleep(struct ath_softc *sc, struct ath_node *an); +extern void ath_tx_node_wakeup(struct ath_softc *sc, struct ath_node *an); + +/* * Setup path */ #define ath_txdma_setup(_sc) \ Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_athvar.h Wed Oct 3 23:23:45 2012 (r241170) @@ -170,6 +170,7 @@ struct ath_node { struct ieee80211_node an_node; /* base class */ u_int8_t an_mgmtrix; /* min h/w rate index */ u_int8_t an_mcastrix; /* mcast h/w rate index */ + uint32_t an_is_powersave; /* node is sleeping */ struct ath_buf *an_ff_buf[WME_NUM_AC]; /* ff staging area */ struct ath_tid an_tid[IEEE80211_TID_SIZE]; /* per-TID state */ char an_name[32]; /* eg "wlan0_a1" */ @@ -332,6 +333,8 @@ struct ath_txq { #define ATH_NODE_LOCK(_an) mtx_lock(&(_an)->an_mtx) #define ATH_NODE_UNLOCK(_an) mtx_unlock(&(_an)->an_mtx) #define ATH_NODE_LOCK_ASSERT(_an) mtx_assert(&(_an)->an_mtx, MA_OWNED) +#define ATH_NODE_UNLOCK_ASSERT(_an) mtx_assert(&(_an)->an_mtx, \ + MA_NOTOWNED) #define ATH_TXQ_LOCK_INIT(_sc, _tq) do { \ snprintf((_tq)->axq_name, sizeof((_tq)->axq_name), "%s_txq%u", \ @@ -379,6 +382,7 @@ struct ath_vap { int (*av_newstate)(struct ieee80211vap *, enum ieee80211_state, int); void (*av_bmiss)(struct ieee80211vap *); + void (*av_node_ps)(struct ieee80211_node *, int); }; #define ATH_VAP(vap) ((struct ath_vap *)(vap)) From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 01:26:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C94C106564A; Thu, 4 Oct 2012 01:26:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 364B78FC0C; Thu, 4 Oct 2012 01:26:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q941QEJX030104; Thu, 4 Oct 2012 01:26:14 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q941QDua030102; Thu, 4 Oct 2012 01:26:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210040126.q941QDua030102@svn.freebsd.org> From: Eitan Adler Date: Thu, 4 Oct 2012 01:26:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241171 - stable/9/usr.sbin/rtprio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 01:26:14 -0000 Author: eadler Date: Thu Oct 4 01:26:13 2012 New Revision: 241171 URL: http://svn.freebsd.org/changeset/base/241171 Log: MFC r241061: Document the security.bsd.unprivileged_idprio in idprio(1) in addition to rtprio(2). Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/rtprio/rtprio.1 Directory Properties: stable/9/usr.sbin/rtprio/ (props changed) Modified: stable/9/usr.sbin/rtprio/rtprio.1 ============================================================================== --- stable/9/usr.sbin/rtprio/rtprio.1 Wed Oct 3 23:23:45 2012 (r241170) +++ stable/9/usr.sbin/rtprio/rtprio.1 Thu Oct 4 01:26:13 2012 (r241171) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 1994 +.Dd September 29, 2012 .Dt RTPRIO 1 .Os .Sh NAME @@ -113,6 +113,14 @@ highest priority of 0 means "the current process". .Pp Only root is allowed to set realtime or idle priority for a process. +A user may modify the idle priority of their own processes if the +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_idprio +is set to non-zero. +Note that this increases the chance that a deadlock can occur +if a process locks a required resource and then does +not get to run. .Sh EXIT STATUS If .Nm From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 01:33:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64785106566B; Thu, 4 Oct 2012 01:33:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F5728FC0A; Thu, 4 Oct 2012 01:33:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q941Xnx8031454; Thu, 4 Oct 2012 01:33:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q941XnM7031451; Thu, 4 Oct 2012 01:33:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210040133.q941XnM7031451@svn.freebsd.org> From: Eitan Adler Date: Thu, 4 Oct 2012 01:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241172 - stable/8/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 01:33:49 -0000 Author: eadler Date: Thu Oct 4 01:33:48 2012 New Revision: 241172 URL: http://svn.freebsd.org/changeset/base/241172 Log: MFC r241062: clarify the wording for 'first' and 'last' Approved by: cperciva (implicit) Modified: stable/8/lib/libc/string/ffs.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/string/ffs.3 ============================================================================== --- stable/8/lib/libc/string/ffs.3 Thu Oct 4 01:26:13 2012 (r241171) +++ stable/8/lib/libc/string/ffs.3 Thu Oct 4 01:33:48 2012 (r241172) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd September 29, 2012 .Dt FFS 3 .Os .Sh NAME @@ -63,8 +63,7 @@ The .Fn ffsl and .Fn ffsll -functions find the first bit set -(beginning with the least significant bit) +functions find the first (least significant) bit set in .Fa value and return the index of that bit. @@ -74,11 +73,11 @@ The .Fn flsl and .Fn flsll -functions find the last bit set in +functions find the last (most significant) bit set in .Fa value and return the index of that bit. .Pp -Bits are numbered starting at 1 (the least significant bit). +Bits are numbered starting at 1, the least significant bit. A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 01:33:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81000106566C; Thu, 4 Oct 2012 01:33:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B94D8FC0C; Thu, 4 Oct 2012 01:33:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q941XnpD031458; Thu, 4 Oct 2012 01:33:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q941Xn6b031456; Thu, 4 Oct 2012 01:33:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210040133.q941Xn6b031456@svn.freebsd.org> From: Eitan Adler Date: Thu, 4 Oct 2012 01:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241173 - stable/9/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 01:33:49 -0000 Author: eadler Date: Thu Oct 4 01:33:48 2012 New Revision: 241173 URL: http://svn.freebsd.org/changeset/base/241173 Log: MFC r241062: clarify the wording for 'first' and 'last' Approved by: cperciva (implicit) Modified: stable/9/lib/libc/string/ffs.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/string/ffs.3 ============================================================================== --- stable/9/lib/libc/string/ffs.3 Thu Oct 4 01:33:48 2012 (r241172) +++ stable/9/lib/libc/string/ffs.3 Thu Oct 4 01:33:48 2012 (r241173) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd September 29, 2012 .Dt FFS 3 .Os .Sh NAME @@ -63,8 +63,7 @@ The .Fn ffsl and .Fn ffsll -functions find the first bit set -(beginning with the least significant bit) +functions find the first (least significant) bit set in .Fa value and return the index of that bit. @@ -74,11 +73,11 @@ The .Fn flsl and .Fn flsll -functions find the last bit set in +functions find the last (most significant) bit set in .Fa value and return the index of that bit. .Pp -Bits are numbered starting at 1 (the least significant bit). +Bits are numbered starting at 1, the least significant bit. A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 01:33:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C72031065672; Thu, 4 Oct 2012 01:33:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1F798FC12; Thu, 4 Oct 2012 01:33:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q941XnkQ031475; Thu, 4 Oct 2012 01:33:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q941XnVJ031473; Thu, 4 Oct 2012 01:33:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210040133.q941XnVJ031473@svn.freebsd.org> From: Eitan Adler Date: Thu, 4 Oct 2012 01:33: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: r241174 - stable/7/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 01:33:49 -0000 Author: eadler Date: Thu Oct 4 01:33:49 2012 New Revision: 241174 URL: http://svn.freebsd.org/changeset/base/241174 Log: MFC r241062: clarify the wording for 'first' and 'last' Approved by: cperciva (implicit) Modified: stable/7/lib/libc/string/ffs.3 Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/string/ffs.3 ============================================================================== --- stable/7/lib/libc/string/ffs.3 Thu Oct 4 01:33:48 2012 (r241173) +++ stable/7/lib/libc/string/ffs.3 Thu Oct 4 01:33:49 2012 (r241174) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd September 29, 2012 .Dt FFS 3 .Os .Sh NAME @@ -63,8 +63,7 @@ The .Fn ffsl and .Fn ffsll -functions find the first bit set -(beginning with the least significant bit) +functions find the first (least significant) bit set in .Fa value and return the index of that bit. @@ -74,11 +73,11 @@ The .Fn flsl and .Fn flsll -functions find the last bit set in +functions find the last (most significant) bit set in .Fa value and return the index of that bit. .Pp -Bits are numbered starting at 1 (the least significant bit). +Bits are numbered starting at 1, the least significant bit. A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 01:37:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C02D0106564A; Thu, 4 Oct 2012 01:37:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9078D8FC0A; Thu, 4 Oct 2012 01:37:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q941bCw5032100; Thu, 4 Oct 2012 01:37:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q941bCoB032098; Thu, 4 Oct 2012 01:37:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210040137.q941bCoB032098@svn.freebsd.org> From: Eitan Adler Date: Thu, 4 Oct 2012 01:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241175 - stable/8/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 01:37:12 -0000 Author: eadler Date: Thu Oct 4 01:37:11 2012 New Revision: 241175 URL: http://svn.freebsd.org/changeset/base/241175 Log: MFC r241115: Indicate (loudly) that ports csup is going away. While here clarify some other portions. Approved by: cperciva (implicit) Modified: stable/8/share/examples/cvsup/ports-supfile Directory Properties: stable/8/share/examples/cvsup/ (props changed) Modified: stable/8/share/examples/cvsup/ports-supfile ============================================================================== --- stable/8/share/examples/cvsup/ports-supfile Thu Oct 4 01:33:49 2012 (r241174) +++ stable/8/share/examples/cvsup/ports-supfile Thu Oct 4 01:37:11 2012 (r241175) @@ -1,15 +1,20 @@ # $FreeBSD$ # # This file contains all of the "CVSup collections" that make up the -# FreeBSD-current ports collection. +# ports collection. # # csup (CVS Update Protocol) allows you to download the latest CVS # tree (or any branch of development therefrom) to your system easily # and efficiently -# -# To keep your CVS tree up-to-date run: -# -# csup ports-supfile +# _ +# __ ____ _ _ __ _ __ (_)_ __ __ _ +# \ \ /\ / / _` | '__| '_ \| | '_ \ / _` | +# \ V V / (_| | | | | | | | | | | (_| | +# \_/\_/ \__,_|_| |_| |_|_|_| |_|\__, | +# |___/ +# cvsup for ports is being phased out as of 28 February 2013 and its +# use is discouraged. Users are advised to migrate to portsnap +# or svn directly. # # Note that this only updates the tree contents and does not # update what is actually installed. @@ -63,11 +68,13 @@ ports-all # These are the individual collections that make up "ports-all". If you # use these, be sure to comment out "ports-all" above. -# + # Be sure to ALWAYS cvsup the ports-base collection if you use any of the # other individual collections below. ports-base is a mandatory collection # for the ports collection, and your ports may not build correctly if it # is not kept up to date. +# +# Use of individual collections is not a supported configuration. #ports-base #ports-accessibility #ports-arabic From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 01:37:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED8481065673; Thu, 4 Oct 2012 01:37:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF3D08FC12; Thu, 4 Oct 2012 01:37:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q941bCkK032105; Thu, 4 Oct 2012 01:37:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q941bCfI032103; Thu, 4 Oct 2012 01:37:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210040137.q941bCfI032103@svn.freebsd.org> From: Eitan Adler Date: Thu, 4 Oct 2012 01:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241176 - stable/9/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 01:37:13 -0000 Author: eadler Date: Thu Oct 4 01:37:11 2012 New Revision: 241176 URL: http://svn.freebsd.org/changeset/base/241176 Log: MFC r241115: Indicate (loudly) that ports csup is going away. While here clarify some other portions. Approved by: cperciva (implicit) Modified: stable/9/share/examples/cvsup/ports-supfile Directory Properties: stable/9/share/examples/cvsup/ (props changed) Modified: stable/9/share/examples/cvsup/ports-supfile ============================================================================== --- stable/9/share/examples/cvsup/ports-supfile Thu Oct 4 01:37:11 2012 (r241175) +++ stable/9/share/examples/cvsup/ports-supfile Thu Oct 4 01:37:11 2012 (r241176) @@ -1,15 +1,20 @@ # $FreeBSD$ # # This file contains all of the "CVSup collections" that make up the -# FreeBSD-current ports collection. +# ports collection. # # csup (CVS Update Protocol) allows you to download the latest CVS # tree (or any branch of development therefrom) to your system easily # and efficiently -# -# To keep your CVS tree up-to-date run: -# -# csup ports-supfile +# _ +# __ ____ _ _ __ _ __ (_)_ __ __ _ +# \ \ /\ / / _` | '__| '_ \| | '_ \ / _` | +# \ V V / (_| | | | | | | | | | | (_| | +# \_/\_/ \__,_|_| |_| |_|_|_| |_|\__, | +# |___/ +# cvsup for ports is being phased out as of 28 February 2013 and its +# use is discouraged. Users are advised to migrate to portsnap +# or svn directly. # # Note that this only updates the tree contents and does not # update what is actually installed. @@ -63,11 +68,13 @@ ports-all # These are the individual collections that make up "ports-all". If you # use these, be sure to comment out "ports-all" above. -# + # Be sure to ALWAYS cvsup the ports-base collection if you use any of the # other individual collections below. ports-base is a mandatory collection # for the ports collection, and your ports may not build correctly if it # is not kept up to date. +# +# Use of individual collections is not a supported configuration. #ports-base #ports-accessibility #ports-arabic From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 01:37:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3539E1065674; Thu, 4 Oct 2012 01:37:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05DB78FC14; Thu, 4 Oct 2012 01:37:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q941bCeg032122; Thu, 4 Oct 2012 01:37:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q941bCIS032119; Thu, 4 Oct 2012 01:37:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210040137.q941bCIS032119@svn.freebsd.org> From: Eitan Adler Date: Thu, 4 Oct 2012 01:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241177 - stable/7/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 01:37:13 -0000 Author: eadler Date: Thu Oct 4 01:37:12 2012 New Revision: 241177 URL: http://svn.freebsd.org/changeset/base/241177 Log: MFC r241115: Indicate (loudly) that ports csup is going away. While here clarify some other portions. Approved by: cperciva (implicit) Modified: stable/7/share/examples/cvsup/ports-supfile Directory Properties: stable/7/share/examples/cvsup/ (props changed) Modified: stable/7/share/examples/cvsup/ports-supfile ============================================================================== --- stable/7/share/examples/cvsup/ports-supfile Thu Oct 4 01:37:11 2012 (r241176) +++ stable/7/share/examples/cvsup/ports-supfile Thu Oct 4 01:37:12 2012 (r241177) @@ -1,15 +1,20 @@ # $FreeBSD$ # # This file contains all of the "CVSup collections" that make up the -# FreeBSD-current ports collection. +# ports collection. # # csup (CVS Update Protocol) allows you to download the latest CVS # tree (or any branch of development therefrom) to your system easily # and efficiently -# -# To keep your CVS tree up-to-date run: -# -# csup ports-supfile +# _ +# __ ____ _ _ __ _ __ (_)_ __ __ _ +# \ \ /\ / / _` | '__| '_ \| | '_ \ / _` | +# \ V V / (_| | | | | | | | | | | (_| | +# \_/\_/ \__,_|_| |_| |_|_|_| |_|\__, | +# |___/ +# cvsup for ports is being phased out as of 28 February 2013 and its +# use is discouraged. Users are advised to migrate to portsnap +# or svn directly. # # Note that this only updates the tree contents and does not # update what is actually installed. @@ -63,11 +68,13 @@ ports-all # These are the individual collections that make up "ports-all". If you # use these, be sure to comment out "ports-all" above. -# + # Be sure to ALWAYS cvsup the ports-base collection if you use any of the # other individual collections below. ports-base is a mandatory collection # for the ports collection, and your ports may not build correctly if it # is not kept up to date. +# +# Use of individual collections is not a supported configuration. #ports-base #ports-accessibility #ports-arabic From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 04:15:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A55106564A; Thu, 4 Oct 2012 04:15:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 673F78FC15; Thu, 4 Oct 2012 04:15:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q944FJEh059478; Thu, 4 Oct 2012 04:15:19 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q944FJWK059470; Thu, 4 Oct 2012 04:15:19 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210040415.q944FJWK059470@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 4 Oct 2012 04:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241181 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 04:15:19 -0000 Author: pfg Date: Thu Oct 4 04:15:18 2012 New Revision: 241181 URL: http://svn.freebsd.org/changeset/base/241181 Log: rpc: convert all uid and gid variables to u_int. After further discussion, instead of pretending to use uid_t and gid_t as upstream Solaris and linux try to, we are better using u_int, which is in fact what the code can handle and best approaches the range of values used by uid and gid. Discussed with: bde Reviewed by: bde Modified: head/include/rpc/auth.h head/include/rpc/auth_unix.h head/lib/libc/rpc/auth_unix.c head/lib/libc/rpc/authunix_prot.c head/lib/libc/rpc/rpc_soc.3 head/lib/libc/rpc/svc_auth_unix.c head/sys/rpc/auth.h Modified: head/include/rpc/auth.h ============================================================================== --- head/include/rpc/auth.h Thu Oct 4 03:59:45 2012 (r241180) +++ head/include/rpc/auth.h Thu Oct 4 04:15:18 2012 (r241181) @@ -243,13 +243,13 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * u_int uid; + * u_int gid; * int len; - * gid_t *aup_gids; + * u_int *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, u_int, u_int, int, u_int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: head/include/rpc/auth_unix.h ============================================================================== --- head/include/rpc/auth_unix.h Thu Oct 4 03:59:45 2012 (r241180) +++ head/include/rpc/auth_unix.h Thu Oct 4 04:15:18 2012 (r241181) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - uid_t aup_uid; - gid_t aup_gid; + u_int aup_uid; + u_int aup_gid; u_int aup_len; - gid_t *aup_gids; + u_int *aup_gids; }; #define authsys_parms authunix_parms Modified: head/lib/libc/rpc/auth_unix.c ============================================================================== --- head/lib/libc/rpc/auth_unix.c Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/auth_unix.c Thu Oct 4 04:15:18 2012 (r241181) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - uid_t uid; - gid_t gid; + u_int uid; + u_int gid; int len; - gid_t *aup_gids; + u_int *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -207,6 +207,7 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; + /* XXX: interface problem; we should translate from uid_t and gid_t */ auth = authunix_create(machname, uid, gid, ngids, gids); free(gids); return (auth); Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/authunix_prot.c Thu Oct 4 04:15:18 2012 (r241181) @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - gid_t **paup_gids; + u_int **paup_gids; assert(xdrs != NULL); assert(p != NULL); @@ -72,7 +72,7 @@ xdr_authunix_parms(xdrs, p) xdr_u_int(xdrs, &(p->aup_uid)) && xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, - &(p->aup_len), NGRPS, sizeof(gid_t), (xdrproc_t)xdr_int) ) { + &(p->aup_len), NGRPS, sizeof(u_int), (xdrproc_t)xdr_u_int) ) { return (TRUE); } return (FALSE); Modified: head/lib/libc/rpc/rpc_soc.3 ============================================================================== --- head/lib/libc/rpc/rpc_soc.3 Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/rpc_soc.3 Thu Oct 4 04:15:18 2012 (r241181) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids" +.Fn authunix_create "char *host" "u_int uid" "u_int gid" "int len" "u_int *aup_gids" .Xc .Pp Create and return an Modified: head/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- head/lib/libc/rpc/svc_auth_unix.c Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/svc_auth_unix.c Thu Oct 4 04:15:18 2012 (r241181) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - gid_t area_gids[NGRPS]; + u_int area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: head/sys/rpc/auth.h ============================================================================== --- head/sys/rpc/auth.h Thu Oct 4 03:59:45 2012 (r241180) +++ head/sys/rpc/auth.h Thu Oct 4 04:15:18 2012 (r241181) @@ -234,17 +234,17 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * u_int uid; + * u_int gid; * int len; - * gid_t *aup_gids; + * u_int *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, u_int, u_int, int, u_int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 06:42:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19A2810656D9; Thu, 4 Oct 2012 06:42:08 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EDA98FCC6; Thu, 4 Oct 2012 06:33:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q946X5cP083787; Thu, 4 Oct 2012 06:33:05 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q946X42x083785; Thu, 4 Oct 2012 06:33:04 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210040633.q946X42x083785@svn.freebsd.org> From: Joel Dahl Date: Thu, 4 Oct 2012 06:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241182 - head/usr.sbin/sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 06:42:08 -0000 Author: joel (doc committer) Date: Thu Oct 4 06:33:03 2012 New Revision: 241182 URL: http://svn.freebsd.org/changeset/base/241182 Log: Fix HISTORY. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Thu Oct 4 04:15:18 2012 (r241181) +++ head/usr.sbin/sysrc/sysrc.8 Thu Oct 4 06:33:03 2012 (r241182) @@ -282,7 +282,7 @@ This will be corrected by a future enhan A .Nm utility first appeared in -.Bx 10.0 . +.Fx 10.0 . .Sh AUTHORS .An Devin Teske Aq dteske@FreeBSD.org .Sh THANKS TO From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 07:40:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13DAD1065670; Thu, 4 Oct 2012 07:40:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F34188FC20; Thu, 4 Oct 2012 07:40:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q947etN0096855; Thu, 4 Oct 2012 07:40:55 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q947etAE096853; Thu, 4 Oct 2012 07:40:55 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201210040740.q947etAE096853@svn.freebsd.org> From: Andrew Thompson Date: Thu, 4 Oct 2012 07:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241183 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 07:40:56 -0000 Author: thompsa Date: Thu Oct 4 07:40:55 2012 New Revision: 241183 URL: http://svn.freebsd.org/changeset/base/241183 Log: Remove the M_NOWAIT from bridge_rtable_init as it isn't needed. The function return value is not even checked and could lead to a panic on a null sc_rthash. MFC after: 2 weeks Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Thu Oct 4 06:33:03 2012 (r241182) +++ head/sys/net/if_bridge.c Thu Oct 4 07:40:55 2012 (r241183) @@ -270,7 +270,7 @@ static void bridge_rtflush(struct bridge static int bridge_rtdaddr(struct bridge_softc *, const uint8_t *, uint16_t); -static int bridge_rtable_init(struct bridge_softc *); +static void bridge_rtable_init(struct bridge_softc *); static void bridge_rtable_fini(struct bridge_softc *); static int bridge_rtnode_addr_cmp(const uint8_t *, const uint8_t *); @@ -2736,24 +2736,19 @@ bridge_rtdelete(struct bridge_softc *sc, * * Initialize the route table for this bridge. */ -static int +static void bridge_rtable_init(struct bridge_softc *sc) { int i; sc->sc_rthash = malloc(sizeof(*sc->sc_rthash) * BRIDGE_RTHASH_SIZE, - M_DEVBUF, M_NOWAIT); - if (sc->sc_rthash == NULL) - return (ENOMEM); + M_DEVBUF, M_WAITOK); for (i = 0; i < BRIDGE_RTHASH_SIZE; i++) LIST_INIT(&sc->sc_rthash[i]); sc->sc_rthash_key = arc4random(); - LIST_INIT(&sc->sc_rtlist); - - return (0); } /* From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 08:52:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F015010656AE; Thu, 4 Oct 2012 08:52:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FEE38FCD4; Thu, 4 Oct 2012 08:33:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948XkuZ007051; Thu, 4 Oct 2012 08:33:46 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948XkNw007049; Thu, 4 Oct 2012 08:33:46 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210040833.q948XkNw007049@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 4 Oct 2012 08:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241185 - stable/9/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 08:52:09 -0000 Author: trasz Date: Thu Oct 4 08:33:46 2012 New Revision: 241185 URL: http://svn.freebsd.org/changeset/base/241185 Log: MFC r240084: Make "setfacl -bd" an alias for "setfacl -k". Previously it would crash on assert. PR: bin/165807 Modified: stable/9/bin/setfacl/setfacl.c Directory Properties: stable/9/bin/setfacl/ (props changed) Modified: stable/9/bin/setfacl/setfacl.c ============================================================================== --- stable/9/bin/setfacl/setfacl.c Thu Oct 4 08:26:49 2012 (r241184) +++ stable/9/bin/setfacl/setfacl.c Thu Oct 4 08:33:46 2012 (r241185) @@ -264,6 +264,17 @@ main(int argc, char *argv[]) need_mask = 1; break; case OP_REMOVE_EXT: + /* + * Don't try to call remove_ext() for empty + * default ACL. + */ + if (acl_type == ACL_TYPE_DEFAULT && + acl_get_entry(acl, ACL_FIRST_ENTRY, + &unused_entry) == 0) { + local_error += remove_default(&acl, + file->filename); + break; + } remove_ext(&acl, file->filename); need_mask = 0; break; From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 08:52:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E6CC1065679; Thu, 4 Oct 2012 08:52:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22F078FD0E; Thu, 4 Oct 2012 08:43:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948hnRb008952; Thu, 4 Oct 2012 08:43:49 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948hnh7008950; Thu, 4 Oct 2012 08:43:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210040843.q948hnh7008950@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 4 Oct 2012 08:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241186 - stable/9/bin/getfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 08:52:19 -0000 Author: trasz Date: Thu Oct 4 08:43:49 2012 New Revision: 241186 URL: http://svn.freebsd.org/changeset/base/241186 Log: MFC r240085: In getfacl(1) manual page, mention where to read about the ACL syntax. PR submitter suggested adding it to acl(3) instead, but I don't think pointing ordinary users at section 3 is a good idea. PR: docs/162380 Modified: stable/9/bin/getfacl/getfacl.1 Directory Properties: stable/9/bin/getfacl/ (props changed) Modified: stable/9/bin/getfacl/getfacl.1 ============================================================================== --- stable/9/bin/getfacl/getfacl.1 Thu Oct 4 08:33:46 2012 (r241185) +++ stable/9/bin/getfacl/getfacl.1 Thu Oct 4 08:43:49 2012 (r241186) @@ -97,6 +97,10 @@ then reads a list of pathnames, each terminated by one newline character, from the standard input. .El +.Pp +For an explanation of the ACL syntax, see the +.Xr setfacl 1 +manual page. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 08:52:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A1061065867; Thu, 4 Oct 2012 08:52:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB5A8FD24; Thu, 4 Oct 2012 08:47:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948l566009607; Thu, 4 Oct 2012 08:47:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948l5ZJ009605; Thu, 4 Oct 2012 08:47:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210040847.q948l5ZJ009605@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 4 Oct 2012 08:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241187 - stable/9/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 08:52:19 -0000 Author: trasz Date: Thu Oct 4 08:47:05 2012 New Revision: 241187 URL: http://svn.freebsd.org/changeset/base/241187 Log: MFC r240087: Fix an error in setfacl(1) that manifested like this: # setfacl -m u:trasz:rwx x # setfacl -m u:root:rwx x # getfacl x # file: x # owner: root # group: wheel user::rw- user:root:rwx user:trasz:rwx group::r-- mask::rwx other::r-- # setfacl -m u:root:rwx x setfacl: x: acl_calc_mask() failed: Invalid argument setfacl: x: failed to set ACL mask For NFSv4 ACLs, this sort of situation would result in duplicated entries. Modified: stable/9/bin/setfacl/merge.c Directory Properties: stable/9/bin/setfacl/ (props changed) Modified: stable/9/bin/setfacl/merge.c ============================================================================== --- stable/9/bin/setfacl/merge.c Thu Oct 4 08:43:49 2012 (r241186) +++ stable/9/bin/setfacl/merge.c Thu Oct 4 08:47:05 2012 (r241187) @@ -94,7 +94,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co acl_tag_t tag, tag_new; acl_entry_type_t entry_type, entry_type_new; acl_flagset_t flagset; - int entry_id, entry_id_new, have_entry, entry_number = 0; + int entry_id, entry_id_new, have_entry, had_entry, entry_number = 0; int acl_brand, prev_acl_brand; acl_get_brand_np(acl, &acl_brand); @@ -116,6 +116,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co while (acl_get_entry(acl, entry_id, &entry) == 1) { entry_id = ACL_NEXT_ENTRY; have_entry = 0; + had_entry = 0; /* keep track of existing ACL_MASK entries */ if (acl_get_tag_type(entry, &tag) == -1) @@ -187,7 +188,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co err(1, "%s: acl_set_flagset_np() failed", filename); } - have_entry = 1; + had_entry = have_entry = 1; break; default: /* should never be here */ @@ -197,7 +198,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co } /* if this entry has not been found, it must be new */ - if (have_entry == 0) { + if (had_entry == 0) { /* * NFSv4 ACL entries must be prepended to the ACL. From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 08:53:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 155C01065672; Thu, 4 Oct 2012 08:53:06 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E203F8FC4B; Thu, 4 Oct 2012 08:53:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948r5vY010764; Thu, 4 Oct 2012 08:53:05 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948r5TN010762; Thu, 4 Oct 2012 08:53:05 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201210040853.q948r5TN010762@svn.freebsd.org> From: Tijl Coosemans Date: Thu, 4 Oct 2012 08:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241190 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 08:53:06 -0000 Author: tijl Date: Thu Oct 4 08:53:05 2012 New Revision: 241190 URL: http://svn.freebsd.org/changeset/base/241190 Log: Define clang feature test macro __has_extension. It's used in stdatomic.h. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Oct 4 08:49:41 2012 (r241189) +++ head/sys/sys/cdefs.h Thu Oct 4 08:53:05 2012 (r241190) @@ -675,6 +675,9 @@ #endif #endif +#ifndef __has_extension +#define __has_extension __has_feature +#endif #ifndef __has_feature #define __has_feature(x) 0 #endif From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 08:57:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CF70106568D; Thu, 4 Oct 2012 08:57:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1A88FD36; Thu, 4 Oct 2012 08:49:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948ngsB010172; Thu, 4 Oct 2012 08:49:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948ng4d010170; Thu, 4 Oct 2012 08:49:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210040849.q948ng4d010170@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Oct 2012 08:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241189 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 08:57:06 -0000 Author: kib Date: Thu Oct 4 08:49:41 2012 New Revision: 241189 URL: http://svn.freebsd.org/changeset/base/241189 Log: MFC r241092: Add the UPDATING note about padlock rng support requiring the config change. Modified: stable/9/UPDATING (contents, props changed) Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Thu Oct 4 08:49:04 2012 (r241188) +++ stable/9/UPDATING Thu Oct 4 08:49:41 2012 (r241189) @@ -9,6 +9,15 @@ handbook. Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. + +20120913: + The random(4) support for the VIA hardware random number + generator (`PADLOCK') is no longer enabled unconditionally. + Add the PADLOCK_RNG option in the custom kernel config if + needed. The GENERIC kernels on i386 and amd64 do include the + option, so the change only affects the custom kernel + configurations. + 20120727: The sparc64 ZFS loader has been changed to no longer try to auto- detect ZFS providers based on diskN aliases but now requires these From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 08:57:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CE2B10656BA; Thu, 4 Oct 2012 08:57:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 033EB8FD2A; Thu, 4 Oct 2012 08:49:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948n4gt010021; Thu, 4 Oct 2012 08:49:04 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948n4XC010018; Thu, 4 Oct 2012 08:49:04 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210040849.q948n4XC010018@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 4 Oct 2012 08:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241188 - stable/9/bin/cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 08:57:07 -0000 Author: trasz Date: Thu Oct 4 08:49:04 2012 New Revision: 241188 URL: http://svn.freebsd.org/changeset/base/241188 Log: MFC r240088: Explicitly mention that "cp -p" copies ACLs. PR: docs/168962 Modified: stable/9/bin/cp/cp.1 Directory Properties: stable/9/bin/cp/ (props changed) Modified: stable/9/bin/cp/cp.1 ============================================================================== --- stable/9/bin/cp/cp.1 Thu Oct 4 08:47:05 2012 (r241187) +++ stable/9/bin/cp/cp.1 Thu Oct 4 08:49:04 2012 (r241188) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd January 17, 2010 +.Dd September 4, 2012 .Dt CP 1 .Os .Sh NAME @@ -164,7 +164,7 @@ Cause .Nm to preserve the following attributes of each source file in the copy: modification time, access time, -file flags, file mode, user ID, and group ID, as allowed by permissions. +file flags, file mode, ACL, user ID, and group ID, as allowed by permissions. .Pp If the user ID and group ID cannot be preserved, no error message is displayed and the exit value is not altered. From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 09:02:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47D9C1065679; Thu, 4 Oct 2012 09:02:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 386CE8FC9E; Thu, 4 Oct 2012 08:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948Qo80005705; Thu, 4 Oct 2012 08:26:50 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948QoMG005703; Thu, 4 Oct 2012 08:26:50 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210040826.q948QoMG005703@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 4 Oct 2012 08:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241184 - stable/9/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 09:02:06 -0000 Author: trasz Date: Thu Oct 4 08:26:49 2012 New Revision: 241184 URL: http://svn.freebsd.org/changeset/base/241184 Log: MFC r240083: Make setfacl(1) behave properly in situations like "setfacl -kd". Modified: stable/9/bin/setfacl/setfacl.c Directory Properties: stable/9/bin/setfacl/ (props changed) Modified: stable/9/bin/setfacl/setfacl.c ============================================================================== --- stable/9/bin/setfacl/setfacl.c Thu Oct 4 07:40:55 2012 (r241183) +++ stable/9/bin/setfacl/setfacl.c Thu Oct 4 08:26:49 2012 (r241184) @@ -73,6 +73,7 @@ main(int argc, char *argv[]) { acl_t acl; acl_type_t acl_type; + acl_entry_t unused_entry; char filename[PATH_MAX]; int local_error, carried_error, ch, i, entry_number, ret; int h_flag; @@ -296,6 +297,20 @@ main(int argc, char *argv[]) } } + /* + * Don't try to set an empty default ACL; it will always fail. + * Use acl_delete_def_file(3) instead. + */ + if (acl_type == ACL_TYPE_DEFAULT && + acl_get_entry(acl, ACL_FIRST_ENTRY, &unused_entry) == 0) { + if (acl_delete_def_file(file->filename) == -1) { + warn("%s: acl_delete_def_file() failed", + file->filename); + carried_error++; + } + continue; + } + /* don't bother setting the ACL if something is broken */ if (local_error) { carried_error++; From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 09:02:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61BCC106584D; Thu, 4 Oct 2012 09:02:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5455B8FC2C; Thu, 4 Oct 2012 09:02:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9492df2012428; Thu, 4 Oct 2012 09:02:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9492dNp012426; Thu, 4 Oct 2012 09:02:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210040902.q9492dNp012426@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Oct 2012 09:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241191 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 09:02:39 -0000 Author: kib Date: Thu Oct 4 09:02:38 2012 New Revision: 241191 URL: http://svn.freebsd.org/changeset/base/241191 Log: MFC r241092: Add the UPDATING note about padlock rng support requiring the config change. Modified: stable/8/UPDATING (contents, props changed) Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Thu Oct 4 08:53:05 2012 (r241190) +++ stable/8/UPDATING Thu Oct 4 09:02:38 2012 (r241191) @@ -15,6 +15,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20120913: + The random(4) support for the VIA hardware random number + generator (`PADLOCK') is no longer enabled unconditionally. + Add the PADLOCK_RNG option in the custom kernel config if + needed. The GENERIC kernels on i386 and amd64 do include the + option, so the change only affects the custom kernel + configurations. + 20120727: The sparc64 ZFS loader has been changed to no longer try to auto- detect ZFS providers based on diskN aliases but now requires these From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 09:49:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2B33106566B; Thu, 4 Oct 2012 09:49:53 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E38198FC14; Thu, 4 Oct 2012 09:49:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q949nr9I021083; Thu, 4 Oct 2012 09:49:53 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q949nrXa021057; Thu, 4 Oct 2012 09:49:53 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201210040949.q949nrXa021057@svn.freebsd.org> From: Max Khon Date: Thu, 4 Oct 2012 09:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241192 - in stable/9: . gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu/usr.bin/gd... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 09:49:53 -0000 Author: fjoe Date: Thu Oct 4 09:49:53 2012 New Revision: 241192 URL: http://svn.freebsd.org/changeset/base/241192 Log: MFC: r241002 Fix pseudo checksum calculation. This fixes ipfilter w/ network controllers that implement only partial rx csum offloading. PR: 106438 Obtained from: upstream Modified: stable/9/Makefile.inc1 stable/9/gnu/usr.bin/gdb/Makefile.inc stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile stable/9/gnu/usr.bin/gdb/arch/amd64/init.c stable/9/gnu/usr.bin/gdb/arch/arm/Makefile stable/9/gnu/usr.bin/gdb/arch/arm/init.c stable/9/gnu/usr.bin/gdb/arch/i386/Makefile stable/9/gnu/usr.bin/gdb/arch/i386/init.c stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile stable/9/gnu/usr.bin/gdb/arch/ia64/init.c stable/9/gnu/usr.bin/gdb/arch/mips/Makefile stable/9/gnu/usr.bin/gdb/arch/mips/init.c stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c stable/9/kerberos5/usr.bin/kadmin/Makefile stable/9/kerberos5/usr.sbin/ktutil/Makefile stable/9/rescue/rescue/Makefile stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c stable/9/sys/fs/ext2fs/ext2_bmap.c stable/9/sys/fs/ext2fs/ext2_extern.h stable/9/sys/fs/ext2fs/ext2_vnops.c stable/9/usr.bin/grep/util.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/Makefile.inc1 Thu Oct 4 09:49:53 2012 (r241192) @@ -172,7 +172,11 @@ OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.$ .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile +.if defined(NO_WORLDTMP) +BPATH= ${PATH} +.else BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games +.endif XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} Modified: stable/9/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- stable/9/gnu/usr.bin/gdb/Makefile.inc Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/Makefile.inc Thu Oct 4 09:49:53 2012 (r241192) @@ -45,6 +45,7 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd +DEBUG_FLAGS= -g -O0 GENSRCS+= nm.h tm.h Modified: stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -5,7 +5,7 @@ GENSRCS+= xm.h LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= amd64-nat.c amd64bsd-nat.c amd64fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c +LIBSRCS+= solib.c solib-svr4.c solib-legacy.c LIBSRCS+= amd64-tdep.c amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c \ i386fbsd-tdep-fixed.c i387-tdep.c Modified: stable/9/gnu/usr.bin/gdb/arch/amd64/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/amd64/init.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/amd64/init.c Thu Oct 4 09:49:53 2012 (r241192) @@ -12,6 +12,7 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; +extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -126,6 +127,7 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); + _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/arm/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/arm/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/arm/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -2,7 +2,7 @@ GENSRCS+= xm.h LIBSRCS+= armfbsd-nat.c -LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c +LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c solib-legacy.c .if !defined(GDB_CROSS_DEBUGGER) LIBSRCS+= fbsd-threads.c .endif Modified: stable/9/gnu/usr.bin/gdb/arch/arm/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/arm/init.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/arm/init.c Thu Oct 4 09:49:53 2012 (r241192) @@ -10,6 +10,7 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; +extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -122,6 +123,7 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); + _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/i386/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/i386/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/i386/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -5,7 +5,7 @@ GENSRCS+= xm.h LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= i386-nat.c i386bsd-nat.c i386fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c +LIBSRCS+= solib.c solib-svr4.c solib-legacy.c LIBSRCS+= i386-tdep.c i386bsd-tdep.c i386fbsd-tdep-fixed.c i387-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/i386/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/i386/init.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/i386/init.c Thu Oct 4 09:49:53 2012 (r241192) @@ -11,6 +11,7 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; +extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -126,6 +127,7 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); + _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ia64-fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c +LIBSRCS+= solib.c solib-svr4.c solib-legacy.c LIBSRCS+= ia64-fbsd-tdep.c ia64-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/ia64/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/ia64/init.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/ia64/init.c Thu Oct 4 09:49:53 2012 (r241192) @@ -10,6 +10,7 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_ia64_tdep; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; +extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -122,6 +123,7 @@ initialize_all_files (void) _initialize_ia64_tdep (); _initialize_solib (); _initialize_svr4_solib (); + _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/mips/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/mips/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/mips/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -3,7 +3,7 @@ .if !defined(GDB_CROSS_DEBUGGER) LIBSRCS+= mipsfbsd-nat.c fbsd-threads.c .endif -LIBSRCS+= solib.c solib-svr4.c +LIBSRCS+= solib.c solib-svr4.c solib-legacy.c LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c fbsd-proc.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/mips/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/mips/init.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/mips/init.c Thu Oct 4 09:49:53 2012 (r241192) @@ -121,6 +121,7 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); + _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); @@ -133,10 +134,8 @@ initialize_all_files (void) _initialize_infptrace (); _initialize_inftarg (); _initialize_thread_db (); -#if 0 _initialize_svr4_lm (); #endif -#endif _initialize_remote (); _initialize_dcache (); _initialize_sr_support (); Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ppcfbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c +LIBSRCS+= solib.c solib-svr4.c solib-legacy.c LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c Thu Oct 4 09:49:53 2012 (r241192) @@ -10,6 +10,7 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; +extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -122,6 +123,7 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); + _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ppcfbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c +LIBSRCS+= solib.c solib-svr4.c solib-legacy.c LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c Thu Oct 4 09:49:53 2012 (r241192) @@ -10,6 +10,7 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; +extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -122,6 +123,7 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); + _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- stable/9/kerberos5/usr.bin/kadmin/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/kerberos5/usr.bin/kadmin/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -29,11 +29,11 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DI DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \ ${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \ ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBREADLINE} ${LIBNCURSES} ${LDAPDPADD} + ${LIBEDIT} ${LIBNCURSES} ${LDAPDPADD} LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \ ${LIBSL} -lroken ${LIBVERS} -lasn1 \ -lcrypto -lcrypt -lcom_err \ - -lreadline -lncurses ${LDAPLDADD} + -ledit -lncurses ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: stable/9/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- stable/9/kerberos5/usr.sbin/ktutil/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/kerberos5/usr.sbin/ktutil/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -18,10 +18,10 @@ SRCS= add.c \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I. DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBHX509} ${LIBSL} ${LIBROKEN} ${LIBVERS} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBREADLINE} ${LIBNCURSES} + ${LIBEDIT} ${LIBNCURSES} LDADD= -lkadm5clnt -lkrb5 -lhx509 ${LIBSL} -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err \ - -lreadline -lncurses + -ledit -lncurses .include Modified: stable/9/rescue/rescue/Makefile ============================================================================== --- stable/9/rescue/rescue/Makefile Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/rescue/rescue/Makefile Thu Oct 4 09:49:53 2012 (r241192) @@ -123,9 +123,9 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem +CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem .endif -CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz +CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs -lz .if ${MACHINE_CPUARCH} == "i386" CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk Modified: stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Oct 4 09:49:53 2012 (r241192) @@ -1357,7 +1357,9 @@ fr_info_t *fin; else sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htonl(m->m_pkthdr.csum_data + - fin->fin_ip->ip_len + fin->fin_p)); + fin->fin_ip->ip_len - + (fin->fin_ip->ip_hl << 2) + + fin->fin_p)); sum ^= 0xffff; if (sum != 0) { fin->fin_flx |= FI_BAD; Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_bmap.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/sys/fs/ext2fs/ext2_bmap.c Thu Oct 4 09:49:53 2012 (r241192) @@ -66,7 +66,6 @@ ext2_bmap(ap) int *a_runb; } */ *ap; { - int32_t blkno; int error; /* @@ -78,9 +77,8 @@ ext2_bmap(ap) if (ap->a_bnp == NULL) return (0); - error = ext2_bmaparray(ap->a_vp, ap->a_bn, &blkno, + error = ext2_bmaparray(ap->a_vp, ap->a_bn, ap->a_bnp, ap->a_runp, ap->a_runb); - *ap->a_bnp = blkno; return (error); } @@ -101,8 +99,8 @@ ext2_bmap(ap) int ext2_bmaparray(vp, bn, bnp, runp, runb) struct vnode *vp; - int32_t bn; - int32_t *bnp; + daddr_t bn; + daddr_t *bnp; int *runp; int *runb; { @@ -112,8 +110,8 @@ ext2_bmaparray(vp, bn, bnp, runp, runb) struct mount *mp; struct vnode *devvp; struct indir a[NIADDR+1], *ap; - int32_t daddr; - long metalbn; + daddr_t daddr; + daddr_t metalbn; int error, num, maxrun = 0, bsize; int *nump; @@ -147,7 +145,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb) if (*bnp == 0) { *bnp = -1; } else if (runp) { - int32_t bnb = bn; + daddr_t bnb = bn; for (++bn; bn < NDADDR && *runp < maxrun && is_sequential(ump, ip->i_db[bn - 1], ip->i_db[bn]); ++bn, ++*runp); Modified: stable/9/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_extern.h Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/sys/fs/ext2fs/ext2_extern.h Thu Oct 4 09:49:53 2012 (r241192) @@ -54,7 +54,7 @@ int ext2_blkatoff(struct vnode *, off_t, void ext2_blkfree(struct inode *, int32_t, long); int32_t ext2_blkpref(struct inode *, int32_t, int, int32_t *, int32_t); int ext2_bmap(struct vop_bmap_args *); -int ext2_bmaparray(struct vnode *, int32_t, int32_t *, int *, int *); +int ext2_bmaparray(struct vnode *, daddr_t, daddr_t *, int *, int *); void ext2_clusteracct(struct m_ext2fs *, char *, int, daddr_t, int); void ext2_dirbad(struct inode *ip, doff_t offset, char *how); void ext2_ei2i(struct ext2fs_dinode *, struct inode *); Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Thu Oct 4 09:49:53 2012 (r241192) @@ -1429,29 +1429,28 @@ ext2_strategy(ap) struct vnode *vp = ap->a_vp; struct inode *ip; struct bufobj *bo; - int32_t blkno; int error; ip = VTOI(vp); if (vp->v_type == VBLK || vp->v_type == VCHR) panic("ext2_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { - error = ext2_bmaparray(vp, bp->b_lblkno, &blkno, NULL, NULL); - bp->b_blkno = blkno; + error = ext2_bmaparray(vp, bp->b_lblkno, &bp->b_blkno, NULL, NULL); if (error) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return (0); } - if ((long)bp->b_blkno == -1) + if (bp->b_blkno == -1) vfs_bio_clrbuf(bp); } - if ((long)bp->b_blkno == -1) { + if (bp->b_blkno == -1) { bufdone(bp); return (0); } bp->b_iooffset = dbtob(bp->b_blkno); + printf("%s: bp->b_iooffset %lld, bp->b_blkno %lld\n", __func__, (long long) bp->b_iooffset, (long long) bp->b_blkno); bo = VFSTOEXT2(vp->v_mount)->um_bo; BO_STRATEGY(bo, bp); return (0); @@ -1752,6 +1751,7 @@ ext2_read(ap) if (bytesinfile < xfersize) xfersize = bytesinfile; + printf("%s: lbn %lld\n", __func__, (long long) lbn); if (lblktosize(fs, nextlbn) >= ip->i_size) error = bread(vp, lbn, size, NOCRED, &bp); else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Thu Oct 4 09:02:38 2012 (r241191) +++ stable/9/usr.bin/grep/util.c Thu Oct 4 09:49:53 2012 (r241192) @@ -336,10 +336,6 @@ procline(struct str *l, int nottext) break; } - /* One pass if we are not recording matches */ - if ((color == NULL && !oflag) || qflag || lflag) - break; - if (st == (size_t)pmatch.rm_so) break; /* No matches */ } From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 09:54:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 320A5106566C; Thu, 4 Oct 2012 09:54:00 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17DFA8FC0A; Thu, 4 Oct 2012 09:54:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q949s0iC021935; Thu, 4 Oct 2012 09:54:00 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q949rxC4021909; Thu, 4 Oct 2012 09:53:59 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201210040953.q949rxC4021909@svn.freebsd.org> From: Max Khon Date: Thu, 4 Oct 2012 09:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241193 - in stable/9: . gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu/usr.bin/gd... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 09:54:00 -0000 Author: fjoe Date: Thu Oct 4 09:53:59 2012 New Revision: 241193 URL: http://svn.freebsd.org/changeset/base/241193 Log: Revert changes that ocassionally got into r241192. Pointy hat to: me Modified: stable/9/Makefile.inc1 stable/9/gnu/usr.bin/gdb/Makefile.inc stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile stable/9/gnu/usr.bin/gdb/arch/amd64/init.c stable/9/gnu/usr.bin/gdb/arch/arm/Makefile stable/9/gnu/usr.bin/gdb/arch/arm/init.c stable/9/gnu/usr.bin/gdb/arch/i386/Makefile stable/9/gnu/usr.bin/gdb/arch/i386/init.c stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile stable/9/gnu/usr.bin/gdb/arch/ia64/init.c stable/9/gnu/usr.bin/gdb/arch/mips/Makefile stable/9/gnu/usr.bin/gdb/arch/mips/init.c stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c stable/9/kerberos5/usr.bin/kadmin/Makefile stable/9/kerberos5/usr.sbin/ktutil/Makefile stable/9/rescue/rescue/Makefile stable/9/sys/fs/ext2fs/ext2_bmap.c stable/9/sys/fs/ext2fs/ext2_extern.h stable/9/sys/fs/ext2fs/ext2_vnops.c stable/9/usr.bin/grep/util.c Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/Makefile.inc1 Thu Oct 4 09:53:59 2012 (r241193) @@ -172,11 +172,7 @@ OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.$ .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile -.if defined(NO_WORLDTMP) -BPATH= ${PATH} -.else BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games -.endif XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} Modified: stable/9/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- stable/9/gnu/usr.bin/gdb/Makefile.inc Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/Makefile.inc Thu Oct 4 09:53:59 2012 (r241193) @@ -45,7 +45,6 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd -DEBUG_FLAGS= -g -O0 GENSRCS+= nm.h tm.h Modified: stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/amd64/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -5,7 +5,7 @@ GENSRCS+= xm.h LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= amd64-nat.c amd64bsd-nat.c amd64fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= amd64-tdep.c amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c \ i386fbsd-tdep-fixed.c i387-tdep.c Modified: stable/9/gnu/usr.bin/gdb/arch/amd64/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/amd64/init.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/amd64/init.c Thu Oct 4 09:53:59 2012 (r241193) @@ -12,7 +12,6 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -127,7 +126,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/arm/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/arm/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/arm/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -2,7 +2,7 @@ GENSRCS+= xm.h LIBSRCS+= armfbsd-nat.c -LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c .if !defined(GDB_CROSS_DEBUGGER) LIBSRCS+= fbsd-threads.c .endif Modified: stable/9/gnu/usr.bin/gdb/arch/arm/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/arm/init.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/arm/init.c Thu Oct 4 09:53:59 2012 (r241193) @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/i386/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/i386/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/i386/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -5,7 +5,7 @@ GENSRCS+= xm.h LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= i386-nat.c i386bsd-nat.c i386fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= i386-tdep.c i386bsd-tdep.c i386fbsd-tdep-fixed.c i387-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/i386/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/i386/init.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/i386/init.c Thu Oct 4 09:53:59 2012 (r241193) @@ -11,7 +11,6 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -127,7 +126,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/ia64/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ia64-fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= ia64-fbsd-tdep.c ia64-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/ia64/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/ia64/init.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/ia64/init.c Thu Oct 4 09:53:59 2012 (r241193) @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_ia64_tdep; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_ia64_tdep (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/mips/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/mips/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/mips/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -3,7 +3,7 @@ .if !defined(GDB_CROSS_DEBUGGER) LIBSRCS+= mipsfbsd-nat.c fbsd-threads.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c fbsd-proc.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/mips/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/mips/init.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/mips/init.c Thu Oct 4 09:53:59 2012 (r241193) @@ -121,7 +121,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); @@ -134,8 +133,10 @@ initialize_all_files (void) _initialize_infptrace (); _initialize_inftarg (); _initialize_thread_db (); +#if 0 _initialize_svr4_lm (); #endif +#endif _initialize_remote (); _initialize_dcache (); _initialize_sr_support (); Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ppcfbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc/init.c Thu Oct 4 09:53:59 2012 (r241193) @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc64/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ppcfbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c nm.h: Modified: stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c ============================================================================== --- stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/gnu/usr.bin/gdb/arch/powerpc64/init.c Thu Oct 4 09:53:59 2012 (r241193) @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); Modified: stable/9/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- stable/9/kerberos5/usr.bin/kadmin/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/kerberos5/usr.bin/kadmin/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -29,11 +29,11 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DI DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \ ${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \ ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBEDIT} ${LIBNCURSES} ${LDAPDPADD} + ${LIBREADLINE} ${LIBNCURSES} ${LDAPDPADD} LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \ ${LIBSL} -lroken ${LIBVERS} -lasn1 \ -lcrypto -lcrypt -lcom_err \ - -ledit -lncurses ${LDAPLDADD} + -lreadline -lncurses ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: stable/9/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- stable/9/kerberos5/usr.sbin/ktutil/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/kerberos5/usr.sbin/ktutil/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -18,10 +18,10 @@ SRCS= add.c \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I. DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBHX509} ${LIBSL} ${LIBROKEN} ${LIBVERS} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBEDIT} ${LIBNCURSES} + ${LIBREADLINE} ${LIBNCURSES} LDADD= -lkadm5clnt -lkrb5 -lhx509 ${LIBSL} -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err \ - -ledit -lncurses + -lreadline -lncurses .include Modified: stable/9/rescue/rescue/Makefile ============================================================================== --- stable/9/rescue/rescue/Makefile Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/rescue/rescue/Makefile Thu Oct 4 09:53:59 2012 (r241193) @@ -123,9 +123,9 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem .endif -CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs -lz +CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz .if ${MACHINE_CPUARCH} == "i386" CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_bmap.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/sys/fs/ext2fs/ext2_bmap.c Thu Oct 4 09:53:59 2012 (r241193) @@ -66,6 +66,7 @@ ext2_bmap(ap) int *a_runb; } */ *ap; { + int32_t blkno; int error; /* @@ -77,8 +78,9 @@ ext2_bmap(ap) if (ap->a_bnp == NULL) return (0); - error = ext2_bmaparray(ap->a_vp, ap->a_bn, ap->a_bnp, + error = ext2_bmaparray(ap->a_vp, ap->a_bn, &blkno, ap->a_runp, ap->a_runb); + *ap->a_bnp = blkno; return (error); } @@ -99,8 +101,8 @@ ext2_bmap(ap) int ext2_bmaparray(vp, bn, bnp, runp, runb) struct vnode *vp; - daddr_t bn; - daddr_t *bnp; + int32_t bn; + int32_t *bnp; int *runp; int *runb; { @@ -110,8 +112,8 @@ ext2_bmaparray(vp, bn, bnp, runp, runb) struct mount *mp; struct vnode *devvp; struct indir a[NIADDR+1], *ap; - daddr_t daddr; - daddr_t metalbn; + int32_t daddr; + long metalbn; int error, num, maxrun = 0, bsize; int *nump; @@ -145,7 +147,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb) if (*bnp == 0) { *bnp = -1; } else if (runp) { - daddr_t bnb = bn; + int32_t bnb = bn; for (++bn; bn < NDADDR && *runp < maxrun && is_sequential(ump, ip->i_db[bn - 1], ip->i_db[bn]); ++bn, ++*runp); Modified: stable/9/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_extern.h Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/sys/fs/ext2fs/ext2_extern.h Thu Oct 4 09:53:59 2012 (r241193) @@ -54,7 +54,7 @@ int ext2_blkatoff(struct vnode *, off_t, void ext2_blkfree(struct inode *, int32_t, long); int32_t ext2_blkpref(struct inode *, int32_t, int, int32_t *, int32_t); int ext2_bmap(struct vop_bmap_args *); -int ext2_bmaparray(struct vnode *, daddr_t, daddr_t *, int *, int *); +int ext2_bmaparray(struct vnode *, int32_t, int32_t *, int *, int *); void ext2_clusteracct(struct m_ext2fs *, char *, int, daddr_t, int); void ext2_dirbad(struct inode *ip, doff_t offset, char *how); void ext2_ei2i(struct ext2fs_dinode *, struct inode *); Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Thu Oct 4 09:53:59 2012 (r241193) @@ -1429,28 +1429,29 @@ ext2_strategy(ap) struct vnode *vp = ap->a_vp; struct inode *ip; struct bufobj *bo; + int32_t blkno; int error; ip = VTOI(vp); if (vp->v_type == VBLK || vp->v_type == VCHR) panic("ext2_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { - error = ext2_bmaparray(vp, bp->b_lblkno, &bp->b_blkno, NULL, NULL); + error = ext2_bmaparray(vp, bp->b_lblkno, &blkno, NULL, NULL); + bp->b_blkno = blkno; if (error) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return (0); } - if (bp->b_blkno == -1) + if ((long)bp->b_blkno == -1) vfs_bio_clrbuf(bp); } - if (bp->b_blkno == -1) { + if ((long)bp->b_blkno == -1) { bufdone(bp); return (0); } bp->b_iooffset = dbtob(bp->b_blkno); - printf("%s: bp->b_iooffset %lld, bp->b_blkno %lld\n", __func__, (long long) bp->b_iooffset, (long long) bp->b_blkno); bo = VFSTOEXT2(vp->v_mount)->um_bo; BO_STRATEGY(bo, bp); return (0); @@ -1751,7 +1752,6 @@ ext2_read(ap) if (bytesinfile < xfersize) xfersize = bytesinfile; - printf("%s: lbn %lld\n", __func__, (long long) lbn); if (lblktosize(fs, nextlbn) >= ip->i_size) error = bread(vp, lbn, size, NOCRED, &bp); else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Thu Oct 4 09:49:53 2012 (r241192) +++ stable/9/usr.bin/grep/util.c Thu Oct 4 09:53:59 2012 (r241193) @@ -336,6 +336,10 @@ procline(struct str *l, int nottext) break; } + /* One pass if we are not recording matches */ + if ((color == NULL && !oflag) || qflag || lflag) + break; + if (st == (size_t)pmatch.rm_so) break; /* No matches */ } From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 12:43:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08B3310656C8; Thu, 4 Oct 2012 12:43:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5D558FC12; Thu, 4 Oct 2012 12:43:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94ChjJh055472; Thu, 4 Oct 2012 12:43:45 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94ChjmO055465; Thu, 4 Oct 2012 12:43:45 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210041243.q94ChjmO055465@svn.freebsd.org> From: Rick Macklem Date: Thu, 4 Oct 2012 12:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241194 - in stable/9/sys/fs: nfs nfsclient nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 12:43:46 -0000 Author: rmacklem Date: Thu Oct 4 12:43:45 2012 New Revision: 241194 URL: http://svn.freebsd.org/changeset/base/241194 Log: MFC: r240720 Modify the NFSv4 client so that it can handle owner and owner_group strings that consist entirely of digits, interpreting them as the uid/gid number. This change was needed since new (>= 3.3) Linux servers reply with these strings by default. This change is mandated by the rfc3530bis draft. Reported on freebsd-stable@ under the Subject heading "Problem with Linux >= 3.3 as NFSv4 server" by Norbert Aschendorff on Aug. 20, 2012. Modified: stable/9/sys/fs/nfs/nfs.h stable/9/sys/fs/nfs/nfs_commonacl.c stable/9/sys/fs/nfs/nfs_commonsubs.c stable/9/sys/fs/nfs/nfs_var.h stable/9/sys/fs/nfsclient/nfs_clcomsubs.c stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/fs/nfs/nfs.h ============================================================================== --- stable/9/sys/fs/nfs/nfs.h Thu Oct 4 09:53:59 2012 (r241193) +++ stable/9/sys/fs/nfs/nfs.h Thu Oct 4 12:43:45 2012 (r241194) @@ -559,6 +559,7 @@ struct nfsrv_descript { #define ND_EXGSSINTEGRITY 0x00200000 #define ND_EXGSSPRIVACY 0x00400000 #define ND_INCRSEQID 0x00800000 +#define ND_NFSCL 0x01000000 /* * ND_GSS should be the "or" of all GSS type authentications. Modified: stable/9/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonacl.c Thu Oct 4 09:53:59 2012 (r241193) +++ stable/9/sys/fs/nfs/nfs_commonacl.c Thu Oct 4 12:43:45 2012 (r241194) @@ -101,12 +101,12 @@ nfsrv_dissectace(struct nfsrv_descript * if (gotid == 0) { if (flag & NFSV4ACE_IDENTIFIERGROUP) { acep->ae_tag = ACL_GROUP; - aceerr = nfsv4_strtogid(name, len, &gid, p); + aceerr = nfsv4_strtogid(nd, name, len, &gid, p); if (aceerr == 0) acep->ae_id = (uid_t)gid; } else { acep->ae_tag = ACL_USER; - aceerr = nfsv4_strtouid(name, len, &uid, p); + aceerr = nfsv4_strtouid(nd, name, len, &uid, p); if (aceerr == 0) acep->ae_id = uid; } Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonsubs.c Thu Oct 4 09:53:59 2012 (r241193) +++ stable/9/sys/fs/nfs/nfs_commonsubs.c Thu Oct 4 12:43:45 2012 (r241194) @@ -1401,12 +1401,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtouid(cp, j, &uid, p) || + if (nfsv4_strtouid(nd, cp, j, &uid, p) || nap->na_uid != uid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtouid(cp, j, &uid, p)) + if (nfsv4_strtouid(nd, cp, j, &uid, p)) nap->na_uid = nfsrv_defaultuid; else nap->na_uid = uid; @@ -1434,12 +1434,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtogid(cp, j, &gid, p) || + if (nfsv4_strtogid(nd, cp, j, &gid, p) || nap->na_gid != gid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtogid(cp, j, &gid, p)) + if (nfsv4_strtogid(nd, cp, j, &gid, p)) nap->na_gid = nfsrv_defaultgid; else nap->na_gid = gid; @@ -2594,27 +2594,41 @@ tryagain: * Convert a string to a uid. * If no conversion is possible return NFSERR_BADOWNER, otherwise * return 0. + * If this is called from a client side mount using AUTH_SYS and the + * string is made up entirely of digits, just convert the string to + * a number. */ APPLESTATIC int -nfsv4_strtouid(u_char *str, int len, uid_t *uidp, NFSPROC_T *p) +nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp, + NFSPROC_T *p) { int i; - u_char *cp; + char *cp, *endstr, *str0; struct nfsusrgrp *usrp; int cnt, ret; int error = 0; + uid_t tuid; if (len == 0) { error = NFSERR_BADOWNER; goto out; } + /* If a string of digits and an AUTH_SYS mount, just convert it. */ + str0 = str; + tuid = (uid_t)strtoul(str0, &endstr, 10); + if ((endstr - str0) == len && + (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { + *uidp = tuid; + goto out; + } /* * Look for an '@'. */ - cp = str; - for (i = 0; i < len; i++) - if (*cp++ == '@') - break; + cp = strchr(str0, '@'); + if (cp != NULL) + i = (int)(cp++ - str0); + else + i = len; cnt = 0; tryagain: @@ -2783,27 +2797,43 @@ tryagain: /* * Convert a string to a gid. + * If no conversion is possible return NFSERR_BADOWNER, otherwise + * return 0. + * If this is called from a client side mount using AUTH_SYS and the + * string is made up entirely of digits, just convert the string to + * a number. */ APPLESTATIC int -nfsv4_strtogid(u_char *str, int len, gid_t *gidp, NFSPROC_T *p) +nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp, + NFSPROC_T *p) { int i; - u_char *cp; + char *cp, *endstr, *str0; struct nfsusrgrp *usrp; int cnt, ret; int error = 0; + gid_t tgid; if (len == 0) { error = NFSERR_BADOWNER; goto out; } + /* If a string of digits and an AUTH_SYS mount, just convert it. */ + str0 = str; + tgid = (gid_t)strtoul(str0, &endstr, 10); + if ((endstr - str0) == len && + (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { + *gidp = tgid; + goto out; + } /* * Look for an '@'. */ - cp = str; - for (i = 0; i < len; i++) - if (*cp++ == '@') - break; + cp = strchr(str0, '@'); + if (cp != NULL) + i = (int)(cp++ - str0); + else + i = len; cnt = 0; tryagain: Modified: stable/9/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/9/sys/fs/nfs/nfs_var.h Thu Oct 4 09:53:59 2012 (r241193) +++ stable/9/sys/fs/nfs/nfs_var.h Thu Oct 4 12:43:45 2012 (r241194) @@ -295,9 +295,11 @@ void nfsrv_adj(mbuf_t, int, int); void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *); int nfsd_errmap(struct nfsrv_descript *); void nfsv4_uidtostr(uid_t, u_char **, int *, NFSPROC_T *); -int nfsv4_strtouid(u_char *, int, uid_t *, NFSPROC_T *); +int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *, + NFSPROC_T *); void nfsv4_gidtostr(gid_t, u_char **, int *, NFSPROC_T *); -int nfsv4_strtogid(u_char *, int, gid_t *, NFSPROC_T *); +int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *, + NFSPROC_T *); int nfsrv_checkuidgid(struct nfsrv_descript *, struct nfsvattr *); void nfsrv_fixattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, NFSACL_T *, NFSPROC_T *, nfsattrbit_t *, Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Thu Oct 4 09:53:59 2012 (r241193) +++ stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Thu Oct 4 12:43:45 2012 (r241194) @@ -126,11 +126,11 @@ nfscl_reqstart(struct nfsrv_descript *nd * First, fill in some of the fields of nd. */ if (NFSHASNFSV4(nmp)) - nd->nd_flag = ND_NFSV4; + nd->nd_flag = ND_NFSV4 | ND_NFSCL; else if (NFSHASNFSV3(nmp)) - nd->nd_flag = ND_NFSV3; + nd->nd_flag = ND_NFSV3 | ND_NFSCL; else - nd->nd_flag = ND_NFSV2; + nd->nd_flag = ND_NFSV2 | ND_NFSCL; nd->nd_procnum = procnum; nd->nd_repstat = 0; Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Oct 4 09:53:59 2012 (r241193) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Oct 4 12:43:45 2012 (r241194) @@ -2438,7 +2438,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, s goto nfsmout; } if (!nd->nd_repstat) { - nd->nd_repstat = nfsv4_strtouid(cp,j,&uid,p); + nd->nd_repstat = nfsv4_strtouid(nd, cp, j, &uid, + p); if (!nd->nd_repstat) nvap->na_uid = uid; } @@ -2464,7 +2465,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, s goto nfsmout; } if (!nd->nd_repstat) { - nd->nd_repstat = nfsv4_strtogid(cp,j,&gid,p); + nd->nd_repstat = nfsv4_strtogid(nd, cp, j, &gid, + p); if (!nd->nd_repstat) nvap->na_gid = gid; } From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 15:42:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50338106566B; Thu, 4 Oct 2012 15:42:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 398128FC08; Thu, 4 Oct 2012 15:42:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94FgkDS079114; Thu, 4 Oct 2012 15:42:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94FgkLs079111; Thu, 4 Oct 2012 15:42:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210041542.q94FgkLs079111@svn.freebsd.org> From: Adrian Chadd Date: Thu, 4 Oct 2012 15:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241195 - in head/sys/dev/ath/ath_hal: ar5416 ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 15:42:46 -0000 Author: adrian Date: Thu Oct 4 15:42:45 2012 New Revision: 241195 URL: http://svn.freebsd.org/changeset/base/241195 Log: Implement the quarter rate fractional channel programming for the AR5416 and AR9280, but leave it disabled by default. TL;DR: don't enable this code at all unless you go through the process of getting the NIC re-certified. This is purely to be used as a reference and NOT a certified solution by any stretch of the imagination. The background: The AR5112 RF synth right up to the AR5133 RF synth (used on the AR5416, derivative is used for the AR9130/AR9160) only implement down to 2.5MHz channel spacing in 5GHz. Ie, the RF synth is programmed in steps of 2.5MHz (or 5, 10, 20MHz.) So they can't represent the quarter rate channels in the 4.9GHz PSB (which end in xxx2MHz and xxx7MHz). They support fractional spacing in 2GHz (1MHz spacing) (or things wouldn't work, right?) So instead of doing this, the RF synth programming for the AR5112 and later code will round to the nearest available frequency. If all NICs were RF5112 or later, they'll inter-operate fine - they all program the same. (And for reference, only the latest revision of the RF5111 NICs do it, but the driver doesn't yet implement the programming.) However: * The AR5416 programming didn't at all implement the fractional synth work around as above; * The AR9280 programming actually programmed the accurate centre frequency and thus wouldn't inter-operate with the legacy NICs. So this patch: * Implements the 4.9GHz PSB fractional synth workaround, exactly as the RF5112 and later code does; * Adds a very dirty workaround from me to calculate the same channel centre "fudge" to the AR9280 code when operating on fractional frequencies in 5GHz. HOWEVER however: It is disabled by default. Since the HAL didn't implement this feature, it's highly unlikely that the AR5416 and AR928x has been tested in these centre frequencies. There's a lot of regulatory compliance testing required before a NIC can have this enabled - checking for centre frequency, for drift, for synth spurs, for distortion and spectral mask compliance. There's likely a lot of other things that need testing so please don't treat this as an exhaustive, authoritative list. There's a perfectly good process out there to get a NIC certified by your regulatory domain, please go and engage someone to do that for you and pay the relevant fees. If a company wishes to grab this work and certify existing 802.11n NICs for work in these bands then please be my guest. The AR9280 works fine on the correct fractional synth channels (49x2 and 49x7Mhz) so you don't need to get certification for that. But the 500KHz offset hack may have the above issues (spur, distortion, accuracy, etc) so you will need to get the NIC recertified. Please note that it's also CARD dependent. Just because the RF synth will behave correctly doesn't at all mean that the card design will also behave correctly. So no, I won't enable this by default if someone verifies a specific AR5416/AR9280 NIC works. Please don't ask. Tested: I used the following NICs to do basic interoperability testing at half and quarter rates. However, I only did very minimal spectrum analyser testing (mostly "am I about to blow things up" testing; not "certification ready" testing): * AR5212 + AR5112 synth * AR5413 + AR5413 synth * AR5416 + AR5113 synth * AR9280 Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c head/sys/dev/ath/ath_hal/ar9002/ar9280.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar2133.c Thu Oct 4 12:43:45 2012 (r241194) +++ head/sys/dev/ath/ath_hal/ar5416/ar2133.c Thu Oct 4 15:42:45 2012 (r241195) @@ -163,6 +163,33 @@ ar2133SetChannel(struct ath_hal *ah, con OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, txctl &~ AR_PHY_CCK_TX_CTRL_JAPAN); } + /* + * Handle programming the RF synth for odd frequencies in the + * 4.9->5GHz range. This matches the programming from the + * later model 802.11abg RF synths. + * + * This interoperates on the quarter rate channels with the + * AR5112 and later RF synths. Please note that the synthesiser + * isn't able to completely accurately represent these frequencies + * (as the resolution in this reference is 2.5MHz) and thus it will + * be slightly "off centre." This matches the same slightly + * incorrect * centre frequency behaviour that the AR5112 and later + * channel selection code has. + * + * This is disabled because it hasn't been tested for regulatory + * compliance and neither have the NICs which would use it. + * So if you enable this code, you must first ensure that you've + * re-certified the NICs in question beforehand or you will be + * violating your local regulatory rules and breaking the law. + */ +#if 0 + } else if (((freq % 5) == 2) && (freq <= 5435)) { + freq = freq - 2; + channelSel = ath_hal_reverseBits( + (uint32_t) (((freq - 4800) * 10) / 25 + 1), 8); + /* XXX what about for Howl/Sowl? */ + aModeRefSel = ath_hal_reverseBits(0, 2); +#endif } else if ((freq % 20) == 0 && freq >= 5120) { channelSel = ath_hal_reverseBits(((freq - 4800) / 20 << 2), 8); if (AR_SREV_HOWL(ah) || AR_SREV_SOWL_10_OR_LATER(ah)) @@ -179,7 +206,8 @@ ar2133SetChannel(struct ath_hal *ah, con channelSel = ath_hal_reverseBits((freq - 4800) / 5, 8); aModeRefSel = ath_hal_reverseBits(1, 2); } else { - HALDEBUG(ah, HAL_DEBUG_ANY, "%s: invalid channel %u MHz\n", + HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, + "%s: invalid channel %u MHz\n", __func__, freq); return AH_FALSE; } Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280.c Thu Oct 4 12:43:45 2012 (r241194) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280.c Thu Oct 4 15:42:45 2012 (r241195) @@ -132,9 +132,63 @@ ar9280SetChannel(struct ath_hal *ah, con default: aModeRefSel = 0; /* Enable 2G (fractional) mode for channels which are 5MHz spaced */ - fracMode = 1; - refDivA = 1; - channelSel = (freq * 0x8000)/15; + + /* + * Workaround for talking on PSB non-5MHz channels; + * the pre-Merlin chips only had a 2.5MHz channel + * spacing so some channels aren't reachable. + + * + * This interoperates on the quarter rate channels + * with the AR5112 and later RF synths. Please note + * that the synthesiser isn't able to completely + * accurately represent these frequencies (as the + * resolution in this reference is 2.5MHz) and thus + * it will be slightly "off centre." This matches + * the same slightly incorrect centre frequency + * behaviour that the AR5112 and later channel + * selection code has. + * + * This also interoperates with the AR5416 + * synthesiser modification for programming + * fractional frequencies in 5GHz mode. However + * that modification is also disabled by default. + * + * This is disabled because it hasn't been tested for + * regulatory compliance and neither have the NICs + * which would use it. So if you enable this code, + * you must first ensure that you've re-certified the + * NICs in question beforehand or you will be + * violating your local regulatory rules and breaking + * the law. + */ +#if 0 + if (freq % 5 == 0) { +#endif + /* Normal */ + fracMode = 1; + refDivA = 1; + channelSel = (freq * 0x8000)/15; +#if 0 + } else { + /* Offset by 500KHz */ + uint32_t f, ch, ch2; + + fracMode = 1; + refDivA = 1; + + /* Calculate the "adjusted" frequency */ + f = freq - 2; + ch = (((f - 4800) * 10) / 25) + 1; + + ch2 = ((ch * 25) / 5) + 9600; + channelSel = (ch2 * 0x4000) / 15; + //ath_hal_printf(ah, + // "%s: freq=%d, ch=%d, ch2=%d, " + // "channelSel=%d\n", + // __func__, freq, ch, ch2, channelSel); + } +#endif /* RefDivA setting */ OS_A_REG_RMW_FIELD(ah, AR_AN_SYNTH9, From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 18:59:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E78991065672; Thu, 4 Oct 2012 18:59:46 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D19D08FC0A; Thu, 4 Oct 2012 18:59:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94IxkdE007217; Thu, 4 Oct 2012 18:59:46 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94IxkKj007214; Thu, 4 Oct 2012 18:59:46 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201210041859.q94IxkKj007214@svn.freebsd.org> From: Jamie Gritton Date: Thu, 4 Oct 2012 18:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241196 - head/usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 18:59:47 -0000 Author: jamie Date: Thu Oct 4 18:59:46 2012 New Revision: 241196 URL: http://svn.freebsd.org/changeset/base/241196 Log: Move properly to the next parameter when jailparam_init fails (i.e. on an unknown parameter), to avoid freeing bogus pointers. Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Thu Oct 4 15:42:45 2012 (r241195) +++ head/usr.sbin/jail/config.c Thu Oct 4 18:59:46 2012 (r241196) @@ -690,6 +690,7 @@ import_params(struct cfjail *j) if (jailparam_init(jp, p->name) < 0) { error = -1; jail_warnx(j, "%s", jail_errmsg); + jp++; continue; } if (TAILQ_EMPTY(&p->val)) From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 19:07:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A672B106566C; Thu, 4 Oct 2012 19:07:06 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7761D8FC12; Thu, 4 Oct 2012 19:07:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94J76MV008261; Thu, 4 Oct 2012 19:07:06 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94J76GC008259; Thu, 4 Oct 2012 19:07:06 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201210041907.q94J76GC008259@svn.freebsd.org> From: Jamie Gritton Date: Thu, 4 Oct 2012 19:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241197 - head/lib/libjail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 19:07:06 -0000 Author: jamie Date: Thu Oct 4 19:07:05 2012 New Revision: 241197 URL: http://svn.freebsd.org/changeset/base/241197 Log: Fix some memory allocation errors: * jail_setv will leak a parameter name if jailparam_import fails. * jailparam_all loses the jailparam pointer on realloc error (a clear freshman mistake). * If jailparam_init fails, the caller doesn't need to jailparam_free the buffer. That's not really clear, so set things to NULL allowing jailparam_free to work without error (though it's still not required). Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Thu Oct 4 18:59:46 2012 (r241196) +++ head/lib/libjail/jail.c Thu Oct 4 19:07:05 2012 (r241197) @@ -85,19 +85,22 @@ jail_setv(int flags, ...) (void)va_arg(tap, char *); va_end(tap); jp = alloca(njp * sizeof(struct jailparam)); - for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { + for (njp = 0; (name = va_arg(ap, char *)) != NULL;) { value = va_arg(ap, char *); - if (jailparam_init(jp + njp, name) < 0 || - jailparam_import(jp + njp, value) < 0) { - jailparam_free(jp, njp); - va_end(ap); - return (-1); - } + if (jailparam_init(jp + njp, name) < 0) + goto error; + if (jailparam_import(jp + njp++, value) < 0) + goto error; } va_end(ap); jid = jailparam_set(jp, njp, flags); jailparam_free(jp, njp); return (jid); + + error: + jailparam_free(jp, njp); + va_end(ap); + return (-1); } /* @@ -195,7 +198,7 @@ jail_getv(int flags, ...) int jailparam_all(struct jailparam **jpp) { - struct jailparam *jp; + struct jailparam *jp, *tjp; size_t mlen1, mlen2, buflen; int njp, nlist; int mib1[CTL_MAXNAME], mib2[CTL_MAXNAME - 2]; @@ -242,11 +245,10 @@ jailparam_all(struct jailparam **jpp) /* Add the parameter to the list */ if (njp >= nlist) { nlist *= 2; - jp = realloc(jp, nlist * sizeof(*jp)); - if (jp == NULL) { - jailparam_free(jp, njp); - return (-1); - } + tjp = realloc(jp, nlist * sizeof(*jp)); + if (tjp == NULL) + goto error; + jp = tjp; } if (jailparam_init(jp + njp, buf + sizeof(SJPARAM)) < 0) goto error; @@ -277,6 +279,8 @@ jailparam_init(struct jailparam *jp, con } if (jailparam_type(jp) < 0) { jailparam_free(jp, 1); + jp->jp_name = NULL; + jp->jp_value = NULL; return (-1); } return (0); From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 20:00:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCBFA106566B; Thu, 4 Oct 2012 20:00:32 +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 9EFC78FC0A; Thu, 4 Oct 2012 20:00:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94K0WOW015666; Thu, 4 Oct 2012 20:00:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94K0W7b015664; Thu, 4 Oct 2012 20:00:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210042000.q94K0W7b015664@svn.freebsd.org> From: John Baldwin Date: Thu, 4 Oct 2012 20:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241198 - head/usr.sbin/acpi/acpidump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 20:00:32 -0000 Author: jhb Date: Thu Oct 4 20:00:32 2012 New Revision: 241198 URL: http://svn.freebsd.org/changeset/base/241198 Log: Display the matrix of inter-domain distances in the SLIT table. This is used to complement the SRAT table on NUMA machines. MFC after: 1 week Modified: head/usr.sbin/acpi/acpidump/acpi.c Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Thu Oct 4 19:07:05 2012 (r241197) +++ head/usr.sbin/acpi/acpidump/acpi.c Thu Oct 4 20:00:32 2012 (r241198) @@ -63,6 +63,7 @@ static void acpi_handle_madt(ACPI_TABLE_ static void acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp); static void acpi_handle_hpet(ACPI_TABLE_HEADER *sdp); static void acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp); +static void acpi_handle_slit(ACPI_TABLE_HEADER *sdp); static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags); static void acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp); @@ -519,6 +520,33 @@ acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp) } static void +acpi_handle_slit(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_SLIT *slit; + UINT64 i, j; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + slit = (ACPI_TABLE_SLIT *)sdp; + printf("\tLocality Count=%jd\n", slit->LocalityCount); + printf("\n\t "); + for (i = 0; i < slit->LocalityCount; i++) + printf(" %3jd", i); + printf("\n\t +"); + for (i = 0; i < slit->LocalityCount; i++) + printf("----"); + printf("\n"); + for (i = 0; i < slit->LocalityCount; i++) { + printf("\t %3jd |", i); + for (j = 0; j < slit->LocalityCount; j++) + printf(" %3d", + slit->Entry[i * slit->LocalityCount + j]); + printf("\n"); + } + printf(END_COMMENT); +} + +static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags) { @@ -1092,6 +1120,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp acpi_handle_ecdt(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_MCFG, 4)) acpi_handle_mcfg(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_SLIT, 4)) + acpi_handle_slit(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_SRAT, 4)) acpi_handle_srat(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_TCPA, 4)) From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 21:07:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F665106564A; Thu, 4 Oct 2012 21:07:57 +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 083828FC0C; Thu, 4 Oct 2012 21:07:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94L7uRc024215; Thu, 4 Oct 2012 21:07:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94L7uV4024206; Thu, 4 Oct 2012 21:07:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210042107.q94L7uV4024206@svn.freebsd.org> From: Xin LI Date: Thu, 4 Oct 2012 21:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241199 - in vendor/libpcap/dist: . Win32/Src doc net packaging pcap test tests X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 21:07:57 -0000 Author: delphij Date: Thu Oct 4 21:07:56 2012 New Revision: 241199 URL: http://svn.freebsd.org/changeset/base/241199 Log: Vendor import of libpcap 1.3.0. Added: vendor/libpcap/dist/pcap-canusb-linux.c vendor/libpcap/dist/pcap-canusb-linux.h vendor/libpcap/dist/tests/ - copied from r241197, vendor/libpcap/dist/test/ Deleted: vendor/libpcap/dist/doc/ vendor/libpcap/dist/net/ vendor/libpcap/dist/test/ Modified: vendor/libpcap/dist/CHANGES vendor/libpcap/dist/CREDITS vendor/libpcap/dist/Makefile.in vendor/libpcap/dist/VERSION vendor/libpcap/dist/Win32/Src/gai_strerror.c vendor/libpcap/dist/config.h.in vendor/libpcap/dist/configure vendor/libpcap/dist/configure.in vendor/libpcap/dist/gencode.c vendor/libpcap/dist/gencode.h vendor/libpcap/dist/optimize.c vendor/libpcap/dist/packaging/pcap.spec.in vendor/libpcap/dist/pcap-bpf.c vendor/libpcap/dist/pcap-common.c vendor/libpcap/dist/pcap-linux.c vendor/libpcap/dist/pcap-netfilter-linux.c vendor/libpcap/dist/pcap.c vendor/libpcap/dist/pcap/bpf.h Modified: vendor/libpcap/dist/CHANGES ============================================================================== --- vendor/libpcap/dist/CHANGES Thu Oct 4 20:00:32 2012 (r241198) +++ vendor/libpcap/dist/CHANGES Thu Oct 4 21:07:56 2012 (r241199) @@ -1,3 +1,22 @@ +Friday March 30, 2012. mcr@sandelman.ca +Summary for 1.3.0 libpcap release + Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}. + Linux: Don't fail if netfilter isn't enabled in the kernel. + Add new link-layer type for NFC Forum LLCP. + Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball. + Add LINKTYPE_NG40/DLT_NG40. + Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams. + [PATCH] Fix AIX-3.5 crash with read failure during stress + AIX fixes. + Introduce --disable-shared configure option. + Added initial support for canusb devices. + Include the pcap(3PCAP) additions as 1.2.1 changes. + many updates to documentation: pcap.3pcap.in + Improve 'inbound'/'outbound' capture filters under Linux. + Note the cleanup of handling of new DLT_/LINKTYPE_ values. + On Lion, don't build for PPC. + For mac80211 devices we need to clean up monitor mode on exit. + Friday December 9, 2011. guy@alum.mit.edu. Summary for 1.2.1 libpcap release Update README file. Modified: vendor/libpcap/dist/CREDITS ============================================================================== --- vendor/libpcap/dist/CREDITS Thu Oct 4 20:00:32 2012 (r241198) +++ vendor/libpcap/dist/CREDITS Thu Oct 4 21:07:56 2012 (r241199) @@ -34,6 +34,7 @@ Additional people who have contributed p David Kaelbling David Young Dean Gaudet + dhruv Don Ebright Dug Song Dustin Spicuzza Modified: vendor/libpcap/dist/Makefile.in ============================================================================== --- vendor/libpcap/dist/Makefile.in Thu Oct 4 20:00:32 2012 (r241198) +++ vendor/libpcap/dist/Makefile.in Thu Oct 4 21:07:56 2012 (r241199) @@ -82,7 +82,7 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -289,6 +289,8 @@ EXTRA_DIST = \ pcap-bt-linux.h \ pcap-can-linux.c \ pcap-can-linux.h \ + pcap-canusb-linux.c \ + pcap-canusb-linux.h \ pcap-config.in \ pcap-dag.c \ pcap-dag.h \ Modified: vendor/libpcap/dist/VERSION ============================================================================== --- vendor/libpcap/dist/VERSION Thu Oct 4 20:00:32 2012 (r241198) +++ vendor/libpcap/dist/VERSION Thu Oct 4 21:07:56 2012 (r241199) @@ -1 +1 @@ -1.2.1 +1.3.0 Modified: vendor/libpcap/dist/Win32/Src/gai_strerror.c ============================================================================== --- vendor/libpcap/dist/Win32/Src/gai_strerror.c Thu Oct 4 20:00:32 2012 (r241198) +++ vendor/libpcap/dist/Win32/Src/gai_strerror.c Thu Oct 4 21:07:56 2012 (r241199) @@ -80,4 +80,4 @@ WSAAPI gai_strerrorA(int ecode) return "Unknown error"; } -#endif /* gai_strerror */ +#endif /* gai_strerror */ \ No newline at end of file Modified: vendor/libpcap/dist/config.h.in ============================================================================== --- vendor/libpcap/dist/config.h.in Thu Oct 4 20:00:32 2012 (r241198) +++ vendor/libpcap/dist/config.h.in Thu Oct 4 21:07:56 2012 (r241199) @@ -232,6 +232,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -244,6 +247,9 @@ /* target host supports CAN sniffing */ #undef PCAP_SUPPORT_CAN +/* target host supports canusb */ +#undef PCAP_SUPPORT_CANUSB + /* target host supports netfilter sniffing */ #undef PCAP_SUPPORT_NETFILTER Modified: vendor/libpcap/dist/configure ============================================================================== --- vendor/libpcap/dist/configure Thu Oct 4 20:00:32 2012 (r241198) +++ vendor/libpcap/dist/configure Thu Oct 4 21:07:56 2012 (r241199) @@ -1,61 +1,84 @@ #! /bin/sh # From configure.in Revision: 1.168 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.67. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -64,20 +87,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -88,354 +109,321 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi -if ( set x; as_func_ret_success y && test x = "$1" ); then - : +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -if as_func_ret_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_ret_success failed. + as_expr=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -452,8 +440,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -463,49 +450,40 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -513,7 +491,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -530,12 +508,12 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -549,11 +527,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -568,7 +546,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -576,6 +553,7 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="pcap.c" # Factoring default headers for most tests. @@ -614,100 +592,128 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 21:08:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5F2E1065700; Thu, 4 Oct 2012 21:08:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7B2818FC12; Thu, 4 Oct 2012 21:08:32 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E19CFB972; Thu, 4 Oct 2012 17:08:31 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Thu, 4 Oct 2012 17:05:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210042000.q94K0W7b015664@svn.freebsd.org> In-Reply-To: <201210042000.q94K0W7b015664@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210041705.49131.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 04 Oct 2012 17:08:32 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r241198 - head/usr.sbin/acpi/acpidump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 21:08:32 -0000 On Thursday, October 04, 2012 4:00:32 pm John Baldwin wrote: > Author: jhb > Date: Thu Oct 4 20:00:32 2012 > New Revision: 241198 > URL: http://svn.freebsd.org/changeset/base/241198 > > Log: > Display the matrix of inter-domain distances in the SLIT table. This is > used to complement the SRAT table on NUMA machines. A very simplistic example from a dual-socket Sandy-Bridge EP (I don't have a quad-socket box handy): /* SLIT: Length=48, Revision=1, Checksum=228, OEMID=A M I, OEM Table ID=AMI SLIT, OEM Revision=0x0, Creator ID=AMI., Creator Revision=0x0 Locality Count=2 0 1 +-------- 0 | 10 21 1 | 21 10 */ -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 21:08:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BA861065804; Thu, 4 Oct 2012 21:08:47 +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 6C94A8FC0C; Thu, 4 Oct 2012 21:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94L8lLp024366; Thu, 4 Oct 2012 21:08:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94L8lXl024365; Thu, 4 Oct 2012 21:08:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210042108.q94L8lXl024365@svn.freebsd.org> From: Xin LI Date: Thu, 4 Oct 2012 21:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241200 - vendor/libpcap/1.3.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 21:08:47 -0000 Author: delphij Date: Thu Oct 4 21:08:46 2012 New Revision: 241200 URL: http://svn.freebsd.org/changeset/base/241200 Log: Tag libpcap 1.3.0. Added: vendor/libpcap/1.3.0/ - copied from r241199, vendor/libpcap/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 21:55:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9C34106566C; Thu, 4 Oct 2012 21:55:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 997CE8FC0A; Thu, 4 Oct 2012 21:55:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94LtcXn030623; Thu, 4 Oct 2012 21:55:38 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94LtcvO030619; Thu, 4 Oct 2012 21:55:38 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210042155.q94LtcvO030619@svn.freebsd.org> From: Rick Macklem Date: Thu, 4 Oct 2012 21:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241201 - in stable/8/sys/fs: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 21:55:38 -0000 Author: rmacklem Date: Thu Oct 4 21:55:37 2012 New Revision: 241201 URL: http://svn.freebsd.org/changeset/base/241201 Log: MFC: r240289 Add a simple printf() based debug facility to the new nfs client. Use it for a printf() that can be harmlessly generated for mmap()'d files. It will be used extensively for the NFSv4.1 client. Debugging printf()s are enabled by setting vfs.nfs.debuglevel to a non-zero value. The higher the value, the more debugging printf()s. Modified: stable/8/sys/fs/nfs/nfs_commonport.c stable/8/sys/fs/nfs/nfscl.h stable/8/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonport.c Thu Oct 4 21:08:46 2012 (r241200) +++ stable/8/sys/fs/nfs/nfs_commonport.c Thu Oct 4 21:55:37 2012 (r241201) @@ -61,6 +61,7 @@ struct mount nfsv4root_mnt; int newnfs_numnfsd = 0; struct nfsstats newnfsstats; int nfs_numnfscbd = 0; +int nfscl_debuglevel = 0; char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; struct callout newnfsd_callout; void (*nfsd_call_servertimer)(void) = NULL; @@ -79,6 +80,8 @@ SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs4ac SYSCTL_STRING(_vfs_newnfs, OID_AUTO, callback_addr, CTLFLAG_RW, nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), "NFSv4 callback addr for server to use"); +SYSCTL_INT(_vfs_newnfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nfscl_debuglevel, + 0, "Debug level for new nfs client"); /* * Defines for malloc Modified: stable/8/sys/fs/nfs/nfscl.h ============================================================================== --- stable/8/sys/fs/nfs/nfscl.h Thu Oct 4 21:08:46 2012 (r241200) +++ stable/8/sys/fs/nfs/nfscl.h Thu Oct 4 21:55:37 2012 (r241201) @@ -68,4 +68,10 @@ struct nfsv4node { #define NFSSATTR_SIZENEG1 0x4 #define NFSSATTR_SIZERDEV 0x8 +/* Use this macro for debug printfs. */ +#define NFSCL_DEBUG(level, ...) do { \ + if (nfscl_debuglevel >= (level)) \ + printf(__VA_ARGS__); \ + } while (0) + #endif /* _NFS_NFSCL_H */ Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu Oct 4 21:08:46 2012 (r241200) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu Oct 4 21:55:37 2012 (r241201) @@ -56,6 +56,7 @@ extern u_int32_t newnfs_false, newnfs_tr extern nfstype nfsv34_type[9]; extern int nfsrv_useacl; extern char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; +extern int nfscl_debuglevel; NFSCLSTATEMUTEX; int nfstest_outofseq = 0; int nfscl_assumeposixlocks = 1; @@ -1398,7 +1399,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio if (stateid.other[0] == 0 && stateid.other[1] == 0 && stateid.other[2] == 0) { nostateid = 1; - printf("stateid0 in write\n"); + NFSCL_DEBUG(1, "stateid0 in write\n"); } } From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:16:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 851F4106564A; Thu, 4 Oct 2012 22:16:19 +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 6E9788FC12; Thu, 4 Oct 2012 22:16:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MGJn6033429; Thu, 4 Oct 2012 22:16:19 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MGHE3033427; Thu, 4 Oct 2012 22:16:17 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042216.q94MGHE3033427@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241202 - stable/9/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:16:19 -0000 Author: dougb Date: Thu Oct 4 22:16:17 2012 New Revision: 241202 URL: http://svn.freebsd.org/changeset/base/241202 Log: MFC r238879: Add a couple of nice quotes from Edward Everett Hale Modified: stable/9/games/fortune/datfiles/fortunes Directory Properties: stable/9/games/fortune/ (props changed) Modified: stable/9/games/fortune/datfiles/fortunes ============================================================================== --- stable/9/games/fortune/datfiles/fortunes Thu Oct 4 21:55:37 2012 (r241201) +++ stable/9/games/fortune/datfiles/fortunes Thu Oct 4 22:16:17 2012 (r241202) @@ -22100,6 +22100,11 @@ planet. Tuna, chicken, sparrow-brains, e world that they like, but catnip is crack from home. -- Bill Cole % +I am only one, but I am one. I cannot do everything, but I can do +something. And I will not let what I cannot do interfere with what +I can do. + -- Edward Everett Hale, (1822 - 1909) +% I am professionally trained in computer science, which is to say (in all seriousness) that I am extremely poorly educated. -- Joseph Weizenbaum, "Computer Power and Human Reason" @@ -31413,6 +31418,10 @@ Look ere ye leap. % Look out! Behind you! % +Look up and not down, look forward and not back, look out and not in, +and lend a hand. + -- Edward Everett Hale, "Lowell Institute Lectures" (1869) +% Look, we play the Star Spangled Banner before every game. You want us to pay income taxes, too? -- Bill Veeck, Chicago White Sox From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:16:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F6EE1065893; Thu, 4 Oct 2012 22:16:40 +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 089198FC0A; Thu, 4 Oct 2012 22:16:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MGd5R033570; Thu, 4 Oct 2012 22:16:39 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MGcuD033567; Thu, 4 Oct 2012 22:16:38 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042216.q94MGcuD033567@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241203 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:16:40 -0000 Author: dougb Date: Thu Oct 4 22:16:38 2012 New Revision: 241203 URL: http://svn.freebsd.org/changeset/base/241203 Log: MFC r238879: Add a couple of nice quotes from Edward Everett Hale Modified: stable/8/games/fortune/datfiles/fortunes Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Thu Oct 4 22:16:17 2012 (r241202) +++ stable/8/games/fortune/datfiles/fortunes Thu Oct 4 22:16:38 2012 (r241203) @@ -22100,6 +22100,11 @@ planet. Tuna, chicken, sparrow-brains, e world that they like, but catnip is crack from home. -- Bill Cole % +I am only one, but I am one. I cannot do everything, but I can do +something. And I will not let what I cannot do interfere with what +I can do. + -- Edward Everett Hale, (1822 - 1909) +% I am professionally trained in computer science, which is to say (in all seriousness) that I am extremely poorly educated. -- Joseph Weizenbaum, "Computer Power and Human Reason" @@ -31413,6 +31418,10 @@ Look ere ye leap. % Look out! Behind you! % +Look up and not down, look forward and not back, look out and not in, +and lend a hand. + -- Edward Everett Hale, "Lowell Institute Lectures" (1869) +% Look, we play the Star Spangled Banner before every game. You want us to pay income taxes, too? -- Bill Veeck, Chicago White Sox From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:17:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70CB01065688; Thu, 4 Oct 2012 22:17:00 +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 5AACE8FC18; Thu, 4 Oct 2012 22:17:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MH0gd033647; Thu, 4 Oct 2012 22:17:00 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MGwNc033643; Thu, 4 Oct 2012 22:16:58 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042216.q94MGwNc033643@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:16:58 +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: r241204 - stable/7/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:17:00 -0000 Author: dougb Date: Thu Oct 4 22:16:58 2012 New Revision: 241204 URL: http://svn.freebsd.org/changeset/base/241204 Log: MFC r238879: Add a couple of nice quotes from Edward Everett Hale Modified: stable/7/games/fortune/datfiles/fortunes Directory Properties: stable/7/games/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Thu Oct 4 22:16:38 2012 (r241203) +++ stable/7/games/fortune/datfiles/fortunes Thu Oct 4 22:16:58 2012 (r241204) @@ -22100,6 +22100,11 @@ planet. Tuna, chicken, sparrow-brains, e world that they like, but catnip is crack from home. -- Bill Cole % +I am only one, but I am one. I cannot do everything, but I can do +something. And I will not let what I cannot do interfere with what +I can do. + -- Edward Everett Hale, (1822 - 1909) +% I am professionally trained in computer science, which is to say (in all seriousness) that I am extremely poorly educated. -- Joseph Weizenbaum, "Computer Power and Human Reason" @@ -31413,6 +31418,10 @@ Look ere ye leap. % Look out! Behind you! % +Look up and not down, look forward and not back, look out and not in, +and lend a hand. + -- Edward Everett Hale, "Lowell Institute Lectures" (1869) +% Look, we play the Star Spangled Banner before every game. You want us to pay income taxes, too? -- Bill Veeck, Chicago White Sox From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:23:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C01FB106566C; Thu, 4 Oct 2012 22:23:40 +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 A9AA08FC08; Thu, 4 Oct 2012 22:23:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MNebU034668; Thu, 4 Oct 2012 22:23:40 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MNedd034666; Thu, 4 Oct 2012 22:23:40 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042223.q94MNedd034666@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241205 - stable/9/libexec/save-entropy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:23:41 -0000 Author: dougb Date: Thu Oct 4 22:23:40 2012 New Revision: 241205 URL: http://svn.freebsd.org/changeset/base/241205 Log: MFC r240090: Improve file rotation Modified: stable/9/libexec/save-entropy/save-entropy.sh Directory Properties: stable/9/libexec/save-entropy/ (props changed) Modified: stable/9/libexec/save-entropy/save-entropy.sh ============================================================================== --- stable/9/libexec/save-entropy/save-entropy.sh Thu Oct 4 22:16:58 2012 (r241204) +++ stable/9/libexec/save-entropy/save-entropy.sh Thu Oct 4 22:23:40 2012 (r241205) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2001-2006 Douglas Barton, DougB@FreeBSD.org +# Copyright (c) 2001-2006,2012 Douglas Barton, dougb@FreeBSD.org # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ # This script is called by cron to store bits of randomness which are # then used to seed /dev/random on boot. -# Originally developed by Doug Barton, DougB@FreeBSD.org +# Originally developed by Doug Barton, dougb@FreeBSD.org PATH=/bin:/usr/bin @@ -55,38 +55,36 @@ entropy_save_sz=${entropy_save_sz:-2048} entropy_save_num=${entropy_save_num:-8} if [ ! -d "${entropy_dir}" ]; then - umask 077 - mkdir "${entropy_dir}" || { - logger -is -t "$0" The entropy directory "${entropy_dir}" does not \ -exist, and cannot be created. Therefore no entropy can be saved. ; - exit 1;} - /usr/sbin/chown operator:operator "${entropy_dir}" - chmod 0700 "${entropy_dir}" + install -d -o operator -g operator -m 0700 "${entropy_dir}" || { + logger -is -t "$0" The entropy directory "${entropy_dir}" does \ + not exist, and cannot be created. Therefore no entropy can \ + be saved.; exit 1; } fi +cd "${entropy_dir}" || { + logger -is -t "$0" Cannot cd to the entropy directory: "${entropy_dir}". \ + Entropy file rotation is aborted.; exit 1; } + +for f in saved-entropy.*; do + case "${f}" in saved-entropy.\*) continue ;; esac # No files match + [ ${f#saved-entropy\.} -ge ${entropy_save_num} ] && unlink ${f} +done + umask 377 -esn_m1=$(( ${entropy_save_num} - 1 )) -for file_num in `jot $esn_m1 $esn_m1 1`; do - if [ -e "${entropy_dir}/saved-entropy.${file_num}" ]; then - if [ -f "${entropy_dir}/saved-entropy.${file_num}" ]; then - new_file=saved-entropy.$(( $file_num + 1 )) - if [ -e "${entropy_dir}/${new_file}" ]; then - unlink ${entropy_dir}/${new_file} - fi - mv "${entropy_dir}/saved-entropy.${file_num}" \ - "${entropy_dir}/${new_file}" - else - logger -is -t "$0" \ -"${entropy_dir}/saved-entropy.${file_num} is not a regular file, and therefore \ -it will not be rotated. Entropy file harvesting is aborted." - exit 1 - fi +n=$(( ${entropy_save_num} - 1 )) +while [ ${n} -ge 1 ]; do + if [ -f "saved-entropy.${n}" ]; then + mv "saved-entropy.${n}" "saved-entropy.$(( ${n} + 1 ))" + elif [ -e "saved-entropy.${n}" -o -L "saved-entropy.${n}" ]; then + logger -is -t "$0" \ + "${entropy_dir}/saved-entropy.${n}" is not a regular file, and so \ + it will not be rotated. Entropy file rotation is aborted. + exit 1 fi + n=$(( ${n} - 1 )) done -dd if=/dev/random of="${entropy_dir}/saved-entropy.1" \ - bs="$entropy_save_sz" count=1 2> /dev/null +dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null exit 0 - From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:23:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D80F51065883; Thu, 4 Oct 2012 22:23:57 +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 C2B1F8FC1A; Thu, 4 Oct 2012 22:23:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MNv71034737; Thu, 4 Oct 2012 22:23:57 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MNvX7034735; Thu, 4 Oct 2012 22:23:57 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042223.q94MNvX7034735@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241206 - stable/8/libexec/save-entropy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:23:58 -0000 Author: dougb Date: Thu Oct 4 22:23:57 2012 New Revision: 241206 URL: http://svn.freebsd.org/changeset/base/241206 Log: MFC r240090: Improve file rotation Modified: stable/8/libexec/save-entropy/save-entropy.sh Directory Properties: stable/8/libexec/save-entropy/ (props changed) Modified: stable/8/libexec/save-entropy/save-entropy.sh ============================================================================== --- stable/8/libexec/save-entropy/save-entropy.sh Thu Oct 4 22:23:40 2012 (r241205) +++ stable/8/libexec/save-entropy/save-entropy.sh Thu Oct 4 22:23:57 2012 (r241206) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2001-2006 Douglas Barton, DougB@FreeBSD.org +# Copyright (c) 2001-2006,2012 Douglas Barton, dougb@FreeBSD.org # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ # This script is called by cron to store bits of randomness which are # then used to seed /dev/random on boot. -# Originally developed by Doug Barton, DougB@FreeBSD.org +# Originally developed by Doug Barton, dougb@FreeBSD.org PATH=/bin:/usr/bin @@ -55,38 +55,36 @@ entropy_save_sz=${entropy_save_sz:-2048} entropy_save_num=${entropy_save_num:-8} if [ ! -d "${entropy_dir}" ]; then - umask 077 - mkdir "${entropy_dir}" || { - logger -is -t "$0" The entropy directory "${entropy_dir}" does not \ -exist, and cannot be created. Therefore no entropy can be saved. ; - exit 1;} - /usr/sbin/chown operator:operator "${entropy_dir}" - chmod 0700 "${entropy_dir}" + install -d -o operator -g operator -m 0700 "${entropy_dir}" || { + logger -is -t "$0" The entropy directory "${entropy_dir}" does \ + not exist, and cannot be created. Therefore no entropy can \ + be saved.; exit 1; } fi +cd "${entropy_dir}" || { + logger -is -t "$0" Cannot cd to the entropy directory: "${entropy_dir}". \ + Entropy file rotation is aborted.; exit 1; } + +for f in saved-entropy.*; do + case "${f}" in saved-entropy.\*) continue ;; esac # No files match + [ ${f#saved-entropy\.} -ge ${entropy_save_num} ] && unlink ${f} +done + umask 377 -esn_m1=$(( ${entropy_save_num} - 1 )) -for file_num in `jot $esn_m1 $esn_m1 1`; do - if [ -e "${entropy_dir}/saved-entropy.${file_num}" ]; then - if [ -f "${entropy_dir}/saved-entropy.${file_num}" ]; then - new_file=saved-entropy.$(( $file_num + 1 )) - if [ -e "${entropy_dir}/${new_file}" ]; then - unlink ${entropy_dir}/${new_file} - fi - mv "${entropy_dir}/saved-entropy.${file_num}" \ - "${entropy_dir}/${new_file}" - else - logger -is -t "$0" \ -"${entropy_dir}/saved-entropy.${file_num} is not a regular file, and therefore \ -it will not be rotated. Entropy file harvesting is aborted." - exit 1 - fi +n=$(( ${entropy_save_num} - 1 )) +while [ ${n} -ge 1 ]; do + if [ -f "saved-entropy.${n}" ]; then + mv "saved-entropy.${n}" "saved-entropy.$(( ${n} + 1 ))" + elif [ -e "saved-entropy.${n}" -o -L "saved-entropy.${n}" ]; then + logger -is -t "$0" \ + "${entropy_dir}/saved-entropy.${n}" is not a regular file, and so \ + it will not be rotated. Entropy file rotation is aborted. + exit 1 fi + n=$(( ${n} - 1 )) done -dd if=/dev/random of="${entropy_dir}/saved-entropy.1" \ - bs="$entropy_save_sz" count=1 2> /dev/null +dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null exit 0 - From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:24:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A83DA1065700; Thu, 4 Oct 2012 22:24:14 +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 90E1D8FC12; Thu, 4 Oct 2012 22:24:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MOEmd034813; Thu, 4 Oct 2012 22:24:14 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MOEAn034811; Thu, 4 Oct 2012 22:24:14 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042224.q94MOEAn034811@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:24: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: r241207 - stable/7/libexec/save-entropy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:24:14 -0000 Author: dougb Date: Thu Oct 4 22:24:14 2012 New Revision: 241207 URL: http://svn.freebsd.org/changeset/base/241207 Log: MFC r240090: Improve file rotation Modified: stable/7/libexec/save-entropy/save-entropy.sh Directory Properties: stable/7/libexec/save-entropy/ (props changed) Modified: stable/7/libexec/save-entropy/save-entropy.sh ============================================================================== --- stable/7/libexec/save-entropy/save-entropy.sh Thu Oct 4 22:23:57 2012 (r241206) +++ stable/7/libexec/save-entropy/save-entropy.sh Thu Oct 4 22:24:14 2012 (r241207) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2001-2006 Douglas Barton, DougB@FreeBSD.org +# Copyright (c) 2001-2006,2012 Douglas Barton, dougb@FreeBSD.org # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ # This script is called by cron to store bits of randomness which are # then used to seed /dev/random on boot. -# Originally developed by Doug Barton, DougB@FreeBSD.org +# Originally developed by Doug Barton, dougb@FreeBSD.org PATH=/bin:/usr/bin @@ -55,38 +55,36 @@ entropy_save_sz=${entropy_save_sz:-2048} entropy_save_num=${entropy_save_num:-8} if [ ! -d "${entropy_dir}" ]; then - umask 077 - mkdir "${entropy_dir}" || { - logger -is -t "$0" The entropy directory "${entropy_dir}" does not \ -exist, and cannot be created. Therefore no entropy can be saved. ; - exit 1;} - /usr/sbin/chown operator:operator "${entropy_dir}" - chmod 0700 "${entropy_dir}" + install -d -o operator -g operator -m 0700 "${entropy_dir}" || { + logger -is -t "$0" The entropy directory "${entropy_dir}" does \ + not exist, and cannot be created. Therefore no entropy can \ + be saved.; exit 1; } fi +cd "${entropy_dir}" || { + logger -is -t "$0" Cannot cd to the entropy directory: "${entropy_dir}". \ + Entropy file rotation is aborted.; exit 1; } + +for f in saved-entropy.*; do + case "${f}" in saved-entropy.\*) continue ;; esac # No files match + [ ${f#saved-entropy\.} -ge ${entropy_save_num} ] && unlink ${f} +done + umask 377 -esn_m1=$(( ${entropy_save_num} - 1 )) -for file_num in `jot $esn_m1 $esn_m1 1`; do - if [ -e "${entropy_dir}/saved-entropy.${file_num}" ]; then - if [ -f "${entropy_dir}/saved-entropy.${file_num}" ]; then - new_file=saved-entropy.$(( $file_num + 1 )) - if [ -e "${entropy_dir}/${new_file}" ]; then - unlink ${entropy_dir}/${new_file} - fi - mv "${entropy_dir}/saved-entropy.${file_num}" \ - "${entropy_dir}/${new_file}" - else - logger -is -t "$0" \ -"${entropy_dir}/saved-entropy.${file_num} is not a regular file, and therefore \ -it will not be rotated. Entropy file harvesting is aborted." - exit 1 - fi +n=$(( ${entropy_save_num} - 1 )) +while [ ${n} -ge 1 ]; do + if [ -f "saved-entropy.${n}" ]; then + mv "saved-entropy.${n}" "saved-entropy.$(( ${n} + 1 ))" + elif [ -e "saved-entropy.${n}" -o -L "saved-entropy.${n}" ]; then + logger -is -t "$0" \ + "${entropy_dir}/saved-entropy.${n}" is not a regular file, and so \ + it will not be rotated. Entropy file rotation is aborted. + exit 1 fi + n=$(( ${n} - 1 )) done -dd if=/dev/random of="${entropy_dir}/saved-entropy.1" \ - bs="$entropy_save_sz" count=1 2> /dev/null +dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null exit 0 - From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:31:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14CAD106564A; Thu, 4 Oct 2012 22:31:57 +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 F1F1F8FC08; Thu, 4 Oct 2012 22:31:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MVufc035916; Thu, 4 Oct 2012 22:31:56 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MVus1035913; Thu, 4 Oct 2012 22:31:56 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042231.q94MVus1035913@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241208 - in stable/9/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:31:57 -0000 Author: dougb Date: Thu Oct 4 22:31:56 2012 New Revision: 241208 URL: http://svn.freebsd.org/changeset/base/241208 Log: MFC r229822: There is no longer a need to abstract ${rcvar_manpage} as we are not attempting to maintain compatibility with NetBSD for some years now. Modified: stable/9/etc/rc.d/hostname stable/9/etc/rc.subr Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/hostname ============================================================================== --- stable/9/etc/rc.d/hostname Thu Oct 4 22:24:14 2012 (r241207) +++ stable/9/etc/rc.d/hostname Thu Oct 4 22:31:56 2012 (r241208) @@ -65,7 +65,7 @@ hostname_start() # Null hostname is probably OK if DHCP is in use. # if [ -z "`list_net_interfaces dhcp`" ]; then - warn "\$hostname is not set -- see ${rcvar_manpage}." + warn "\$hostname is not set -- see rc.conf(5)." fi return fi Modified: stable/9/etc/rc.subr ============================================================================== --- stable/9/etc/rc.subr Thu Oct 4 22:24:14 2012 (r241207) +++ stable/9/etc/rc.subr Thu Oct 4 22:31:56 2012 (r241208) @@ -32,7 +32,6 @@ # functions used by various rc scripts # -: ${rcvar_manpage:='rc.conf(5)'} : ${RC_PID:=$$}; export RC_PID # @@ -159,7 +158,7 @@ checkyesno() return 1 ;; *) - warn "\$${1} is not set properly - see ${rcvar_manpage}." + warn "\$${1} is not set properly - see rc.conf(5)." return 1 ;; esac From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:32:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97E9A10657E0; Thu, 4 Oct 2012 22:32:13 +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 81D088FC0C; Thu, 4 Oct 2012 22:32:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MWDON035999; Thu, 4 Oct 2012 22:32:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MWD5N035996; Thu, 4 Oct 2012 22:32:13 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042232.q94MWD5N035996@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241209 - in stable/8/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:32:13 -0000 Author: dougb Date: Thu Oct 4 22:32:12 2012 New Revision: 241209 URL: http://svn.freebsd.org/changeset/base/241209 Log: MFC r229822: There is no longer a need to abstract ${rcvar_manpage} as we are not attempting to maintain compatibility with NetBSD for some years now. Modified: stable/8/etc/rc.d/hostname stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.d/hostname ============================================================================== --- stable/8/etc/rc.d/hostname Thu Oct 4 22:31:56 2012 (r241208) +++ stable/8/etc/rc.d/hostname Thu Oct 4 22:32:12 2012 (r241209) @@ -65,7 +65,7 @@ hostname_start() # Null hostname is probably OK if DHCP is in use. # if [ -z "`list_net_interfaces dhcp`" ]; then - warn "\$hostname is not set -- see ${rcvar_manpage}." + warn "\$hostname is not set -- see rc.conf(5)." fi return fi Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Thu Oct 4 22:31:56 2012 (r241208) +++ stable/8/etc/rc.subr Thu Oct 4 22:32:12 2012 (r241209) @@ -32,7 +32,6 @@ # functions used by various rc scripts # -: ${rcvar_manpage:='rc.conf(5)'} : ${RC_PID:=$$}; export RC_PID # @@ -159,7 +158,7 @@ checkyesno() return 1 ;; *) - warn "\$${1} is not set properly - see ${rcvar_manpage}." + warn "\$${1} is not set properly - see rc.conf(5)." return 1 ;; esac From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:32:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C3C31065691; Thu, 4 Oct 2012 22:32:28 +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 24F538FC08; Thu, 4 Oct 2012 22:32:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MWSbi036059; Thu, 4 Oct 2012 22:32:28 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MWRFh036056; Thu, 4 Oct 2012 22:32:27 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210042232.q94MWRFh036056@svn.freebsd.org> From: Doug Barton Date: Thu, 4 Oct 2012 22:32:27 +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: r241210 - in stable/7/etc: . rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:32:28 -0000 Author: dougb Date: Thu Oct 4 22:32:27 2012 New Revision: 241210 URL: http://svn.freebsd.org/changeset/base/241210 Log: MFC r229822: There is no longer a need to abstract ${rcvar_manpage} as we are not attempting to maintain compatibility with NetBSD for some years now. Modified: stable/7/etc/rc.d/hostname stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.d/hostname ============================================================================== --- stable/7/etc/rc.d/hostname Thu Oct 4 22:32:12 2012 (r241209) +++ stable/7/etc/rc.d/hostname Thu Oct 4 22:32:27 2012 (r241210) @@ -65,7 +65,7 @@ hostname_start() # Null hostname is probably OK if DHCP is in use. # if [ -z "`list_net_interfaces dhcp`" ]; then - warn "\$hostname is not set -- see ${rcvar_manpage}." + warn "\$hostname is not set -- see rc.conf(5)." fi return fi Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Thu Oct 4 22:32:12 2012 (r241209) +++ stable/7/etc/rc.subr Thu Oct 4 22:32:27 2012 (r241210) @@ -39,7 +39,6 @@ # functions used by various rc scripts # -: ${rcvar_manpage:='rc.conf(5)'} : ${RC_PID:=$$}; export RC_PID # @@ -143,7 +142,7 @@ checkyesno() return 1 ;; *) - warn "\$${1} is not set properly - see ${rcvar_manpage}." + warn "\$${1} is not set properly - see rc.conf(5)." return 1 ;; esac From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:40:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D45BA1065686; Thu, 4 Oct 2012 22:40:23 +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 BBB838FC08; Thu, 4 Oct 2012 22:40:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MeNPO037066; Thu, 4 Oct 2012 22:40:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MeNUe037051; Thu, 4 Oct 2012 22:40:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210042240.q94MeNUe037051@svn.freebsd.org> From: Xin LI Date: Thu, 4 Oct 2012 22:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241211 - in vendor/tcpdump/dist: . tests win32/Include/Arpa win32/Include/Netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:40:23 -0000 Author: delphij Date: Thu Oct 4 22:40:22 2012 New Revision: 241211 URL: http://svn.freebsd.org/changeset/base/241211 Log: Vendor import of tcpdump 4.3.0. Added: vendor/tcpdump/dist/print-tipc.c vendor/tcpdump/dist/tests/icmpv6.out vendor/tcpdump/dist/tests/icmpv6.pcap (contents, props changed) vendor/tcpdump/dist/tests/lmp.new vendor/tcpdump/dist/tests/pppoe.out vendor/tcpdump/dist/tests/pppoe.pcap (contents, props changed) Deleted: vendor/tcpdump/dist/tests/forces2.out vendor/tcpdump/dist/win32/Include/Arpa/ vendor/tcpdump/dist/win32/Include/Netinet/ Modified: vendor/tcpdump/dist/CHANGES vendor/tcpdump/dist/CREDITS vendor/tcpdump/dist/Makefile.in vendor/tcpdump/dist/VERSION vendor/tcpdump/dist/aclocal.m4 vendor/tcpdump/dist/configure vendor/tcpdump/dist/configure.in vendor/tcpdump/dist/decode_prefix.h vendor/tcpdump/dist/ethertype.h vendor/tcpdump/dist/forces.h vendor/tcpdump/dist/netdissect.h vendor/tcpdump/dist/print-802_11.c vendor/tcpdump/dist/print-bgp.c vendor/tcpdump/dist/print-ether.c vendor/tcpdump/dist/print-forces.c vendor/tcpdump/dist/print-icmp6.c vendor/tcpdump/dist/print-igmp.c vendor/tcpdump/dist/print-ip.c vendor/tcpdump/dist/print-ip6opts.c vendor/tcpdump/dist/print-ldp.c vendor/tcpdump/dist/print-lldp.c vendor/tcpdump/dist/print-lwapp.c vendor/tcpdump/dist/print-ospf6.c vendor/tcpdump/dist/print-pim.c vendor/tcpdump/dist/print-pppoe.c vendor/tcpdump/dist/print-rrcp.c vendor/tcpdump/dist/tcpdump.1.in vendor/tcpdump/dist/tcpdump.c vendor/tcpdump/dist/tests/TESTLIST vendor/tcpdump/dist/tests/TESTrun.sh vendor/tcpdump/dist/tests/forces1vvv.out vendor/tcpdump/dist/tests/forces1vvvv.out vendor/tcpdump/dist/tests/forces2v.out vendor/tcpdump/dist/tests/forces2vv.out Modified: vendor/tcpdump/dist/CHANGES ============================================================================== --- vendor/tcpdump/dist/CHANGES Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/CHANGES Thu Oct 4 22:40:22 2012 (r241211) @@ -1,3 +1,19 @@ +Friday April 3, 2011. mcr@sandelman.ca. + Summary for 4.3.0 tcpdump release + fixes for forces: SPARSE data (per RFC 5810) + some more test cases added + updates to documentation on -l, -U and -w flags. + Fix printing of BGP optional headers. + Tried to include DLT_PFSYNC support, failed due to headers required. + added TIPC support. + Fix LLDP Network Policy bit definitions. + fixes for IGMPv3's Max Response Time: it is in units of 0.1 second. + SIGUSR1 can be used rather than SIGINFO for stats + permit -n flag to affect print-ip for protocol numbers + ND_OPT_ADVINTERVAL is in milliseconds, not seconds + Teach PPPoE parser about RFC 4638 + + Friday December 9, 2011. guy@alum.mit.edu. Summary for 4.2.1 tcpdump release Only build the Babel printer if IPv6 is enabled. Modified: vendor/tcpdump/dist/CREDITS ============================================================================== --- vendor/tcpdump/dist/CREDITS Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/CREDITS Thu Oct 4 22:40:22 2012 (r241211) @@ -43,6 +43,7 @@ Additional people who have contributed p Chris Larson Christian Sievers Christophe Rhodes + Cliff Frey Craig Rodrigues Crist J. Clark Daniel Hagerty @@ -102,6 +103,7 @@ Additional people who have contributed p Kelly Carmichael Ken Hornstein Kevin Steves + Kenichi Maehashi Klaus Klein Kris Kennaway Krzysztof Halasa @@ -176,6 +178,7 @@ Additional people who have contributed p Sepherosa Ziehau Seth Webster Shinsuke Suzuki + Simon Ruderich Steinar Haug Swaminathan Chandrasekaran Takashi Yamamoto Modified: vendor/tcpdump/dist/Makefile.in ============================================================================== --- vendor/tcpdump/dist/Makefile.in Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/Makefile.in Thu Oct 4 22:40:22 2012 (r241211) @@ -77,7 +77,7 @@ CSRC = addrtoname.c af.c checksum.c cpac print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ print-eap.c print-eigrp.c\ - print-esp.c print-ether.c print-fddi.c print-fr.c \ + print-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \ print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \ print-ipx.c print-isoclns.c print-juniper.c print-krb.c \ @@ -91,8 +91,8 @@ CSRC = addrtoname.c af.c checksum.c cpac print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ - print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \ - print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \ + print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \ + print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \ print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c LIBNETDISSECT_SRC=print-isakmp.c @@ -304,10 +304,11 @@ EXTRA_DIST = \ tests/forces1.pcap \ tests/forces1vvv.out \ tests/forces1vvvv.out \ - tests/forces2.out \ tests/forces2v.out \ tests/forces2vv.out \ tests/forces3vvv.out \ + tests/icmpv6.out \ + tests/icmpv6.pcap \ tests/ikev2four.out \ tests/ikev2four.pcap \ tests/ikev2fourv.out \ @@ -335,6 +336,8 @@ EXTRA_DIST = \ tests/mpls-traceroute.pcap \ tests/ospf-gmpls.out \ tests/ospf-gmpls.pcap \ + tests/pppoe.out \ + tests/pppoe.pcap \ tests/print-A.out \ tests/print-AA.out \ tests/print-capX.out \ Modified: vendor/tcpdump/dist/VERSION ============================================================================== --- vendor/tcpdump/dist/VERSION Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/VERSION Thu Oct 4 22:40:22 2012 (r241211) @@ -1 +1 @@ -4.2.1 +4.3.0 Modified: vendor/tcpdump/dist/aclocal.m4 ============================================================================== --- vendor/tcpdump/dist/aclocal.m4 Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/aclocal.m4 Thu Oct 4 22:40:22 2012 (r241211) @@ -445,7 +445,14 @@ AC_DEFUN(AC_LBL_LIBPCAP, [ AC_MSG_ERROR( [Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report]) +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves.]) ]) dnl Modified: vendor/tcpdump/dist/configure ============================================================================== --- vendor/tcpdump/dist/configure Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/configure Thu Oct 4 22:40:22 2012 (r241211) @@ -7554,9 +7554,23 @@ if test $ac_cv_func_pcap_loop = yes; the else { { echo "$as_me:$LINENO: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&5 +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&5 echo "$as_me: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&2;} +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&2;} { (exit 1); exit 1; }; } fi @@ -9330,7 +9344,7 @@ fi done if test $ac_cv_func_pcap_findalldevs = "yes" ; then - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" { echo "$as_me:$LINENO: checking for pcap_if_t" >&5 echo $ECHO_N "checking for pcap_if_t... $ECHO_C" >&6; } @@ -11748,7 +11762,7 @@ _ACEOF fi - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" for ac_header in openssl/evp.h Modified: vendor/tcpdump/dist/configure.in ============================================================================== --- vendor/tcpdump/dist/configure.in Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/configure.in Thu Oct 4 22:40:22 2012 (r241211) @@ -732,7 +732,7 @@ if test $ac_cv_func_pcap_findalldevs = " dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't dnl have pcap_if_t. - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_TYPES(pcap_if_t, , , [#include ]) CPPFLAGS="$savedcppflags" @@ -1067,7 +1067,7 @@ if test "$want_libcrypto" != "no"; then fi AC_CHECK_LIB(crypto, DES_cbc_encrypt) - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_HEADERS(openssl/evp.h) CPPFLAGS="$savedcppflags" Modified: vendor/tcpdump/dist/decode_prefix.h ============================================================================== --- vendor/tcpdump/dist/decode_prefix.h Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/decode_prefix.h Thu Oct 4 22:40:22 2012 (r241211) @@ -33,9 +33,9 @@ #ifndef tcpdump_decode_prefix_h #define tcpdump_decode_prefix_h -extern int decode_prefix4(const u_char *pptr, char *buf, u_int buflen); +extern int decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen); #ifdef INET6 -extern int decode_prefix6(const u_char *pd, char *buf, u_int buflen); +extern int decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen); #endif #endif Modified: vendor/tcpdump/dist/ethertype.h ============================================================================== --- vendor/tcpdump/dist/ethertype.h Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/ethertype.h Thu Oct 4 22:40:22 2012 (r241211) @@ -100,6 +100,9 @@ #ifndef ETHERTYPE_AARP #define ETHERTYPE_AARP 0x80f3 #endif +#ifndef ETHERTYPE_TIPC +#define ETHERTYPE_TIPC 0x88ca +#endif #ifndef ETHERTYPE_8021Q #define ETHERTYPE_8021Q 0x8100 #endif Modified: vendor/tcpdump/dist/forces.h ============================================================================== --- vendor/tcpdump/dist/forces.h Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/forces.h Thu Oct 4 22:40:22 2012 (r241211) @@ -308,7 +308,7 @@ static const struct optlv_h OPTLV_msg[F_ /* F_OP_GET */ {ZERO_TTLV, 0, " Get", recpdoptlv_print}, /* F_OP_GETPROP */ {ZERO_TTLV, 0, " GetProp", recpdoptlv_print}, /* F_OP_GETRESP */ - {TTLV_T2, B_FULLD | B_RESTV, " GetResp", recpdoptlv_print}, + {TTLV_T2, B_FULLD | B_SPARD | B_RESTV, " GetResp", recpdoptlv_print}, /* F_OP_GETPRESP */ {TTLV_T2, B_FULLD | B_RESTV, " GetPropResp", recpdoptlv_print}, /* F_OP_REPORT */ Modified: vendor/tcpdump/dist/netdissect.h ============================================================================== --- vendor/tcpdump/dist/netdissect.h Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/netdissect.h Thu Oct 4 22:40:22 2012 (r241211) @@ -280,6 +280,7 @@ extern int esp_print(netdissect_options register const u_char *bp, int len, register const u_char *bp2, int *nhdr, int *padlen); extern void arp_print(netdissect_options *,const u_char *, u_int, u_int); +extern void tipc_print(netdissect_options *, const u_char *, u_int, u_int); extern void icmp6_print(netdissect_options *ndo, const u_char *, u_int, const u_char *, int); extern void isakmp_print(netdissect_options *,const u_char *, Modified: vendor/tcpdump/dist/print-802_11.c ============================================================================== --- vendor/tcpdump/dist/print-802_11.c Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/print-802_11.c Thu Oct 4 22:40:22 2012 (r241211) @@ -485,7 +485,7 @@ static const char *auth_alg_text[]={"Ope #define NUM_AUTH_ALGS (sizeof auth_alg_text / sizeof auth_alg_text[0]) static const char *status_text[] = { - "Succesful", /* 0 */ + "Successful", /* 0 */ "Unspecified failure", /* 1 */ "Reserved", /* 2 */ "Reserved", /* 3 */ Modified: vendor/tcpdump/dist/print-bgp.c ============================================================================== --- vendor/tcpdump/dist/print-bgp.c Thu Oct 4 22:32:27 2012 (r241210) +++ vendor/tcpdump/dist/print-bgp.c Thu Oct 4 22:40:22 2012 (r241211) @@ -93,8 +93,7 @@ struct bgp_opt { /* variable length */ }; #define BGP_OPT_SIZE 2 /* some compilers may pad to 4 bytes */ - -#define BGP_UPDATE_MINSIZE 23 +#define BGP_CAP_HEADER_SIZE 2 /* some compilers may pad to 4 bytes */ struct bgp_notification { u_int8_t bgpn_marker[16]; @@ -115,19 +114,10 @@ struct bgp_route_refresh { }; /* EXTRACT_16BITS(&bgp_route_refresh->afi) (sigh) */ #define BGP_ROUTE_REFRESH_SIZE 23 -struct bgp_attr { - u_int8_t bgpa_flags; - u_int8_t bgpa_type; - union { - u_int8_t len; - u_int16_t elen; - } bgpa_len; -#define bgp_attr_len(p) \ - (((p)->bgpa_flags & 0x10) ? \ - EXTRACT_16BITS(&(p)->bgpa_len.elen) : (p)->bgpa_len.len) -#define bgp_attr_off(p) \ - (((p)->bgpa_flags & 0x10) ? 4 : 3) -}; +#define bgp_attr_lenlen(flags, p) \ + (((flags) & 0x10) ? 2 : 1) +#define bgp_attr_len(flags, p) \ + (((flags) & 0x10) ? EXTRACT_16BITS(p) : *(p)) #define BGPTYPE_ORIGIN 1 #define BGPTYPE_AS_PATH 2 @@ -493,38 +483,49 @@ as_printf (char *str, int size, u_int as return str; } +#define ITEMCHECK(minlen) if (itemlen < minlen) goto badtlv; + int -decode_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pptr[0]); + ITEMCHECK(1); plen = pptr[0]; if (32 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[1], (plen + 7) / 8); - memcpy(&addr, &pptr[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[1], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ /* this is one of the weirdnesses of rfc3107 @@ -542,12 +543,15 @@ decode_labeled_prefix4(const u_char *ppt if (32 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -557,10 +561,13 @@ decode_labeled_prefix4(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } /* @@ -1041,37 +1048,46 @@ trunc: #ifdef INET6 int -decode_prefix6(const u_char *pd, char *buf, u_int buflen) +decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pd[0]); + ITEMCHECK(1); plen = pd[0]; if (128 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pd[1], (plen + 7) / 8); - memcpy(&addr, &pd[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pd[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pd[1], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname6((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix6(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix6(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ if (24 > plen) @@ -1081,12 +1097,14 @@ decode_labeled_prefix6(const u_char *ppt if (128 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -1096,10 +1114,13 @@ decode_labeled_prefix6(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int @@ -1266,7 +1287,7 @@ trunc: } static int -bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) +bgp_attr_print(u_int atype, const u_char *pptr, u_int len) { int i; u_int16_t af; @@ -1276,7 +1297,7 @@ bgp_attr_print(const struct bgp_attr *at u_int32_t i; } bw; int advance; - int tlen; + u_int tlen; const u_char *tptr; char buf[MAXHOSTNAMELEN + 100]; char tokbuf[TOKBUFSIZE]; @@ -1285,7 +1306,7 @@ bgp_attr_print(const struct bgp_attr *at tptr = pptr; tlen=len; - switch (attr->bgpa_type) { + switch (atype) { case BGPTYPE_ORIGIN: if (len != 1) printf("invalid len"); @@ -1321,7 +1342,7 @@ bgp_attr_print(const struct bgp_attr *at * 2 bytes first, and it does not pass, assume that ASs are * encoded in 4 bytes format and move on. */ - as_size = bgp_attr_get_as_size(attr->bgpa_type, pptr, len); + as_size = bgp_attr_get_as_size(atype, pptr, len); while (tptr < pptr + len) { TCHECK(tptr[0]); @@ -1657,20 +1678,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1718,20 +1743,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1821,20 +1850,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1853,20 +1886,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -2097,40 +2134,50 @@ bgp_attr_print(const struct bgp_attr *at } case BGPTYPE_ATTR_SET: TCHECK2(tptr[0], 4); + if (len < 4) + goto trunc; printf("\n\t Origin AS: %s", as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(tptr))); tptr+=4; len -=4; - while (len >= 2 ) { - int alen; - struct bgp_attr bgpa; + while (len) { + u_int aflags, atype, alenlen, alen; - TCHECK2(tptr[0], sizeof(bgpa)); - memcpy(&bgpa, tptr, sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - tptr += bgp_attr_off(&bgpa); - len -= bgp_attr_off(&bgpa); + TCHECK2(tptr[0], 2); + if (len < 2) + goto trunc; + aflags = *tptr; + atype = *(tptr + 1); + tptr += 2; + len -= 2; + alenlen = bgp_attr_lenlen(aflags, tptr); + TCHECK2(tptr[0], alenlen); + if (len < alenlen) + goto trunc; + alen = bgp_attr_len(aflags, tptr); + tptr += alenlen; + len -= alenlen; printf("\n\t %s (%u), length: %u", tok2strbuf(bgp_attr_values, - "Unknown Attribute", bgpa.bgpa_type, - tokbuf, sizeof(tokbuf)), - bgpa.bgpa_type, + "Unknown Attribute", atype, + tokbuf, sizeof(tokbuf)), + atype, alen); - if (bgpa.bgpa_flags) { + if (aflags) { printf(", Flags [%s%s%s%s", - bgpa.bgpa_flags & 0x80 ? "O" : "", - bgpa.bgpa_flags & 0x40 ? "T" : "", - bgpa.bgpa_flags & 0x20 ? "P" : "", - bgpa.bgpa_flags & 0x10 ? "E" : ""); - if (bgpa.bgpa_flags & 0xf) - printf("+%x", bgpa.bgpa_flags & 0xf); + aflags & 0x80 ? "O" : "", + aflags & 0x40 ? "T" : "", + aflags & 0x20 ? "P" : "", + aflags & 0x10 ? "E" : ""); + if (aflags & 0xf) + printf("+%x", aflags & 0xf); printf("]: "); } /* FIXME check for recursion */ - if (!bgp_attr_print(&bgpa, tptr, alen)) + if (!bgp_attr_print(atype, tptr, alen)) return 0; tptr += alen; len -= alen; @@ -2140,7 +2187,7 @@ bgp_attr_print(const struct bgp_attr *at default: TCHECK2(*pptr,len); - printf("\n\t no Attribute %u decoder",attr->bgpa_type); /* we have no decoder for the attribute */ + printf("\n\t no Attribute %u decoder",atype); /* we have no decoder for the attribute */ if (vflag <= 1) print_unknown_data(pptr,"\n\t ",len); break; @@ -2156,14 +2203,97 @@ trunc: } static void +bgp_capabilities_print(const u_char *opt, int caps_len) +{ + char tokbuf[TOKBUFSIZE]; + char tokbuf2[TOKBUFSIZE]; + int cap_type, cap_len, tcap_len, cap_offset; + int i = 0; + + while (i < caps_len) { + TCHECK2(opt[i], BGP_CAP_HEADER_SIZE); + cap_type=opt[i]; + cap_len=opt[i+1]; + tcap_len=cap_len; + printf("\n\t %s (%u), length: %u", + tok2strbuf(bgp_capcode_values, "Unknown", + cap_type, tokbuf, sizeof(tokbuf)), + cap_type, + cap_len); + TCHECK2(opt[i+2], cap_len); + switch (cap_type) { + case BGP_CAPCODE_MP: + printf("\n\t\tAFI %s (%u), SAFI %s (%u)", + tok2strbuf(af_values, "Unknown", + EXTRACT_16BITS(opt+i+2), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+2), + tok2strbuf(bgp_safi_values, "Unknown", + opt[i+5], + tokbuf, sizeof(tokbuf)), + opt[i+5]); + break; + case BGP_CAPCODE_RESTART: + printf("\n\t\tRestart Flags: [%s], Restart Time %us", + ((opt[i+2])&0x80) ? "R" : "none", + EXTRACT_16BITS(opt+i+2)&0xfff); + tcap_len-=2; + cap_offset=4; + while(tcap_len>=4) { + printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", + tok2strbuf(af_values,"Unknown", + EXTRACT_16BITS(opt+i+cap_offset), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+cap_offset), + tok2strbuf(bgp_safi_values,"Unknown", + opt[i+cap_offset+2], + tokbuf2, sizeof(tokbuf2)), + opt[i+cap_offset+2], + ((opt[i+cap_offset+3])&0x80) ? "yes" : "no" ); + tcap_len-=4; + cap_offset+=4; + } + break; + case BGP_CAPCODE_RR: + case BGP_CAPCODE_RR_CISCO: + break; + case BGP_CAPCODE_AS_NEW: + + /* + * Extract the 4 byte AS number encoded. + */ + if (cap_len == 4) { + printf("\n\t\t 4 Byte AS %s", + as_printf(astostr, sizeof(astostr), + EXTRACT_32BITS(opt + i + 2))); + } + break; + default: + printf("\n\t\tno decoder for Capability %u", + cap_type); + if (vflag <= 1) + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + break; + } + if (vflag > 1 && cap_len > 0) { + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + } + i += BGP_CAP_HEADER_SIZE + cap_len; + } + return; + +trunc: + printf("[|BGP]"); +} + +static void bgp_open_print(const u_char *dat, int length) { struct bgp_open bgpo; struct bgp_opt bgpopt; const u_char *opt; - int i,cap_type,cap_len,tcap_len,cap_offset; + int i; char tokbuf[TOKBUFSIZE]; - char tokbuf2[TOKBUFSIZE]; TCHECK2(dat[0], BGP_OPEN_SIZE); memcpy(&bgpo, dat, BGP_OPEN_SIZE); @@ -2188,96 +2318,31 @@ bgp_open_print(const u_char *dat, int le TCHECK2(opt[i], BGP_OPT_SIZE); memcpy(&bgpopt, &opt[i], BGP_OPT_SIZE); if (i + 2 + bgpopt.bgpopt_len > bgpo.bgpo_optlen) { - printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); + printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); break; } printf("\n\t Option %s (%u), length: %u", - tok2strbuf(bgp_opt_values,"Unknown", + tok2strbuf(bgp_opt_values,"Unknown", bgpopt.bgpopt_type, tokbuf, sizeof(tokbuf)), - bgpopt.bgpopt_type, - bgpopt.bgpopt_len); + bgpopt.bgpopt_type, + bgpopt.bgpopt_len); - /* now lets decode the options we know*/ - switch(bgpopt.bgpopt_type) { - case BGP_OPT_CAP: - cap_type=opt[i+BGP_OPT_SIZE]; - cap_len=opt[i+BGP_OPT_SIZE+1]; - tcap_len=cap_len; - printf("\n\t %s (%u), length: %u", - tok2strbuf(bgp_capcode_values, "Unknown", - cap_type, tokbuf, sizeof(tokbuf)), - cap_type, - cap_len); - switch(cap_type) { - case BGP_CAPCODE_MP: - printf("\n\t\tAFI %s (%u), SAFI %s (%u)", - tok2strbuf(af_values, "Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tok2strbuf(bgp_safi_values, "Unknown", - opt[i+BGP_OPT_SIZE+5], - tokbuf, sizeof(tokbuf)), - opt[i+BGP_OPT_SIZE+5]); - break; - case BGP_CAPCODE_RESTART: - printf("\n\t\tRestart Flags: [%s], Restart Time %us", - ((opt[i+BGP_OPT_SIZE+2])&0x80) ? "R" : "none", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2)&0xfff); - tcap_len-=2; - cap_offset=4; - while(tcap_len>=4) { - printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", - tok2strbuf(af_values,"Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tok2strbuf(bgp_safi_values,"Unknown", - opt[i+BGP_OPT_SIZE+cap_offset+2], - tokbuf2, sizeof(tokbuf2)), - opt[i+BGP_OPT_SIZE+cap_offset+2], - ((opt[i+BGP_OPT_SIZE+cap_offset+3])&0x80) ? "yes" : "no" ); - tcap_len-=4; - cap_offset+=4; - } - break; - case BGP_CAPCODE_RR: - case BGP_CAPCODE_RR_CISCO: - break; - case BGP_CAPCODE_AS_NEW: + /* now let's decode the options we know*/ + switch(bgpopt.bgpopt_type) { - /* - * Extract the 4 byte AS number encoded. - */ - TCHECK2(opt[i + BGP_OPT_SIZE + 2], cap_len); - if (cap_len == 4) { - printf("\n\t\t 4 Byte AS %s", - as_printf(astostr, sizeof(astostr), - EXTRACT_32BITS(opt + i + BGP_OPT_SIZE + 2))); - } - break; - default: - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - printf("\n\t\tno decoder for Capability %u", - cap_type); - if (vflag <= 1) - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - break; - } - if (vflag > 1) { - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - } - break; - case BGP_OPT_AUTH: - default: - printf("\n\t no decoder for option %u", - bgpopt.bgpopt_type); - break; - } + case BGP_OPT_CAP: + bgp_capabilities_print(&opt[i+BGP_OPT_SIZE], + bgpopt.bgpopt_len); + break; + case BGP_OPT_AUTH: + default: + printf("\n\t no decoder for option %u", + bgpopt.bgpopt_type); + break; + } i += BGP_OPT_SIZE + bgpopt.bgpopt_len; } return; @@ -2289,107 +2354,163 @@ static void bgp_update_print(const u_char *dat, int length) { struct bgp bgp; - struct bgp_attr bgpa; const u_char *p; + int withdrawn_routes_len; int len; int i; char tokbuf[TOKBUFSIZE]; +#ifndef INET6 + char buf[MAXHOSTNAMELEN + 100]; + int wpfx; +#endif TCHECK2(dat[0], BGP_SIZE); + if (length < BGP_SIZE) + goto trunc; memcpy(&bgp, dat, BGP_SIZE); p = dat + BGP_SIZE; /*XXX*/ + length -= BGP_SIZE; /* Unfeasible routes */ - len = EXTRACT_16BITS(p); - if (len) { + TCHECK2(p[0], 2); + if (length < 2) + goto trunc; + withdrawn_routes_len = EXTRACT_16BITS(p); + p += 2; + length -= 2; + if (withdrawn_routes_len) { /* * Without keeping state from the original NLRI message, * it's not possible to tell if this a v4 or v6 route, * so only try to decode it if we're not v6 enabled. */ + TCHECK2(p[0], withdrawn_routes_len); + if (length < withdrawn_routes_len) + goto trunc; #ifdef INET6 - printf("\n\t Withdrawn routes: %d bytes", len); + printf("\n\t Withdrawn routes: %d bytes", withdrawn_routes_len); + p += withdrawn_routes_len; + length -= withdrawn_routes_len; #else - char buf[MAXHOSTNAMELEN + 100]; - int wpfx; + if (withdrawn_routes_len < 2) + goto trunc; + length -= 2; + withdrawn_routes_len -= 2; - TCHECK2(p[2], len); - i = 2; printf("\n\t Withdrawn routes:"); - while(i < 2 + len) { - wpfx = decode_prefix4(&p[i], buf, sizeof(buf)); + while(withdrawn_routes_len > 0) { + wpfx = decode_prefix4(p, withdrawn_routes_len, buf, sizeof(buf)); if (wpfx == -1) { printf("\n\t (illegal prefix length)"); break; } else if (wpfx == -2) goto trunc; + else if (wpfx == -3) + goto trunc; /* bytes left, but not enough */ else { - i += wpfx; printf("\n\t %s", buf); + p += wpfx; + length -= wpfx; + withdrawn_routes_len -= wpfx; } } #endif } - p += 2 + len; TCHECK2(p[0], 2); + if (length < 2) + goto trunc; len = EXTRACT_16BITS(p); + p += 2; + length -= 2; - if (len == 0 && length == BGP_UPDATE_MINSIZE) { + if (withdrawn_routes_len == 0 && len == 0 && length == 0) { + /* No withdrawn routes, no path attributes, no NLRI */ printf("\n\t End-of-Rib Marker (empty NLRI)"); return; } if (len) { /* do something more useful!*/ - i = 2; - while (i < 2 + len) { - int alen, aoff; - - TCHECK2(p[i], sizeof(bgpa)); - memcpy(&bgpa, &p[i], sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - aoff = bgp_attr_off(&bgpa); + while (len) { + int aflags, atype, alenlen, alen; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:41:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 920AA1065702; Thu, 4 Oct 2012 22:41:01 +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 62DFB8FC0C; Thu, 4 Oct 2012 22:41:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94Mf1q4037180; Thu, 4 Oct 2012 22:41:01 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94Mf1ba037177; Thu, 4 Oct 2012 22:41:01 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210042241.q94Mf1ba037177@svn.freebsd.org> From: Xin LI Date: Thu, 4 Oct 2012 22:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241212 - vendor/tcpdump/4.3.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:41:01 -0000 Author: delphij Date: Thu Oct 4 22:41:00 2012 New Revision: 241212 URL: http://svn.freebsd.org/changeset/base/241212 Log: Tag tcpdump 4.3.0. Added: vendor/tcpdump/4.3.0/ - copied from r241211, vendor/tcpdump/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Oct 4 22:56:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A517106564A; Thu, 4 Oct 2012 22:56:16 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A6628FC12; Thu, 4 Oct 2012 22:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94MuGSF039146; Thu, 4 Oct 2012 22:56:16 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94MuFFB039135; Thu, 4 Oct 2012 22:56:15 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210042256.q94MuFFB039135@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 4 Oct 2012 22:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241213 - stable/9/usr.bin/systat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 22:56:16 -0000 Author: melifaro Date: Thu Oct 4 22:56:15 2012 New Revision: 241213 URL: http://svn.freebsd.org/changeset/base/241213 Log: Merge r240605. Make systat(1) accept fractional number of seconds. Make old alarm(3)-based code use select(2). Modified: stable/9/usr.bin/systat/cmds.c stable/9/usr.bin/systat/extern.h stable/9/usr.bin/systat/icmp.c stable/9/usr.bin/systat/icmp6.c stable/9/usr.bin/systat/ip.c stable/9/usr.bin/systat/ip6.c stable/9/usr.bin/systat/keyboard.c stable/9/usr.bin/systat/main.c stable/9/usr.bin/systat/systat.1 stable/9/usr.bin/systat/tcp.c Directory Properties: stable/9/usr.bin/ (props changed) stable/9/usr.bin/systat/ (props changed) Modified: stable/9/usr.bin/systat/cmds.c ============================================================================== --- stable/9/usr.bin/systat/cmds.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/cmds.c Thu Oct 4 22:56:15 2012 (r241213) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); static const char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95"; #endif +#include + #include #include #include @@ -49,10 +51,9 @@ command(const char *cmd) { struct cmdtab *p; char *cp, *tmpstr, *tmpstr1; - int interval, omask; + double t; tmpstr = tmpstr1 = strdup(cmd); - omask = sigblock(sigmask(SIGALRM)); for (cp = tmpstr1; *cp && !isspace(*cp); cp++) ; if (*cp) @@ -68,7 +69,7 @@ command(const char *cmd) goto done; } if (strcmp(tmpstr1, "stop") == 0) { - alarm(0); + delay = 0; mvaddstr(CMDLINE, 0, "Refresh disabled."); clrtoeol(); goto done; @@ -88,19 +89,23 @@ command(const char *cmd) clrtoeol(); goto done; } - interval = atoi(tmpstr1); - if (interval <= 0 && - (strcmp(tmpstr1, "start") == 0 || strcmp(tmpstr1, "interval") == 0)) { - interval = *cp ? atoi(cp) : naptime; - if (interval <= 0) { - error("%d: bad interval.", interval); - goto done; + t = strtod(tmpstr1, NULL) * 1000000.0; + if (t > 0 && t < (double)UINT_MAX) + delay = (unsigned int)t; + if ((t <= 0 || t > (double)UINT_MAX) && + (strcmp(tmpstr1, "start") == 0 || + strcmp(tmpstr1, "interval") == 0)) { + if (*cp != '\0') { + t = strtod(cp, NULL) * 1000000.0; + if (t <= 0 || t >= (double)UINT_MAX) { + error("%d: bad interval.", (int)t); + goto done; + } } } - if (interval > 0) { - alarm(0); - naptime = interval; - display(0); + if (t > 0) { + delay = (unsigned int)t; + display(); status(); goto done; } @@ -112,7 +117,6 @@ command(const char *cmd) if (p) { if (curcmd == p) goto done; - alarm(0); (*curcmd->c_close)(wnd); curcmd->c_flags &= ~CF_INIT; wnd = (*p->c_open)(); @@ -133,14 +137,13 @@ command(const char *cmd) } curcmd = p; labels(); - display(0); + display(); status(); goto done; } if (curcmd->c_cmd == 0 || !(*curcmd->c_cmd)(tmpstr1, cp)) error("%s: Unknown command.", tmpstr1); done: - sigsetmask(omask); free(tmpstr); } @@ -177,7 +180,7 @@ status(void) { error("Showing %s, refresh every %d seconds.", - curcmd->c_name, naptime); + curcmd->c_name, delay / 1000000); } int Modified: stable/9/usr.bin/systat/extern.h ============================================================================== --- stable/9/usr.bin/systat/extern.h Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/extern.h Thu Oct 4 22:56:15 2012 (r241213) @@ -49,11 +49,12 @@ extern int CMDLINE; extern int dk_ndrive; extern int hz, stathz; extern double hertz; /* sampling frequency for cp_time and dk_time */ -extern int naptime, col; +extern int col; extern int nhosts; extern int nports; extern int protos; extern int verbose; +extern unsigned int delay; struct inpcb; @@ -87,7 +88,7 @@ int cmdnetstat(const char *, const char struct cmdtab *lookup(const char *); void command(const char *); void die(int); -void display(int); +void display(void); int dkinit(void); int dkcmd(char *, char *); void error(const char *fmt, ...) __printflike(1, 2); Modified: stable/9/usr.bin/systat/icmp.c ============================================================================== --- stable/9/usr.bin/systat/icmp.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/icmp.c Thu Oct 4 22:56:15 2012 (r241213) @@ -138,7 +138,7 @@ domode(struct icmpstat *ret) switch(currentmode) { case display_RATE: sub = &oldstat; - divisor = naptime; + divisor = (delay > 1000000) ? delay / 1000000 : 1; break; case display_DELTA: sub = &oldstat; Modified: stable/9/usr.bin/systat/icmp6.c ============================================================================== --- stable/9/usr.bin/systat/icmp6.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/icmp6.c Thu Oct 4 22:56:15 2012 (r241213) @@ -137,7 +137,7 @@ domode(struct icmp6stat *ret) switch(currentmode) { case display_RATE: sub = &oldstat; - divisor = naptime; + divisor = (delay > 1000000) ? delay / 1000000 : 1; break; case display_DELTA: sub = &oldstat; Modified: stable/9/usr.bin/systat/ip.c ============================================================================== --- stable/9/usr.bin/systat/ip.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/ip.c Thu Oct 4 22:56:15 2012 (r241213) @@ -146,7 +146,7 @@ domode(struct stat *ret) switch(currentmode) { case display_RATE: sub = &oldstat; - divisor = naptime; + divisor = (delay > 1000000) ? delay / 1000000 : 1; break; case display_DELTA: sub = &oldstat; Modified: stable/9/usr.bin/systat/ip6.c ============================================================================== --- stable/9/usr.bin/systat/ip6.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/ip6.c Thu Oct 4 22:56:15 2012 (r241213) @@ -142,7 +142,7 @@ domode(struct ip6stat *ret) switch(currentmode) { case display_RATE: sub = &oldstat; - divisor = naptime; + divisor = (delay > 1000000) ? delay / 1000000 : 1; break; case display_DELTA: sub = &oldstat; Modified: stable/9/usr.bin/systat/keyboard.c ============================================================================== --- stable/9/usr.bin/systat/keyboard.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/keyboard.c Thu Oct 4 22:56:15 2012 (r241213) @@ -35,88 +35,146 @@ __FBSDID("$FreeBSD$"); static const char sccsid[] = "@(#)keyboard.c 8.1 (Berkeley) 6/6/93"; #endif +#include +#include + #include #include -#include #include #include +#include #include "systat.h" #include "extern.h" +static char line[80]; +static int keyboard_dispatch(int ch); + int keyboard(void) { - char line[80]; - int ch, oldmask; + int ch, n; + struct timeval last, intvl, now, tm; + fd_set rfds; + /* Set initial timings */ + gettimeofday(&last, NULL); + intvl.tv_sec = delay / 1000000; + intvl.tv_usec = delay % 1000000; for (;;) { col = 0; move(CMDLINE, 0); - do { - refresh(); - ch = getch(); - if (ch == ERR) { - if (errno == EINTR) - continue; - exit(1); + for (;;) { + /* Determine interval to sleep */ + (void)gettimeofday(&now, NULL); + tm.tv_sec = last.tv_sec + intvl.tv_sec - now.tv_sec; + tm.tv_usec = last.tv_usec + intvl.tv_usec - now.tv_usec; + while (tm.tv_usec < 0) { + tm.tv_usec += 1000000; + tm.tv_sec--; + } + while (tm.tv_usec >= 1000000) { + tm.tv_usec -= 1000000; + tm.tv_sec++; + } + if (tm.tv_sec < 0) { + /* We have to update screen immediately */ + display(); + gettimeofday(&last, NULL); + continue; } - if (ch >= 'A' && ch <= 'Z') - ch += 'a' - 'A'; - if (col == 0) { -#define mask(s) (1 << ((s) - 1)) - if (ch == CTRL('l')) { - oldmask = sigblock(mask(SIGALRM)); - wrefresh(curscr); - sigsetmask(oldmask); - continue; - } - if (ch == CTRL('g')) { - oldmask = sigblock(mask(SIGALRM)); - status(); - sigsetmask(oldmask); + + /* Prepare select */ + FD_ZERO(&rfds); + FD_SET(STDIN_FILENO, &rfds); + n = select(STDIN_FILENO + 1, &rfds, NULL, NULL, &tm); + + if (n > 0) { + /* Read event on stdin */ + ch = getch(); + + if (keyboard_dispatch(ch) == 0) { + refresh(); continue; } - if (ch != ':') - continue; - move(CMDLINE, 0); - clrtoeol(); - } - if (ch == erasechar() && col > 0) { - if (col == 1 && line[0] == ':') - continue; - col--; - goto doerase; - } - if (ch == CTRL('w') && col > 0) { - while (--col >= 0 && isspace(line[col])) - ; - col++; - while (--col >= 0 && !isspace(line[col])) - if (col == 0 && line[0] == ':') - break; - col++; - goto doerase; - } - if (ch == killchar() && col > 0) { - col = 0; - if (line[0] == ':') - col++; - doerase: - move(CMDLINE, col); - clrtoeol(); - continue; - } - if (isprint(ch) || ch == ' ') { - line[col] = ch; - mvaddch(CMDLINE, col, ch); - col++; + + line[col] = '\0'; + command(line + 1); + /* Refresh delay */ + intvl.tv_sec = delay / 1000000; + intvl.tv_usec = delay % 1000000; + refresh(); + break; } - } while (col == 0 || (ch != '\r' && ch != '\n')); - line[col] = '\0'; - oldmask = sigblock(mask(SIGALRM)); - command(line + 1); - sigsetmask(oldmask); + + if (n < 0 && errno != EINTR) + exit(1); + + /* Timeout or signal. Call display another time */ + display(); + gettimeofday(&last, NULL); + } } - /*NOTREACHED*/ +} + +static int +keyboard_dispatch(int ch) +{ + + if (ch == ERR) { + if (errno == EINTR) + return 0; + exit(1); + } + if (ch >= 'A' && ch <= 'Z') + ch += 'a' - 'A'; + if (col == 0) { + if (ch == CTRL('l')) { + wrefresh(curscr); + return 0; + } + if (ch == CTRL('g')) { + status(); + return 0; + } + if (ch != ':') + return 0; + move(CMDLINE, 0); + clrtoeol(); + } + if (ch == erasechar() && col > 0) { + if (col == 1 && line[0] == ':') + return 0; + col--; + goto doerase; + } + if (ch == CTRL('w') && col > 0) { + while (--col >= 0 && isspace(line[col])) + ; + col++; + while (--col >= 0 && !isspace(line[col])) + if (col == 0 && line[0] == ':') + return 1; + col++; + goto doerase; + } + if (ch == killchar() && col > 0) { + col = 0; + if (line[0] == ':') + col++; +doerase: + move(CMDLINE, col); + clrtoeol(); + return 0; + } + if (isprint(ch) || ch == ' ') { + line[col] = ch; + mvaddch(CMDLINE, col, ch); + col++; + } + + if (col == 0 || (ch != '\r' && ch != '\n')) + return 0; + + return 1; } Modified: stable/9/usr.bin/systat/main.c ============================================================================== --- stable/9/usr.bin/systat/main.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/main.c Thu Oct 4 22:56:15 2012 (r241213) @@ -64,7 +64,7 @@ kvm_t *kd; sig_t sigtstpdfl; double avenrun[3]; int col; -int naptime = 5; +unsigned int delay = 5000000; /* in microseconds */ int verbose = 1; /* to report kvm read errs */ struct clockinfo clkinfo; double hertz; @@ -82,6 +82,7 @@ main(int argc, char **argv) { char errbuf[_POSIX2_LINE_MAX], dummy; size_t size; + double t; (void) setlocale(LC_ALL, ""); @@ -97,9 +98,9 @@ main(int argc, char **argv) errx(1, "%s: unknown request", &argv[0][1]); curcmd = p; } else { - naptime = atoi(argv[0]); - if (naptime <= 0) - naptime = 5; + t = strtod(argv[0], NULL) * 1000000.0; + if (t > 0 && t < (double)UINT_MAX) + delay = (unsigned int)t; } argc--, argv++; } @@ -166,8 +167,7 @@ main(int argc, char **argv) dellave = 0.0; - signal(SIGALRM, display); - display(0); + display(); noecho(); crmode(); keyboard(); @@ -192,7 +192,7 @@ labels(void) } void -display(int signo __unused) +display() { int i, j; @@ -223,7 +223,6 @@ display(int signo __unused) wrefresh(wnd); move(CMDLINE, col); refresh(); - alarm(naptime); } void Modified: stable/9/usr.bin/systat/systat.1 ============================================================================== --- stable/9/usr.bin/systat/systat.1 Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/systat.1 Thu Oct 4 22:56:15 2012 (r241213) @@ -28,7 +28,7 @@ .\" @(#)systat.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd October 14, 2007 +.Dd September 17, 2012 .Dt SYSTAT 1 .Os .Sh NAME @@ -109,6 +109,7 @@ full detail below. The .Ar refresh-value specifies the screen refresh time interval in seconds. +Time interval can be fractional. .El .Pp Certain characters cause immediate action by Modified: stable/9/usr.bin/systat/tcp.c ============================================================================== --- stable/9/usr.bin/systat/tcp.c Thu Oct 4 22:41:00 2012 (r241212) +++ stable/9/usr.bin/systat/tcp.c Thu Oct 4 22:56:15 2012 (r241213) @@ -147,7 +147,7 @@ domode(struct tcpstat *ret) switch(currentmode) { case display_RATE: sub = &oldstat; - divisor = naptime; + divisor = (delay > 1000000) ? delay / 1000000 : 1; break; case display_DELTA: sub = &oldstat; From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 00:08:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 821BF106566C; Fri, 5 Oct 2012 00:08:18 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BF6C48FC0C; Fri, 5 Oct 2012 00:08:17 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so1526902obb.13 for ; Thu, 04 Oct 2012 17:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IPthyT5vKssHXX4SFZqPrSj/fRVLrSy00sasitiFACE=; b=EkogAwIIjZ7AU5dN1OdRwj8FzzO01gHRPNY6iWYJpUWEmTIEPXjGdJhJRlFr/Q46ZG ytrFMb9c4oA3ZdZq/ixAOEAIeCd3RxT33i0XrqC2R4HhahrbxRytbDnwvuSxgDq7U9H/ r+kMzpPZB5s4ng4fQ05naryCBVhlN9ZEyrLnLb/rk7CalTQO27rl7N010KNgJ4k9MahS RE4uUghxGcOU3M85SnRjgvcDIDUg7QXWwc1mmBdGsG6V5r6alT3d2R8GP/qmne/Wmz+j hONA3YH7gWhr27wrgOU1DNrwouyHcEmyY4frKn2HRLX8GEY01OwaNdo4hANQxcyV+zBO sfdQ== MIME-Version: 1.0 Received: by 10.60.171.134 with SMTP id au6mr5761915oec.69.1349395690886; Thu, 04 Oct 2012 17:08:10 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Thu, 4 Oct 2012 17:08:10 -0700 (PDT) In-Reply-To: <201209242035.q8OKZvUM093772@svn.freebsd.org> References: <201209242035.q8OKZvUM093772@svn.freebsd.org> Date: Thu, 4 Oct 2012 17:08:10 -0700 Message-ID: From: Garrett Cooper To: Adrian Chadd Content-Type: multipart/mixed; boundary=bcaec550b604d1145e04cb44aa73 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240899 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 00:08:18 -0000 --bcaec550b604d1145e04cb44aa73 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Sep 24, 2012 at 1:35 PM, Adrian Chadd wrote: > Author: adrian > Date: Mon Sep 24 20:35:56 2012 > New Revision: 240899 > URL: http://svn.freebsd.org/changeset/base/240899 > > Log: > Migrate the ath(4) KTR logging to use an ATH_KTR() macro. > > This should eventually be unified with ATH_DEBUG() so I can get both > from one macro; that may take some time. > > Add some new probes for TX and TX completion. This commit broke the non-IEEE80211_SUPPORT_TDMA case. My attached patch fixes it by better unifying the IEEE80211_SUPPORT_TDMA and non-IEEE80211_SUPPORT_TDMA cases where it made sense (it could be further unified, but that might make things more convoluted). Thanks! -Garrett --bcaec550b604d1145e04cb44aa73 Content-Type: application/octet-stream; name="fix-if_ath_tx-non-IEEE80211_SUPPORT_TDMA.patch" Content-Disposition: attachment; filename="fix-if_ath_tx-non-IEEE80211_SUPPORT_TDMA.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h7wjb0230 SW5kZXg6IGRldi9hdGgvaWZfYXRoX3R4LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZGV2L2F0aC9pZl9hdGhf dHguYwkocmV2aXNpb24gMjQxMjEzKQorKysgZGV2L2F0aC9pZl9hdGhfdHguYwkod29ya2luZyBj b3B5KQpAQCAtNzI1LDE1ICs3MjUsMTkgQEAKIAogCS8qIEZvciBub3csIHNvIG5vdCB0byBnZW5l cmF0ZSB3aGl0ZXNwYWNlIGRpZmZzICovCiAJaWYgKDEpIHsKLSNpZmRlZiBJRUVFODAyMTFfU1VQ UE9SVF9URE1BCiAJCWludCBxYnVzeTsKIAogCQlBVEhfVFhRX0lOU0VSVF9UQUlMKHR4cSwgYmYs IGJmX2xpc3QpOwogCQlxYnVzeSA9IGF0aF9oYWxfdHhxZW5hYmxlZChhaCwgdHhxLT5heHFfcW51 bSk7Ci0KIAkJQVRIX0tUUihzYywgQVRIX0tUUl9UWCwgNCwKLQkJICAgICJhdGhfdHhfaGFuZG9m ZjogdHhxPSV1LCBhZGQgYmY9JXAsIHFidXN5PSVkLCBkZXB0aD0lZCIsCisJCSAgICAiYXRoX3R4 X2hhbmRvZmYlczogdHhxPSV1LCBhZGQgYmY9JXAsIHFidXN5PSVkLCBkZXB0aD0lZCIsCisjaWZk ZWYgSUVFRTgwMjExX1NVUFBPUlRfVERNQQorCQkgICAgIiIKKyNlbHNlCisJCSAgICAiOiBub24t dGRtYSIKKyNlbmRpZgogCQkgICAgdHhxLT5heHFfcW51bSwgYmYsIHFidXN5LCB0eHEtPmF4cV9k ZXB0aCk7CisjaWZkZWYgSUVFRTgwMjExX1NVUFBPUlRfVERNQQogCQlpZiAodHhxLT5heHFfbGlu ayA9PSBOVUxMKSB7CiAJCQkvKgogCQkJICogQmUgY2FyZWZ1bCB3cml0aW5nIHRoZSBhZGRyZXNz IHRvIFRYRFAuICBJZgpAQCAtODA4LDE0ICs4MTIsNiBAQAogCQkJfQogCQl9CiAjZWxzZQotCQlB VEhfVFhRX0lOU0VSVF9UQUlMKHR4cSwgYmYsIGJmX2xpc3QpOwotCQlBVEhfS1RSKHNjLCBBVEhf S1RSX1RYLCA0LAotCQkgICAgImF0aF90eF9oYW5kb2ZmOiBub24tdGRtYTogdHhxPSV1LCBhZGQg YmY9JXAsIHFidXN5PSVkLCAiCi0JCSAgICAiZGVwdGg9JWQiLAotCQkgICAgdHhxLT5heHFfcW51 bSwKLQkJICAgIGJmLAotCQkgICAgcWJ1c3ksCi0JCSAgICB0eHEtPmF4cV9kZXB0aCk7CiAJCWlm ICh0eHEtPmF4cV9saW5rID09IE5VTEwpIHsKIAkJCWF0aF9oYWxfcHV0dHhidWYoYWgsIHR4cS0+ YXhxX3FudW0sIGJmLT5iZl9kYWRkcik7CiAJCQlEUFJJTlRGKHNjLCBBVEhfREVCVUdfWE1JVCwK --bcaec550b604d1145e04cb44aa73-- From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 00:35:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B400106564A; Fri, 5 Oct 2012 00:35:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458558FC17; Fri, 5 Oct 2012 00:35:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q950ZEwM052731; Fri, 5 Oct 2012 00:35:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q950ZERI052728; Fri, 5 Oct 2012 00:35:14 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201210050035.q950ZERI052728@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 5 Oct 2012 00:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241214 - in head: . lib/clang/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 00:35:14 -0000 Author: jkim Date: Fri Oct 5 00:35:13 2012 New Revision: 241214 URL: http://svn.freebsd.org/changeset/base/241214 Log: Do not install incomplete unwind.h from clang. This header file was meant to be a wrapper for the canonical system header file. Unfortunately, we do not have one (yet) and some times it is causing weird failures when clang is used for building ports. More complete and correct file will come from libcxxrt in the future. Discussed with: dim, kib, theraven MFC after: 1 week Modified: head/ObsoleteFiles.inc head/lib/clang/include/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Oct 4 22:56:15 2012 (r241213) +++ head/ObsoleteFiles.inc Fri Oct 5 00:35:13 2012 (r241214) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20121004: remove incomplete unwind.h +OLD_FILES+=usr/include/clang/3.2/unwind.h # 20120908: pf cleanup OLD_FILES+=usr/include/net/if_pflow.h # 20120816: new clang import which bumps version from 3.1 to 3.2 Modified: head/lib/clang/include/Makefile ============================================================================== --- head/lib/clang/include/Makefile Thu Oct 4 22:56:15 2012 (r241213) +++ head/lib/clang/include/Makefile Fri Oct 5 00:35:13 2012 (r241214) @@ -25,7 +25,6 @@ INCS= altivec.h \ popcntintrin.h \ smmintrin.h \ tmmintrin.h \ - unwind.h \ wmmintrin.h \ x86intrin.h \ xmmintrin.h \ From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 03:35:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71619106566B; Fri, 5 Oct 2012 03:35:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C75E8FC08; Fri, 5 Oct 2012 03:35:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q953Zdfm079043; Fri, 5 Oct 2012 03:35:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q953ZdLs079041; Fri, 5 Oct 2012 03:35:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050335.q953ZdLs079041@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 03:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241215 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 03:35:39 -0000 Author: yongari Date: Fri Oct 5 03:35:38 2012 New Revision: 241215 URL: http://svn.freebsd.org/changeset/base/241215 Log: Don't touch EMAC Mode and TX/RX MAC Mode register when driver is not running. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 00:35:13 2012 (r241214) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 03:35:38 2012 (r241215) @@ -896,7 +896,10 @@ bge_miibus_statchg(device_t dev) { struct bge_softc *sc; struct mii_data *mii; + sc = device_get_softc(dev); + if ((sc->bge_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; mii = device_get_softc(sc->bge_miibus); if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == @@ -5054,11 +5057,11 @@ bge_init_locked(struct bge_softc *sc) bge_writembx(sc, BGE_MBX_IRQ0_LO, 0); } - bge_ifmedia_upd_locked(ifp); - ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + bge_ifmedia_upd_locked(ifp); + callout_reset(&sc->bge_stat_ch, hz, bge_tick, sc); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 03:46:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 183FD1065670; Fri, 5 Oct 2012 03:46:28 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B953D8FC08; Fri, 5 Oct 2012 03:46:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q953kPu7080590; Fri, 5 Oct 2012 03:46:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q953kPdK080588; Fri, 5 Oct 2012 03:46:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050346.q953kPdK080588@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 03:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241216 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 03:46:28 -0000 Author: yongari Date: Fri Oct 5 03:46:25 2012 New Revision: 241216 URL: http://svn.freebsd.org/changeset/base/241216 Log: APE firmware touches EMAC Mode and TX/RX MAC Mode registers to keep the MAC connected to the outside world. So keep the accesses atomic. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 03:35:38 2012 (r241215) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 03:46:25 2012 (r241216) @@ -896,6 +896,7 @@ bge_miibus_statchg(device_t dev) { struct bge_softc *sc; struct mii_data *mii; + uint32_t mac_mode, rx_mode, tx_mode; sc = device_get_softc(dev); if ((sc->bge_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -925,30 +926,39 @@ bge_miibus_statchg(device_t dev) sc->bge_link = 0; if (sc->bge_link == 0) return; - BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE); + + /* + * APE firmware touches these registers to keep the MAC + * connected to the outside world. Try to keep the + * accesses atomic. + */ + + /* Set the port mode (MII/GMII) to match the link speed. */ + mac_mode = CSR_READ_4(sc, BGE_MAC_MODE) & + ~(BGE_MACMODE_PORTMODE | BGE_MACMODE_HALF_DUPLEX); + tx_mode = CSR_READ_4(sc, BGE_TX_MODE); + rx_mode = CSR_READ_4(sc, BGE_RX_MODE); + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) - BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII); + mac_mode |= BGE_PORTMODE_GMII; else - BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII); + mac_mode |= BGE_PORTMODE_MII; + /* Set MAC flow control behavior to match link flow control settings. */ + tx_mode &= ~BGE_TXMODE_FLOWCTL_ENABLE; + rx_mode &= ~BGE_RXMODE_FLOWCTL_ENABLE; if (IFM_OPTIONS(mii->mii_media_active & IFM_FDX) != 0) { - BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); - if ((IFM_OPTIONS(mii->mii_media_active) & - IFM_ETH_TXPAUSE) != 0) - BGE_SETBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - else - BGE_CLRBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - if ((IFM_OPTIONS(mii->mii_media_active) & - IFM_ETH_RXPAUSE) != 0) - BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); - else - BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); - } else { - BGE_SETBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); - BGE_CLRBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); - } + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) + tx_mode |= BGE_TXMODE_FLOWCTL_ENABLE; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) + rx_mode |= BGE_RXMODE_FLOWCTL_ENABLE; + } else + mac_mode |= BGE_MACMODE_HALF_DUPLEX; + + CSR_WRITE_4(sc, BGE_MAC_MODE, mac_mode); + CSR_WRITE_4(sc, BGE_TX_MODE, tx_mode); + CSR_WRITE_4(sc, BGE_RX_MODE, rx_mode); } /* From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 04:35:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA539106566B; Fri, 5 Oct 2012 04:35:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B55E68FC1A; Fri, 5 Oct 2012 04:35:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q954ZK7b088209; Fri, 5 Oct 2012 04:35:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q954ZKxg088207; Fri, 5 Oct 2012 04:35:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210050435.q954ZKxg088207@svn.freebsd.org> From: Alan Cox Date: Fri, 5 Oct 2012 04:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241217 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 04:35:20 -0000 Author: alc Date: Fri Oct 5 04:35:20 2012 New Revision: 241217 URL: http://svn.freebsd.org/changeset/base/241217 Log: Eliminate a stale and a duplicated comment. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Oct 5 03:46:25 2012 (r241216) +++ head/sys/mips/mips/pmap.c Fri Oct 5 04:35:20 2012 (r241217) @@ -1621,13 +1621,6 @@ retry: return (pv); } -/* - * If it is the first entry on the list, it is actually - * in the header and we must copy the following entry up - * to the header. Otherwise we must search the list for - * the entry. In either case we free the now unused entry. - */ - static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va) { @@ -2945,13 +2938,6 @@ pmap_clear_reference(vm_page_t m) * address space. Return a pointer to where it is mapped. This * routine is intended to be used for mapping device memory, * NOT real memory. - */ - -/* - * Map a set of physical memory pages into the kernel virtual - * address space. Return a pointer to where it is mapped. This - * routine is intended to be used for mapping device memory, - * NOT real memory. * * Use XKPHYS uncached for 64 bit, and KSEG1 where possible for 32 bit. */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 05:01:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 909281065672; Fri, 5 Oct 2012 05:01:43 +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 6FE3C8FC0A; Fri, 5 Oct 2012 05:01:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9551hpB092358; Fri, 5 Oct 2012 05:01:43 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9551hCL092356; Fri, 5 Oct 2012 05:01:43 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210050501.q9551hCL092356@svn.freebsd.org> From: Doug Barton Date: Fri, 5 Oct 2012 05:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241218 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 05:01:43 -0000 Author: dougb Date: Fri Oct 5 05:01:42 2012 New Revision: 241218 URL: http://svn.freebsd.org/changeset/base/241218 Log: Remove references to CVS so that people will stop bringing it up For -p: The localtime update should have been excluded in the first place The make.conf comparison has been OBE for some time now, and there is no src.conf equivalent to share/examples/make.conf, so remove the whole thing. Update copyright Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Oct 5 04:35:20 2012 (r241217) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Oct 5 05:01:42 2012 (r241218) @@ -5,8 +5,8 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2011 Douglas Barton -# dougb@FreeBSD.org +# Copyright (c) 1998-2012 Douglas Barton, All rights reserved +# Please see detailed copyright below # $FreeBSD$ @@ -532,9 +532,9 @@ if [ -t 0 ]; then esac fi -# Define what CVS $Id tag to look for to aid portability. +# Define what $Id tag to look for to aid portability. # -CVS_ID_TAG=FreeBSD +ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null @@ -1095,17 +1095,17 @@ for COMPFILE in `find . -type f | sort`; case "${STRICT}" in '' | [Nn][Oo]) - # Compare CVS $Id's first so if the file hasn't been modified + # Compare $Id's first so if the file hasn't been modified # local changes will be ignored. # If the files have the same $Id, delete the one in temproot so the # user will have less to wade through if files are left to merge by hand. # - CVSID1=`grep "[$]${CVS_ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` - CVSID2=`grep "[$]${CVS_ID_TAG}:" ${COMPFILE} 2>/dev/null` || CVSID2=none + ID1=`grep "[$]${ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` + ID2=`grep "[$]${ID_TAG}:" ${COMPFILE} 2>/dev/null` || ID2=none - case "${CVSID2}" in - "${CVSID1}") - echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" + case "${ID2}" in + "${ID1}") + echo " *** Temp ${COMPFILE} and installed have the same Id, deleting" rm "${COMPFILE}" ;; esac @@ -1334,7 +1334,7 @@ case "${NEED_PWD_MKDB}" in ;; esac -if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC +if [ -e "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC echo '' [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then @@ -1380,29 +1380,35 @@ case "${COMP_CONFS}" in ;; esac -case "${PRE_WORLD}" in -'') ;; -*) - MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" - - (echo '' - echo '*** Comparing make variables' - echo '' - echo "*** From ${DESTDIR}/etc/make.conf" - echo "*** From ${MAKE_CONF}" - - for MAKE_VAR in `grep -i ^[a-z] ${DESTDIR}/etc/make.conf | cut -d '=' -f 1`; do - echo '' - grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf - grep -w ^#${MAKE_VAR} ${MAKE_CONF} || - echo ' * No example variable with this name' - done) | ${PAGER} - ;; -esac - if [ -n "${PRESERVE_FILES}" ]; then find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null rmdir $PRESERVE_FILES_DIR 2>/dev/null fi exit 0 + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Copyright (c) 1998-2012 Douglas Barton +# 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. From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 06:24:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F9531065672; Fri, 5 Oct 2012 06:24:23 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 209738FC08; Fri, 5 Oct 2012 06:24:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q956OMjK006078; Fri, 5 Oct 2012 06:24:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q956OM06006076; Fri, 5 Oct 2012 06:24:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050624.q956OM06006076@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 06:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241219 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 06:24:23 -0000 Author: yongari Date: Fri Oct 5 06:24:22 2012 New Revision: 241219 URL: http://svn.freebsd.org/changeset/base/241219 Log: Add 40 microseconds delay after updating EMAC Mode register as recommended by Broadcom data sheet. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 05:01:42 2012 (r241218) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 06:24:22 2012 (r241219) @@ -957,6 +957,7 @@ bge_miibus_statchg(device_t dev) mac_mode |= BGE_MACMODE_HALF_DUPLEX; CSR_WRITE_4(sc, BGE_MAC_MODE, mac_mode); + DELAY(40); CSR_WRITE_4(sc, BGE_TX_MODE, tx_mode); CSR_WRITE_4(sc, BGE_RX_MODE, rx_mode); } @@ -1434,6 +1435,7 @@ bge_chipinit(struct bge_softc *sc) /* Clear the MAC control register */ CSR_WRITE_4(sc, BGE_MAC_MODE, 0); + DELAY(40); /* * Clear the MAC statistics block in the NIC's @@ -2046,6 +2048,7 @@ bge_blockinit(struct bge_softc *sc) /* Turn on DMA, clear stats */ CSR_WRITE_4(sc, BGE_MAC_MODE, val); + DELAY(40); /* Set misc. local control, enable interrupts on attentions */ CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN); @@ -3752,6 +3755,7 @@ bge_reset(struct bge_softc *sc) BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_STACKUP); CSR_WRITE_4(sc, BGE_MAC_MODE, 0); + DELAY(40); /* * The 5704 in TBI mode apparently needs some special @@ -5148,6 +5152,7 @@ bge_ifmedia_upd_locked(struct ifnet *ifp BGE_SETBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); } + DELAY(40); break; default: return (EINVAL); @@ -5623,9 +5628,11 @@ bge_link_upd(struct bge_softc *sc) if (status & BGE_MACSTAT_TBI_PCS_SYNCHED) { if (!sc->bge_link) { sc->bge_link++; - if (sc->bge_asicrev == BGE_ASICREV_BCM5704) + if (sc->bge_asicrev == BGE_ASICREV_BCM5704) { BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_TBI_SEND_CFGS); + DELAY(40); + } CSR_WRITE_4(sc, BGE_MAC_STS, 0xFFFFFFFF); if (bootverbose) if_printf(sc->bge_ifp, "link UP\n"); From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 06:34:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37E77106566B; Fri, 5 Oct 2012 06:34:15 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8D0C18FC12; Fri, 5 Oct 2012 06:34:13 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id x43so1047170wey.13 for ; Thu, 04 Oct 2012 23:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=rc1ABDFZkaYESpNeImea/np42X+PWXn7GOc7nlOqDQs=; b=L1MnhuK53OR0Y+Ytw/XM1E9ns3HIIpKDMsipr+Rve/cvsTOSyxmXQ6B/30VdYaeHsJ 62qc0JpKiOgG5crDPQ6GZW+cgg1iVQTXKjFN3iKUH5/U7Rf84RcSc0awc2FpyiRYf+yp vnCF16eoxFlq4QMl1zGYTxMs06dJBazaV776i/qVIgpHoTE0iEgQU2qJWan8N5A9K9uc wieymKjxF0ZhhE+/aojbqntV9wnfdqQ/A02Y+M2goMGbGp7X6+qUlGzwA9XT7z8Vz8Yt Xdi8ZwlgnKafjhcmNduZ6kY5GHJ/yvaDI0pNDZWEp33h7Imudq9Yrvh86pdffUQQtw57 Yy1A== Received: by 10.216.195.133 with SMTP id p5mr4953304wen.1.1349418852823; Thu, 04 Oct 2012 23:34:12 -0700 (PDT) Received: from [10.0.0.86] ([93.152.184.10]) by mx.google.com with ESMTPS id q7sm815212wiy.11.2012.10.04.23.34.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Oct 2012 23:34:11 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: <201209201005.q8KA5BqZ094414@svn.freebsd.org> Date: Fri, 5 Oct 2012 09:34:07 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1498) Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 06:34:15 -0000 On Sep 20, 2012, at 1:05 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Sep 20 10:05:10 2012 > New Revision: 240742 > URL: http://svn.freebsd.org/changeset/base/240742 >=20 > Log: > Convert lagg(4) to use if_transmit instead of if_start. >=20 > In collaboration with: thompsa, sbruno, fabient >=20 > Modified: > head/sys/net/if_lagg.c >=20 > Modified: head/sys/net/if_lagg.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/net/if_lagg.c Thu Sep 20 09:52:57 2012 = (r240741) > +++ head/sys/net/if_lagg.c Thu Sep 20 10:05:10 2012 = (r240742) > @@ -110,7 +110,8 @@ static int lagg_ether_cmdmulti(struct la > static int lagg_setflag(struct lagg_port *, int, int, > int (*func)(struct ifnet *, int)); > static int lagg_setflags(struct lagg_port *, int status); > -static void lagg_start(struct ifnet *); > +static int lagg_transmit(struct ifnet *, struct mbuf *); > +static void lagg_qflush(struct ifnet *); > static int lagg_media_change(struct ifnet *); > static void lagg_media_status(struct ifnet *, struct ifmediareq *); > static struct lagg_port *lagg_link_active(struct lagg_softc *, > @@ -312,15 +313,12 @@ lagg_clone_create(struct if_clone *ifc,=20 >=20 > if_initname(ifp, ifc->ifc_name, unit); > ifp->if_softc =3D sc; > - ifp->if_start =3D lagg_start; > + ifp->if_transmit =3D lagg_transmit; > + ifp->if_qflush =3D lagg_qflush; > ifp->if_init =3D lagg_init; > ifp->if_ioctl =3D lagg_ioctl; > ifp->if_flags =3D IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; >=20 > - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); > - ifp->if_snd.ifq_drv_maxlen =3D ifqmaxlen; > - IFQ_SET_READY(&ifp->if_snd); > - > /* > * Attach as an ordinary ethernet device, children will be = attached > * as special device IFT_IEEE8023ADLAG. > @@ -1222,35 +1220,45 @@ lagg_setflags(struct lagg_port *lp, int=20 > return (0); > } >=20 > -static void > -lagg_start(struct ifnet *ifp) > +static int > +lagg_transmit(struct ifnet *ifp, struct mbuf *m) > { > struct lagg_softc *sc =3D (struct lagg_softc *)ifp->if_softc; > - struct mbuf *m; > - int error =3D 0; > + int error, len, mcast; > + > + len =3D m->m_pkthdr.len; > + mcast =3D (m->m_flags & (M_MCAST | M_BCAST)) ? 1 : 0; >=20 > LAGG_RLOCK(sc); > /* We need a Tx algorithm and at least one port */ > if (sc->sc_proto =3D=3D LAGG_PROTO_NONE || sc->sc_count =3D=3D = 0) { > - IF_DRAIN(&ifp->if_snd); > LAGG_RUNLOCK(sc); > - return; > + m_freem(m); > + ifp->if_oerrors++; > + return (ENXIO); > } >=20 > - for (;; error =3D 0) { > - IFQ_DEQUEUE(&ifp->if_snd, m); > - if (m =3D=3D NULL) > - break; > + ETHER_BPF_MTAP(ifp, m); >=20 > - ETHER_BPF_MTAP(ifp, m); > - > - error =3D (*sc->sc_start)(sc, m); > - if (error =3D=3D 0) > - ifp->if_opackets++; > - else > - ifp->if_oerrors++; > - } > + error =3D (*sc->sc_start)(sc, m); > LAGG_RUNLOCK(sc); > + > + if (error =3D=3D 0) { > + ifp->if_opackets++; > + ifp->if_omcasts +=3D mcast; > + ifp->if_obytes +=3D len; > + } else > + ifp->if_oerrors++; > + > + return (error); > +} > + > +/* > + * The ifp->if_qflush entry point for lagg(4) is no-op. > + */ > +static void > +lagg_qflush(struct ifnet *ifp __unused) > +{ > } >=20 > static struct mbuf * > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Hi, Are there any plans to MFC this change and the one for if_bridge? This one applies cleanly on RELENG_9 and I will have the opportunity to = test it later today. Regards, Nikolay= From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 07:09:16 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AB2A106564A for ; Fri, 5 Oct 2012 07:09:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6528FC12 for ; Fri, 5 Oct 2012 07:09:15 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9579ERP049592; Fri, 5 Oct 2012 11:09:14 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9579E3i049591; Fri, 5 Oct 2012 11:09:14 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 5 Oct 2012 11:09:14 +0400 From: Gleb Smirnoff To: Nikolay Denev Message-ID: <20121005070914.GI34622@glebius.int.ru> References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 07:09:16 -0000 On Fri, Oct 05, 2012 at 09:34:07AM +0300, Nikolay Denev wrote: N> > Date: Thu Sep 20 10:05:10 2012 N> > New Revision: 240742 N> > URL: http://svn.freebsd.org/changeset/base/240742 N> > N> > Log: N> > Convert lagg(4) to use if_transmit instead of if_start. N> > N> > In collaboration with: thompsa, sbruno, fabient N> > N> > Modified: N> > head/sys/net/if_lagg.c ... N> Are there any plans to MFC this change and the one for if_bridge? N> This one applies cleanly on RELENG_9 and I will have the opportunity to test it later today. Sure we can, if you test it. Thanks! -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 07:13:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF8DA106564A; Fri, 5 Oct 2012 07:13:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAEC58FC0C; Fri, 5 Oct 2012 07:13:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q957DLMR014267; Fri, 5 Oct 2012 07:13:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q957DLi4014265; Fri, 5 Oct 2012 07:13:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050713.q957DLi4014265@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 07:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241220 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 07:13:22 -0000 Author: yongari Date: Fri Oct 5 07:13:21 2012 New Revision: 241220 URL: http://svn.freebsd.org/changeset/base/241220 Log: Follow Broadcom datasheet: Delay 100 microseconds after enabling transmit MAC. Delay 10 microseconds after enabling receive MAC. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 06:24:22 2012 (r241219) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 07:13:21 2012 (r241220) @@ -5033,9 +5033,11 @@ bge_init_locked(struct bge_softc *sc) } /* Turn on transmitter. */ CSR_WRITE_4(sc, BGE_TX_MODE, mode | BGE_TXMODE_ENABLE); + DELAY(100); /* Turn on receiver. */ BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_ENABLE); + DELAY(10); /* * Set the number of good frames to receive after RX MBUF From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 07:51:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EC39106566B; Fri, 5 Oct 2012 07:51:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22DD58FC1D; Fri, 5 Oct 2012 07:51:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q957pMom020738; Fri, 5 Oct 2012 07:51:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q957pL1X020732; Fri, 5 Oct 2012 07:51:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210050751.q957pL1X020732@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 5 Oct 2012 07:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241221 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 07:51:22 -0000 Author: glebius Date: Fri Oct 5 07:51:21 2012 New Revision: 241221 URL: http://svn.freebsd.org/changeset/base/241221 Log: Provide ability for printing and decoding pfsync(4) traffic. This doesn't mean supporting IFT_PFSYNC (which I hope will eventually die). This means decoding packets with IP protocol of 240 caught on any normal interface like Ethernet. The code is based on couple of files from OpenBSD, significantly modified by myself. Parser differentiates for four levels of verbosity: no -v, -v, -vv and -vvv. We don't yet forward this code upstream, because currently it strongly relies on if_pfsync.h and even on pfvar.h. I hope that this can be fixed in future. Reviewed by: gnn, delphij Added: head/contrib/tcpdump/print-pfsync.c (contents, props changed) Modified: head/contrib/tcpdump/interface.h head/contrib/tcpdump/ipproto.c head/contrib/tcpdump/print-ip.c head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/contrib/tcpdump/interface.h ============================================================================== --- head/contrib/tcpdump/interface.h Fri Oct 5 07:13:21 2012 (r241220) +++ head/contrib/tcpdump/interface.h Fri Oct 5 07:51:21 2012 (r241221) @@ -183,6 +183,7 @@ extern void dvmrp_print(const u_char *, extern void egp_print(const u_char *, u_int); extern u_int enc_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *); +extern void pfsync_ip_print(const u_char *, u_int); extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int token_print(const u_char *, u_int, u_int); Modified: head/contrib/tcpdump/ipproto.c ============================================================================== --- head/contrib/tcpdump/ipproto.c Fri Oct 5 07:13:21 2012 (r241220) +++ head/contrib/tcpdump/ipproto.c Fri Oct 5 07:51:21 2012 (r241221) @@ -56,6 +56,7 @@ const struct tok ipproto_values[] = { { IPPROTO_SCTP, "SCTP" }, { IPPROTO_MOBILITY, "Mobility" }, { IPPROTO_CARP, "CARP" }, + { IPPROTO_PFSYNC, "pfsync" }, { 0, NULL } }; Modified: head/contrib/tcpdump/print-ip.c ============================================================================== --- head/contrib/tcpdump/print-ip.c Fri Oct 5 07:13:21 2012 (r241220) +++ head/contrib/tcpdump/print-ip.c Fri Oct 5 07:51:21 2012 (r241221) @@ -483,6 +483,10 @@ again: pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); break; + case IPPROTO_PFSYNC: + pfsync_ip_print(ipds->cp, ipds->len); + break; + default: if ((proto = getprotobynumber(ipds->nh)) != NULL) ND_PRINT((ndo, " %s", proto->p_name)); Added: head/contrib/tcpdump/print-pfsync.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tcpdump/print-pfsync.c Fri Oct 5 07:51:21 2012 (r241221) @@ -0,0 +1,451 @@ +/* + * Copyright (c) 2012 Gleb Smirnoff + * Copyright (c) 2002 Michael Shalayeff + * Copyright (c) 2001 Daniel Hartmeier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + * + * $OpenBSD: print-pfsync.c,v 1.38 2012/09/19 13:50:36 mikeb Exp $ + * $OpenBSD: pf_print_state.c,v 1.11 2012/07/08 17:48:37 lteo Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include /* XXX */ +#include +#include +#define TCPSTATES +#include + +#include + +#include "interface.h" +#include "addrtoname.h" + +static void pfsync_print(struct pfsync_header *, const u_char *, u_int); +static void print_src_dst(const struct pfsync_state_peer *, + const struct pfsync_state_peer *, uint8_t); +static void print_state(struct pfsync_state *); + +#ifdef notyet +void +pfsync_if_print(u_char *user, const struct pcap_pkthdr *h, + register const u_char *p) +{ + u_int caplen = h->caplen; + + ts_print(&h->ts); + + if (caplen < PFSYNC_HDRLEN) { + printf("[|pfsync]"); + goto out; + } + + pfsync_print((struct pfsync_header *)p, + p + sizeof(struct pfsync_header), + caplen - sizeof(struct pfsync_header)); +out: + if (xflag) { + default_print((const u_char *)p, caplen); + } + putchar('\n'); +} +#endif /* notyet */ + +void +pfsync_ip_print(const u_char *bp, u_int len) +{ + struct pfsync_header *hdr = (struct pfsync_header *)bp; + + if (len < PFSYNC_HDRLEN) + printf("[|pfsync]"); + else + pfsync_print(hdr, bp + sizeof(struct pfsync_header), + len - sizeof(struct pfsync_header)); +} + +struct pfsync_actions { + const char *name; + size_t len; + void (*print)(const void *); +}; + +static void pfsync_print_clr(const void *); +static void pfsync_print_state(const void *); +static void pfsync_print_ins_ack(const void *); +static void pfsync_print_upd_c(const void *); +static void pfsync_print_upd_req(const void *); +static void pfsync_print_del_c(const void *); +static void pfsync_print_bus(const void *); +static void pfsync_print_tdb(const void *); + +struct pfsync_actions actions[] = { + { "clear all", sizeof(struct pfsync_clr), pfsync_print_clr }, + { "insert", sizeof(struct pfsync_state), pfsync_print_state }, + { "insert ack", sizeof(struct pfsync_ins_ack), pfsync_print_ins_ack }, + { "update", sizeof(struct pfsync_ins_ack), pfsync_print_state }, + { "update compressed", sizeof(struct pfsync_upd_c), + pfsync_print_upd_c }, + { "request uncompressed", sizeof(struct pfsync_upd_req), + pfsync_print_upd_req }, + { "delete", sizeof(struct pfsync_state), pfsync_print_state }, + { "delete compressed", sizeof(struct pfsync_del_c), + pfsync_print_del_c }, + { "frag insert", 0, NULL }, + { "frag delete", 0, NULL }, + { "bulk update status", sizeof(struct pfsync_bus), + pfsync_print_bus }, + { "tdb", 0, pfsync_print_tdb }, + { "eof", 0, NULL }, +}; + +static void +pfsync_print(struct pfsync_header *hdr, const u_char *bp, u_int len) +{ + struct pfsync_subheader *subh; + int count, plen, i; + u_int alen; + + plen = ntohs(hdr->len); + + printf("PFSYNCv%d len %d", hdr->version, plen); + + if (hdr->version != PFSYNC_VERSION) + return; + + plen -= sizeof(*hdr); + + while (plen > 0) { + if (len < sizeof(*subh)) + break; + + subh = (struct pfsync_subheader *)bp; + bp += sizeof(*subh); + len -= sizeof(*subh); + plen -= sizeof(*subh); + + if (subh->action >= PFSYNC_ACT_MAX) { + printf("\n act UNKNOWN id %d", subh->action); + return; + } + + count = ntohs(subh->count); + printf("\n %s count %d", actions[subh->action].name, count); + alen = actions[subh->action].len; + + if (subh->action == PFSYNC_ACT_EOF) + return; + + if (actions[subh->action].print == NULL) { + printf("\n unimplemented action %hhu", subh->action); + return; + } + + for (i = 0; i < count; i++) { + if (len < alen) { + len = 0; + break; + } + + if (vflag) + actions[subh->action].print(bp); + + bp += alen; + len -= alen; + plen -= alen; + } + } + + if (plen > 0) { + printf("\n ..."); + return; + } + if (plen < 0) { + printf("\n invalid header length"); + return; + } + if (len > 0) + printf("\n invalid packet length"); +} + +static void +pfsync_print_clr(const void *bp) +{ + const struct pfsync_clr *clr = bp; + + printf("\n\tcreatorid: %08x", htonl(clr->creatorid)); + if (clr->ifname[0] != '\0') + printf(" interface: %s", clr->ifname); +} + +static void +pfsync_print_state(const void *bp) +{ + struct pfsync_state *st = (struct pfsync_state *)bp; + + putchar('\n'); + print_state(st); +} + +static void +pfsync_print_ins_ack(const void *bp) +{ + const struct pfsync_ins_ack *iack = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(iack->id), + ntohl(iack->creatorid)); +} + +static void +pfsync_print_upd_c(const void *bp) +{ + const struct pfsync_upd_c *u = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(u->id), + ntohl(u->creatorid)); + if (vflag > 2) { + printf("\n\tTCP? :"); + print_src_dst(&u->src, &u->dst, IPPROTO_TCP); + } +} + +static void +pfsync_print_upd_req(const void *bp) +{ + const struct pfsync_upd_req *ur = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(ur->id), + ntohl(ur->creatorid)); +} + +static void +pfsync_print_del_c(const void *bp) +{ + const struct pfsync_del_c *d = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(d->id), + ntohl(d->creatorid)); +} + +static void +pfsync_print_bus(const void *bp) +{ + const struct pfsync_bus *b = bp; + uint32_t endtime; + int min, sec; + const char *status; + + endtime = ntohl(b->endtime); + sec = endtime % 60; + endtime /= 60; + min = endtime % 60; + endtime /= 60; + + switch (b->status) { + case PFSYNC_BUS_START: + status = "start"; + break; + case PFSYNC_BUS_END: + status = "end"; + break; + default: + status = "UNKNOWN"; + break; + } + + printf("\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", + htonl(b->creatorid), endtime, min, sec, status); +} + +static void +pfsync_print_tdb(const void *bp) +{ + const struct pfsync_tdb *t = bp; + + printf("\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", + ntohl(t->spi), (uintmax_t )be64toh(t->rpl), + (uintmax_t )be64toh(t->cur_bytes)); +} + +static void +print_host(struct pf_addr *addr, uint16_t port, sa_family_t af, + const char *proto) +{ + char buf[48]; + + if (inet_ntop(af, addr, buf, sizeof(buf)) == NULL) + printf("?"); + else + printf("%s", buf); + + if (port) + printf(".%hu", ntohs(port)); +} + +static void +print_seq(const struct pfsync_state_peer *p) +{ + if (p->seqdiff) + printf("[%u + %u](+%u)", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff)); + else + printf("[%u + %u]", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo)); +} + +static void +print_src_dst(const struct pfsync_state_peer *src, + const struct pfsync_state_peer *dst, uint8_t proto) +{ + + if (proto == IPPROTO_TCP) { + if (src->state <= TCPS_TIME_WAIT && + dst->state <= TCPS_TIME_WAIT) + printf(" %s:%s", tcpstates[src->state], + tcpstates[dst->state]); + else if (src->state == PF_TCPS_PROXY_SRC || + dst->state == PF_TCPS_PROXY_SRC) + printf(" PROXY:SRC"); + else if (src->state == PF_TCPS_PROXY_DST || + dst->state == PF_TCPS_PROXY_DST) + printf(" PROXY:DST"); + else + printf(" ", + src->state, dst->state); + if (vflag > 1) { + printf("\n\t"); + print_seq(src); + if (src->wscale && dst->wscale) + printf(" wscale %u", + src->wscale & PF_WSCALE_MASK); + printf(" "); + print_seq(dst); + if (src->wscale && dst->wscale) + printf(" wscale %u", + dst->wscale & PF_WSCALE_MASK); + } + } else if (proto == IPPROTO_UDP && src->state < PFUDPS_NSTATES && + dst->state < PFUDPS_NSTATES) { + const char *states[] = PFUDPS_NAMES; + + printf(" %s:%s", states[src->state], states[dst->state]); + } else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES && + dst->state < PFOTHERS_NSTATES) { + /* XXX ICMP doesn't really have state levels */ + const char *states[] = PFOTHERS_NAMES; + + printf(" %s:%s", states[src->state], states[dst->state]); + } else { + printf(" %u:%u", src->state, dst->state); + } +} + +static void +print_state(struct pfsync_state *s) +{ + struct pfsync_state_peer *src, *dst; + struct pfsync_state_key *sk, *nk; + int min, sec; + + if (s->direction == PF_OUT) { + src = &s->src; + dst = &s->dst; + sk = &s->key[PF_SK_STACK]; + nk = &s->key[PF_SK_WIRE]; + if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6) + sk->port[0] = nk->port[0]; + } else { + src = &s->dst; + dst = &s->src; + sk = &s->key[PF_SK_WIRE]; + nk = &s->key[PF_SK_STACK]; + if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6) + sk->port[1] = nk->port[1]; + } + printf("\t%s ", s->ifname); + printf("proto %u ", s->proto); + + print_host(&nk->addr[1], nk->port[1], s->af, NULL); + if (PF_ANEQ(&nk->addr[1], &sk->addr[1], s->af) || + nk->port[1] != sk->port[1]) { + printf(" ("); + print_host(&sk->addr[1], sk->port[1], s->af, NULL); + printf(")"); + } + if (s->direction == PF_OUT) + printf(" -> "); + else + printf(" <- "); + print_host(&nk->addr[0], nk->port[0], s->af, NULL); + if (PF_ANEQ(&nk->addr[0], &sk->addr[0], s->af) || + nk->port[0] != sk->port[0]) { + printf(" ("); + print_host(&sk->addr[0], sk->port[0], s->af, NULL); + printf(")"); + } + + print_src_dst(src, dst, s->proto); + + if (vflag > 1) { + uint64_t packets[2]; + uint64_t bytes[2]; + uint32_t creation = ntohl(s->creation); + uint32_t expire = ntohl(s->expire); + + sec = creation % 60; + creation /= 60; + min = creation % 60; + creation /= 60; + printf("\n\tage %.2u:%.2u:%.2u", creation, min, sec); + sec = expire % 60; + expire /= 60; + min = expire % 60; + expire /= 60; + printf(", expires in %.2u:%.2u:%.2u", expire, min, sec); + + bcopy(s->packets[0], &packets[0], sizeof(uint64_t)); + bcopy(s->packets[1], &packets[1], sizeof(uint64_t)); + bcopy(s->bytes[0], &bytes[0], sizeof(uint64_t)); + bcopy(s->bytes[1], &bytes[1], sizeof(uint64_t)); + printf(", %ju:%ju pkts, %ju:%ju bytes", + be64toh(packets[0]), be64toh(packets[1]), + be64toh(bytes[0]), be64toh(bytes[1])); + if (s->anchor != ntohl(-1)) + printf(", anchor %u", ntohl(s->anchor)); + if (s->rule != ntohl(-1)) + printf(", rule %u", ntohl(s->rule)); + } + if (vflag > 1) { + uint64_t id; + + bcopy(&s->id, &id, sizeof(uint64_t)); + printf("\n\tid: %016jx creatorid: %08x", + (uintmax_t )be64toh(id), ntohl(s->creatorid)); + } +} Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Fri Oct 5 07:13:21 2012 (r241220) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Fri Oct 5 07:51:21 2012 (r241221) @@ -25,6 +25,7 @@ SRCS = addrtoname.c af.c checksum.c cpac print-lwapp.c print-lwres.c print-mobile.c print-mpls.c print-msdp.c \ print-mpcp.c \ print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ + print-pfsync.c \ print-pgm.c print-pim.c print-ppi.c print-ppp.c print-pppoe.c \ print-pptp.c print-radius.c print-raw.c print-rip.c \ print-rpki-rtr.c \ From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 08:02:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15721106567E; Fri, 5 Oct 2012 08:02:28 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 6AE328FC1F; Fri, 5 Oct 2012 08:02:26 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hq12so195428wib.13 for ; Fri, 05 Oct 2012 01:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=RYW0NT3LmQS0rTRruLV+zqVPX/tdh0UmlenBAKpFVjA=; b=ak9dUuTaF0iP9kUJyEnBxZ49x7+w8dRN7ysWgDj39YqDN9gYeHvhAu1AuHonAvUfST 5fP7zJdS+GWcL0yHVbTes2ukEtuuSYuXffEPUuTnCBQUY5iYVnCVecj3oYCAEqb+QL0A XfH2zU1mKYWhyalgEaddW/+1t+MJvJh1BVsn3VIS7P56j1QIriZY5d19WUptA4vprIe8 NGv6+Vors5tTRhcJuQQDzPvBdLnUsX2poslNHNDZOOHMByGJQG06pliMeLiINIz/TCyN hOmu8mx5gWVV/21FyTGi5WR5VTIjxt7fDhBZlUtX7/3ntEcOXE0WayJ/3dV+rVL9OSZ9 cspA== Received: by 10.216.210.11 with SMTP id t11mr4855897weo.92.1349424145695; Fri, 05 Oct 2012 01:02:25 -0700 (PDT) Received: from ndenevsa.sf.moneybookers.net (g1.moneybookers.com. [217.18.249.148]) by mx.google.com with ESMTPS id cl8sm1066957wib.10.2012.10.05.01.02.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 01:02:23 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset=koi8-r From: Nikolay Denev In-Reply-To: <20121005070914.GI34622@glebius.int.ru> Date: Fri, 5 Oct 2012 11:02:14 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1498) Cc: svn-src-all@FreeBSD.org Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 08:02:28 -0000 On Oct 5, 2012, at 10:09 AM, Gleb Smirnoff wrote: > On Fri, Oct 05, 2012 at 09:34:07AM +0300, Nikolay Denev wrote: > N> > Date: Thu Sep 20 10:05:10 2012 > N> > New Revision: 240742 > N> > URL: http://svn.freebsd.org/changeset/base/240742 > N> >=20 > N> > Log: > N> > Convert lagg(4) to use if_transmit instead of if_start. > N> >=20 > N> > In collaboration with: thompsa, sbruno, fabient > N> >=20 > N> > Modified: > N> > head/sys/net/if_lagg.c > ... > N> Are there any plans to MFC this change and the one for if_bridge? > N> This one applies cleanly on RELENG_9 and I will have the = opportunity to test it later today. >=20 > Sure we can, if you test it. Thanks! >=20 > --=20 > Totus tuus, Glebius. Patch applied and module reloaded. I'm testing with 16 iperf instances from a RELENG_8 machine connected to = a 10G port on Extreme Networks switch with ix(4) interface, and on the other side is = the machine with if_lagg, with Intel quad igb(4) interface. /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 = /10 Load Average ||||||||||||||||||||||||||||||||||||||| Interface Traffic Peak = Total lagg0 in 464.759 MB/s 465.483 MB/s 25.686 = GB out 14.900 MB/s 22.543 MB/s 3.845 = GB lo0 in 0.000 KB/s 0.000 KB/s 2.118 = MB out 0.000 KB/s 0.000 KB/s 2.118 = MB igb3 in 116.703 MB/s 117.322 MB/s 7.235 = GB out 3.427 MB/s 5.225 MB/s 2.303 = GB igb2 in 116.626 MB/s 117.301 MB/s 8.248 = GB out 4.789 MB/s 12.069 MB/s 3.331 = GB igb1 in 116.845 MB/s 117.138 MB/s 6.406 = GB out 4.222 MB/s 6.439 MB/s 267.546 = MB igb0 in 116.595 MB/s 117.298 MB/s 6.045 = GB out 2.984 MB/s 7.678 MB/s 221.413 = MB (High Load Average is because of simultaneously running disk IO test on = the machine). And the same in the other direction : /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 = /10 Load Average ||||||||||||||||||||||||||||||||||| Interface Traffic Peak = Total lagg0 in 14.427 MB/s 14.939 MB/s 155.813 = GB out 458.935 MB/s 459.789 MB/s 28.429 = GB lo0 in 0.000 KB/s 0.000 KB/s 2.118 = MB out 0.000 KB/s 0.000 KB/s 2.118 = MB igb3 in 2.797 MB/s 3.540 MB/s 39.869 = GB out 117.452 MB/s 121.691 MB/s 8.612 = GB igb2 in 3.641 MB/s 5.412 MB/s 40.939 = GB out 116.963 MB/s 127.053 MB/s 11.185 = GB igb1 in 4.202 MB/s 5.301 MB/s 39.097 = GB out 116.286 MB/s 117.230 MB/s 5.356 = GB igb0 in 3.818 MB/s 4.713 MB/s 38.755 = GB out 116.315 MB/s 117.053 MB/s 6.142 = GB Regards, Nikolay= From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 08:04:55 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D2C4106566C for ; Fri, 5 Oct 2012 08:04:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4708FC08 for ; Fri, 5 Oct 2012 08:04:54 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9584riv050077; Fri, 5 Oct 2012 12:04:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9584r4i050076; Fri, 5 Oct 2012 12:04:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 5 Oct 2012 12:04:53 +0400 From: Gleb Smirnoff To: Nikolay Denev Message-ID: <20121005080453.GL34622@glebius.int.ru> References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 08:04:55 -0000 On Fri, Oct 05, 2012 at 11:02:14AM +0300, Nikolay Denev wrote: N> > On Fri, Oct 05, 2012 at 09:34:07AM +0300, Nikolay Denev wrote: N> > N> > Date: Thu Sep 20 10:05:10 2012 N> > N> > New Revision: 240742 N> > N> > URL: http://svn.freebsd.org/changeset/base/240742 N> > N> > N> > N> > Log: N> > N> > Convert lagg(4) to use if_transmit instead of if_start. N> > N> > N> > N> > In collaboration with: thompsa, sbruno, fabient N> > N> > N> > N> > Modified: N> > N> > head/sys/net/if_lagg.c N> > ... N> > N> Are there any plans to MFC this change and the one for if_bridge? N> > N> This one applies cleanly on RELENG_9 and I will have the opportunity to test it later today. N> > N> > Sure we can, if you test it. Thanks! N> > N> > -- N> > Totus tuus, Glebius. N> N> Patch applied and module reloaded. N> N> I'm testing with 16 iperf instances from a RELENG_8 machine connected to a 10G port on N> Extreme Networks switch with ix(4) interface, and on the other side is the machine with if_lagg, N> with Intel quad igb(4) interface. N> N> /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 N> Load Average ||||||||||||||||||||||||||||||||||||||| N> N> Interface Traffic Peak Total N> lagg0 in 464.759 MB/s 465.483 MB/s 25.686 GB N> out 14.900 MB/s 22.543 MB/s 3.845 GB N> N> lo0 in 0.000 KB/s 0.000 KB/s 2.118 MB N> out 0.000 KB/s 0.000 KB/s 2.118 MB N> N> igb3 in 116.703 MB/s 117.322 MB/s 7.235 GB N> out 3.427 MB/s 5.225 MB/s 2.303 GB N> N> igb2 in 116.626 MB/s 117.301 MB/s 8.248 GB N> out 4.789 MB/s 12.069 MB/s 3.331 GB N> N> igb1 in 116.845 MB/s 117.138 MB/s 6.406 GB N> out 4.222 MB/s 6.439 MB/s 267.546 MB N> N> igb0 in 116.595 MB/s 117.298 MB/s 6.045 GB N> out 2.984 MB/s 7.678 MB/s 221.413 MB N> N> N> (High Load Average is because of simultaneously running disk IO test on the machine). N> N> And the same in the other direction : N> N> /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 N> Load Average ||||||||||||||||||||||||||||||||||| N> N> Interface Traffic Peak Total N> lagg0 in 14.427 MB/s 14.939 MB/s 155.813 GB N> out 458.935 MB/s 459.789 MB/s 28.429 GB N> N> lo0 in 0.000 KB/s 0.000 KB/s 2.118 MB N> out 0.000 KB/s 0.000 KB/s 2.118 MB N> N> igb3 in 2.797 MB/s 3.540 MB/s 39.869 GB N> out 117.452 MB/s 121.691 MB/s 8.612 GB N> N> igb2 in 3.641 MB/s 5.412 MB/s 40.939 GB N> out 116.963 MB/s 127.053 MB/s 11.185 GB N> N> igb1 in 4.202 MB/s 5.301 MB/s 39.097 GB N> out 116.286 MB/s 117.230 MB/s 5.356 GB N> N> igb0 in 3.818 MB/s 4.713 MB/s 38.755 GB N> out 116.315 MB/s 117.053 MB/s 6.142 GB A cool test environment you do have :) Have you got results numbers prior to applying the patch? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 08:16:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0317106566B; Fri, 5 Oct 2012 08:16:53 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 56B4F8FC12; Fri, 5 Oct 2012 08:16:53 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so2011354vbm.13 for ; Fri, 05 Oct 2012 01:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:from:date:message-id:subject:to :cc:content-type; bh=pMBCwVQzRl5TiFeMvJb2RPyK/YXPi5FP3S8uhE2XMdg=; b=xVR2LbOx9PbIJ4Lkmx3/B5H0EL2vAO8NlbsrX6GrEl7UYnXDemQ3az7B0WQSCt0cwC j5vrSRnY/AvslEPh2unzAv13PMZ2SKSThe6QQ0/FDTSx59xVBcGqyy3Wt6Cz+F94ikLu 0FBtgAv05qQylp36cHs6vgP5XgnI0IRyEtImqUHWUVq5FInU/R7MvljGrLEaFHZOdag3 eh2qLAZpZ1DtgWGFikmvbdp7JxvvTAKaiwYK6pIqBslYFwjEAS8hG1VNlyT/8QRF8wKH R0EgedA27r2sFounUQkTaSwAQ9AUf7Bg5x4g3kEZpLEMBR9+oDmdNO6DjNg8jNy5FJGL KvDg== Received: by 10.58.116.212 with SMTP id jy20mr4146762veb.5.1349425012234; Fri, 05 Oct 2012 01:16:52 -0700 (PDT) References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> <20121005080453.GL34622@glebius.int.ru> In-Reply-To: <20121005080453.GL34622@glebius.int.ru> Mime-Version: 1.0 (1.0) From: Nikolay Denev Date: Fri, 5 Oct 2012 11:16:51 +0300 Message-ID: <2109548116005159772@unknownmsgid> To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-all@freebsd.org" Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 08:16:53 -0000 On 05.10.2012, at 11:04, Gleb Smirnoff wrote: > On Fri, Oct 05, 2012 at 11:02:14AM +0300, Nikolay Denev wrote: > N> > On Fri, Oct 05, 2012 at 09:34:07AM +0300, Nikolay Denev wrote: > N> > N> > Date: Thu Sep 20 10:05:10 2012 > N> > N> > New Revision: 240742 > N> > N> > URL: http://svn.freebsd.org/changeset/base/240742 > N> > N> > > N> > N> > Log: > N> > N> > Convert lagg(4) to use if_transmit instead of if_start. > N> > N> > > N> > N> > In collaboration with: thompsa, sbruno, fabient > N> > N> > > N> > N> > Modified: > N> > N> > head/sys/net/if_lagg.c > N> > ... > N> > N> Are there any plans to MFC this change and the one for if_bridge? > N> > N> This one applies cleanly on RELENG_9 and I will have the opportunity to test it later today. > N> > > N> > Sure we can, if you test it. Thanks! > N> > > N> > -- > N> > Totus tuus, Glebius. > N> > N> Patch applied and module reloaded. > N> > N> I'm testing with 16 iperf instances from a RELENG_8 machine connected to a 10G port on > N> Extreme Networks switch with ix(4) interface, and on the other side is the machine with if_lagg, > N> with Intel quad igb(4) interface. > N> > N> /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 > N> Load Average ||||||||||||||||||||||||||||||||||||||| > N> > N> Interface Traffic Peak Total > N> lagg0 in 464.759 MB/s 465.483 MB/s 25.686 GB > N> out 14.900 MB/s 22.543 MB/s 3.845 GB > N> > N> lo0 in 0.000 KB/s 0.000 KB/s 2.118 MB > N> out 0.000 KB/s 0.000 KB/s 2.118 MB > N> > N> igb3 in 116.703 MB/s 117.322 MB/s 7.235 GB > N> out 3.427 MB/s 5.225 MB/s 2.303 GB > N> > N> igb2 in 116.626 MB/s 117.301 MB/s 8.248 GB > N> out 4.789 MB/s 12.069 MB/s 3.331 GB > N> > N> igb1 in 116.845 MB/s 117.138 MB/s 6.406 GB > N> out 4.222 MB/s 6.439 MB/s 267.546 MB > N> > N> igb0 in 116.595 MB/s 117.298 MB/s 6.045 GB > N> out 2.984 MB/s 7.678 MB/s 221.413 MB > N> > N> > N> (High Load Average is because of simultaneously running disk IO test on the machine). > N> > N> And the same in the other direction : > N> > N> /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 > N> Load Average ||||||||||||||||||||||||||||||||||| > N> > N> Interface Traffic Peak Total > N> lagg0 in 14.427 MB/s 14.939 MB/s 155.813 GB > N> out 458.935 MB/s 459.789 MB/s 28.429 GB > N> > N> lo0 in 0.000 KB/s 0.000 KB/s 2.118 MB > N> out 0.000 KB/s 0.000 KB/s 2.118 MB > N> > N> igb3 in 2.797 MB/s 3.540 MB/s 39.869 GB > N> out 117.452 MB/s 121.691 MB/s 8.612 GB > N> > N> igb2 in 3.641 MB/s 5.412 MB/s 40.939 GB > N> out 116.963 MB/s 127.053 MB/s 11.185 GB > N> > N> igb1 in 4.202 MB/s 5.301 MB/s 39.097 GB > N> out 116.286 MB/s 117.230 MB/s 5.356 GB > N> > N> igb0 in 3.818 MB/s 4.713 MB/s 38.755 GB > N> out 116.315 MB/s 117.053 MB/s 6.142 GB > > A cool test environment you do have :) Have you got results numbers prior to > applying the patch? > > -- > Totus tuus, Glebius. It's not entirely test enironment, more like semi-production :) I will try to reload the old module and do a comparison. From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 09:47:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 123C71065672; Fri, 5 Oct 2012 09:47:55 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D761E8FC08; Fri, 5 Oct 2012 09:47:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q959lsPF040472; Fri, 5 Oct 2012 09:47:54 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q959lsEa040469; Fri, 5 Oct 2012 09:47:54 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210050947.q959lsEa040469@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 5 Oct 2012 09:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241222 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 09:47:55 -0000 Author: jh Date: Fri Oct 5 09:47:54 2012 New Revision: 241222 URL: http://svn.freebsd.org/changeset/base/241222 Log: MFC r239257: Reserve room for the terminating NUL when setting or getting kernel environment variables. KENV_MNAMELEN and KENV_MVALLEN doesn't include space for the terminating NUL. Modified: stable/9/sys/kern/kern_environment.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/kern/kern_environment.c ============================================================================== --- stable/9/sys/kern/kern_environment.c Fri Oct 5 07:51:21 2012 (r241221) +++ stable/9/sys/kern/kern_environment.c Fri Oct 5 09:47:54 2012 (r241222) @@ -143,9 +143,9 @@ sys_kenv(td, uap) break; } - name = malloc(KENV_MNAMELEN, M_TEMP, M_WAITOK); + name = malloc(KENV_MNAMELEN + 1, M_TEMP, M_WAITOK); - error = copyinstr(uap->name, name, KENV_MNAMELEN, NULL); + error = copyinstr(uap->name, name, KENV_MNAMELEN + 1, NULL); if (error) goto done; @@ -176,8 +176,8 @@ sys_kenv(td, uap) error = EINVAL; goto done; } - if (len > KENV_MVALLEN) - len = KENV_MVALLEN; + if (len > KENV_MVALLEN + 1) + len = KENV_MVALLEN + 1; value = malloc(len, M_TEMP, M_WAITOK); error = copyinstr(uap->value, value, len, NULL); if (error) { @@ -389,10 +389,10 @@ setenv(const char *name, const char *val KENV_CHECK; namelen = strlen(name) + 1; - if (namelen > KENV_MNAMELEN) + if (namelen > KENV_MNAMELEN + 1) return (-1); vallen = strlen(value) + 1; - if (vallen > KENV_MVALLEN) + if (vallen > KENV_MVALLEN + 1) return (-1); buf = malloc(namelen + vallen, M_KENV, M_WAITOK); sprintf(buf, "%s=%s", name, value); From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 10:44:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4D11106566C; Fri, 5 Oct 2012 10:44:51 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9EE8FC08; Fri, 5 Oct 2012 10:44:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95Aiphf052280; Fri, 5 Oct 2012 10:44:51 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95AipCg052278; Fri, 5 Oct 2012 10:44:51 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210051044.q95AipCg052278@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 5 Oct 2012 10:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241223 - stable/9/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 10:44:51 -0000 Author: jh Date: Fri Oct 5 10:44:50 2012 New Revision: 241223 URL: http://svn.freebsd.org/changeset/base/241223 Log: MFC r239612: Check the return value of sbuf_finish(). Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Fri Oct 5 09:47:54 2012 (r241222) +++ stable/9/sbin/camcontrol/camcontrol.c Fri Oct 5 10:44:50 2012 (r241223) @@ -4757,7 +4757,10 @@ try_long: smp_report_general_sbuf(response, sizeof(*response), sb); - sbuf_finish(sb); + if (sbuf_finish(sb) != 0) { + warnx("%s: sbuf_finish", __func__); + goto bailout; + } printf("%s", sbuf_data(sb)); @@ -5128,7 +5131,10 @@ smpmaninfo(struct cam_device *device, in smp_report_manuf_info_sbuf(&response, sizeof(response), sb); - sbuf_finish(sb); + if (sbuf_finish(sb) != 0) { + warnx("%s: sbuf_finish", __func__); + goto bailout; + } printf("%s", sbuf_data(sb)); From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 14:11:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8A211065670; Fri, 5 Oct 2012 14:11:19 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1AD8FC08; Fri, 5 Oct 2012 14:11:19 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hr7so554961wib.13 for ; Fri, 05 Oct 2012 07:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=gDH/mbW64bHAxlOKb5r81KLhqgrxh0IdnsEqfC4Cfus=; b=mLgq68JgNb0540jCWqLBlDswloAzwF9LLggIi/VC/NKVxqkyMqzJe7q1Kyv/TlAzVP 1jT4Cp9euvfdz/CHgwGESpGySQJiEtrPAMwTww6o9VFIkGCBBVFPbfiyrr4tTtkrFpgp AROL3YBggsFSEYLnUEDdFfiotj+AXv9o/HzIXSlagJpegY+qbmOnVQaeDghiSl8qSmVZ OmIl1XRXaBH4kA0lAt+p0ctpzLuFxkzDQIf/BKPkWqgI6ZeOzJylqfdjb+dI396AFQmv FTCr1ULAwIu/Ba9uQxJjExWzn+LSqpbzwaVsTfn/3ygOaKb785two8VoCVJHN6Xuyxyu hfuw== Received: by 10.216.206.152 with SMTP id l24mr5138226weo.66.1349446278124; Fri, 05 Oct 2012 07:11:18 -0700 (PDT) Received: from ndenevsa.sf.moneybookers.net (g1.moneybookers.com. [217.18.249.148]) by mx.google.com with ESMTPS id cu1sm2564898wib.6.2012.10.05.07.11.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 07:11:15 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset=iso-8859-1 From: Nikolay Denev In-Reply-To: <2109548116005159772@unknownmsgid> Date: Fri, 5 Oct 2012 17:11:12 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> <20121005080453.GL34622@glebius.int.ru> <2109548116005159772@unknownmsgid> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1498) Cc: "svn-src-all@freebsd.org" Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 14:11:19 -0000 On Oct 5, 2012, at 11:16 AM, Nikolay Denev wrote: > On 05.10.2012, at 11:04, Gleb Smirnoff wrote: >=20 >> On Fri, Oct 05, 2012 at 11:02:14AM +0300, Nikolay Denev wrote: >> N> > On Fri, Oct 05, 2012 at 09:34:07AM +0300, Nikolay Denev wrote: >> N> > N> > Date: Thu Sep 20 10:05:10 2012 >> N> > N> > New Revision: 240742 >> N> > N> > URL: http://svn.freebsd.org/changeset/base/240742 >> N> > N> > >> N> > N> > Log: >> N> > N> > Convert lagg(4) to use if_transmit instead of if_start. >> N> > N> > >> N> > N> > In collaboration with: thompsa, sbruno, fabient >> N> > N> > >> N> > N> > Modified: >> N> > N> > head/sys/net/if_lagg.c >> N> > ... >> N> > N> Are there any plans to MFC this change and the one for = if_bridge? >> N> > N> This one applies cleanly on RELENG_9 and I will have the = opportunity to test it later today. >> N> > >> N> > Sure we can, if you test it. Thanks! >> N> > >> N> > -- >> N> > Totus tuus, Glebius. >> N> >> N> Patch applied and module reloaded. >> N> >> N> I'm testing with 16 iperf instances from a RELENG_8 machine = connected to a 10G port on >> N> Extreme Networks switch with ix(4) interface, and on the other = side is the machine with if_lagg, >> N> with Intel quad igb(4) interface. >> N> >> N> /0 /1 /2 /3 /4 /5 /6 /7 /8 = /9 /10 >> N> Load Average ||||||||||||||||||||||||||||||||||||||| >> N> >> N> Interface Traffic Peak = Total >> N> lagg0 in 464.759 MB/s 465.483 MB/s = 25.686 GB >> N> out 14.900 MB/s 22.543 MB/s = 3.845 GB >> N> >> N> lo0 in 0.000 KB/s 0.000 KB/s = 2.118 MB >> N> out 0.000 KB/s 0.000 KB/s = 2.118 MB >> N> >> N> igb3 in 116.703 MB/s 117.322 MB/s = 7.235 GB >> N> out 3.427 MB/s 5.225 MB/s = 2.303 GB >> N> >> N> igb2 in 116.626 MB/s 117.301 MB/s = 8.248 GB >> N> out 4.789 MB/s 12.069 MB/s = 3.331 GB >> N> >> N> igb1 in 116.845 MB/s 117.138 MB/s = 6.406 GB >> N> out 4.222 MB/s 6.439 MB/s = 267.546 MB >> N> >> N> igb0 in 116.595 MB/s 117.298 MB/s = 6.045 GB >> N> out 2.984 MB/s 7.678 MB/s = 221.413 MB >> N> >> N> >> N> (High Load Average is because of simultaneously running disk IO = test on the machine). >> N> >> N> And the same in the other direction : >> N> >> N> /0 /1 /2 /3 /4 /5 /6 /7 /8 = /9 /10 >> N> Load Average ||||||||||||||||||||||||||||||||||| >> N> >> N> Interface Traffic Peak = Total >> N> lagg0 in 14.427 MB/s 14.939 MB/s = 155.813 GB >> N> out 458.935 MB/s 459.789 MB/s = 28.429 GB >> N> >> N> lo0 in 0.000 KB/s 0.000 KB/s = 2.118 MB >> N> out 0.000 KB/s 0.000 KB/s = 2.118 MB >> N> >> N> igb3 in 2.797 MB/s 3.540 MB/s = 39.869 GB >> N> out 117.452 MB/s 121.691 MB/s = 8.612 GB >> N> >> N> igb2 in 3.641 MB/s 5.412 MB/s = 40.939 GB >> N> out 116.963 MB/s 127.053 MB/s = 11.185 GB >> N> >> N> igb1 in 4.202 MB/s 5.301 MB/s = 39.097 GB >> N> out 116.286 MB/s 117.230 MB/s = 5.356 GB >> N> >> N> igb0 in 3.818 MB/s 4.713 MB/s = 38.755 GB >> N> out 116.315 MB/s 117.053 MB/s = 6.142 GB >>=20 >> A cool test environment you do have :) Have you got results numbers = prior to >> applying the patch? >>=20 >> -- >> Totus tuus, Glebius. >=20 > It's not entirely test enironment, more like semi-production :) >=20 > I will try to reload the old module and do a comparison. With both modules I was able to saturate the four GigE interfaces, and = got=20 about ~3.72 Gbits/sec total according to iperf, systat -ifstat showed about 116MB/s per each interface. However I'm seeing slightly different CPU stat graphs [1], the = difference is not big, but with the new if_lagg(4) driver, when the machine is acting as client = I'm seeing slightly higher system CPU time, and about the same interrupt, = while when acting as server both system and interrupt are slightly lower. But please note that these tests were not very scientifically correct. When the server is available again I might be able to perform several = runs and do a proper comparison. [1] http://93.152.184.10/lagg.jpg From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 14:20:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49353106566C; Fri, 5 Oct 2012 14:20:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18A8A8FC1B; Fri, 5 Oct 2012 14:20:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95EKr26084684; Fri, 5 Oct 2012 14:20:53 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95EKrEl084680; Fri, 5 Oct 2012 14:20:53 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210051420.q95EKrEl084680@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 5 Oct 2012 14:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241224 - stable/9/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 14:20:54 -0000 Author: jilles Date: Fri Oct 5 14:20:53 2012 New Revision: 241224 URL: http://svn.freebsd.org/changeset/base/241224 Log: MFC r241001: sigaction(2),sigwait(2),sigwaitinfo(2): Remove [EFAULT] error condition. Passing an invalid pointer results in undefined behaviour. The wrappers in libthr access some of the data pointed to by the arguments in userland, so that an invalid pointer will cause a signal and not an [EFAULT] error return. Furthermore, if the [EFAULT] error occurs when the kernel is writing, it is not a proper error in the sense that the call still commits (changing the signal disposition or accepting the signal). Modified: stable/9/lib/libc/sys/sigaction.2 stable/9/lib/libc/sys/sigwait.2 stable/9/lib/libc/sys/sigwaitinfo.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/sigaction.2 ============================================================================== --- stable/9/lib/libc/sys/sigaction.2 Fri Oct 5 10:44:50 2012 (r241223) +++ stable/9/lib/libc/sys/sigaction.2 Fri Oct 5 14:20:53 2012 (r241224) @@ -28,7 +28,7 @@ .\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" $FreeBSD$ .\" -.Dd April 18, 2010 +.Dd September 27, 2012 .Dt SIGACTION 2 .Os .Sh NAME @@ -586,13 +586,6 @@ system call will fail and no new signal handler will be installed if one of the following occurs: .Bl -tag -width Er -.It Bq Er EFAULT -Either -.Fa act -or -.Fa oact -points to memory that is not a valid part of the process -address space. .It Bq Er EINVAL The .Fa sig Modified: stable/9/lib/libc/sys/sigwait.2 ============================================================================== --- stable/9/lib/libc/sys/sigwait.2 Fri Oct 5 10:44:50 2012 (r241223) +++ stable/9/lib/libc/sys/sigwait.2 Fri Oct 5 14:20:53 2012 (r241224) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2011 +.Dd September 27, 2012 .Dt SIGWAIT 2 .Os .Sh NAME @@ -107,9 +107,6 @@ The .Fa set argument specifies one or more invalid signal numbers. -.It Bq Er EFAULT -Any arguments point outside the allocated address space or there is a -memory protection fault. .El .Sh SEE ALSO .Xr sigaction 2 , Modified: stable/9/lib/libc/sys/sigwaitinfo.2 ============================================================================== --- stable/9/lib/libc/sys/sigwaitinfo.2 Fri Oct 5 10:44:50 2012 (r241223) +++ stable/9/lib/libc/sys/sigwaitinfo.2 Fri Oct 5 14:20:53 2012 (r241224) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2011 +.Dd September 27, 2012 .Dt SIGTIMEDWAIT 2 .Os .Sh NAME @@ -172,9 +172,6 @@ system calls fail if: .Bl -tag -width Er .It Bq Er EINTR The wait was interrupted by an unblocked, caught signal. -.It Bq Er EFAULT -Any arguments point outside the allocated address space or there is a -memory protection fault. .Pp .El The From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 14:42:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6A0F1065672; Fri, 5 Oct 2012 14:42:38 +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 C1E758FC24; Fri, 5 Oct 2012 14:42:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95EgcHA087280; Fri, 5 Oct 2012 14:42:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95Egcaf087278; Fri, 5 Oct 2012 14:42:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210051442.q95Egcaf087278@svn.freebsd.org> From: Andriy Gapon Date: Fri, 5 Oct 2012 14:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241225 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 14:42:39 -0000 Author: avg Date: Fri Oct 5 14:42:38 2012 New Revision: 241225 URL: http://svn.freebsd.org/changeset/base/241225 Log: mount.h: MNTK_VGONE_UPPER and MNTK_VGONE_WAITER were supposed to be different ... otherwise a waiter is never woken up. Reported by: swills Discussed with: jhb Approved by: kib MFC after: 3 days Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Fri Oct 5 14:20:53 2012 (r241224) +++ head/sys/sys/mount.h Fri Oct 5 14:42:38 2012 (r241225) @@ -376,9 +376,9 @@ void __mnt_vnode_markerfree(str and writes. Filesystem shall properly handle i/o state on EFAULT. */ #define MNTK_VGONE_UPPER 0x00000200 -#define MNTK_VGONE_WAITER 0x00000200 -#define MNTK_MARKER 0x00000400 +#define MNTK_VGONE_WAITER 0x00000400 #define MNTK_LOOKUP_EXCL_DOTDOT 0x00000800 +#define MNTK_MARKER 0x00001000 #define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 14:43:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFE87106566C; Fri, 5 Oct 2012 14:43:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B90EA8FC08; Fri, 5 Oct 2012 14:43:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95EhnR5087452; Fri, 5 Oct 2012 14:43:49 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95EhnMI087450; Fri, 5 Oct 2012 14:43:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210051443.q95EhnMI087450@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 5 Oct 2012 14:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241226 - stable/9/libexec/atrun X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 14:43:49 -0000 Author: jilles Date: Fri Oct 5 14:43:49 2012 New Revision: 241226 URL: http://svn.freebsd.org/changeset/base/241226 Log: MFC r240974: atrun: Do not assume that MAXLOGNAME <= 100. The reserved space for fmt was exactly sufficient for a two-digit value of MAXLOGNAME - 1. PR: bin/171815 Submitted by: Jeremy Huddleston Sequoia Modified: stable/9/libexec/atrun/atrun.c Directory Properties: stable/9/libexec/atrun/ (props changed) Modified: stable/9/libexec/atrun/atrun.c ============================================================================== --- stable/9/libexec/atrun/atrun.c Fri Oct 5 14:42:38 2012 (r241225) +++ stable/9/libexec/atrun/atrun.c Fri Oct 5 14:43:49 2012 (r241226) @@ -123,7 +123,7 @@ run_file(const char *filename, uid_t uid pid_t pid; int fd_out, fd_in; int queue; - char mailbuf[MAXLOGNAME], fmt[49]; + char mailbuf[MAXLOGNAME], fmt[64]; char *mailname = NULL; FILE *stream; int send_mail = 0; From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 15:11:42 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83F43106564A for ; Fri, 5 Oct 2012 15:11:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id EBBEC8FC08 for ; Fri, 5 Oct 2012 15:11:41 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q95FBdqF052534; Fri, 5 Oct 2012 19:11:39 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q95FBdwx052533; Fri, 5 Oct 2012 19:11:39 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 5 Oct 2012 19:11:39 +0400 From: Gleb Smirnoff To: Nikolay Denev Message-ID: <20121005151139.GS34622@glebius.int.ru> References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> <20121005080453.GL34622@glebius.int.ru> <2109548116005159772@unknownmsgid> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-all@freebsd.org" Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 15:11:42 -0000 Nikolay, On Fri, Oct 05, 2012 at 05:11:12PM +0300, Nikolay Denev wrote: N> With both modules I was able to saturate the four GigE interfaces, and got N> about ~3.72 Gbits/sec total according to iperf, systat -ifstat showed N> about 116MB/s per each interface. N> N> However I'm seeing slightly different CPU stat graphs [1], the difference is not big, N> but with the new if_lagg(4) driver, when the machine is acting as client I'm N> seeing slightly higher system CPU time, and about the same interrupt, while N> when acting as server both system and interrupt are slightly lower. N> But please note that these tests were not very scientifically correct. N> When the server is available again I might be able to perform several runs and N> do a proper comparison. Do I understand correct, that in the above testing "server" means transmitting traffic and "client" is receiving traffic? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 15:36:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EACF61065670; Fri, 5 Oct 2012 15:36:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D54AE8FC17; Fri, 5 Oct 2012 15:36:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95FaUsC094168; Fri, 5 Oct 2012 15:36:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95FaUeI094166; Fri, 5 Oct 2012 15:36:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210051536.q95FaUeI094166@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 5 Oct 2012 15:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241227 - stable/9/usr.bin/find X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 15:36:31 -0000 Author: jilles Date: Fri Oct 5 15:36:30 2012 New Revision: 241227 URL: http://svn.freebsd.org/changeset/base/241227 Log: MFC r240973: find: Do not pass fd to save current directory to child processes. This removes one of the two wrongly passed file descriptors. The other one appears to be from fts(3). Modified: stable/9/usr.bin/find/main.c Directory Properties: stable/9/usr.bin/find/ (props changed) Modified: stable/9/usr.bin/find/main.c ============================================================================== --- stable/9/usr.bin/find/main.c Fri Oct 5 14:43:49 2012 (r241226) +++ stable/9/usr.bin/find/main.c Fri Oct 5 15:36:30 2012 (r241227) @@ -150,7 +150,7 @@ main(int argc, char *argv[]) usage(); *p = NULL; - if ((dotfd = open(".", O_RDONLY, 0)) < 0) + if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) err(1, "."); exit(find_execute(find_formplan(argv), start)); From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 15:46:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E04F1106566C; Fri, 5 Oct 2012 15:46:54 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 347C38FC0A; Fri, 5 Oct 2012 15:46:53 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hq12so739561wib.13 for ; Fri, 05 Oct 2012 08:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; bh=ejlG4i77uMd19IlgXARcGRf/bhGdIRkm2H+2sv2SCZo=; b=o/eSH+9PN+bIEJi69VCH17bAaC2Q4SfnBUfTL9HKEyl7ZQlLrEVdtLmBZA/CiGET8T l4GKuwyygQKU3nT21QMxC3IAl7wQjGDTl/XAaX9Uvq6K7lQQPxLv6e4QxdzQqOGnoXgO snXfh1oBX9t1DPhUQMmRrpXz7CoETkA/GygTQdPt0AR6BJY7JNPXHFcZ71bg60FHNds7 VGKL/orhJjRHixIpWc8vzdBdVPPTDzG7NFyzPVA6/jwOJw5PmWXCLcU1vmwH5m3oTMMB LtwVjghU313kLY7BDsbEbftAkhRhDFd4QRzb4ibMaln5+ytNEFSrL4GsKqj4OOZnFNbr ZE7w== Received: by 10.216.71.20 with SMTP id q20mr5234610wed.172.1349452012696; Fri, 05 Oct 2012 08:46:52 -0700 (PDT) Received: from ndenevsa.sf.moneybookers.net (g1.moneybookers.com. [217.18.249.148]) by mx.google.com with ESMTPS id v3sm3336313wiy.5.2012.10.05.08.46.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 08:46:50 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) From: Nikolay Denev In-Reply-To: <20121005151139.GS34622@glebius.int.ru> Date: Fri, 5 Oct 2012 18:46:46 +0300 Message-Id: <67EC4A5E-752C-4476-9C95-8BAA3A8F49BC@gmail.com> References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> <20121005080453.GL34622@glebius.int.ru> <2109548116005159772@unknownmsgid> <20121005151139.GS34622@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1498) Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "svn-src-all@freebsd.org" Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 15:46:55 -0000 On Oct 5, 2012, at 6:11 PM, Gleb Smirnoff wrote: > Nikolay, >=20 > On Fri, Oct 05, 2012 at 05:11:12PM +0300, Nikolay Denev wrote: > N> With both modules I was able to saturate the four GigE interfaces, = and got=20 > N> about ~3.72 Gbits/sec total according to iperf, systat -ifstat = showed > N> about 116MB/s per each interface. > N>=20 > N> However I'm seeing slightly different CPU stat graphs [1], the = difference is not big, > N> but with the new if_lagg(4) driver, when the machine is acting as = client I'm > N> seeing slightly higher system CPU time, and about the same = interrupt, while > N> when acting as server both system and interrupt are slightly lower. > N> But please note that these tests were not very scientifically = correct. > N> When the server is available again I might be able to perform = several runs and > N> do a proper comparison. >=20 > Do I understand correct, that in the above testing "server" means = transmitting > traffic and "client" is receiving traffic? >=20 > --=20 > Totus tuus, Glebius. Actually with iperf the server is more like a sink, and the client sends = data to the server. Here's what's in the man page : To perform an iperf test the user must establish both a server (to discard traffic) and a client = (to gen- erate traffic). From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 15:52:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57541106566C; Fri, 5 Oct 2012 15:52:32 +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 419F18FC08; Fri, 5 Oct 2012 15:52:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95FqWZE096206; Fri, 5 Oct 2012 15:52:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95FqWNM096204; Fri, 5 Oct 2012 15:52:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210051552.q95FqWNM096204@svn.freebsd.org> From: John Baldwin Date: Fri, 5 Oct 2012 15:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241228 - head/sys/dev/amr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 15:52:32 -0000 Author: jhb Date: Fri Oct 5 15:52:31 2012 New Revision: 241228 URL: http://svn.freebsd.org/changeset/base/241228 Log: Further adjust the workaround in r234501. Rounding all small requests up to 32k swamped the controller causing firmware hangs. Instead, round requests smaller than 64k up to the next power of 2 as a general rule. To handle the one known special case of a command that accepts a 12k buffer returning a 24k-ish reply, round requests between 8k and 16k up to 32k rather than 16k. The result is that commands less than 8k should now be rounded up to a smaller size (either 4k or 8k) rather than 32k. PR: kern/155658 Tested by: Andreas Longwitz MFC after: 1 week Modified: head/sys/dev/amr/amr.c Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Fri Oct 5 15:36:30 2012 (r241227) +++ head/sys/dev/amr/amr.c Fri Oct 5 15:52:31 2012 (r241228) @@ -533,13 +533,19 @@ shutdown_out: * The amr(4) firmware relies on this feature. In fact, it assumes * the buffer is always a power of 2 up to a max of 64k. There is * also at least one case where it assumes a buffer less than 16k is - * greater than 16k. Force a minimum buffer size of 32k and round - * sizes between 32k and 64k up to 64k as a workaround. + * greater than 16k. However, forcing all buffers to a size of 32k + * causes stalls in the firmware. Force each command smaller than + * 64k up to the next power of two except that commands between 8k + * and 16k are rounded up to 32k instead of 16k. */ static unsigned long amr_ioctl_buffer_length(unsigned long len) { + if (len <= 4 * 1024) + return (4 * 1024); + if (len <= 8 * 1024) + return (8 * 1024); if (len <= 32 * 1024) return (32 * 1024); if (len <= 64 * 1024) From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 16:44:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAFAD1065716; Fri, 5 Oct 2012 16:44:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB478FC14; Fri, 5 Oct 2012 16:44:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95Gi1wM003600; Fri, 5 Oct 2012 16:44:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95Gi1j0003598; Fri, 5 Oct 2012 16:44:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210051644.q95Gi1j0003598@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Oct 2012 16:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241229 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 16:44:01 -0000 Author: adrian Date: Fri Oct 5 16:44:00 2012 New Revision: 241229 URL: http://svn.freebsd.org/changeset/base/241229 Log: Initialise an uninitialised variable. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Oct 5 15:52:31 2012 (r241228) +++ head/sys/dev/ath/if_ath.c Fri Oct 5 16:44:00 2012 (r241229) @@ -4350,7 +4350,7 @@ ath_calibrate(void *arg) struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - HAL_BOOL longCal, isCalDone; + HAL_BOOL longCal, isCalDone = AH_TRUE; HAL_BOOL aniCal, shortCal = AH_FALSE; int nextcal; @@ -4400,6 +4400,7 @@ ath_calibrate(void *arg) /* Only call if we're doing a short/long cal, not for ANI calibration */ if (shortCal || longCal) { + isCalDone = AH_FALSE; if (ath_hal_calibrateN(ah, sc->sc_curchan, longCal, &isCalDone)) { if (longCal) { /* From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 17:50:26 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF3B710656F1 for ; Fri, 5 Oct 2012 17:50:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 2142E8FC17 for ; Fri, 5 Oct 2012 17:50:25 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q95HoOw0053143; Fri, 5 Oct 2012 21:50:24 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q95HoOTA053142; Fri, 5 Oct 2012 21:50:24 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 5 Oct 2012 21:50:24 +0400 From: Gleb Smirnoff To: Nikolay Denev Message-ID: <20121005175024.GV34622@glebius.int.ru> References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> <20121005080453.GL34622@glebius.int.ru> <2109548116005159772@unknownmsgid> <20121005151139.GS34622@glebius.int.ru> <67EC4A5E-752C-4476-9C95-8BAA3A8F49BC@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <67EC4A5E-752C-4476-9C95-8BAA3A8F49BC@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-all@freebsd.org" Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 17:50:26 -0000 On Fri, Oct 05, 2012 at 06:46:46PM +0300, Nikolay Denev wrote: N> > On Fri, Oct 05, 2012 at 05:11:12PM +0300, Nikolay Denev wrote: N> > N> With both modules I was able to saturate the four GigE interfaces, and got N> > N> about ~3.72 Gbits/sec total according to iperf, systat -ifstat showed N> > N> about 116MB/s per each interface. N> > N> N> > N> However I'm seeing slightly different CPU stat graphs [1], the difference is not big, N> > N> but with the new if_lagg(4) driver, when the machine is acting as client I'm N> > N> seeing slightly higher system CPU time, and about the same interrupt, while N> > N> when acting as server both system and interrupt are slightly lower. N> > N> But please note that these tests were not very scientifically correct. N> > N> When the server is available again I might be able to perform several runs and N> > N> do a proper comparison. N> > N> > Do I understand correct, that in the above testing "server" means transmitting N> > traffic and "client" is receiving traffic? N> > N> > -- N> > Totus tuus, Glebius. N> N> Actually with iperf the server is more like a sink, and the client sends data to the server. N> Here's what's in the man page : N> N> To perform an iperf test the user N> must establish both a server (to discard traffic) and a client (to gen- N> erate traffic). Hmm, in this case I'm really puzzled with results. I expected that receiving side won't be affected and transmitting optimized. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 17:54:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A07BB106566B; Fri, 5 Oct 2012 17:54:27 +0000 (UTC) (envelope-from cracauer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B3E78FC08; Fri, 5 Oct 2012 17:54:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95HsRPH014585; Fri, 5 Oct 2012 17:54:27 GMT (envelope-from cracauer@svn.freebsd.org) Received: (from cracauer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95HsRi8014583; Fri, 5 Oct 2012 17:54:27 GMT (envelope-from cracauer@svn.freebsd.org) Message-Id: <201210051754.q95HsRi8014583@svn.freebsd.org> From: Martin Cracauer Date: Fri, 5 Oct 2012 17:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241230 - head/usr.bin/at X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 17:54:27 -0000 Author: cracauer Date: Fri Oct 5 17:54:27 2012 New Revision: 241230 URL: http://svn.freebsd.org/changeset/base/241230 Log: Allow time offsets to be negative, e.g. `at 1530 - 15 minutes`. This is useful if you have been given some time for some event in some format and you want your computer to do something to prepare for it. Without having to do time arithmetic in a shellscript. The syntax matches what the at(1) usually used on Linux supports. Modified: head/usr.bin/at/parsetime.c Modified: head/usr.bin/at/parsetime.c ============================================================================== --- head/usr.bin/at/parsetime.c Fri Oct 5 16:44:00 2012 (r241229) +++ head/usr.bin/at/parsetime.c Fri Oct 5 17:54:27 2012 (r241230) @@ -64,7 +64,7 @@ enum { /* symbols */ MIDNIGHT, NOON, TEATIME, PM, AM, TOMORROW, TODAY, NOW, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS, - NUMBER, PLUS, DOT, SLASH, ID, JUNK, + NUMBER, PLUS, MINUS, DOT, SLASH, ID, JUNK, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, SUN, MON, TUE, WED, THU, FRI, SAT @@ -246,6 +246,8 @@ token(void) return sc_tokid = DOT; else if (sc_token[0] == '+') return sc_tokid = PLUS; + else if (sc_token[0] == '-') + return sc_tokid = MINUS; else if (sc_token[0] == '/') return sc_tokid = SLASH; else @@ -277,22 +279,14 @@ expect(int desired) /* - * plus() parses a now + time - * - * at [NOW] PLUS NUMBER [MINUTES|HOURS|DAYS|WEEKS|MONTHS|YEARS] - * + * plus_or_minus() holds functionality common to plus() and minus() */ - static void -plus(struct tm *tm) +plus_or_minus(struct tm *tm, int delay) { - int delay; int expectplur; - expect(NUMBER); - - delay = atoi(sc_token); - expectplur = (delay != 1) ? 1 : 0; + expectplur = (delay != 1 && delay != -1) ? 1 : 0; switch (token()) { case YEARS: @@ -323,11 +317,43 @@ plus(struct tm *tm) tm->tm_isdst = -1; if (mktime(tm) < 0) plonk(sc_tokid); +} /* plus_or_minus */ + + +/* + * plus() parses a now + time + * + * at [NOW] PLUS NUMBER [MINUTES|HOURS|DAYS|WEEKS|MONTHS|YEARS] + * + */ +static void +plus(struct tm *tm) +{ + int delay; + + expect(NUMBER); + delay = atoi(sc_token); + plus_or_minus(tm, delay); } /* plus */ /* + * minus() is like plus but can not be used with NOW + */ +static void +minus(struct tm *tm) +{ + int delay; + + expect(NUMBER); + + delay = -atoi(sc_token); + plus_or_minus(tm, delay); +} /* minus */ + + +/* * tod() computes the time of day * [NUMBER [DOT NUMBER] [AM|PM]] */ @@ -379,7 +405,8 @@ tod(struct tm *tm) * if we've gone past that time - but if we're specifying a time plus * a relative offset, it's okay to bump things */ - if ((sc_tokid == EOF || sc_tokid == PLUS) && tm->tm_hour > hour) { + if ((sc_tokid == EOF || sc_tokid == PLUS || sc_tokid == MINUS) && + tm->tm_hour > hour) { tm->tm_mday++; tm->tm_wday++; } @@ -456,6 +483,9 @@ month(struct tm *tm) case PLUS: plus(tm); break; + case MINUS: + minus(tm); + break; case TOMORROW: /* do something tomorrow */ @@ -588,6 +618,12 @@ parsetime(int argc, char **argv) plus(&runtime); break; + /* MINUS is different from PLUS in that NOW is not + * an optional prefix for it + */ + case MINUS: + minus(&runtime); + break; case NUMBER: tod(&runtime); month(&runtime); From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 18:42:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97B17106566C; Fri, 5 Oct 2012 18:42:51 +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 7ECF18FC1E; Fri, 5 Oct 2012 18:42:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95IgpDp021863; Fri, 5 Oct 2012 18:42:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95IgpDO021855; Fri, 5 Oct 2012 18:42:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210051842.q95IgpDO021855@svn.freebsd.org> From: Xin LI Date: Fri, 5 Oct 2012 18:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241231 - in head: contrib/libpcap contrib/libpcap/net contrib/libpcap/packaging contrib/libpcap/pcap contrib/libpcap/test contrib/libpcap/tests lib/libpcap sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 18:42:51 -0000 Author: delphij Date: Fri Oct 5 18:42:50 2012 New Revision: 241231 URL: http://svn.freebsd.org/changeset/base/241231 Log: MFV: libpcap 1.3.0. MFC after: 4 weeks Added: head/contrib/libpcap/pcap-canusb-linux.c - copied unchanged from r241200, vendor/libpcap/dist/pcap-canusb-linux.c head/contrib/libpcap/pcap-canusb-linux.h - copied unchanged from r241200, vendor/libpcap/dist/pcap-canusb-linux.h head/contrib/libpcap/tests/ - copied from r241200, vendor/libpcap/dist/tests/ Deleted: head/contrib/libpcap/net/ head/contrib/libpcap/test/ Modified: head/contrib/libpcap/CHANGES head/contrib/libpcap/CREDITS head/contrib/libpcap/Makefile.in head/contrib/libpcap/VERSION head/contrib/libpcap/config.h.in head/contrib/libpcap/configure head/contrib/libpcap/configure.in head/contrib/libpcap/gencode.c head/contrib/libpcap/gencode.h head/contrib/libpcap/optimize.c head/contrib/libpcap/packaging/pcap.spec.in head/contrib/libpcap/pcap-bpf.c head/contrib/libpcap/pcap-common.c head/contrib/libpcap/pcap-linux.c head/contrib/libpcap/pcap-netfilter-linux.c head/contrib/libpcap/pcap.c head/contrib/libpcap/pcap/bpf.h head/lib/libpcap/config.h head/sys/net/bpf.h Directory Properties: head/contrib/libpcap/ (props changed) Modified: head/contrib/libpcap/CHANGES ============================================================================== --- head/contrib/libpcap/CHANGES Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/CHANGES Fri Oct 5 18:42:50 2012 (r241231) @@ -1,3 +1,22 @@ +Friday March 30, 2012. mcr@sandelman.ca +Summary for 1.3.0 libpcap release + Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}. + Linux: Don't fail if netfilter isn't enabled in the kernel. + Add new link-layer type for NFC Forum LLCP. + Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball. + Add LINKTYPE_NG40/DLT_NG40. + Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams. + [PATCH] Fix AIX-3.5 crash with read failure during stress + AIX fixes. + Introduce --disable-shared configure option. + Added initial support for canusb devices. + Include the pcap(3PCAP) additions as 1.2.1 changes. + many updates to documentation: pcap.3pcap.in + Improve 'inbound'/'outbound' capture filters under Linux. + Note the cleanup of handling of new DLT_/LINKTYPE_ values. + On Lion, don't build for PPC. + For mac80211 devices we need to clean up monitor mode on exit. + Friday December 9, 2011. guy@alum.mit.edu. Summary for 1.2.1 libpcap release Update README file. Modified: head/contrib/libpcap/CREDITS ============================================================================== --- head/contrib/libpcap/CREDITS Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/CREDITS Fri Oct 5 18:42:50 2012 (r241231) @@ -34,6 +34,7 @@ Additional people who have contributed p David Kaelbling David Young Dean Gaudet + dhruv Don Ebright Dug Song Dustin Spicuzza Modified: head/contrib/libpcap/Makefile.in ============================================================================== --- head/contrib/libpcap/Makefile.in Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/Makefile.in Fri Oct 5 18:42:50 2012 (r241231) @@ -82,7 +82,7 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -289,6 +289,8 @@ EXTRA_DIST = \ pcap-bt-linux.h \ pcap-can-linux.c \ pcap-can-linux.h \ + pcap-canusb-linux.c \ + pcap-canusb-linux.h \ pcap-config.in \ pcap-dag.c \ pcap-dag.h \ Modified: head/contrib/libpcap/VERSION ============================================================================== --- head/contrib/libpcap/VERSION Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/VERSION Fri Oct 5 18:42:50 2012 (r241231) @@ -1 +1 @@ -1.2.1 +1.3.0 Modified: head/contrib/libpcap/config.h.in ============================================================================== --- head/contrib/libpcap/config.h.in Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/config.h.in Fri Oct 5 18:42:50 2012 (r241231) @@ -232,6 +232,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -244,6 +247,9 @@ /* target host supports CAN sniffing */ #undef PCAP_SUPPORT_CAN +/* target host supports canusb */ +#undef PCAP_SUPPORT_CANUSB + /* target host supports netfilter sniffing */ #undef PCAP_SUPPORT_NETFILTER Modified: head/contrib/libpcap/configure ============================================================================== --- head/contrib/libpcap/configure Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/configure Fri Oct 5 18:42:50 2012 (r241231) @@ -1,61 +1,84 @@ #! /bin/sh # From configure.in Revision: 1.168 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.67. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -64,20 +87,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -88,354 +109,321 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi -if ( set x; as_func_ret_success y && test x = "$1" ); then - : +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -if as_func_ret_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_ret_success failed. + as_expr=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -452,8 +440,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -463,49 +450,40 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -513,7 +491,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -530,12 +508,12 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -549,11 +527,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -568,7 +546,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -576,6 +553,7 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="pcap.c" # Factoring default headers for most tests. @@ -614,100 +592,128 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 19:04:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5652C106566C; Fri, 5 Oct 2012 19:04:10 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id AD2F08FC08; Fri, 5 Oct 2012 19:04:09 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id x43so1559047wey.13 for ; Fri, 05 Oct 2012 12:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=p4Pm+Uv5Bh/dkfIszne4J8cL6jIrtYFqllx9Ca9HWIQ=; b=Gb0U7hJAeGyPalesLpnxrt+XpvwlFYNwfkxnRpUl3kOjOOvu+D6X6NefflgNWMiVCU +RYb+DzmrKDrbDs42RZcncYNTP7uI5wEvRObA20OtAlIzKq25PfbgNLy3Ac/yF9EITMC A1bh/r3qr3YhK9Gl+I+CaDasDoC8+0FOZnPoRW/IErGCGl2Yyewxr2R7i/HKVZKdrhw6 LYWX82yZATqIGx5tK/++WGoSMIURh9NK/1aUB6uCyVT/j6b+8gXuj3lmFIRT7Fk5E/Qx xWv472bkvZq7MQ81/LVnTJIkA7/Ixu+ii6TYOLHYORYDe5Uqckce+lLmBCKf04bXOHgF gITA== Received: by 10.180.108.45 with SMTP id hh13mr5128939wib.15.1349463848363; Fri, 05 Oct 2012 12:04:08 -0700 (PDT) Received: from [10.0.0.86] ([93.152.184.10]) by mx.google.com with ESMTPS id fb20sm4314994wid.1.2012.10.05.12.04.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 12:04:04 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset=koi8-r From: Nikolay Denev In-Reply-To: <20121005175024.GV34622@glebius.int.ru> Date: Fri, 5 Oct 2012 22:04:02 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <52437C79-E04A-4C93-9E83-EF07D17D34F2@gmail.com> References: <201209201005.q8KA5BqZ094414@svn.freebsd.org> <2966A49C-DE3F-4559-A799-D1E9C0A74A9C@gmail.com> <20121005070914.GI34622@glebius.int.ru> <20121005080453.GL34622@glebius.int.ru> <2109548116005159772@unknownmsgid> <20121005151139.GS34622@glebius.int.ru> <67EC4A5E-752C-4476-9C95-8BAA3A8F49BC@gmail.com> <20121005175024.GV34622@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1498) Cc: "svn-src-all@freebsd.org" Subject: Re: svn commit: r240742 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 19:04:10 -0000 On Oct 5, 2012, at 8:50 PM, Gleb Smirnoff wrote: > On Fri, Oct 05, 2012 at 06:46:46PM +0300, Nikolay Denev wrote: > N> > On Fri, Oct 05, 2012 at 05:11:12PM +0300, Nikolay Denev wrote: > N> > N> With both modules I was able to saturate the four GigE = interfaces, and got=20 > N> > N> about ~3.72 Gbits/sec total according to iperf, systat -ifstat = showed > N> > N> about 116MB/s per each interface. > N> > N>=20 > N> > N> However I'm seeing slightly different CPU stat graphs [1], the = difference is not big, > N> > N> but with the new if_lagg(4) driver, when the machine is acting = as client I'm > N> > N> seeing slightly higher system CPU time, and about the same = interrupt, while > N> > N> when acting as server both system and interrupt are slightly = lower. > N> > N> But please note that these tests were not very scientifically = correct. > N> > N> When the server is available again I might be able to perform = several runs and > N> > N> do a proper comparison. > N> >=20 > N> > Do I understand correct, that in the above testing "server" means = transmitting > N> > traffic and "client" is receiving traffic? > N> >=20 > N> > --=20 > N> > Totus tuus, Glebius. > N>=20 > N> Actually with iperf the server is more like a sink, and the client = sends data to the server. > N> Here's what's in the man page : > N>=20 > N> To perform an iperf test the user > N> must establish both a server (to discard traffic) and a = client (to gen- > N> erate traffic). >=20 > Hmm, in this case I'm really puzzled with results. I expected that = receiving > side won't be affected and transmitting optimized. >=20 > --=20 > Totus tuus, Glebius. I have no explanation too, but I suppose my tests were flawed, as the = machine was not 100% idle at the moment of the test. I think I will have to retest with more runs, and probably use smaller = packets to stress the code more, as now iperf easily saturates the links and there is no visible speed = difference. From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 20:14:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 570E9106564A; Fri, 5 Oct 2012 20:14:03 +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 3E2428FC14; Fri, 5 Oct 2012 20:14:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95KE3OZ034849; Fri, 5 Oct 2012 20:14:03 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95KE3ZB034846; Fri, 5 Oct 2012 20:14:03 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201210052014.q95KE3ZB034846@svn.freebsd.org> From: Brooks Davis Date: Fri, 5 Oct 2012 20:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241233 - in vendor/NetBSD/libc-pwcache: . dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 20:14:03 -0000 Author: brooks Date: Fri Oct 5 20:14:02 2012 New Revision: 241233 URL: http://svn.freebsd.org/changeset/base/241233 Log: Vendor import of NetBSD's pwcache(3) as of 2012-10-05 Added: vendor/NetBSD/libc-pwcache/ vendor/NetBSD/libc-pwcache/dist/ vendor/NetBSD/libc-pwcache/dist/pwcache.3 (contents, props changed) vendor/NetBSD/libc-pwcache/dist/pwcache.c (contents, props changed) vendor/NetBSD/libc-pwcache/dist/pwcache.h (contents, props changed) Added: vendor/NetBSD/libc-pwcache/dist/pwcache.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libc-pwcache/dist/pwcache.3 Fri Oct 5 20:14:02 2012 (r241233) @@ -0,0 +1,220 @@ +.\" $NetBSD: pwcache.3,v 1.17 2008/05/02 18:11:04 martin Exp $ +.\" +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. 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. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" +.\" Copyright (c) 2002 The NetBSD Foundation, Inc. +.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. +.\" +.\" +.\" @(#)pwcache.3 8.1 (Berkeley) 6/9/93 +.\" +.Dd January 24, 2002 +.Dt PWCACHE 3 +.Os +.Sh NAME +.Nm pwcache , +.Nm user_from_uid , +.Nm group_from_gid +.Nd cache password and group entries +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In pwd.h +.Ft const char * +.Fn user_from_uid "uid_t uid" "int nouser" +.Ft int +.Fn uid_from_user "const char *name" "uid_t *uid" +.Ft int +.Fn pwcache_userdb "int (*setpassent)(int)" "void (*endpwent)(void)" "struct passwd * (*getpwnam)(const char *)" "struct passwd * (*getpwuid)(uid_t)" +.In grp.h +.Ft const char * +.Fn group_from_gid "gid_t gid" "int nogroup" +.Ft int +.Fn gid_from_group "const char *name" "gid_t *gid" +.Ft int +.Fn pwcache_groupdb "int (*setgroupent)(int)" "void (*endgrent)(void)" "struct group * (*getgrnam)(const char *)" "struct group * (*getgrgid)(gid_t)" +.Sh DESCRIPTION +The +.Fn user_from_uid +function returns the user name associated with the argument +.Fa uid . +The user name is cached so that multiple calls with the same +.Fa uid +do not require additional calls to +.Xr getpwuid 3 . +If there is no user associated with the +.Fa uid , +a pointer is returned +to a string representation of the +.Fa uid , +unless the argument +.Fa nouser +is non-zero, in which case a +.Dv NULL +pointer is returned. +.Pp +The +.Fn group_from_gid +function returns the group name associated with the argument +.Fa gid . +The group name is cached so that multiple calls with the same +.Fa gid +do not require additional calls to +.Xr getgrgid 3 . +If there is no group associated with the +.Fa gid , +a pointer is returned +to a string representation of the +.Fa gid , +unless the argument +.Fa nogroup +is non-zero, in which case a +.Dv NULL +pointer is returned. +.Pp +The +.Fn uid_from_user +function returns the uid associated with the argument +.Fa name . +The uid is cached so that multiple calls with the same +.Fa name +do not require additional calls to +.Xr getpwnam 3 . +If there is no uid associated with the +.Fa name , +the +.Fn uid_from_user +function returns \-1; otherwise it stores the uid at the location pointed to by +.Fa uid +and returns 0. +.Pp +The +.Fn gid_from_group +function returns the gid associated with the argument +.Fa name . +The gid is cached so that multiple calls with the same +.Fa name +do not require additional calls to +.Xr getgrnam 3 . +If there is no gid associated with the +.Fa name , +the +.Fn gid_from_group +function returns \-1; otherwise it stores the gid at the location pointed to by +.Fa gid +and returns 0. +.Pp +The +.Fn pwcache_userdb +function changes the user database access routines which +.Fn user_from_uid +and +.Fn uid_from_user +call to search for users. +The caches are flushed and the existing +.Fn endpwent +method is called before switching to the new routines. +.Fa getpwnam +and +.Fa getpwuid +must be provided, and +.Fa setpassent +and +.Fa endpwent +may be +.Dv NULL +pointers. +.Pp +The +.Fn pwcache_groupdb +function changes the group database access routines which +.Fn group_from_gid +and +.Fn gid_from_group +call to search for groups. +The caches are flushed and the existing +.Fn endgrent +method is called before switching to the new routines. +.Fa getgrnam +and +.Fa getgrgid +must be provided, and +.Fa setgroupent +and +.Fa endgrent +may be +.Dv NULL +pointers. +.Sh SEE ALSO +.Xr getgrgid 3 , +.Xr getgrnam 3 , +.Xr getpwnam 3 , +.Xr getpwuid 3 +.Sh HISTORY +The +.Fn user_from_uid +and +.Fn group_from_gid +functions first appeared in +.Bx 4.4 . +.Pp +The +.Fn uid_from_user +and +.Fn gid_from_group +functions first appeared in +.Nx 1.4 . +.Pp +The +.Fn pwcache_userdb +and +.Fn pwcache_groupdb +functions first appeared in +.Nx 1.6 . Added: vendor/NetBSD/libc-pwcache/dist/pwcache.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libc-pwcache/dist/pwcache.c Fri Oct 5 20:14:02 2012 (r241233) @@ -0,0 +1,643 @@ +/* $NetBSD: pwcache.c,v 1.31 2010/03/23 20:28:59 drochner Exp $ */ + +/*- + * Copyright (c) 1992 Keith Muller. + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Keith Muller of the University of California, San Diego. + * + * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ + +/*- + * Copyright (c) 2002 The NetBSD Foundation, Inc. + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +/* + * XXX Undefine the renames of these functions so that we don't + * XXX rename the versions found in the host's by mistake! + */ +#undef group_from_gid +#undef user_from_uid +#endif + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93"; +#else +__RCSID("$NetBSD: pwcache.c,v 1.31 2010/03/23 20:28:59 drochner Exp $"); +#endif +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#if HAVE_NBTOOL_CONFIG_H +/* XXX Now, re-apply the renaming that we undid above. */ +#define group_from_gid __nbcompat_group_from_gid +#define user_from_uid __nbcompat_user_from_uid +#endif + +#ifdef __weak_alias +__weak_alias(user_from_uid,_user_from_uid) +__weak_alias(group_from_gid,_group_from_gid) +__weak_alias(pwcache_groupdb,_pwcache_groupdb) +#endif + +#if !HAVE_PWCACHE_USERDB || HAVE_NBTOOL_CONFIG_H +#include "pwcache.h" + +/* + * routines that control user, group, uid and gid caches (for the archive + * member print routine). + * IMPORTANT: + * these routines cache BOTH hits and misses, a major performance improvement + */ + +/* + * function pointers to various name lookup routines. + * these may be changed as necessary. + */ +static int (*_pwcache_setgroupent)(int) = setgroupent; +static void (*_pwcache_endgrent)(void) = endgrent; +static struct group * (*_pwcache_getgrnam)(const char *) = getgrnam; +static struct group * (*_pwcache_getgrgid)(gid_t) = getgrgid; +static int (*_pwcache_setpassent)(int) = setpassent; +static void (*_pwcache_endpwent)(void) = endpwent; +static struct passwd * (*_pwcache_getpwnam)(const char *) = getpwnam; +static struct passwd * (*_pwcache_getpwuid)(uid_t) = getpwuid; + +/* + * internal state + */ +static int pwopn; /* is password file open */ +static int gropn; /* is group file open */ +static UIDC **uidtb; /* uid to name cache */ +static GIDC **gidtb; /* gid to name cache */ +static UIDC **usrtb; /* user name to uid cache */ +static GIDC **grptb; /* group name to gid cache */ + +static int uidtb_fail; /* uidtb_start() failed ? */ +static int gidtb_fail; /* gidtb_start() failed ? */ +static int usrtb_fail; /* usrtb_start() failed ? */ +static int grptb_fail; /* grptb_start() failed ? */ + + +static u_int st_hash(const char *, size_t, int); +static int uidtb_start(void); +static int gidtb_start(void); +static int usrtb_start(void); +static int grptb_start(void); + + +static u_int +st_hash(const char *name, size_t len, int tabsz) +{ + u_int key = 0; + + _DIAGASSERT(name != NULL); + + while (len--) { + key += *name++; + key = (key << 8) | (key >> 24); + } + + return (key % tabsz); +} + +/* + * uidtb_start + * creates an an empty uidtb + * Return: + * 0 if ok, -1 otherwise + */ +static int +uidtb_start(void) +{ + + if (uidtb != NULL) + return (0); + if (uidtb_fail) + return (-1); + if ((uidtb = (UIDC **)calloc(UID_SZ, sizeof(UIDC *))) == NULL) { + ++uidtb_fail; + return (-1); + } + return (0); +} + +/* + * gidtb_start + * creates an an empty gidtb + * Return: + * 0 if ok, -1 otherwise + */ +static int +gidtb_start(void) +{ + + if (gidtb != NULL) + return (0); + if (gidtb_fail) + return (-1); + if ((gidtb = (GIDC **)calloc(GID_SZ, sizeof(GIDC *))) == NULL) { + ++gidtb_fail; + return (-1); + } + return (0); +} + +/* + * usrtb_start + * creates an an empty usrtb + * Return: + * 0 if ok, -1 otherwise + */ +static int +usrtb_start(void) +{ + + if (usrtb != NULL) + return (0); + if (usrtb_fail) + return (-1); + if ((usrtb = (UIDC **)calloc(UNM_SZ, sizeof(UIDC *))) == NULL) { + ++usrtb_fail; + return (-1); + } + return (0); +} + +/* + * grptb_start + * creates an an empty grptb + * Return: + * 0 if ok, -1 otherwise + */ +static int +grptb_start(void) +{ + + if (grptb != NULL) + return (0); + if (grptb_fail) + return (-1); + if ((grptb = (GIDC **)calloc(GNM_SZ, sizeof(GIDC *))) == NULL) { + ++grptb_fail; + return (-1); + } + return (0); +} + +/* + * user_from_uid() + * caches the name (if any) for the uid. If noname clear, we always + * return the stored name (if valid or invalid match). + * We use a simple hash table. + * Return + * Pointer to stored name (or a empty string) + */ +const char * +user_from_uid(uid_t uid, int noname) +{ + struct passwd *pw; + UIDC *ptr, **pptr; + + if ((uidtb == NULL) && (uidtb_start() < 0)) + return (NULL); + + /* + * see if we have this uid cached + */ + pptr = uidtb + (uid % UID_SZ); + ptr = *pptr; + + if ((ptr != NULL) && (ptr->valid > 0) && (ptr->uid == uid)) { + /* + * have an entry for this uid + */ + if (!noname || (ptr->valid == VALID)) + return (ptr->name); + return (NULL); + } + + /* + * No entry for this uid, we will add it + */ + if (!pwopn) { + if (_pwcache_setpassent != NULL) + (*_pwcache_setpassent)(1); + ++pwopn; + } + + if (ptr == NULL) + *pptr = ptr = (UIDC *)malloc(sizeof(UIDC)); + + if ((pw = (*_pwcache_getpwuid)(uid)) == NULL) { + /* + * no match for this uid in the local password file + * a string that is the uid in numeric format + */ + if (ptr == NULL) + return (NULL); + ptr->uid = uid; + (void)snprintf(ptr->name, UNMLEN, "%lu", (long) uid); + ptr->valid = INVALID; + if (noname) + return (NULL); + } else { + /* + * there is an entry for this uid in the password file + */ + if (ptr == NULL) + return (pw->pw_name); + ptr->uid = uid; + (void)strlcpy(ptr->name, pw->pw_name, UNMLEN); + ptr->valid = VALID; + } + return (ptr->name); +} + +/* + * group_from_gid() + * caches the name (if any) for the gid. If noname clear, we always + * return the stored name (if valid or invalid match). + * We use a simple hash table. + * Return + * Pointer to stored name (or a empty string) + */ +const char * +group_from_gid(gid_t gid, int noname) +{ + struct group *gr; + GIDC *ptr, **pptr; + + if ((gidtb == NULL) && (gidtb_start() < 0)) + return (NULL); + + /* + * see if we have this gid cached + */ + pptr = gidtb + (gid % GID_SZ); + ptr = *pptr; + + if ((ptr != NULL) && (ptr->valid > 0) && (ptr->gid == gid)) { + /* + * have an entry for this gid + */ + if (!noname || (ptr->valid == VALID)) + return (ptr->name); + return (NULL); + } + + /* + * No entry for this gid, we will add it + */ + if (!gropn) { + if (_pwcache_setgroupent != NULL) + (*_pwcache_setgroupent)(1); + ++gropn; + } + + if (ptr == NULL) + *pptr = ptr = (GIDC *)malloc(sizeof(GIDC)); + + if ((gr = (*_pwcache_getgrgid)(gid)) == NULL) { + /* + * no match for this gid in the local group file, put in + * a string that is the gid in numberic format + */ + if (ptr == NULL) + return (NULL); + ptr->gid = gid; + (void)snprintf(ptr->name, GNMLEN, "%lu", (long) gid); + ptr->valid = INVALID; + if (noname) + return (NULL); + } else { + /* + * there is an entry for this group in the group file + */ + if (ptr == NULL) + return (gr->gr_name); + ptr->gid = gid; + (void)strlcpy(ptr->name, gr->gr_name, GNMLEN); + ptr->valid = VALID; + } + return (ptr->name); +} + +/* + * uid_from_user() + * caches the uid for a given user name. We use a simple hash table. + * Return + * the uid (if any) for a user name, or a -1 if no match can be found + */ +int +uid_from_user(const char *name, uid_t *uid) +{ + struct passwd *pw; + UIDC *ptr, **pptr; + size_t namelen; + + /* + * return -1 for mangled names + */ + if (name == NULL || ((namelen = strlen(name)) == 0)) + return (-1); + if ((usrtb == NULL) && (usrtb_start() < 0)) + return (-1); + + /* + * look up in hash table, if found and valid return the uid, + * if found and invalid, return a -1 + */ + pptr = usrtb + st_hash(name, namelen, UNM_SZ); + ptr = *pptr; + + if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) { + if (ptr->valid == INVALID) + return (-1); + *uid = ptr->uid; + return (0); + } + + if (!pwopn) { + if (_pwcache_setpassent != NULL) + (*_pwcache_setpassent)(1); + ++pwopn; + } + + if (ptr == NULL) + *pptr = ptr = (UIDC *)malloc(sizeof(UIDC)); + + /* + * no match, look it up, if no match store it as an invalid entry, + * or store the matching uid + */ + if (ptr == NULL) { + if ((pw = (*_pwcache_getpwnam)(name)) == NULL) + return (-1); + *uid = pw->pw_uid; + return (0); + } + (void)strlcpy(ptr->name, name, UNMLEN); + if ((pw = (*_pwcache_getpwnam)(name)) == NULL) { + ptr->valid = INVALID; + return (-1); + } + ptr->valid = VALID; + *uid = ptr->uid = pw->pw_uid; + return (0); +} + +/* + * gid_from_group() + * caches the gid for a given group name. We use a simple hash table. + * Return + * the gid (if any) for a group name, or a -1 if no match can be found + */ +int +gid_from_group(const char *name, gid_t *gid) +{ + struct group *gr; + GIDC *ptr, **pptr; + size_t namelen; + + /* + * return -1 for mangled names + */ + if (name == NULL || ((namelen = strlen(name)) == 0)) + return (-1); + if ((grptb == NULL) && (grptb_start() < 0)) + return (-1); + + /* + * look up in hash table, if found and valid return the uid, + * if found and invalid, return a -1 + */ + pptr = grptb + st_hash(name, namelen, GID_SZ); + ptr = *pptr; + + if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) { + if (ptr->valid == INVALID) + return (-1); + *gid = ptr->gid; + return (0); + } + + if (!gropn) { + if (_pwcache_setgroupent != NULL) + (*_pwcache_setgroupent)(1); + ++gropn; + } + + if (ptr == NULL) + *pptr = ptr = (GIDC *)malloc(sizeof(GIDC)); + + /* + * no match, look it up, if no match store it as an invalid entry, + * or store the matching gid + */ + if (ptr == NULL) { + if ((gr = (*_pwcache_getgrnam)(name)) == NULL) + return (-1); + *gid = gr->gr_gid; + return (0); + } + + (void)strlcpy(ptr->name, name, GNMLEN); + if ((gr = (*_pwcache_getgrnam)(name)) == NULL) { + ptr->valid = INVALID; + return (-1); + } + ptr->valid = VALID; + *gid = ptr->gid = gr->gr_gid; + return (0); +} + +#define FLUSHTB(arr, len, fail) \ + do { \ + if (arr != NULL) { \ + for (i = 0; i < len; i++) \ + if (arr[i] != NULL) \ + free(arr[i]); \ + arr = NULL; \ + } \ + fail = 0; \ + } while (/* CONSTCOND */0); + +int +pwcache_userdb( + int (*a_setpassent)(int), + void (*a_endpwent)(void), + struct passwd * (*a_getpwnam)(const char *), + struct passwd * (*a_getpwuid)(uid_t)) +{ + int i; + + /* a_setpassent and a_endpwent may be NULL */ + if (a_getpwnam == NULL || a_getpwuid == NULL) + return (-1); + + if (_pwcache_endpwent != NULL) + (*_pwcache_endpwent)(); + FLUSHTB(uidtb, UID_SZ, uidtb_fail); + FLUSHTB(usrtb, UNM_SZ, usrtb_fail); + pwopn = 0; + _pwcache_setpassent = a_setpassent; + _pwcache_endpwent = a_endpwent; + _pwcache_getpwnam = a_getpwnam; + _pwcache_getpwuid = a_getpwuid; + + return (0); +} + +int +pwcache_groupdb( + int (*a_setgroupent)(int), + void (*a_endgrent)(void), + struct group * (*a_getgrnam)(const char *), + struct group * (*a_getgrgid)(gid_t)) +{ + int i; + + /* a_setgroupent and a_endgrent may be NULL */ + if (a_getgrnam == NULL || a_getgrgid == NULL) + return (-1); + + if (_pwcache_endgrent != NULL) + (*_pwcache_endgrent)(); + FLUSHTB(gidtb, GID_SZ, gidtb_fail); + FLUSHTB(grptb, GNM_SZ, grptb_fail); + gropn = 0; + _pwcache_setgroupent = a_setgroupent; + _pwcache_endgrent = a_endgrent; + _pwcache_getgrnam = a_getgrnam; + _pwcache_getgrgid = a_getgrgid; + + return (0); +} + + +#ifdef TEST_PWCACHE + +struct passwd * +test_getpwnam(const char *name) +{ + static struct passwd foo; + + memset(&foo, 0, sizeof(foo)); + if (strcmp(name, "toor") == 0) { + foo.pw_uid = 666; + return &foo; + } + return (getpwnam(name)); +} + +int +main(int argc, char *argv[]) +{ + uid_t u; + int r, i; + + printf("pass 1 (default userdb)\n"); + for (i = 1; i < argc; i++) { + printf("i: %d, pwopn %d usrtb_fail %d usrtb %p\n", + i, pwopn, usrtb_fail, usrtb); + r = uid_from_user(argv[i], &u); + if (r == -1) + printf(" uid_from_user %s: failed\n", argv[i]); + else + printf(" uid_from_user %s: %d\n", argv[i], u); + } + printf("pass 1 finish: pwopn %d usrtb_fail %d usrtb %p\n", + pwopn, usrtb_fail, usrtb); + + puts(""); + printf("pass 2 (replacement userdb)\n"); + printf("pwcache_userdb returned %d\n", + pwcache_userdb(setpassent, test_getpwnam, getpwuid)); + printf("pwopn %d usrtb_fail %d usrtb %p\n", pwopn, usrtb_fail, usrtb); + + for (i = 1; i < argc; i++) { + printf("i: %d, pwopn %d usrtb_fail %d usrtb %p\n", + i, pwopn, usrtb_fail, usrtb); + u = -1; + r = uid_from_user(argv[i], &u); + if (r == -1) + printf(" uid_from_user %s: failed\n", argv[i]); + else + printf(" uid_from_user %s: %d\n", argv[i], u); + } + printf("pass 2 finish: pwopn %d usrtb_fail %d usrtb %p\n", + pwopn, usrtb_fail, usrtb); + + puts(""); + printf("pass 3 (null pointers)\n"); + printf("pwcache_userdb returned %d\n", + pwcache_userdb(NULL, NULL, NULL)); + + return (0); +} +#endif /* TEST_PWCACHE */ +#endif /* !HAVE_PWCACHE_USERDB */ Added: vendor/NetBSD/libc-pwcache/dist/pwcache.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libc-pwcache/dist/pwcache.h Fri Oct 5 20:14:02 2012 (r241233) @@ -0,0 +1,72 @@ +/* $NetBSD: pwcache.h,v 1.5 2003/11/10 08:51:51 wiz Exp $ */ + +/*- + * Copyright (c) 1992 Keith Muller. + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Keith Muller of the University of California, San Diego. + * + * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * @(#)cache.h 8.1 (Berkeley) 5/31/93 + */ + +/* + * Constants and data structures used to implement group and password file + * caches. Traditional passwd/group cache routines perform quite poorly with + * archives. The chances of hitting a valid lookup with an archive is quite a + * bit worse than with files already resident on the file system. These misses + * create a MAJOR performance cost. To address this problem, these routines + * cache both hits and misses. + * + * NOTE: name lengths must be as large as those stored in ANY PROTOCOL and + * as stored in the passwd and group files. CACHE SIZES MUST BE PRIME + */ +#define UNMLEN 32 /* >= user name found in any protocol */ +#define GNMLEN 32 /* >= group name found in any protocol */ +#define UID_SZ 317 /* size of uid to user_name cache */ +#define UNM_SZ 317 /* size of user_name to uid cache */ +#define GID_SZ 251 /* size of gid to group_name cache */ +#define GNM_SZ 251 /* size of group_name to gid cache */ +#define VALID 1 /* entry and name are valid */ +#define INVALID 2 /* entry valid, name NOT valid */ + +/* + * Node structures used in the user, group, uid, and gid caches. + */ + +typedef struct uidc { + int valid; /* is this a valid or a miss entry */ + char name[UNMLEN]; /* uid name */ + uid_t uid; /* cached uid */ +} UIDC; + +typedef struct gidc { + int valid; /* is this a valid or a miss entry */ + char name[GNMLEN]; /* gid name */ + gid_t gid; /* cached gid */ +} GIDC; From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 20:15:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B707106566C; Fri, 5 Oct 2012 20:15:31 +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 0BB928FC23; Fri, 5 Oct 2012 20:15:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95KFUNe035051; Fri, 5 Oct 2012 20:15:30 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95KFUdX035050; Fri, 5 Oct 2012 20:15:30 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201210052015.q95KFUdX035050@svn.freebsd.org> From: Brooks Davis Date: Fri, 5 Oct 2012 20:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241234 - vendor/NetBSD/libc-pwcache/20121005 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 20:15:31 -0000 Author: brooks Date: Fri Oct 5 20:15:30 2012 New Revision: 241234 URL: http://svn.freebsd.org/changeset/base/241234 Log: Tag import of NetBSD's pwcache(3) as of 2012-10-05 Added: vendor/NetBSD/libc-pwcache/20121005/ - copied from r241233, vendor/NetBSD/libc-pwcache/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 20:19:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D8181065673; Fri, 5 Oct 2012 20:19:29 +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 268548FC12; Fri, 5 Oct 2012 20:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95KJTBD035583; Fri, 5 Oct 2012 20:19:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95KJSxv035569; Fri, 5 Oct 2012 20:19:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210052019.q95KJSxv035569@svn.freebsd.org> From: Xin LI Date: Fri, 5 Oct 2012 20:19:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241235 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 20:19:29 -0000 Author: delphij Date: Fri Oct 5 20:19:28 2012 New Revision: 241235 URL: http://svn.freebsd.org/changeset/base/241235 Log: MFV: tcpdump 4.3.0. MFC after: 4 weeks Added: head/contrib/tcpdump/print-tipc.c - copied unchanged from r241231, vendor/tcpdump/dist/print-tipc.c Modified: head/contrib/tcpdump/CHANGES head/contrib/tcpdump/CREDITS head/contrib/tcpdump/Makefile.in head/contrib/tcpdump/VERSION head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/decode_prefix.h head/contrib/tcpdump/ethertype.h head/contrib/tcpdump/forces.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/print-802_11.c head/contrib/tcpdump/print-bgp.c head/contrib/tcpdump/print-ether.c head/contrib/tcpdump/print-forces.c head/contrib/tcpdump/print-icmp6.c head/contrib/tcpdump/print-igmp.c head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-ip6opts.c head/contrib/tcpdump/print-ldp.c head/contrib/tcpdump/print-lldp.c head/contrib/tcpdump/print-lwapp.c head/contrib/tcpdump/print-ospf6.c head/contrib/tcpdump/print-pim.c head/contrib/tcpdump/print-pppoe.c head/contrib/tcpdump/print-rrcp.c head/contrib/tcpdump/tcpdump.1.in head/contrib/tcpdump/tcpdump.c head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/CHANGES ============================================================================== --- head/contrib/tcpdump/CHANGES Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/CHANGES Fri Oct 5 20:19:28 2012 (r241235) @@ -1,3 +1,19 @@ +Friday April 3, 2011. mcr@sandelman.ca. + Summary for 4.3.0 tcpdump release + fixes for forces: SPARSE data (per RFC 5810) + some more test cases added + updates to documentation on -l, -U and -w flags. + Fix printing of BGP optional headers. + Tried to include DLT_PFSYNC support, failed due to headers required. + added TIPC support. + Fix LLDP Network Policy bit definitions. + fixes for IGMPv3's Max Response Time: it is in units of 0.1 second. + SIGUSR1 can be used rather than SIGINFO for stats + permit -n flag to affect print-ip for protocol numbers + ND_OPT_ADVINTERVAL is in milliseconds, not seconds + Teach PPPoE parser about RFC 4638 + + Friday December 9, 2011. guy@alum.mit.edu. Summary for 4.2.1 tcpdump release Only build the Babel printer if IPv6 is enabled. Modified: head/contrib/tcpdump/CREDITS ============================================================================== --- head/contrib/tcpdump/CREDITS Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/CREDITS Fri Oct 5 20:19:28 2012 (r241235) @@ -43,6 +43,7 @@ Additional people who have contributed p Chris Larson Christian Sievers Christophe Rhodes + Cliff Frey Craig Rodrigues Crist J. Clark Daniel Hagerty @@ -102,6 +103,7 @@ Additional people who have contributed p Kelly Carmichael Ken Hornstein Kevin Steves + Kenichi Maehashi Klaus Klein Kris Kennaway Krzysztof Halasa @@ -176,6 +178,7 @@ Additional people who have contributed p Sepherosa Ziehau Seth Webster Shinsuke Suzuki + Simon Ruderich Steinar Haug Swaminathan Chandrasekaran Takashi Yamamoto Modified: head/contrib/tcpdump/Makefile.in ============================================================================== --- head/contrib/tcpdump/Makefile.in Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/Makefile.in Fri Oct 5 20:19:28 2012 (r241235) @@ -77,7 +77,7 @@ CSRC = addrtoname.c af.c checksum.c cpac print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ print-eap.c print-eigrp.c\ - print-esp.c print-ether.c print-fddi.c print-fr.c \ + print-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \ print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \ print-ipx.c print-isoclns.c print-juniper.c print-krb.c \ @@ -91,8 +91,8 @@ CSRC = addrtoname.c af.c checksum.c cpac print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ - print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \ - print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \ + print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \ + print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \ print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c LIBNETDISSECT_SRC=print-isakmp.c @@ -304,10 +304,11 @@ EXTRA_DIST = \ tests/forces1.pcap \ tests/forces1vvv.out \ tests/forces1vvvv.out \ - tests/forces2.out \ tests/forces2v.out \ tests/forces2vv.out \ tests/forces3vvv.out \ + tests/icmpv6.out \ + tests/icmpv6.pcap \ tests/ikev2four.out \ tests/ikev2four.pcap \ tests/ikev2fourv.out \ @@ -335,6 +336,8 @@ EXTRA_DIST = \ tests/mpls-traceroute.pcap \ tests/ospf-gmpls.out \ tests/ospf-gmpls.pcap \ + tests/pppoe.out \ + tests/pppoe.pcap \ tests/print-A.out \ tests/print-AA.out \ tests/print-capX.out \ Modified: head/contrib/tcpdump/VERSION ============================================================================== --- head/contrib/tcpdump/VERSION Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/VERSION Fri Oct 5 20:19:28 2012 (r241235) @@ -1 +1 @@ -4.2.1 +4.3.0 Modified: head/contrib/tcpdump/configure ============================================================================== --- head/contrib/tcpdump/configure Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/configure Fri Oct 5 20:19:28 2012 (r241235) @@ -7554,9 +7554,23 @@ if test $ac_cv_func_pcap_loop = yes; the else { { echo "$as_me:$LINENO: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&5 +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&5 echo "$as_me: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&2;} +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&2;} { (exit 1); exit 1; }; } fi @@ -9330,7 +9344,7 @@ fi done if test $ac_cv_func_pcap_findalldevs = "yes" ; then - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" { echo "$as_me:$LINENO: checking for pcap_if_t" >&5 echo $ECHO_N "checking for pcap_if_t... $ECHO_C" >&6; } @@ -11748,7 +11762,7 @@ _ACEOF fi - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" for ac_header in openssl/evp.h Modified: head/contrib/tcpdump/configure.in ============================================================================== --- head/contrib/tcpdump/configure.in Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/configure.in Fri Oct 5 20:19:28 2012 (r241235) @@ -732,7 +732,7 @@ if test $ac_cv_func_pcap_findalldevs = " dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't dnl have pcap_if_t. - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_TYPES(pcap_if_t, , , [#include ]) CPPFLAGS="$savedcppflags" @@ -1067,7 +1067,7 @@ if test "$want_libcrypto" != "no"; then fi AC_CHECK_LIB(crypto, DES_cbc_encrypt) - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_HEADERS(openssl/evp.h) CPPFLAGS="$savedcppflags" Modified: head/contrib/tcpdump/decode_prefix.h ============================================================================== --- head/contrib/tcpdump/decode_prefix.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/decode_prefix.h Fri Oct 5 20:19:28 2012 (r241235) @@ -33,9 +33,9 @@ #ifndef tcpdump_decode_prefix_h #define tcpdump_decode_prefix_h -extern int decode_prefix4(const u_char *pptr, char *buf, u_int buflen); +extern int decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen); #ifdef INET6 -extern int decode_prefix6(const u_char *pd, char *buf, u_int buflen); +extern int decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen); #endif #endif Modified: head/contrib/tcpdump/ethertype.h ============================================================================== --- head/contrib/tcpdump/ethertype.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/ethertype.h Fri Oct 5 20:19:28 2012 (r241235) @@ -101,6 +101,9 @@ #ifndef ETHERTYPE_AARP #define ETHERTYPE_AARP 0x80f3 #endif +#ifndef ETHERTYPE_TIPC +#define ETHERTYPE_TIPC 0x88ca +#endif #ifndef ETHERTYPE_8021Q #define ETHERTYPE_8021Q 0x8100 #endif Modified: head/contrib/tcpdump/forces.h ============================================================================== --- head/contrib/tcpdump/forces.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/forces.h Fri Oct 5 20:19:28 2012 (r241235) @@ -308,7 +308,7 @@ static const struct optlv_h OPTLV_msg[F_ /* F_OP_GET */ {ZERO_TTLV, 0, " Get", recpdoptlv_print}, /* F_OP_GETPROP */ {ZERO_TTLV, 0, " GetProp", recpdoptlv_print}, /* F_OP_GETRESP */ - {TTLV_T2, B_FULLD | B_RESTV, " GetResp", recpdoptlv_print}, + {TTLV_T2, B_FULLD | B_SPARD | B_RESTV, " GetResp", recpdoptlv_print}, /* F_OP_GETPRESP */ {TTLV_T2, B_FULLD | B_RESTV, " GetPropResp", recpdoptlv_print}, /* F_OP_REPORT */ Modified: head/contrib/tcpdump/netdissect.h ============================================================================== --- head/contrib/tcpdump/netdissect.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/netdissect.h Fri Oct 5 20:19:28 2012 (r241235) @@ -280,6 +280,7 @@ extern int esp_print(netdissect_options register const u_char *bp, int len, register const u_char *bp2, int *nhdr, int *padlen); extern void arp_print(netdissect_options *,const u_char *, u_int, u_int); +extern void tipc_print(netdissect_options *, const u_char *, u_int, u_int); extern void icmp6_print(netdissect_options *ndo, const u_char *, u_int, const u_char *, int); extern void isakmp_print(netdissect_options *,const u_char *, Modified: head/contrib/tcpdump/print-802_11.c ============================================================================== --- head/contrib/tcpdump/print-802_11.c Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/print-802_11.c Fri Oct 5 20:19:28 2012 (r241235) @@ -485,7 +485,7 @@ static const char *auth_alg_text[]={"Ope #define NUM_AUTH_ALGS (sizeof auth_alg_text / sizeof auth_alg_text[0]) static const char *status_text[] = { - "Succesful", /* 0 */ + "Successful", /* 0 */ "Unspecified failure", /* 1 */ "Reserved", /* 2 */ "Reserved", /* 3 */ Modified: head/contrib/tcpdump/print-bgp.c ============================================================================== --- head/contrib/tcpdump/print-bgp.c Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/print-bgp.c Fri Oct 5 20:19:28 2012 (r241235) @@ -93,8 +93,7 @@ struct bgp_opt { /* variable length */ }; #define BGP_OPT_SIZE 2 /* some compilers may pad to 4 bytes */ - -#define BGP_UPDATE_MINSIZE 23 +#define BGP_CAP_HEADER_SIZE 2 /* some compilers may pad to 4 bytes */ struct bgp_notification { u_int8_t bgpn_marker[16]; @@ -115,19 +114,10 @@ struct bgp_route_refresh { }; /* EXTRACT_16BITS(&bgp_route_refresh->afi) (sigh) */ #define BGP_ROUTE_REFRESH_SIZE 23 -struct bgp_attr { - u_int8_t bgpa_flags; - u_int8_t bgpa_type; - union { - u_int8_t len; - u_int16_t elen; - } bgpa_len; -#define bgp_attr_len(p) \ - (((p)->bgpa_flags & 0x10) ? \ - EXTRACT_16BITS(&(p)->bgpa_len.elen) : (p)->bgpa_len.len) -#define bgp_attr_off(p) \ - (((p)->bgpa_flags & 0x10) ? 4 : 3) -}; +#define bgp_attr_lenlen(flags, p) \ + (((flags) & 0x10) ? 2 : 1) +#define bgp_attr_len(flags, p) \ + (((flags) & 0x10) ? EXTRACT_16BITS(p) : *(p)) #define BGPTYPE_ORIGIN 1 #define BGPTYPE_AS_PATH 2 @@ -493,38 +483,49 @@ as_printf (char *str, int size, u_int as return str; } +#define ITEMCHECK(minlen) if (itemlen < minlen) goto badtlv; + int -decode_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pptr[0]); + ITEMCHECK(1); plen = pptr[0]; if (32 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[1], (plen + 7) / 8); - memcpy(&addr, &pptr[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[1], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ /* this is one of the weirdnesses of rfc3107 @@ -542,12 +543,15 @@ decode_labeled_prefix4(const u_char *ppt if (32 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -557,10 +561,13 @@ decode_labeled_prefix4(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } /* @@ -1041,37 +1048,46 @@ trunc: #ifdef INET6 int -decode_prefix6(const u_char *pd, char *buf, u_int buflen) +decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pd[0]); + ITEMCHECK(1); plen = pd[0]; if (128 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pd[1], (plen + 7) / 8); - memcpy(&addr, &pd[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pd[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pd[1], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname6((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix6(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix6(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ if (24 > plen) @@ -1081,12 +1097,14 @@ decode_labeled_prefix6(const u_char *ppt if (128 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -1096,10 +1114,13 @@ decode_labeled_prefix6(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int @@ -1266,7 +1287,7 @@ trunc: } static int -bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) +bgp_attr_print(u_int atype, const u_char *pptr, u_int len) { int i; u_int16_t af; @@ -1276,7 +1297,7 @@ bgp_attr_print(const struct bgp_attr *at u_int32_t i; } bw; int advance; - int tlen; + u_int tlen; const u_char *tptr; char buf[MAXHOSTNAMELEN + 100]; char tokbuf[TOKBUFSIZE]; @@ -1285,7 +1306,7 @@ bgp_attr_print(const struct bgp_attr *at tptr = pptr; tlen=len; - switch (attr->bgpa_type) { + switch (atype) { case BGPTYPE_ORIGIN: if (len != 1) printf("invalid len"); @@ -1321,7 +1342,7 @@ bgp_attr_print(const struct bgp_attr *at * 2 bytes first, and it does not pass, assume that ASs are * encoded in 4 bytes format and move on. */ - as_size = bgp_attr_get_as_size(attr->bgpa_type, pptr, len); + as_size = bgp_attr_get_as_size(atype, pptr, len); while (tptr < pptr + len) { TCHECK(tptr[0]); @@ -1657,20 +1678,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1718,20 +1743,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1821,20 +1850,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1853,20 +1886,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -2097,40 +2134,50 @@ bgp_attr_print(const struct bgp_attr *at } case BGPTYPE_ATTR_SET: TCHECK2(tptr[0], 4); + if (len < 4) + goto trunc; printf("\n\t Origin AS: %s", as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(tptr))); tptr+=4; len -=4; - while (len >= 2 ) { - int alen; - struct bgp_attr bgpa; + while (len) { + u_int aflags, atype, alenlen, alen; - TCHECK2(tptr[0], sizeof(bgpa)); - memcpy(&bgpa, tptr, sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - tptr += bgp_attr_off(&bgpa); - len -= bgp_attr_off(&bgpa); + TCHECK2(tptr[0], 2); + if (len < 2) + goto trunc; + aflags = *tptr; + atype = *(tptr + 1); + tptr += 2; + len -= 2; + alenlen = bgp_attr_lenlen(aflags, tptr); + TCHECK2(tptr[0], alenlen); + if (len < alenlen) + goto trunc; + alen = bgp_attr_len(aflags, tptr); + tptr += alenlen; + len -= alenlen; printf("\n\t %s (%u), length: %u", tok2strbuf(bgp_attr_values, - "Unknown Attribute", bgpa.bgpa_type, - tokbuf, sizeof(tokbuf)), - bgpa.bgpa_type, + "Unknown Attribute", atype, + tokbuf, sizeof(tokbuf)), + atype, alen); - if (bgpa.bgpa_flags) { + if (aflags) { printf(", Flags [%s%s%s%s", - bgpa.bgpa_flags & 0x80 ? "O" : "", - bgpa.bgpa_flags & 0x40 ? "T" : "", - bgpa.bgpa_flags & 0x20 ? "P" : "", - bgpa.bgpa_flags & 0x10 ? "E" : ""); - if (bgpa.bgpa_flags & 0xf) - printf("+%x", bgpa.bgpa_flags & 0xf); + aflags & 0x80 ? "O" : "", + aflags & 0x40 ? "T" : "", + aflags & 0x20 ? "P" : "", + aflags & 0x10 ? "E" : ""); + if (aflags & 0xf) + printf("+%x", aflags & 0xf); printf("]: "); } /* FIXME check for recursion */ - if (!bgp_attr_print(&bgpa, tptr, alen)) + if (!bgp_attr_print(atype, tptr, alen)) return 0; tptr += alen; len -= alen; @@ -2140,7 +2187,7 @@ bgp_attr_print(const struct bgp_attr *at default: TCHECK2(*pptr,len); - printf("\n\t no Attribute %u decoder",attr->bgpa_type); /* we have no decoder for the attribute */ + printf("\n\t no Attribute %u decoder",atype); /* we have no decoder for the attribute */ if (vflag <= 1) print_unknown_data(pptr,"\n\t ",len); break; @@ -2156,14 +2203,97 @@ trunc: } static void +bgp_capabilities_print(const u_char *opt, int caps_len) +{ + char tokbuf[TOKBUFSIZE]; + char tokbuf2[TOKBUFSIZE]; + int cap_type, cap_len, tcap_len, cap_offset; + int i = 0; + + while (i < caps_len) { + TCHECK2(opt[i], BGP_CAP_HEADER_SIZE); + cap_type=opt[i]; + cap_len=opt[i+1]; + tcap_len=cap_len; + printf("\n\t %s (%u), length: %u", + tok2strbuf(bgp_capcode_values, "Unknown", + cap_type, tokbuf, sizeof(tokbuf)), + cap_type, + cap_len); + TCHECK2(opt[i+2], cap_len); + switch (cap_type) { + case BGP_CAPCODE_MP: + printf("\n\t\tAFI %s (%u), SAFI %s (%u)", + tok2strbuf(af_values, "Unknown", + EXTRACT_16BITS(opt+i+2), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+2), + tok2strbuf(bgp_safi_values, "Unknown", + opt[i+5], + tokbuf, sizeof(tokbuf)), + opt[i+5]); + break; + case BGP_CAPCODE_RESTART: + printf("\n\t\tRestart Flags: [%s], Restart Time %us", + ((opt[i+2])&0x80) ? "R" : "none", + EXTRACT_16BITS(opt+i+2)&0xfff); + tcap_len-=2; + cap_offset=4; + while(tcap_len>=4) { + printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", + tok2strbuf(af_values,"Unknown", + EXTRACT_16BITS(opt+i+cap_offset), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+cap_offset), + tok2strbuf(bgp_safi_values,"Unknown", + opt[i+cap_offset+2], + tokbuf2, sizeof(tokbuf2)), + opt[i+cap_offset+2], + ((opt[i+cap_offset+3])&0x80) ? "yes" : "no" ); + tcap_len-=4; + cap_offset+=4; + } + break; + case BGP_CAPCODE_RR: + case BGP_CAPCODE_RR_CISCO: + break; + case BGP_CAPCODE_AS_NEW: + + /* + * Extract the 4 byte AS number encoded. + */ + if (cap_len == 4) { + printf("\n\t\t 4 Byte AS %s", + as_printf(astostr, sizeof(astostr), + EXTRACT_32BITS(opt + i + 2))); + } + break; + default: + printf("\n\t\tno decoder for Capability %u", + cap_type); + if (vflag <= 1) + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + break; + } + if (vflag > 1 && cap_len > 0) { + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + } + i += BGP_CAP_HEADER_SIZE + cap_len; + } + return; + +trunc: + printf("[|BGP]"); +} + +static void bgp_open_print(const u_char *dat, int length) { struct bgp_open bgpo; struct bgp_opt bgpopt; const u_char *opt; - int i,cap_type,cap_len,tcap_len,cap_offset; + int i; char tokbuf[TOKBUFSIZE]; - char tokbuf2[TOKBUFSIZE]; TCHECK2(dat[0], BGP_OPEN_SIZE); memcpy(&bgpo, dat, BGP_OPEN_SIZE); @@ -2188,96 +2318,31 @@ bgp_open_print(const u_char *dat, int le TCHECK2(opt[i], BGP_OPT_SIZE); memcpy(&bgpopt, &opt[i], BGP_OPT_SIZE); if (i + 2 + bgpopt.bgpopt_len > bgpo.bgpo_optlen) { - printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); + printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); break; } printf("\n\t Option %s (%u), length: %u", - tok2strbuf(bgp_opt_values,"Unknown", + tok2strbuf(bgp_opt_values,"Unknown", bgpopt.bgpopt_type, tokbuf, sizeof(tokbuf)), - bgpopt.bgpopt_type, - bgpopt.bgpopt_len); + bgpopt.bgpopt_type, + bgpopt.bgpopt_len); - /* now lets decode the options we know*/ - switch(bgpopt.bgpopt_type) { - case BGP_OPT_CAP: - cap_type=opt[i+BGP_OPT_SIZE]; - cap_len=opt[i+BGP_OPT_SIZE+1]; - tcap_len=cap_len; - printf("\n\t %s (%u), length: %u", - tok2strbuf(bgp_capcode_values, "Unknown", - cap_type, tokbuf, sizeof(tokbuf)), - cap_type, - cap_len); - switch(cap_type) { - case BGP_CAPCODE_MP: - printf("\n\t\tAFI %s (%u), SAFI %s (%u)", - tok2strbuf(af_values, "Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tok2strbuf(bgp_safi_values, "Unknown", - opt[i+BGP_OPT_SIZE+5], - tokbuf, sizeof(tokbuf)), - opt[i+BGP_OPT_SIZE+5]); - break; - case BGP_CAPCODE_RESTART: - printf("\n\t\tRestart Flags: [%s], Restart Time %us", - ((opt[i+BGP_OPT_SIZE+2])&0x80) ? "R" : "none", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2)&0xfff); - tcap_len-=2; - cap_offset=4; - while(tcap_len>=4) { - printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", - tok2strbuf(af_values,"Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tok2strbuf(bgp_safi_values,"Unknown", - opt[i+BGP_OPT_SIZE+cap_offset+2], - tokbuf2, sizeof(tokbuf2)), - opt[i+BGP_OPT_SIZE+cap_offset+2], - ((opt[i+BGP_OPT_SIZE+cap_offset+3])&0x80) ? "yes" : "no" ); - tcap_len-=4; - cap_offset+=4; - } - break; - case BGP_CAPCODE_RR: - case BGP_CAPCODE_RR_CISCO: - break; - case BGP_CAPCODE_AS_NEW: + /* now let's decode the options we know*/ + switch(bgpopt.bgpopt_type) { - /* - * Extract the 4 byte AS number encoded. - */ - TCHECK2(opt[i + BGP_OPT_SIZE + 2], cap_len); - if (cap_len == 4) { - printf("\n\t\t 4 Byte AS %s", - as_printf(astostr, sizeof(astostr), - EXTRACT_32BITS(opt + i + BGP_OPT_SIZE + 2))); - } - break; - default: - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - printf("\n\t\tno decoder for Capability %u", - cap_type); - if (vflag <= 1) - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - break; - } - if (vflag > 1) { - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - } - break; - case BGP_OPT_AUTH: - default: - printf("\n\t no decoder for option %u", - bgpopt.bgpopt_type); - break; - } + case BGP_OPT_CAP: + bgp_capabilities_print(&opt[i+BGP_OPT_SIZE], + bgpopt.bgpopt_len); + break; + case BGP_OPT_AUTH: + default: + printf("\n\t no decoder for option %u", + bgpopt.bgpopt_type); + break; + } i += BGP_OPT_SIZE + bgpopt.bgpopt_len; } return; @@ -2289,107 +2354,163 @@ static void bgp_update_print(const u_char *dat, int length) { struct bgp bgp; - struct bgp_attr bgpa; const u_char *p; + int withdrawn_routes_len; int len; int i; char tokbuf[TOKBUFSIZE]; +#ifndef INET6 + char buf[MAXHOSTNAMELEN + 100]; + int wpfx; +#endif TCHECK2(dat[0], BGP_SIZE); + if (length < BGP_SIZE) + goto trunc; memcpy(&bgp, dat, BGP_SIZE); p = dat + BGP_SIZE; /*XXX*/ + length -= BGP_SIZE; /* Unfeasible routes */ - len = EXTRACT_16BITS(p); - if (len) { + TCHECK2(p[0], 2); + if (length < 2) + goto trunc; + withdrawn_routes_len = EXTRACT_16BITS(p); + p += 2; + length -= 2; + if (withdrawn_routes_len) { /* * Without keeping state from the original NLRI message, * it's not possible to tell if this a v4 or v6 route, * so only try to decode it if we're not v6 enabled. */ + TCHECK2(p[0], withdrawn_routes_len); + if (length < withdrawn_routes_len) + goto trunc; #ifdef INET6 - printf("\n\t Withdrawn routes: %d bytes", len); + printf("\n\t Withdrawn routes: %d bytes", withdrawn_routes_len); + p += withdrawn_routes_len; + length -= withdrawn_routes_len; #else - char buf[MAXHOSTNAMELEN + 100]; - int wpfx; + if (withdrawn_routes_len < 2) + goto trunc; + length -= 2; + withdrawn_routes_len -= 2; - TCHECK2(p[2], len); - i = 2; printf("\n\t Withdrawn routes:"); - while(i < 2 + len) { - wpfx = decode_prefix4(&p[i], buf, sizeof(buf)); + while(withdrawn_routes_len > 0) { + wpfx = decode_prefix4(p, withdrawn_routes_len, buf, sizeof(buf)); if (wpfx == -1) { printf("\n\t (illegal prefix length)"); break; } else if (wpfx == -2) goto trunc; + else if (wpfx == -3) + goto trunc; /* bytes left, but not enough */ else { - i += wpfx; printf("\n\t %s", buf); + p += wpfx; + length -= wpfx; + withdrawn_routes_len -= wpfx; } } #endif } - p += 2 + len; TCHECK2(p[0], 2); + if (length < 2) + goto trunc; len = EXTRACT_16BITS(p); + p += 2; + length -= 2; - if (len == 0 && length == BGP_UPDATE_MINSIZE) { + if (withdrawn_routes_len == 0 && len == 0 && length == 0) { + /* No withdrawn routes, no path attributes, no NLRI */ printf("\n\t End-of-Rib Marker (empty NLRI)"); return; } if (len) { /* do something more useful!*/ - i = 2; - while (i < 2 + len) { - int alen, aoff; - - TCHECK2(p[i], sizeof(bgpa)); - memcpy(&bgpa, &p[i], sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - aoff = bgp_attr_off(&bgpa); + while (len) { + int aflags, atype, alenlen, alen; + + TCHECK2(p[0], 2); + if (len < 2) + goto trunc; + if (length < 2) + goto trunc; + aflags = *p; + atype = *(p + 1); + p += 2; + len -= 2; + length -= 2; + alenlen = bgp_attr_lenlen(aflags, p); + TCHECK2(p[0], alenlen); + if (len < alenlen) + goto trunc; + if (length < alenlen) + goto trunc; + alen = bgp_attr_len(aflags, p); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 22:30:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 793CB106566B; Fri, 5 Oct 2012 22:30:16 +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 6068E8FC0C; Fri, 5 Oct 2012 22:30:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95MUGEC051831; Fri, 5 Oct 2012 22:30:16 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95MUG56051825; Fri, 5 Oct 2012 22:30:16 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201210052230.q95MUG56051825@svn.freebsd.org> From: Brooks Davis Date: Fri, 5 Oct 2012 22:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241236 - in vendor/NetBSD/libc-vis: . dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 22:30:16 -0000 Author: brooks Date: Fri Oct 5 22:30:16 2012 New Revision: 241236 URL: http://svn.freebsd.org/changeset/base/241236 Log: Vendor import of NetBSD's (un)vis(3) as of 2012-10-05 Added: vendor/NetBSD/libc-vis/ vendor/NetBSD/libc-vis/dist/ vendor/NetBSD/libc-vis/dist/unvis.3 (contents, props changed) vendor/NetBSD/libc-vis/dist/unvis.c (contents, props changed) vendor/NetBSD/libc-vis/dist/vis.3 (contents, props changed) vendor/NetBSD/libc-vis/dist/vis.c (contents, props changed) vendor/NetBSD/libc-vis/dist/vis.h (contents, props changed) Added: vendor/NetBSD/libc-vis/dist/unvis.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libc-vis/dist/unvis.3 Fri Oct 5 22:30:16 2012 (r241236) @@ -0,0 +1,244 @@ +.\" $NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $ +.\" +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. 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. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" @(#)unvis.3 8.2 (Berkeley) 12/11/93 +.\" +.Dd March 12, 2011 +.Dt UNVIS 3 +.Os +.Sh NAME +.Nm unvis , +.Nm strunvis +.Nd decode a visual representation of characters +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In vis.h +.Ft int +.Fn unvis "char *cp" "int c" "int *astate" "int flag" +.Ft int +.Fn strunvis "char *dst" "const char *src" +.Ft int +.Fn strnunvis "char *dst" "size_t dlen" "const char *src" +.Ft int +.Fn strunvisx "char *dst" "const char *src" "int flag" +.Ft int +.Fn strnunvisx "char *dst" "size_t dlen" "const char *src" "int flag" +.Sh DESCRIPTION +The +.Fn unvis , +.Fn strunvis +and +.Fn strunvisx +functions +are used to decode a visual representation of characters, as produced +by the +.Xr vis 3 +function, back into +the original form. +.Pp +The +.Fn unvis +function is called with successive characters in +.Ar c +until a valid sequence is recognized, at which time the decoded +character is available at the character pointed to by +.Ar cp . +.Pp +The +.Fn strunvis +function decodes the characters pointed to by +.Ar src +into the buffer pointed to by +.Ar dst . +The +.Fn strunvis +function simply copies +.Ar src +to +.Ar dst , +decoding any escape sequences along the way, +and returns the number of characters placed into +.Ar dst , +or \-1 if an +invalid escape sequence was detected. +The size of +.Ar dst +should be equal to the size of +.Ar src +(that is, no expansion takes place during decoding). +.Pp +The +.Fn strunvisx +function does the same as the +.Fn strunvis +function, +but it allows you to add a flag that specifies the style the string +.Ar src +is encoded with. +Currently, the supported flags are: +.Dv VIS_HTTPSTYLE +and +.Dv VIS_MIMESTYLE . +.Pp +The +.Fn unvis +function implements a state machine that can be used to decode an +arbitrary stream of bytes. +All state associated with the bytes being decoded is stored outside the +.Fn unvis +function (that is, a pointer to the state is passed in), so +calls decoding different streams can be freely intermixed. +To start decoding a stream of bytes, first initialize an integer to zero. +Call +.Fn unvis +with each successive byte, along with a pointer +to this integer, and a pointer to a destination character. +The +.Fn unvis +function has several return codes that must be handled properly. +They are: +.Bl -tag -width UNVIS_VALIDPUSH +.It Li \&0 (zero) +Another character is necessary; nothing has been recognized yet. +.It Dv UNVIS_VALID +A valid character has been recognized and is available at the location +pointed to by cp. +.It Dv UNVIS_VALIDPUSH +A valid character has been recognized and is available at the location +pointed to by cp; however, the character currently passed in should +be passed in again. +.It Dv UNVIS_NOCHAR +A valid sequence was detected, but no character was produced. +This return code is necessary to indicate a logical break between characters. +.It Dv UNVIS_SYNBAD +An invalid escape sequence was detected, or the decoder is in an unknown state. +The decoder is placed into the starting state. +.El +.Pp +When all bytes in the stream have been processed, call +.Fn unvis +one more time with flag set to +.Dv UNVIS_END +to extract any remaining character (the character passed in is ignored). +.Pp +The +.Ar flag +argument is also used to specify the encoding style of the source. +If set to +.Dv VIS_HTTPSTYLE +or +.Dv VIS_HTTP1808 , +.Fn unvis +will decode URI strings as specified in RFC 1808. +If set to +.Dv VIS_HTTP1866 , +.Fn unvis +will decode URI strings as specified in RFC 1866. +If set to +.Dv VIS_MIMESTYLE , +.Fn unvis +will decode MIME Quoted-Printable strings as specified in RFC 2045. +If set to +.Dv VIS_NOESCAPE , +.Fn unvis +will not decode \e quoted characters. +.Pp +The following code fragment illustrates a proper use of +.Fn unvis . +.Bd -literal -offset indent +int state = 0; +char out; + +while ((ch = getchar()) != EOF) { +again: + switch(unvis(\*[Am]out, ch, \*[Am]state, 0)) { + case 0: + case UNVIS_NOCHAR: + break; + case UNVIS_VALID: + (void)putchar(out); + break; + case UNVIS_VALIDPUSH: + (void)putchar(out); + goto again; + case UNVIS_SYNBAD: + errx(EXIT_FAILURE, "Bad character sequence!"); + } +} +if (unvis(\*[Am]out, '\e0', \*[Am]state, UNVIS_END) == UNVIS_VALID) + (void)putchar(out); +.Ed +.Sh ERRORS +The functions +.Fn strunvis , +.Fn strnunvis , +.Fn strunvisx , +and +.Fn strnunvisx +will return \-1 on error and set +.Va errno +to: +.Bl -tag -width Er +.It Bq Er EINVAL +An invalid escape sequence was detected, or the decoder is in an unknown state. +.El +.Pp +In addition the functions +.Fn strnunvis +and +.Fn strnunvisx +will can also set +.Va errno +on error to: +.Bl -tag -width Er +.It Bq Er ENOSPC +Not enough space to perform the conversion. +.El +.Sh SEE ALSO +.Xr unvis 1 , +.Xr vis 1 , +.Xr vis 3 +.Rs +.%A R. Fielding +.%T Relative Uniform Resource Locators +.%O RFC1808 +.Re +.Sh HISTORY +The +.Fn unvis +function +first appeared in +.Bx 4.4 . +The +.Fn strnunvis +and +.Fn strnunvisx +functions appeared in +.Nx 6.0 . Added: vendor/NetBSD/libc-vis/dist/unvis.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libc-vis/dist/unvis.c Fri Oct 5 22:30:16 2012 (r241236) @@ -0,0 +1,553 @@ +/* $NetBSD: unvis.c,v 1.39 2012/03/13 21:13:37 christos Exp $ */ + +/*- + * Copyright (c) 1989, 1993 + * The Regents of the University of California. 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: unvis.c,v 1.39 2012/03/13 21:13:37 christos Exp $"); +#endif +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" +#include + +#include +#include +#include +#include +#include +#include + +#ifdef __weak_alias +__weak_alias(strnunvisx,_strnunvisx) +#endif + +#if !HAVE_VIS +/* + * decode driven by state machine + */ +#define S_GROUND 0 /* haven't seen escape char */ +#define S_START 1 /* start decoding special sequence */ +#define S_META 2 /* metachar started (M) */ +#define S_META1 3 /* metachar more, regular char (-) */ +#define S_CTRL 4 /* control char started (^) */ +#define S_OCTAL2 5 /* octal digit 2 */ +#define S_OCTAL3 6 /* octal digit 3 */ +#define S_HEX 7 /* mandatory hex digit */ +#define S_HEX1 8 /* http hex digit */ +#define S_HEX2 9 /* http hex digit 2 */ +#define S_MIME1 10 /* mime hex digit 1 */ +#define S_MIME2 11 /* mime hex digit 2 */ +#define S_EATCRNL 12 /* mime eating CRNL */ +#define S_AMP 13 /* seen & */ +#define S_NUMBER 14 /* collecting number */ +#define S_STRING 15 /* collecting string */ + +#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') +#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10)) +#define XTOD(c) (isdigit(c) ? (c - '0') : ((c - 'A') + 10)) + +/* + * RFC 1866 + */ +static const struct nv { + const char *name; + uint8_t value; +} nv[] = { + { "AElig", 198 }, /* capital AE diphthong (ligature) */ + { "Aacute", 193 }, /* capital A, acute accent */ + { "Acirc", 194 }, /* capital A, circumflex accent */ + { "Agrave", 192 }, /* capital A, grave accent */ + { "Aring", 197 }, /* capital A, ring */ + { "Atilde", 195 }, /* capital A, tilde */ + { "Auml", 196 }, /* capital A, dieresis or umlaut mark */ + { "Ccedil", 199 }, /* capital C, cedilla */ + { "ETH", 208 }, /* capital Eth, Icelandic */ + { "Eacute", 201 }, /* capital E, acute accent */ + { "Ecirc", 202 }, /* capital E, circumflex accent */ + { "Egrave", 200 }, /* capital E, grave accent */ + { "Euml", 203 }, /* capital E, dieresis or umlaut mark */ + { "Iacute", 205 }, /* capital I, acute accent */ + { "Icirc", 206 }, /* capital I, circumflex accent */ + { "Igrave", 204 }, /* capital I, grave accent */ + { "Iuml", 207 }, /* capital I, dieresis or umlaut mark */ + { "Ntilde", 209 }, /* capital N, tilde */ + { "Oacute", 211 }, /* capital O, acute accent */ + { "Ocirc", 212 }, /* capital O, circumflex accent */ + { "Ograve", 210 }, /* capital O, grave accent */ + { "Oslash", 216 }, /* capital O, slash */ + { "Otilde", 213 }, /* capital O, tilde */ + { "Ouml", 214 }, /* capital O, dieresis or umlaut mark */ + { "THORN", 222 }, /* capital THORN, Icelandic */ + { "Uacute", 218 }, /* capital U, acute accent */ + { "Ucirc", 219 }, /* capital U, circumflex accent */ + { "Ugrave", 217 }, /* capital U, grave accent */ + { "Uuml", 220 }, /* capital U, dieresis or umlaut mark */ + { "Yacute", 221 }, /* capital Y, acute accent */ + { "aacute", 225 }, /* small a, acute accent */ + { "acirc", 226 }, /* small a, circumflex accent */ + { "acute", 180 }, /* acute accent */ + { "aelig", 230 }, /* small ae diphthong (ligature) */ + { "agrave", 224 }, /* small a, grave accent */ + { "amp", 38 }, /* ampersand */ + { "aring", 229 }, /* small a, ring */ + { "atilde", 227 }, /* small a, tilde */ + { "auml", 228 }, /* small a, dieresis or umlaut mark */ + { "brvbar", 166 }, /* broken (vertical) bar */ + { "ccedil", 231 }, /* small c, cedilla */ + { "cedil", 184 }, /* cedilla */ + { "cent", 162 }, /* cent sign */ + { "copy", 169 }, /* copyright sign */ + { "curren", 164 }, /* general currency sign */ + { "deg", 176 }, /* degree sign */ + { "divide", 247 }, /* divide sign */ + { "eacute", 233 }, /* small e, acute accent */ + { "ecirc", 234 }, /* small e, circumflex accent */ + { "egrave", 232 }, /* small e, grave accent */ + { "eth", 240 }, /* small eth, Icelandic */ + { "euml", 235 }, /* small e, dieresis or umlaut mark */ + { "frac12", 189 }, /* fraction one-half */ + { "frac14", 188 }, /* fraction one-quarter */ + { "frac34", 190 }, /* fraction three-quarters */ + { "gt", 62 }, /* greater than */ + { "iacute", 237 }, /* small i, acute accent */ + { "icirc", 238 }, /* small i, circumflex accent */ + { "iexcl", 161 }, /* inverted exclamation mark */ + { "igrave", 236 }, /* small i, grave accent */ + { "iquest", 191 }, /* inverted question mark */ + { "iuml", 239 }, /* small i, dieresis or umlaut mark */ + { "laquo", 171 }, /* angle quotation mark, left */ + { "lt", 60 }, /* less than */ + { "macr", 175 }, /* macron */ + { "micro", 181 }, /* micro sign */ + { "middot", 183 }, /* middle dot */ + { "nbsp", 160 }, /* no-break space */ + { "not", 172 }, /* not sign */ + { "ntilde", 241 }, /* small n, tilde */ + { "oacute", 243 }, /* small o, acute accent */ + { "ocirc", 244 }, /* small o, circumflex accent */ + { "ograve", 242 }, /* small o, grave accent */ + { "ordf", 170 }, /* ordinal indicator, feminine */ + { "ordm", 186 }, /* ordinal indicator, masculine */ + { "oslash", 248 }, /* small o, slash */ + { "otilde", 245 }, /* small o, tilde */ + { "ouml", 246 }, /* small o, dieresis or umlaut mark */ + { "para", 182 }, /* pilcrow (paragraph sign) */ + { "plusmn", 177 }, /* plus-or-minus sign */ + { "pound", 163 }, /* pound sterling sign */ + { "quot", 34 }, /* double quote */ + { "raquo", 187 }, /* angle quotation mark, right */ + { "reg", 174 }, /* registered sign */ + { "sect", 167 }, /* section sign */ + { "shy", 173 }, /* soft hyphen */ + { "sup1", 185 }, /* superscript one */ + { "sup2", 178 }, /* superscript two */ + { "sup3", 179 }, /* superscript three */ + { "szlig", 223 }, /* small sharp s, German (sz ligature) */ + { "thorn", 254 }, /* small thorn, Icelandic */ + { "times", 215 }, /* multiply sign */ + { "uacute", 250 }, /* small u, acute accent */ + { "ucirc", 251 }, /* small u, circumflex accent */ + { "ugrave", 249 }, /* small u, grave accent */ + { "uml", 168 }, /* umlaut (dieresis) */ + { "uuml", 252 }, /* small u, dieresis or umlaut mark */ + { "yacute", 253 }, /* small y, acute accent */ + { "yen", 165 }, /* yen sign */ + { "yuml", 255 }, /* small y, dieresis or umlaut mark */ +}; + +/* + * unvis - decode characters previously encoded by vis + */ +int +unvis(char *cp, int c, int *astate, int flag) +{ + unsigned char uc = (unsigned char)c; + unsigned char st, ia, is, lc; + +/* + * Bottom 8 bits of astate hold the state machine state. + * Top 8 bits hold the current character in the http 1866 nv string decoding + */ +#define GS(a) ((a) & 0xff) +#define SS(a, b) (((uint32_t)(a) << 24) | (b)) +#define GI(a) ((uint32_t)(a) >> 24) + + _DIAGASSERT(cp != NULL); + _DIAGASSERT(astate != NULL); + st = GS(*astate); + + if (flag & UNVIS_END) { + switch (st) { + case S_OCTAL2: + case S_OCTAL3: + case S_HEX2: + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case S_GROUND: + return UNVIS_NOCHAR; + default: + return UNVIS_SYNBAD; + } + } + + switch (st) { + + case S_GROUND: + *cp = 0; + if ((flag & VIS_NOESCAPE) == 0 && c == '\\') { + *astate = SS(0, S_START); + return UNVIS_NOCHAR; + } + if ((flag & VIS_HTTP1808) && c == '%') { + *astate = SS(0, S_HEX1); + return UNVIS_NOCHAR; + } + if ((flag & VIS_HTTP1866) && c == '&') { + *astate = SS(0, S_AMP); + return UNVIS_NOCHAR; + } + if ((flag & VIS_MIMESTYLE) && c == '=') { + *astate = SS(0, S_MIME1); + return UNVIS_NOCHAR; + } + *cp = c; + return UNVIS_VALID; + + case S_START: + switch(c) { + case '\\': + *cp = c; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + *cp = (c - '0'); + *astate = SS(0, S_OCTAL2); + return UNVIS_NOCHAR; + case 'M': + *cp = (char)0200; + *astate = SS(0, S_META); + return UNVIS_NOCHAR; + case '^': + *astate = SS(0, S_CTRL); + return UNVIS_NOCHAR; + case 'n': + *cp = '\n'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'r': + *cp = '\r'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'b': + *cp = '\b'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'a': + *cp = '\007'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'v': + *cp = '\v'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 't': + *cp = '\t'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'f': + *cp = '\f'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 's': + *cp = ' '; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'E': + *cp = '\033'; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + case 'x': + *astate = SS(0, S_HEX); + return UNVIS_NOCHAR; + case '\n': + /* + * hidden newline + */ + *astate = SS(0, S_GROUND); + return UNVIS_NOCHAR; + case '$': + /* + * hidden marker + */ + *astate = SS(0, S_GROUND); + return UNVIS_NOCHAR; + } + goto bad; + + case S_META: + if (c == '-') + *astate = SS(0, S_META1); + else if (c == '^') + *astate = SS(0, S_CTRL); + else + goto bad; + return UNVIS_NOCHAR; + + case S_META1: + *astate = SS(0, S_GROUND); + *cp |= c; + return UNVIS_VALID; + + case S_CTRL: + if (c == '?') + *cp |= 0177; + else + *cp |= c & 037; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + + case S_OCTAL2: /* second possible octal digit */ + if (isoctal(uc)) { + /* + * yes - and maybe a third + */ + *cp = (*cp << 3) + (c - '0'); + *astate = SS(0, S_OCTAL3); + return UNVIS_NOCHAR; + } + /* + * no - done with current sequence, push back passed char + */ + *astate = SS(0, S_GROUND); + return UNVIS_VALIDPUSH; + + case S_OCTAL3: /* third possible octal digit */ + *astate = SS(0, S_GROUND); + if (isoctal(uc)) { + *cp = (*cp << 3) + (c - '0'); + return UNVIS_VALID; + } + /* + * we were done, push back passed char + */ + return UNVIS_VALIDPUSH; + + case S_HEX: + if (!isxdigit(uc)) + goto bad; + /*FALLTHROUGH*/ + case S_HEX1: + if (isxdigit(uc)) { + *cp = xtod(uc); + *astate = SS(0, S_HEX2); + return UNVIS_NOCHAR; + } + /* + * no - done with current sequence, push back passed char + */ + *astate = SS(0, S_GROUND); + return UNVIS_VALIDPUSH; + + case S_HEX2: + *astate = S_GROUND; + if (isxdigit(uc)) { + *cp = xtod(uc) | (*cp << 4); + return UNVIS_VALID; + } + return UNVIS_VALIDPUSH; + + case S_MIME1: + if (uc == '\n' || uc == '\r') { + *astate = SS(0, S_EATCRNL); + return UNVIS_NOCHAR; + } + if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) { + *cp = XTOD(uc); + *astate = SS(0, S_MIME2); + return UNVIS_NOCHAR; + } + goto bad; + + case S_MIME2: + if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) { + *astate = SS(0, S_GROUND); + *cp = XTOD(uc) | (*cp << 4); + return UNVIS_VALID; + } + goto bad; + + case S_EATCRNL: + switch (uc) { + case '\r': + case '\n': + return UNVIS_NOCHAR; + case '=': + *astate = SS(0, S_MIME1); + return UNVIS_NOCHAR; + default: + *cp = uc; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + } + + case S_AMP: + *cp = 0; + if (uc == '#') { + *astate = SS(0, S_NUMBER); + return UNVIS_NOCHAR; + } + *astate = SS(0, S_STRING); + /*FALLTHROUGH*/ + + case S_STRING: + ia = *cp; /* index in the array */ + is = GI(*astate); /* index in the string */ + lc = is == 0 ? 0 : nv[ia].name[is - 1]; /* last character */ + + if (uc == ';') + uc = '\0'; + + for (; ia < __arraycount(nv); ia++) { + if (is != 0 && nv[ia].name[is - 1] != lc) + goto bad; + if (nv[ia].name[is] == uc) + break; + } + + if (ia == __arraycount(nv)) + goto bad; + + if (uc != 0) { + *cp = ia; + *astate = SS(is + 1, S_STRING); + return UNVIS_NOCHAR; + } + + *cp = nv[ia].value; + *astate = SS(0, S_GROUND); + return UNVIS_VALID; + + case S_NUMBER: + if (uc == ';') + return UNVIS_VALID; + if (!isdigit(uc)) + goto bad; + *cp += (*cp * 10) + uc - '0'; + return UNVIS_NOCHAR; + + default: + bad: + /* + * decoder in unknown state - (probably uninitialized) + */ + *astate = SS(0, S_GROUND); + return UNVIS_SYNBAD; + } +} + +/* + * strnunvisx - decode src into dst + * + * Number of chars decoded into dst is returned, -1 on error. + * Dst is null terminated. + */ + +int +strnunvisx(char *dst, size_t dlen, const char *src, int flag) +{ + char c; + char t = '\0', *start = dst; + int state = 0; + + _DIAGASSERT(src != NULL); + _DIAGASSERT(dst != NULL); +#define CHECKSPACE() \ + do { \ + if (dlen-- == 0) { \ + errno = ENOSPC; \ + return -1; \ + } \ + } while (/*CONSTCOND*/0) + + while ((c = *src++) != '\0') { + again: + switch (unvis(&t, c, &state, flag)) { + case UNVIS_VALID: + CHECKSPACE(); + *dst++ = t; + break; + case UNVIS_VALIDPUSH: + CHECKSPACE(); + *dst++ = t; + goto again; + case 0: + case UNVIS_NOCHAR: + break; + case UNVIS_SYNBAD: + errno = EINVAL; + return -1; + default: + _DIAGASSERT(/*CONSTCOND*/0); + errno = EINVAL; + return -1; + } + } + if (unvis(&t, c, &state, UNVIS_END) == UNVIS_VALID) { + CHECKSPACE(); + *dst++ = t; + } + CHECKSPACE(); + *dst = '\0'; + return (int)(dst - start); +} + +int +strunvisx(char *dst, const char *src, int flag) +{ + return strnunvisx(dst, (size_t)~0, src, flag); +} + +int +strunvis(char *dst, const char *src) +{ + return strnunvisx(dst, (size_t)~0, src, 0); +} + +int +strnunvis(char *dst, size_t dlen, const char *src) +{ + return strnunvisx(dst, dlen, src, 0); +} +#endif Added: vendor/NetBSD/libc-vis/dist/vis.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libc-vis/dist/vis.3 Fri Oct 5 22:30:16 2012 (r241236) @@ -0,0 +1,441 @@ +.\" $NetBSD: vis.3,v 1.27 2011/05/17 07:10:39 joerg Exp $ +.\" +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. 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. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" @(#)vis.3 8.1 (Berkeley) 6/9/93 +.\" +.Dd March 12, 2011 +.Dt VIS 3 +.Os +.Sh NAME +.Nm vis , +.Nm nvis , +.Nm strvis , +.Nm strnvis , +.Nm strvisx , +.Nm strnvisx , +.Nm svis , +.Nm snvis , +.Nm strsvis , +.Nm strsnvis , +.Nm strsvisx +.Nm strsnvisx +.Nd visually encode characters +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In vis.h +.Ft char * +.Fn vis "char *dst" "int c" "int flag" "int nextc" +.Ft char * +.Fn nvis "char *dst" "size_t dlen" "int c" "int flag" "int nextc" +.Ft int +.Fn strvis "char *dst" "const char *src" "int flag" +.Ft int +.Fn strnvis "char *dst" "size_t dlen" "const char *src" "int flag" +.Ft int +.Fn strvisx "char *dst" "const char *src" "size_t len" "int flag" +.Ft int +.Fn strnvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag" +.Ft char * +.Fn svis "char *dst" "int c" "int flag" "int nextc" "const char *extra" +.Ft char * +.Fn snvis "char *dst" "size_t dlen" "int c" "int flag" "int nextc" "const char *extra" +.Ft int +.Fn strsvis "char *dst" "const char *src" "int flag" "const char *extra" +.Ft int +.Fn strsnvis "char *dst" "size_t dlen" "const char *src" "int flag" "const char *extra" +.Ft int +.Fn strsvisx "char *dst" "const char *src" "size_t len" "int flag" "const char *extra" +.Ft int +.Fn strsnvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag" "const char *extra" +.Sh DESCRIPTION +The +.Fn vis +function +copies into +.Fa dst +a string which represents the character +.Fa c . +If +.Fa c +needs no encoding, it is copied in unaltered. +The string is null terminated, and a pointer to the end of the string is +returned. +The maximum length of any encoding is four +characters (not including the trailing +.Dv NUL ) ; +thus, when +encoding a set of characters into a buffer, the size of the buffer should +be four times the number of characters encoded, plus one for the trailing +.Dv NUL . +The flag parameter is used for altering the default range of +characters considered for encoding and for altering the visual +representation. +The additional character, +.Fa nextc , +is only used when selecting the +.Dv VIS_CSTYLE +encoding format (explained below). +.Pp +The +.Fn strvis , +.Fn strnvis , +.Fn strvisx , +and +.Fn strnvisx +functions copy into +.Fa dst +a visual representation of +the string +.Fa src . +The +.Fn strvis +and +.Fn strnvis +functions encode characters from +.Fa src +up to the +first +.Dv NUL . +The +.Fn strvisx +and +.Fn strnvisx +functions encode exactly +.Fa len +characters from +.Fa src +(this +is useful for encoding a block of data that may contain +.Dv NUL Ns 's ) . +Both forms +.Dv NUL +terminate +.Fa dst . +The size of +.Fa dst +must be four times the number +of characters encoded from +.Fa src +(plus one for the +.Dv NUL ) . +Both +forms return the number of characters in dst (not including +the trailing +.Dv NUL ) . +The +.Dq n +versions of the functions also take an additional argument +.Fa dlen +that indicates the length of the +.Fa dst +buffer. +If +.Fa dlen +is not large enough to fix the converted string then the +.Fn strnvis +and +.Fn strnvisx +functions return \-1 and set +.Va errno +to +.Dv ENOSPC . +.Pp +The functions +.Fn svis , +.Fn snvis , +.Fn strsvis , +.Fn strsnvis , +.Fn strsvisx , +and +.Fn strsnvisx +correspond to +.Fn vis , +.Fn nvis , +.Fn strvis , +.Fn strnvis , +.Fn strvisx , +and +.Fn strnvisx +but have an additional argument +.Fa extra , +pointing to a +.Dv NUL +terminated list of characters. +These characters will be copied encoded or backslash-escaped into +.Fa dst . +These functions are useful e.g. to remove the special meaning +of certain characters to shells. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 22:31:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60168106566C; Fri, 5 Oct 2012 22:31:29 +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 321538FC0C; Fri, 5 Oct 2012 22:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95MVTp7052023; Fri, 5 Oct 2012 22:31:29 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95MVSpc052022; Fri, 5 Oct 2012 22:31:29 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201210052231.q95MVSpc052022@svn.freebsd.org> From: Brooks Davis Date: Fri, 5 Oct 2012 22:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241237 - vendor/NetBSD/libc-vis/20121005 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 22:31:29 -0000 Author: brooks Date: Fri Oct 5 22:31:28 2012 New Revision: 241237 URL: http://svn.freebsd.org/changeset/base/241237 Log: Tag import of of NetBSD's (un)vis(3) as of 2012-10-05 Added: vendor/NetBSD/libc-vis/20121005/ - copied from r241236, vendor/NetBSD/libc-vis/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 22:42:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11F91106564A; Fri, 5 Oct 2012 22:42:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F01458FC0C; Fri, 5 Oct 2012 22:42:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95MgvfE053628; Fri, 5 Oct 2012 22:42:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95MgvWI053615; Fri, 5 Oct 2012 22:42:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210052242.q95MgvWI053615@svn.freebsd.org> From: Eitan Adler Date: Fri, 5 Oct 2012 22:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241238 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 22:42:58 -0000 Author: eadler Date: Fri Oct 5 22:42:57 2012 New Revision: 241238 URL: http://svn.freebsd.org/changeset/base/241238 Log: MFC r241116: Correct the tip about finding all the directories on the system Add a tip about clearing the screen. Make things more consistent by removing quotes around 'make search' Approved by: cperciva (implicit) Modified: stable/8/games/fortune/datfiles/freebsd-tips Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/8/games/fortune/datfiles/freebsd-tips Fri Oct 5 22:31:28 2012 (r241237) +++ stable/8/games/fortune/datfiles/freebsd-tips Fri Oct 5 22:42:57 2012 (r241238) @@ -272,8 +272,11 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | less - -- Dru + find / -type d | less + +All the files? + + find / -type f | less % To see how long it takes a command to run, type the word "time" before the command name. @@ -315,9 +318,9 @@ and they can be combined as "ls -FG". Want to find a specific port, just type the following under /usr/ports or one its subdirectories: - "make search name=" + make search name= or - "make search key=" + make search key= % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -422,6 +425,8 @@ You can press Ctrl-D to quickly exit fro login shell. -- Konstantinos Konstantinidis % +You can press Ctrl-L while in the shell to clear the screen. +% You can press up-arrow or down-arrow to walk through a list of previous commands in tcsh. % From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 22:42:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F322106566C; Fri, 5 Oct 2012 22:42:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0853A8FC12; Fri, 5 Oct 2012 22:42:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95MgvsG053629; Fri, 5 Oct 2012 22:42:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95Mgvgj053625; Fri, 5 Oct 2012 22:42:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210052242.q95Mgvgj053625@svn.freebsd.org> From: Eitan Adler Date: Fri, 5 Oct 2012 22:42:57 +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: r241239 - stable/7/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 22:42:58 -0000 Author: eadler Date: Fri Oct 5 22:42:57 2012 New Revision: 241239 URL: http://svn.freebsd.org/changeset/base/241239 Log: MFC r241116: Correct the tip about finding all the directories on the system Add a tip about clearing the screen. Make things more consistent by removing quotes around 'make search' Approved by: cperciva (implicit) Modified: stable/7/games/fortune/datfiles/freebsd-tips Directory Properties: stable/7/games/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/7/games/fortune/datfiles/freebsd-tips Fri Oct 5 22:42:57 2012 (r241238) +++ stable/7/games/fortune/datfiles/freebsd-tips Fri Oct 5 22:42:57 2012 (r241239) @@ -272,8 +272,11 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | less - -- Dru + find / -type d | less + +All the files? + + find / -type f | less % To see how long it takes a command to run, type the word "time" before the command name. @@ -315,9 +318,9 @@ and they can be combined as "ls -FG". Want to find a specific port, just type the following under /usr/ports or one its subdirectories: - "make search name=" + make search name= or - "make search key=" + make search key= % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -422,6 +425,8 @@ You can press Ctrl-D to quickly exit fro login shell. -- Konstantinos Konstantinidis % +You can press Ctrl-L while in the shell to clear the screen. +% You can press up-arrow or down-arrow to walk through a list of previous commands in tcsh. % From owner-svn-src-all@FreeBSD.ORG Fri Oct 5 22:42:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A3901065670; Fri, 5 Oct 2012 22:42:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3416E8FC16; Fri, 5 Oct 2012 22:42:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95MgwQL053637; Fri, 5 Oct 2012 22:42:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95MgvRG053633; Fri, 5 Oct 2012 22:42:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210052242.q95MgvRG053633@svn.freebsd.org> From: Eitan Adler Date: Fri, 5 Oct 2012 22:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241240 - stable/9/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 22:42:58 -0000 Author: eadler Date: Fri Oct 5 22:42:57 2012 New Revision: 241240 URL: http://svn.freebsd.org/changeset/base/241240 Log: MFC r241116: Correct the tip about finding all the directories on the system Add a tip about clearing the screen. Make things more consistent by removing quotes around 'make search' Approved by: cperciva (implicit) Modified: stable/9/games/fortune/datfiles/freebsd-tips Directory Properties: stable/9/games/fortune/ (props changed) Modified: stable/9/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 5 22:42:57 2012 (r241239) +++ stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 5 22:42:57 2012 (r241240) @@ -272,8 +272,11 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | less - -- Dru + find / -type d | less + +All the files? + + find / -type f | less % To see how long it takes a command to run, type the word "time" before the command name. @@ -315,9 +318,9 @@ and they can be combined as "ls -FG". Want to find a specific port, just type the following under /usr/ports or one its subdirectories: - "make search name=" + make search name= or - "make search key=" + make search key= % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -422,6 +425,8 @@ You can press Ctrl-D to quickly exit fro login shell. -- Konstantinos Konstantinidis % +You can press Ctrl-L while in the shell to clear the screen. +% You can press up-arrow or down-arrow to walk through a list of previous commands in tcsh. % From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 05:54:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDD0B106566C; Sat, 6 Oct 2012 05:54:41 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF13A8FC0C; Sat, 6 Oct 2012 05:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q965sftr008059; Sat, 6 Oct 2012 05:54:41 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q965sfAO008057; Sat, 6 Oct 2012 05:54:41 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210060554.q965sfAO008057@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Oct 2012 05:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241241 - head/usr.sbin/sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 05:54:42 -0000 Author: joel (doc committer) Date: Sat Oct 6 05:54:41 2012 New Revision: 241241 URL: http://svn.freebsd.org/changeset/base/241241 Log: Remove trailing whitespace. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Fri Oct 5 22:42:57 2012 (r241240) +++ head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 05:54:41 2012 (r241241) @@ -87,7 +87,7 @@ Print a full usage statement to stderr a .It Fl i Ignore unknown variables. .It Fl j Ar jail -The +The .Ar jid or name of the .Ar jail From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 06:02:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99A48106564A; Sat, 6 Oct 2012 06:02:30 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83B8D8FC17; Sat, 6 Oct 2012 06:02:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9662Ugo009081; Sat, 6 Oct 2012 06:02:30 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9662URT009079; Sat, 6 Oct 2012 06:02:30 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210060602.q9662URT009079@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Oct 2012 06:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241242 - head/usr.sbin/sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 06:02:30 -0000 Author: joel (doc committer) Date: Sat Oct 6 06:02:29 2012 New Revision: 241242 URL: http://svn.freebsd.org/changeset/base/241242 Log: Minor mdoc fix. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 05:54:41 2012 (r241241) +++ head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 06:02:29 2012 (r241242) @@ -126,7 +126,7 @@ syntax for querying/setting configuratio However, while .Xr sysctl 8 serves to query/modify MIBs in the entrant kernel, -.Xr sysrc 8 +.Nm instead works on values in the system .Xr rc.conf 5 configuration files. From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 06:07:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37A841065672; Sat, 6 Oct 2012 06:07:33 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C06328FC12; Sat, 6 Oct 2012 06:07:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9667X7l009805; Sat, 6 Oct 2012 06:07:33 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9667Xex009803; Sat, 6 Oct 2012 06:07:33 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210060607.q9667Xex009803@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Oct 2012 06:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241243 - head/usr.sbin/sysrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 06:07:34 -0000 Author: joel (doc committer) Date: Sat Oct 6 06:07:33 2012 New Revision: 241243 URL: http://svn.freebsd.org/changeset/base/241243 Log: mdoc: begin sentences on a new line. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 06:02:29 2012 (r241242) +++ head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 06:07:33 2012 (r241243) @@ -98,7 +98,8 @@ Show only variable values, not their nam .It Fl N Show only variable names, not their values. .It Fl q -Quiet. Ignore previous +Quiet. +Ignore previous .Fl v and/or .Ev SYSRC_VERBOSE . @@ -108,7 +109,8 @@ Operate within the root directory rather than .Pq Sq / . .It Fl v -Verbose. Print the pathname of the specific +Verbose. +Print the pathname of the specific .Xr rc.conf 5 file where the directive was found. .It Fl x @@ -135,16 +137,20 @@ The list of system configuration files i .Ql /etc/defaults/rc.conf within the variable .Ql rc_conf_files , -which by-default contains a space-separated list of pathnames. On all FreeBSD -systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". Each -pathname is sourced in-order upon startup. It is in the same fashion that +which by-default contains a space-separated list of pathnames. +On all FreeBSD +systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". +Each +pathname is sourced in-order upon startup. +It is in the same fashion that .Nm sources the configuration files before returning the value of the given variable. .Pp When supplied a variable name, .Nm -will return the value of the variable. If the variable does not appear in any +will return the value of the variable. +If the variable does not appear in any of the configured .Ql rc_conf_files , an error is printed and error status is returned. @@ -152,13 +158,16 @@ an error is printed and error status is When changing values of a given variable, it does not matter if the variable appears in any of the .Ql rc_conf_files -or not. If the variable does not appear in any of the files, it is appended to +or not. +If the variable does not appear in any of the files, it is appended to the end of the first pathname in the .Ql rc_conf_files -variable. Otherwise, +variable. +Otherwise, .Nm will replace only the last-occurrence in the last-file found to contain the -variable. This gets the value to take effect next boot without heavily +variable. +This gets the value to take effect next boot without heavily modifying these integral files (yet taking care not to allow the file to grow unwieldy should .Nm @@ -176,7 +185,8 @@ Location of .Ql /etc/defaults/rc.conf file. .It Ev SYSRC_VERBOSE -Default verbosity. Set to non-NULL to enable. +Default verbosity. +Set to non-NULL to enable. .El .Sh DEPENDENCIES The following standard commands are required by From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 07:06:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DD521065673; Sat, 6 Oct 2012 07:06:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38ABD8FC0C; Sat, 6 Oct 2012 07:06:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9676wuv017274; Sat, 6 Oct 2012 07:06:58 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9676wpo017272; Sat, 6 Oct 2012 07:06:58 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210060706.q9676wpo017272@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 6 Oct 2012 07:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241244 - head/sys/netpfil/pf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 07:06:58 -0000 Author: glebius Date: Sat Oct 6 07:06:57 2012 New Revision: 241244 URL: http://svn.freebsd.org/changeset/base/241244 Log: The pfil(9) layer guarantees us presence of the protocol header, so remove extra check, that is always false. P.S. Also, goto there lead to unlocking a not locked rwlock. Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sat Oct 6 06:07:33 2012 (r241243) +++ head/sys/netpfil/pf/pf.c Sat Oct 6 07:06:57 2012 (r241244) @@ -5620,13 +5620,6 @@ pf_test(int dir, struct ifnet *ifp, stru if (m->m_flags & M_SKIP_FIREWALL) return (PF_PASS); - if (m->m_pkthdr.len < (int)sizeof(struct ip)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_SHORT); - log = 1; - goto done; - } - pd.pf_mtag = pf_find_mtag(m); PF_RULES_RLOCK(); @@ -5992,13 +5985,6 @@ pf_test6(int dir, struct ifnet *ifp, str if (kif->pfik_flags & PFI_IFLAG_SKIP) return (PF_PASS); - if (m->m_pkthdr.len < (int)sizeof(*h)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_SHORT); - log = 1; - goto done; - } - PF_RULES_RLOCK(); /* We do IP header normalization and packet reassembly here */ From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 10:02:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DF50106566B; Sat, 6 Oct 2012 10:02:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451888FC0C; Sat, 6 Oct 2012 10:02:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96A2CSs039784; Sat, 6 Oct 2012 10:02:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96A2BFf039772; Sat, 6 Oct 2012 10:02:11 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210061002.q96A2BFf039772@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 6 Oct 2012 10:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241245 - in head: . share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netinet sys/netpfil/ipfw sys/netpfil/pf sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 10:02:12 -0000 Author: glebius Date: Sat Oct 6 10:02:11 2012 New Revision: 241245 URL: http://svn.freebsd.org/changeset/base/241245 Log: A step in resolving mess with byte ordering for AF_INET. After this change: - All packets in NETISR_IP queue are in net byte order. - ip_input() is entered in net byte order and converts packet to host byte order right _after_ processing pfil(9) hooks. - ip_output() is entered in host byte order and converts packet to net byte order right _before_ processing pfil(9) hooks. - ip_fragment() accepts and emits packet in net byte order. - ip_forward(), ip_mloopback() use host byte order (untouched actually). - ip_fastforward() no longer modifies packet at all (except ip_ttl). - Swapping of byte order there and back removed from the following modules: pf(4), ipfw(4), enc(4), if_bridge(4). - Swapping of byte order added to ipfilter(4), based on __FreeBSD_version - __FreeBSD_version bumped. - pfil(9) manual page updated. Reviewed by: ray, luigi, eri, melifaro Tested by: glebius (LE), ray (BE) Modified: head/UPDATING head/share/man/man9/pfil.9 head/sys/contrib/ipfilter/netinet/fil.c head/sys/net/if_bridge.c head/sys/net/if_enc.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/pf/pf_ioctl.c head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 6 07:06:57 2012 (r241244) +++ head/UPDATING Sat Oct 6 10:02:11 2012 (r241245) @@ -24,6 +24,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121006: + The pfil(9) API/ABI for AF_INET family has been changed. Packet + filtering modules: pf(4), ipfw(4), ipfilter(4) need to be recompiled + with new kernel. + 20121001: The net80211(4) ABI has been changed to allow for improved driver PS-POLL and power-save support. All wireless drivers need to be Modified: head/share/man/man9/pfil.9 ============================================================================== --- head/share/man/man9/pfil.9 Sat Oct 6 07:06:57 2012 (r241244) +++ head/share/man/man9/pfil.9 Sat Oct 6 10:02:11 2012 (r241245) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 16, 2012 +.Dd October 6, 2012 .Dt PFIL 9 .Os .Sh NAME @@ -127,10 +127,9 @@ Currently, filtering points are implemen .Pp .Bl -tag -width "AF_INET6" -offset XXX -compact .It AF_INET +IPv4 packets. .It AF_INET6 -IPv4 and IPv6 packets. Note that packet header is already -.Cm converted to host format. -Host format has to be preserved in case of header modifications. +IPv6 packets. .It AF_LINK Link-layer packets. .El Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 6 10:02:11 2012 (r241245) @@ -2513,7 +2513,7 @@ int out; } else #endif { -#if (defined(OpenBSD) && (OpenBSD >= 200311)) && defined(_KERNEL) +#if ((defined(OpenBSD) && (OpenBSD >= 200311)) || (defined(FreeBSD) && (__FreeBSD_version >= 1000019))) && defined(_KERNEL) ip->ip_len = ntohs(ip->ip_len); ip->ip_off = ntohs(ip->ip_off); #endif @@ -2777,7 +2777,7 @@ finished: RWLOCK_EXIT(&ipf_global); #ifdef _KERNEL -# if (defined(OpenBSD) && (OpenBSD >= 200311)) +# if (defined(OpenBSD) && (OpenBSD >= 200311)) || (defined(FreeBSD) && (__FreeBSD_version >= 1000019)) if (FR_ISPASS(pass) && (v == 4)) { ip = fin->fin_ip; ip->ip_len = ntohs(ip->ip_len); Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/net/if_bridge.c Sat Oct 6 10:02:11 2012 (r241245) @@ -3093,15 +3093,6 @@ bridge_pfil(struct mbuf **mp, struct ifn switch (ether_type) { case ETHERTYPE_IP: /* - * before calling the firewall, swap fields the same as - * IP does. here we assume the header is contiguous - */ - ip = mtod(*mp, struct ip *); - - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - - /* * Run pfil on the member interface and the bridge, both can * be skipped by clearing pfil_member or pfil_bridge. * @@ -3139,7 +3130,7 @@ bridge_pfil(struct mbuf **mp, struct ifn } } - /* Recalculate the ip checksum and restore byte ordering */ + /* Recalculate the ip checksum. */ ip = mtod(*mp, struct ip *); hlen = ip->ip_hl << 2; if (hlen < sizeof(struct ip)) @@ -3151,8 +3142,6 @@ bridge_pfil(struct mbuf **mp, struct ifn if (ip == NULL) goto bad; } - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); ip->ip_sum = 0; if (hlen == sizeof(struct ip)) ip->ip_sum = in_cksum_hdr(ip); Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/net/if_enc.c Sat Oct 6 10:02:11 2012 (r241245) @@ -270,23 +270,8 @@ ipsec_filter(struct mbuf **mp, int dir, switch (ip->ip_v) { #ifdef INET case 4: - /* - * before calling the firewall, swap fields the same as - * IP does. here we assume the header is contiguous - */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - error = pfil_run_hooks(&V_inet_pfil_hook, mp, encif, dir, NULL); - - if (*mp == NULL || error != 0) - break; - - /* restore byte ordering */ - ip = mtod(*mp, struct ip *); - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); break; #endif #ifdef INET6 Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netinet/ip_fastfwd.c Sat Oct 6 10:02:11 2012 (r241245) @@ -164,7 +164,7 @@ ip_fastforward(struct mbuf *m) struct sockaddr_in *dst = NULL; struct ifnet *ifp; struct in_addr odest, dest; - u_short sum, ip_len; + uint16_t sum, ip_len, ip_off; int error = 0; int hlen, mtu; #ifdef IPFIREWALL_FORWARD @@ -340,12 +340,6 @@ ip_fastforward(struct mbuf *m) * Step 3: incoming packet firewall processing */ - /* - * Convert to host representation - */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - odest.s_addr = dest.s_addr = ip->ip_dst.s_addr; /* @@ -472,8 +466,6 @@ passin: forwardlocal: /* * Return packet for processing by ip_input(). - * Keep host byte order as expected at ip_input's - * "ours"-label. */ m->m_flags |= M_FASTFWD_OURS; if (ro.ro_rt) @@ -500,6 +492,8 @@ passout: /* * Step 6: send off the packet */ + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); /* * Check if route is dampned (when ARP is unable to resolve) @@ -515,7 +509,7 @@ passout: /* * Check if there is enough space in the interface queue */ - if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >= + if ((ifp->if_snd.ifq_len + ip_len / ifp->if_mtu + 1) >= ifp->if_snd.ifq_maxlen) { IPSTAT_INC(ips_odropped); /* would send source quench here but that is depreciated */ @@ -539,13 +533,8 @@ passout: else mtu = ifp->if_mtu; - if (ip->ip_len <= mtu || - (ifp->if_hwassist & CSUM_FRAGMENT && (ip->ip_off & IP_DF) == 0)) { - /* - * Restore packet header fields to original values - */ - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); + if (ip_len <= mtu || + (ifp->if_hwassist & CSUM_FRAGMENT && (ip_off & IP_DF) == 0)) { /* * Send off the packet via outgoing interface */ @@ -555,7 +544,7 @@ passout: /* * Handle EMSGSIZE with icmp reply needfrag for TCP MTU discovery */ - if (ip->ip_off & IP_DF) { + if (ip_off & IP_DF) { IPSTAT_INC(ips_cantfrag); icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0, mtu); @@ -565,10 +554,6 @@ passout: * We have to fragment the packet */ m->m_pkthdr.csum_flags |= CSUM_IP; - /* - * ip_fragment expects ip_len and ip_off in host byte - * order but returns all packets in network byte order - */ if (ip_fragment(ip, &m, mtu, ifp->if_hwassist, (~ifp->if_hwassist & CSUM_DELAY_IP))) { goto drop; Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netinet/ip_input.c Sat Oct 6 10:02:11 2012 (r241245) @@ -380,20 +380,18 @@ ip_input(struct mbuf *m) struct ifaddr *ifa; struct ifnet *ifp; int checkif, hlen = 0; - u_short sum; + uint16_t sum, ip_len; int dchg = 0; /* dest changed after fw */ struct in_addr odst; /* original dst address */ M_ASSERTPKTHDR(m); if (m->m_flags & M_FASTFWD_OURS) { - /* - * Firewall or NAT changed destination to local. - * We expect ip_len and ip_off to be in host byte order. - */ m->m_flags &= ~M_FASTFWD_OURS; /* Set up some basics that will be used later. */ ip = mtod(m, struct ip *); + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); hlen = ip->ip_hl << 2; goto ours; } @@ -458,15 +456,11 @@ ip_input(struct mbuf *m) return; #endif - /* - * Convert fields to host representation. - */ - ip->ip_len = ntohs(ip->ip_len); - if (ip->ip_len < hlen) { + ip_len = ntohs(ip->ip_len); + if (ip_len < hlen) { IPSTAT_INC(ips_badlen); goto bad; } - ip->ip_off = ntohs(ip->ip_off); /* * Check that the amount of data in the buffers @@ -474,17 +468,17 @@ ip_input(struct mbuf *m) * Trim mbufs if longer than we expect. * Drop packet if shorter than we expect. */ - if (m->m_pkthdr.len < ip->ip_len) { + if (m->m_pkthdr.len < ip_len) { tooshort: IPSTAT_INC(ips_tooshort); goto bad; } - if (m->m_pkthdr.len > ip->ip_len) { + if (m->m_pkthdr.len > ip_len) { if (m->m_len == m->m_pkthdr.len) { - m->m_len = ip->ip_len; - m->m_pkthdr.len = ip->ip_len; + m->m_len = ip_len; + m->m_pkthdr.len = ip_len; } else - m_adj(m, ip->ip_len - m->m_pkthdr.len); + m_adj(m, ip_len - m->m_pkthdr.len); } #ifdef IPSEC /* @@ -519,6 +513,8 @@ tooshort: #ifdef IPFIREWALL_FORWARD if (m->m_flags & M_FASTFWD_OURS) { m->m_flags &= ~M_FASTFWD_OURS; + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); goto ours; } if ((dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL)) != 0) { @@ -527,6 +523,8 @@ tooshort: * packets originally destined to us to some other directly * connected host. */ + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); ip_forward(m, dchg); return; } @@ -534,6 +532,13 @@ tooshort: passin: /* + * From now and up to output pfil(9) processing in ip_output() + * the header is in host byte order. + */ + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); + + /* * Process options and, if not destined for us, * ship it on. ip_dooptions returns 1 when an * error was detected (causing an icmp message @@ -1360,6 +1365,8 @@ u_char inetctlerrmap[PRC_NCMDS] = { * * The srcrt parameter indicates whether the packet is being forwarded * via a source route. + * + * IP header in host byte order. */ void ip_forward(struct mbuf *m, int srcrt) Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netinet/ip_output.c Sat Oct 6 10:02:11 2012 (r241245) @@ -125,7 +125,8 @@ ip_output(struct mbuf *m, struct mbuf *o int error = 0; struct sockaddr_in *dst; struct in_ifaddr *ia; - int isbroadcast, sw_csum; + int isbroadcast; + uint16_t ip_len, ip_off, sw_csum; struct route iproute; struct rtentry *rte; /* cache for ro->ro_rt */ struct in_addr odst; @@ -501,6 +502,12 @@ sendit: hlen = ip->ip_hl << 2; #endif /* IPSEC */ + /* + * To network byte order. pfil(9) hooks and ip_fragment() expect this. + */ + ip->ip_len = htons(ip->ip_len); + ip->ip_off = htons(ip->ip_off); + /* Jump over all PFIL processing if hooks are not active. */ if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passout; @@ -537,6 +544,8 @@ sendit: } else { if (ia != NULL) ifa_free(&ia->ia_ifa); + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); goto again; /* Redo the routing table lookup. */ } } @@ -570,11 +579,16 @@ sendit: m_tag_delete(m, fwd_tag); if (ia != NULL) ifa_free(&ia->ia_ifa); + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); goto again; } #endif /* IPFIREWALL_FORWARD */ passout: + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); + /* 127/8 must not appear on wire - RFC1122. */ if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { @@ -603,11 +617,9 @@ passout: * If small enough for interface, or the interface will take * care of the fragmentation for us, we can just send directly. */ - if (ip->ip_len <= mtu || + if (ip_len <= mtu || (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || - ((ip->ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); + ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { ip->ip_sum = 0; if (sw_csum & CSUM_DELAY_IP) ip->ip_sum = in_cksum(m, hlen); @@ -641,7 +653,7 @@ passout: } /* Balk when DF bit is set or the interface didn't support TSO. */ - if ((ip->ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { + if ((ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { error = EMSGSIZE; IPSTAT_INC(ips_cantfrag); goto bad; @@ -710,8 +722,12 @@ ip_fragment(struct ip *ip, struct mbuf * int firstlen; struct mbuf **mnext; int nfrags; + uint16_t ip_len, ip_off; + + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); - if (ip->ip_off & IP_DF) { /* Fragmentation not allowed */ + if (ip_off & IP_DF) { /* Fragmentation not allowed */ IPSTAT_INC(ips_cantfrag); return EMSGSIZE; } @@ -785,7 +801,7 @@ smart_frag_failure: * The fragments are linked off the m_nextpkt of the original * packet, which after processing serves as the first fragment. */ - for (nfrags = 1; off < ip->ip_len; off += len, nfrags++) { + for (nfrags = 1; off < ip_len; off += len, nfrags++) { struct ip *mhip; /* ip header on the fragment */ struct mbuf *m; int mhlen = sizeof (struct ip); @@ -811,10 +827,10 @@ smart_frag_failure: mhip->ip_hl = mhlen >> 2; } m->m_len = mhlen; - /* XXX do we need to add ip->ip_off below ? */ - mhip->ip_off = ((off - hlen) >> 3) + ip->ip_off; - if (off + len >= ip->ip_len) { /* last fragment */ - len = ip->ip_len - off; + /* XXX do we need to add ip_off below ? */ + mhip->ip_off = ((off - hlen) >> 3) + ip_off; + if (off + len >= ip_len) { /* last fragment */ + len = ip_len - off; m->m_flags |= M_LASTFRAG; } else mhip->ip_off |= IP_MF; @@ -849,11 +865,10 @@ smart_frag_failure: * Update first fragment by trimming what's been copied out * and updating header. */ - m_adj(m0, hlen + firstlen - ip->ip_len); + m_adj(m0, hlen + firstlen - ip_len); m0->m_pkthdr.len = hlen + firstlen; ip->ip_len = htons((u_short)m0->m_pkthdr.len); - ip->ip_off |= IP_MF; - ip->ip_off = htons(ip->ip_off); + ip->ip_off = htons(ip_off | IP_MF); ip->ip_sum = 0; if (sw_csum & CSUM_DELAY_IP) ip->ip_sum = in_cksum(m0, hlen); @@ -1279,6 +1294,8 @@ ip_ctloutput(struct socket *so, struct s * calls the output routine of the loopback "driver", but with an interface * pointer that might NOT be a loopback interface -- evil, but easier than * replicating that code here. + * + * IP header in host byte order. */ static void ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst, Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Sat Oct 6 10:02:11 2012 (r241245) @@ -125,10 +125,6 @@ ipfw_check_packet(void *arg, struct mbuf int ipfw; int ret; - /* all the processing now uses ip_len in net format */ - if (mtod(*m0, struct ip *)->ip_v == 4) - SET_NET_IPLEN(mtod(*m0, struct ip *)); - /* convert dir to IPFW values */ dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; bzero(&args, sizeof(args)); @@ -288,8 +284,7 @@ again: FREE_PKT(*m0); *m0 = NULL; } - if (*m0 && mtod(*m0, struct ip *)->ip_v == 4) - SET_HOST_IPLEN(mtod(*m0, struct ip *)); + return ret; } Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netpfil/pf/pf_ioctl.c Sat Oct 6 10:02:11 2012 (r241245) @@ -3473,23 +3473,8 @@ static int pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - /* - * XXX Wed Jul 9 22:03:16 2003 UTC - * OpenBSD has changed its byte ordering convention on ip_len/ip_off - * in network stack. OpenBSD's network stack have converted - * ip_len/ip_off to host byte order frist as FreeBSD. - * Now this is not true anymore , so we should convert back to network - * byte order. - */ - struct ip *h = NULL; int chk; - if ((*m)->m_pkthdr.len >= (int)sizeof(struct ip)) { - /* if m_pkthdr.len is less than ip header, pf will handle. */ - h = mtod(*m, struct ip *); - HTONS(h->ip_len); - HTONS(h->ip_off); - } CURVNET_SET(ifp->if_vnet); chk = pf_test(PF_IN, ifp, m, inp); CURVNET_RESTORE(); @@ -3497,28 +3482,14 @@ pf_check_in(void *arg, struct mbuf **m, m_freem(*m); *m = NULL; } - if (*m != NULL) { - /* pf_test can change ip header location */ - h = mtod(*m, struct ip *); - NTOHS(h->ip_len); - NTOHS(h->ip_off); - } - return chk; + + return (chk); } static int pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - /* - * XXX Wed Jul 9 22:03:16 2003 UTC - * OpenBSD has changed its byte ordering convention on ip_len/ip_off - * in network stack. OpenBSD's network stack have converted - * ip_len/ip_off to host byte order frist as FreeBSD. - * Now this is not true anymore , so we should convert back to network - * byte order. - */ - struct ip *h = NULL; int chk; /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ @@ -3526,12 +3497,7 @@ pf_check_out(void *arg, struct mbuf **m, in_delayed_cksum(*m); (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } - if ((*m)->m_pkthdr.len >= (int)sizeof(*h)) { - /* if m_pkthdr.len is less than ip header, pf will handle. */ - h = mtod(*m, struct ip *); - HTONS(h->ip_len); - HTONS(h->ip_off); - } + CURVNET_SET(ifp->if_vnet); chk = pf_test(PF_OUT, ifp, m, inp); CURVNET_RESTORE(); @@ -3539,13 +3505,8 @@ pf_check_out(void *arg, struct mbuf **m, m_freem(*m); *m = NULL; } - if (*m != NULL) { - /* pf_test can change ip header location */ - h = mtod(*m, struct ip *); - NTOHS(h->ip_len); - NTOHS(h->ip_off); - } - return chk; + + return (chk); } #endif @@ -3554,10 +3515,6 @@ static int pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - - /* - * IPv6 is not affected by ip_len/ip_off byte order changes. - */ int chk; /* @@ -3579,9 +3536,6 @@ static int pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - /* - * IPv6 does not affected ip_len/ip_off byte order changes. - */ int chk; /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/sys/param.h Sat Oct 6 10:02:11 2012 (r241245) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000018 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000019 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 12:25:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AA791065670; Sat, 6 Oct 2012 12:25:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 420F48FC08; Sat, 6 Oct 2012 12:25:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96CPEKR062395; Sat, 6 Oct 2012 12:25:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96CPEhs062393; Sat, 6 Oct 2012 12:25:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061225.q96CPEhs062393@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 12:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241246 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 12:25:14 -0000 Author: mav Date: Sat Oct 6 12:25:13 2012 New Revision: 241246 URL: http://svn.freebsd.org/changeset/base/241246 Log: MFC r232207, r232454, r234066: Rework CPU load balancing in SCHED_ULE: - In sched_pickcpu() be more careful taking previous CPU on SMT systems. Do it only if all other logical CPUs of that physical one are idle to avoid extra resource sharing. - In sched_pickcpu() change general logic of CPU selection. First look for idle CPU, sharing last level cache with previously used one, skipping SMT CPU groups. If none found, search all CPUs for the least loaded one, where the thread with its priority can run now. If none found, search just for the least loaded CPU. - Make cpu_search() compare lowest/highest CPU load when comparing CPU groups with equal load. That allows to differentiate 1+1 and 2+0 loads. - Make cpu_search() to prefer specified (previous) CPU or group if load is equal. This improves cache affinity for more complicated topologies. - Randomize CPU selection if above factors are equal. Previous code tend to prefer CPUs with lower IDs, causing unneeded collisions. - Rework periodic balancer in sched_balance_group(). With cpu_search() more intelligent now, make balansing process flat, removing recursion over the topology tree. That fixes double swap problem and makes load distribution more even and predictable. All together this gives 10-15% performance improvement in many tests on CPUs with SMT, such as Core i7, for number of threads is less then number of logical CPUs. In some tests it also gives positive effect to systems without SMT. Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Sat Oct 6 10:02:11 2012 (r241245) +++ stable/8/sys/kern/sched_ule.c Sat Oct 6 12:25:13 2012 (r241246) @@ -255,7 +255,6 @@ struct cpu_group *cpu_top; /* CPU topol static int rebalance = 1; static int balance_interval = 128; /* Default set in sched_initticks(). */ static int affinity; -static int steal_htt = 1; static int steal_idle = 1; static int steal_thresh = 2; @@ -265,6 +264,7 @@ static int steal_thresh = 2; static struct tdq tdq_cpu[MAXCPU]; static struct tdq *balance_tdq; static int balance_ticks; +static DPCPU_DEFINE(uint32_t, randomval); #define TDQ_SELF() (&tdq_cpu[PCPU_GET(cpuid)]) #define TDQ_CPU(x) (&tdq_cpu[(x)]) @@ -571,9 +571,11 @@ tdq_setlowpri(struct tdq *tdq, struct th #ifdef SMP struct cpu_search { cpuset_t cs_mask; - u_int cs_load; - u_int cs_cpu; - int cs_limit; /* Min priority for low min load for high. */ + u_int cs_prefer; + int cs_pri; /* Min priority for low. */ + int cs_limit; /* Max load for low, min load for high. */ + int cs_cpu; + int cs_load; }; #define CPU_SEARCH_LOWEST 0x1 @@ -584,44 +586,14 @@ struct cpu_search { for ((cpu) = 0; (cpu) <= mp_maxid; (cpu)++) \ if ((mask) & 1 << (cpu)) -static __inline int cpu_search(struct cpu_group *cg, struct cpu_search *low, +static __inline int cpu_search(const struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high, const int match); -int cpu_search_lowest(struct cpu_group *cg, struct cpu_search *low); -int cpu_search_highest(struct cpu_group *cg, struct cpu_search *high); -int cpu_search_both(struct cpu_group *cg, struct cpu_search *low, +int cpu_search_lowest(const struct cpu_group *cg, struct cpu_search *low); +int cpu_search_highest(const struct cpu_group *cg, struct cpu_search *high); +int cpu_search_both(const struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high); /* - * This routine compares according to the match argument and should be - * reduced in actual instantiations via constant propagation and dead code - * elimination. - */ -static __inline int -cpu_compare(int cpu, struct cpu_search *low, struct cpu_search *high, - const int match) -{ - struct tdq *tdq; - - tdq = TDQ_CPU(cpu); - if (match & CPU_SEARCH_LOWEST) - if (CPU_ISSET(cpu, &low->cs_mask) && - tdq->tdq_load < low->cs_load && - tdq->tdq_lowpri > low->cs_limit) { - low->cs_cpu = cpu; - low->cs_load = tdq->tdq_load; - } - if (match & CPU_SEARCH_HIGHEST) - if (CPU_ISSET(cpu, &high->cs_mask) && - tdq->tdq_load >= high->cs_limit && - tdq->tdq_load > high->cs_load && - tdq->tdq_transferable) { - high->cs_cpu = cpu; - high->cs_load = tdq->tdq_load; - } - return (tdq->tdq_load); -} - -/* * Search the tree of cpu_groups for the lowest or highest loaded cpu * according to the match argument. This routine actually compares the * load on all paths through the tree and finds the least loaded cpu on @@ -633,33 +605,44 @@ cpu_compare(int cpu, struct cpu_search * * also recursive to the depth of the tree. */ static __inline int -cpu_search(struct cpu_group *cg, struct cpu_search *low, +cpu_search(const struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high, const int match) { - int total; + struct cpu_search lgroup; + struct cpu_search hgroup; + cpumask_t cpumask; + struct cpu_group *child; + struct tdq *tdq; + int cpu, i, hload, lload, load, total, rnd, *rndptr; total = 0; - if (cg->cg_children) { - struct cpu_search lgroup; - struct cpu_search hgroup; - struct cpu_group *child; - u_int lload; - int hload; - int load; - int i; - - lload = -1; - hload = -1; - for (i = 0; i < cg->cg_children; i++) { - child = &cg->cg_child[i]; - if (match & CPU_SEARCH_LOWEST) { - lgroup = *low; - lgroup.cs_load = -1; - } - if (match & CPU_SEARCH_HIGHEST) { - hgroup = *high; - lgroup.cs_load = 0; - } + cpumask = cg->cg_mask; + if (match & CPU_SEARCH_LOWEST) { + lload = INT_MAX; + lgroup = *low; + } + if (match & CPU_SEARCH_HIGHEST) { + hload = INT_MIN; + hgroup = *high; + } + + /* Iterate through the child CPU groups and then remaining CPUs. */ + for (i = cg->cg_children, cpu = mp_maxid; i >= 0; ) { + if (i == 0) { + while (cpu >= 0 && ((1 << cpu) & cpumask) == 0) + cpu--; + if (cpu < 0) + break; + child = NULL; + } else + child = &cg->cg_child[i - 1]; + + if (match & CPU_SEARCH_LOWEST) + lgroup.cs_cpu = -1; + if (match & CPU_SEARCH_HIGHEST) + hgroup.cs_cpu = -1; + if (child) { /* Handle child CPU group. */ + cpumask &= ~child->cg_mask; switch (match) { case CPU_SEARCH_LOWEST: load = cpu_search_lowest(child, &lgroup); @@ -671,23 +654,56 @@ cpu_search(struct cpu_group *cg, struct load = cpu_search_both(child, &lgroup, &hgroup); break; } - total += load; - if (match & CPU_SEARCH_LOWEST) - if (load < lload || low->cs_cpu == -1) { - *low = lgroup; - lload = load; + } else { /* Handle child CPU. */ + tdq = TDQ_CPU(cpu); + load = tdq->tdq_load * 256; + rndptr = DPCPU_PTR(randomval); + rnd = (*rndptr = *rndptr * 69069 + 5) >> 26; + if (match & CPU_SEARCH_LOWEST) { + if (cpu == low->cs_prefer) + load -= 64; + /* If that CPU is allowed and get data. */ + if (tdq->tdq_lowpri > lgroup.cs_pri && + tdq->tdq_load <= lgroup.cs_limit && + CPU_ISSET(cpu, &lgroup.cs_mask)) { + lgroup.cs_cpu = cpu; + lgroup.cs_load = load - rnd; } - if (match & CPU_SEARCH_HIGHEST) - if (load > hload || high->cs_cpu == -1) { - hload = load; - *high = hgroup; + } + if (match & CPU_SEARCH_HIGHEST) + if (tdq->tdq_load >= hgroup.cs_limit && + tdq->tdq_transferable && + CPU_ISSET(cpu, &hgroup.cs_mask)) { + hgroup.cs_cpu = cpu; + hgroup.cs_load = load - rnd; } } - } else { - int cpu; + total += load; - CPUSET_FOREACH(cpu, cg->cg_mask) - total += cpu_compare(cpu, low, high, match); + /* We have info about child item. Compare it. */ + if (match & CPU_SEARCH_LOWEST) { + if (lgroup.cs_cpu >= 0 && + (load < lload || + (load == lload && lgroup.cs_load < low->cs_load))) { + lload = load; + low->cs_cpu = lgroup.cs_cpu; + low->cs_load = lgroup.cs_load; + } + } + if (match & CPU_SEARCH_HIGHEST) + if (hgroup.cs_cpu >= 0 && + (load > hload || + (load == hload && hgroup.cs_load > high->cs_load))) { + hload = load; + high->cs_cpu = hgroup.cs_cpu; + high->cs_load = hgroup.cs_load; + } + if (child) { + i--; + if (i == 0 && cpumask == 0) + break; + } else + cpu--; } return (total); } @@ -697,19 +713,19 @@ cpu_search(struct cpu_group *cg, struct * optimization. */ int -cpu_search_lowest(struct cpu_group *cg, struct cpu_search *low) +cpu_search_lowest(const struct cpu_group *cg, struct cpu_search *low) { return cpu_search(cg, low, NULL, CPU_SEARCH_LOWEST); } int -cpu_search_highest(struct cpu_group *cg, struct cpu_search *high) +cpu_search_highest(const struct cpu_group *cg, struct cpu_search *high) { return cpu_search(cg, NULL, high, CPU_SEARCH_HIGHEST); } int -cpu_search_both(struct cpu_group *cg, struct cpu_search *low, +cpu_search_both(const struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high) { return cpu_search(cg, low, high, CPU_SEARCH_BOTH); @@ -721,14 +737,16 @@ cpu_search_both(struct cpu_group *cg, st * acceptable. */ static inline int -sched_lowest(struct cpu_group *cg, cpuset_t mask, int pri) +sched_lowest(const struct cpu_group *cg, cpuset_t mask, int pri, int maxload, + int prefer) { struct cpu_search low; low.cs_cpu = -1; - low.cs_load = -1; + low.cs_prefer = prefer; low.cs_mask = mask; - low.cs_limit = pri; + low.cs_pri = pri; + low.cs_limit = maxload; cpu_search_lowest(cg, &low); return low.cs_cpu; } @@ -737,12 +755,11 @@ sched_lowest(struct cpu_group *cg, cpuse * Find the cpu with the highest load via the highest loaded path. */ static inline int -sched_highest(struct cpu_group *cg, cpuset_t mask, int minload) +sched_highest(const struct cpu_group *cg, cpuset_t mask, int minload) { struct cpu_search high; high.cs_cpu = -1; - high.cs_load = 0; high.cs_mask = mask; high.cs_limit = minload; cpu_search_highest(cg, &high); @@ -753,17 +770,17 @@ sched_highest(struct cpu_group *cg, cpus * Simultaneously find the highest and lowest loaded cpu reachable via * cg. */ -static inline void -sched_both(struct cpu_group *cg, cpuset_t mask, int *lowcpu, int *highcpu) +static inline void +sched_both(const struct cpu_group *cg, cpuset_t mask, int *lowcpu, int *highcpu) { struct cpu_search high; struct cpu_search low; low.cs_cpu = -1; - low.cs_limit = -1; - low.cs_load = -1; + low.cs_prefer = -1; + low.cs_pri = -1; + low.cs_limit = INT_MAX; low.cs_mask = mask; - high.cs_load = 0; high.cs_cpu = -1; high.cs_limit = -1; high.cs_mask = mask; @@ -776,30 +793,45 @@ sched_both(struct cpu_group *cg, cpuset_ static void sched_balance_group(struct cpu_group *cg) { - cpuset_t mask; - int high; - int low; - int i; + cpuset_t hmask, lmask; + int high, low, anylow; - CPU_FILL(&mask); + CPU_FILL(&hmask); for (;;) { - sched_both(cg, mask, &low, &high); - if (low == high || low == -1 || high == -1) + high = sched_highest(cg, hmask, 1); + /* Stop if there is no more CPU with transferrable threads. */ + if (high == -1) break; - if (sched_balance_pair(TDQ_CPU(high), TDQ_CPU(low))) + CPU_CLR(high, &hmask); + CPU_COPY(&hmask, &lmask); + /* Stop if there is no more CPU left for low. */ + if (CPU_EMPTY(&lmask)) break; - /* - * If we failed to move any threads determine which cpu - * to kick out of the set and try again. - */ - if (TDQ_CPU(high)->tdq_transferable == 0) - CPU_CLR(high, &mask); - else - CPU_CLR(low, &mask); + anylow = 1; +nextlow: + low = sched_lowest(cg, lmask, -1, + TDQ_CPU(high)->tdq_load - 1, high); + /* Stop if we looked well and found no less loaded CPU. */ + if (anylow && low == -1) + break; + /* Go to next high if we found no less loaded CPU. */ + if (low == -1) + continue; + /* Transfer thread from high to low. */ + if (sched_balance_pair(TDQ_CPU(high), TDQ_CPU(low))) { + /* CPU that got thread can no longer be a donor. */ + CPU_CLR(low, &hmask); + } else { + /* + * If failed, then there is no threads on high + * that can run on this low. Drop low from low + * mask and look for different one. + */ + CPU_CLR(low, &lmask); + anylow = 0; + goto nextlow; + } } - - for (i = 0; i < cg->cg_children; i++) - sched_balance_group(&cg->cg_child[i]); } static void @@ -852,31 +884,16 @@ tdq_unlock_pair(struct tdq *one, struct static int sched_balance_pair(struct tdq *high, struct tdq *low) { - int transferable; - int high_load; - int low_load; int moved; - int move; - int diff; - int i; tdq_lock_pair(high, low); - transferable = high->tdq_transferable; - high_load = high->tdq_load; - low_load = low->tdq_load; moved = 0; /* * Determine what the imbalance is and then adjust that to how many * threads we actually have to give up (transferable). */ - if (transferable != 0) { - diff = high_load - low_load; - move = diff / 2; - if (diff & 0x1) - move++; - move = min(move, transferable); - for (i = 0; i < move; i++) - moved += tdq_move(high, low); + if (high->tdq_transferable != 0 && high->tdq_load > low->tdq_load && + (moved = tdq_move(high, low)) > 0) { /* * IPI the target cpu to force it to reschedule with the new * workload. @@ -1016,8 +1033,7 @@ runq_steal_from(struct runq *rq, int cpu { struct rqbits *rqb; struct rqhead *rqh; - struct thread *td; - int first; + struct thread *td, *first; int bit; int pri; int i; @@ -1025,7 +1041,7 @@ runq_steal_from(struct runq *rq, int cpu rqb = &rq->rq_status; bit = start & (RQB_BPW -1); pri = 0; - first = 0; + first = NULL; again: for (i = RQB_WORD(start); i < RQB_LEN; bit = 0, i++) { if (rqb->rqb_bits[i] == 0) @@ -1044,7 +1060,7 @@ again: if (first && THREAD_CAN_MIGRATE(td) && THREAD_CAN_SCHED(td, cpu)) return (td); - first = 1; + first = td; } } if (start != 0) { @@ -1052,6 +1068,9 @@ again: goto again; } + if (first && THREAD_CAN_MIGRATE(first) && + THREAD_CAN_SCHED(first, cpu)) + return (first); return (NULL); } @@ -1153,13 +1172,11 @@ SCHED_STAT_DEFINE(pickcpu_migration, "Se static int sched_pickcpu(struct thread *td, int flags) { - struct cpu_group *cg; + struct cpu_group *cg, *ccg; struct td_sched *ts; struct tdq *tdq; cpuset_t mask; - int self; - int pri; - int cpu; + int cpu, pri, self; self = PCPU_GET(cpuid); ts = td->td_sched; @@ -1174,52 +1191,77 @@ sched_pickcpu(struct thread *td, int fla * Prefer to run interrupt threads on the processors that generate * the interrupt. */ + pri = td->td_priority; if (td->td_priority <= PRI_MAX_ITHD && THREAD_CAN_SCHED(td, self) && curthread->td_intr_nesting_level && ts->ts_cpu != self) { SCHED_STAT_INC(pickcpu_intrbind); ts->ts_cpu = self; + if (TDQ_CPU(self)->tdq_lowpri > pri) { + SCHED_STAT_INC(pickcpu_affinity); + return (ts->ts_cpu); + } } /* * If the thread can run on the last cpu and the affinity has not * expired or it is idle run it there. */ - pri = td->td_priority; tdq = TDQ_CPU(ts->ts_cpu); - if (THREAD_CAN_SCHED(td, ts->ts_cpu)) { - if (tdq->tdq_lowpri > PRI_MIN_IDLE) { + cg = tdq->tdq_cg; + if (THREAD_CAN_SCHED(td, ts->ts_cpu) && + tdq->tdq_lowpri >= PRI_MIN_IDLE && + SCHED_AFFINITY(ts, CG_SHARE_L2)) { + if (cg->cg_flags & CG_FLAG_THREAD) { + CPUSET_FOREACH(cpu, cg->cg_mask) { + if (TDQ_CPU(cpu)->tdq_lowpri < PRI_MIN_IDLE) + break; + } + } else + cpu = INT_MAX; + if (cpu > mp_maxid) { SCHED_STAT_INC(pickcpu_idle_affinity); return (ts->ts_cpu); } - if (SCHED_AFFINITY(ts, CG_SHARE_L2) && tdq->tdq_lowpri > pri) { - SCHED_STAT_INC(pickcpu_affinity); - return (ts->ts_cpu); - } } /* - * Search for the highest level in the tree that still has affinity. + * Search for the last level cache CPU group in the tree. + * Skip caches with expired affinity time and SMT groups. + * Affinity to higher level caches will be handled less aggressively. */ - cg = NULL; - for (cg = tdq->tdq_cg; cg != NULL; cg = cg->cg_parent) - if (SCHED_AFFINITY(ts, cg->cg_level)) - break; + for (ccg = NULL; cg != NULL; cg = cg->cg_parent) { + if (cg->cg_flags & CG_FLAG_THREAD) + continue; + if (!SCHED_AFFINITY(ts, cg->cg_level)) + continue; + ccg = cg; + } + if (ccg != NULL) + cg = ccg; cpu = -1; + /* Search the group for the less loaded idle CPU we can run now. */ mask = td->td_cpuset->cs_mask; - if (cg) - cpu = sched_lowest(cg, mask, pri); + if (cg != NULL && cg != cpu_top && + cg->cg_mask != cpu_top->cg_mask) + cpu = sched_lowest(cg, mask, max(pri, PRI_MAX_TIMESHARE), + INT_MAX, ts->ts_cpu); + /* Search globally for the less loaded CPU we can run now. */ if (cpu == -1) - cpu = sched_lowest(cpu_top, mask, -1); + cpu = sched_lowest(cpu_top, mask, pri, INT_MAX, ts->ts_cpu); + /* Search globally for the less loaded CPU. */ + if (cpu == -1) + cpu = sched_lowest(cpu_top, mask, -1, INT_MAX, ts->ts_cpu); + KASSERT(cpu != -1, ("sched_pickcpu: Failed to find a cpu.")); /* * Compare the lowest loaded cpu to current cpu. */ if (THREAD_CAN_SCHED(td, self) && TDQ_CPU(self)->tdq_lowpri > pri && - TDQ_CPU(cpu)->tdq_lowpri < PRI_MIN_IDLE) { + TDQ_CPU(cpu)->tdq_lowpri < PRI_MIN_IDLE && + TDQ_CPU(self)->tdq_load <= TDQ_CPU(cpu)->tdq_load + 1) { SCHED_STAT_INC(pickcpu_local); cpu = self; } else SCHED_STAT_INC(pickcpu_lowest); if (cpu != ts->ts_cpu) SCHED_STAT_INC(pickcpu_migration); - KASSERT(cpu != -1, ("sched_pickcpu: Failed to find a cpu.")); return (cpu); } #endif @@ -2792,8 +2834,6 @@ SYSCTL_INT(_kern_sched, OID_AUTO, balanc SYSCTL_INT(_kern_sched, OID_AUTO, balance_interval, CTLFLAG_RW, &balance_interval, 0, "Average frequency in stathz ticks to run the long-term balancer"); -SYSCTL_INT(_kern_sched, OID_AUTO, steal_htt, CTLFLAG_RW, &steal_htt, 0, - "Steals work from another hyper-threaded core on idle"); SYSCTL_INT(_kern_sched, OID_AUTO, steal_idle, CTLFLAG_RW, &steal_idle, 0, "Attempts to steal work from other cores before idling"); SYSCTL_INT(_kern_sched, OID_AUTO, steal_thresh, CTLFLAG_RW, &steal_thresh, 0, From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 12:38:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14878106564A; Sat, 6 Oct 2012 12:38:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 487018FC08; Sat, 6 Oct 2012 12:38:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96CcgG9064465; Sat, 6 Oct 2012 12:38:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96CcgNO064463; Sat, 6 Oct 2012 12:38:42 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061238.q96CcgNO064463@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 12:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241247 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 12:38:43 -0000 Author: mav Date: Sat Oct 6 12:38:41 2012 New Revision: 241247 URL: http://svn.freebsd.org/changeset/base/241247 Log: MFC r239153: SCHED_4BSD scheduling quantum mechanism appears to be broken for some time. With switchticks variable being reset each time thread preempted (that is done regularly by interrupt threads) scheduling quantum may never expire. It was not noticed in time because several other factors still regularly trigger context switches. Handle the problem by replacing that mechanism with its equivalent from SCHED_ULE called time slice. It is effectively the same, just measured in context of stathz instead of hz. Some unification is probably not bad. Modified: stable/9/sys/kern/sched_4bsd.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_4bsd.c ============================================================================== --- stable/9/sys/kern/sched_4bsd.c Sat Oct 6 12:25:13 2012 (r241246) +++ stable/9/sys/kern/sched_4bsd.c Sat Oct 6 12:38:41 2012 (r241247) @@ -94,6 +94,7 @@ struct td_sched { fixpt_t ts_pctcpu; /* (j) %cpu during p_swtime. */ int ts_cpticks; /* (j) Ticks of cpu time. */ int ts_slptime; /* (j) Seconds !RUNNING. */ + int ts_slice; /* Remaining part of time slice. */ int ts_flags; struct runq *ts_runq; /* runq the thread is currently on */ #ifdef KTR @@ -117,9 +118,9 @@ struct td_sched { static struct td_sched td_sched0; struct mtx sched_lock; +static int realstathz; /* stathz is sometimes 0 and run off of hz. */ static int sched_tdcnt; /* Total runnable threads in the system. */ -static int sched_quantum; /* Roundrobin scheduling quantum in ticks. */ -#define SCHED_QUANTUM (hz / 10) /* Default sched quantum */ +static int sched_slice = 1; /* Thread run time before rescheduling. */ static void setup_runqs(void); static void schedcpu(void); @@ -145,6 +146,10 @@ SYSINIT(schedcpu, SI_SUB_RUN_SCHEDULER, &sched_kp); SYSINIT(sched_setup, SI_SUB_RUN_QUEUE, SI_ORDER_FIRST, sched_setup, NULL); +static void sched_initticks(void *dummy); +SYSINIT(sched_initticks, SI_SUB_CLOCKS, SI_ORDER_THIRD, sched_initticks, + NULL); + /* * Global run queue. */ @@ -179,31 +184,12 @@ setup_runqs(void) runq_init(&runq); } -static int -sysctl_kern_quantum(SYSCTL_HANDLER_ARGS) -{ - int error, new_val; - - new_val = sched_quantum * tick; - error = sysctl_handle_int(oidp, &new_val, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - if (new_val < tick) - return (EINVAL); - sched_quantum = new_val / tick; - hogticks = 2 * sched_quantum; - return (0); -} - SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "Scheduler"); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "4BSD", 0, "Scheduler name"); - -SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof sched_quantum, sysctl_kern_quantum, "I", - "Roundrobin scheduling quantum in microseconds"); - +SYSCTL_INT(_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, + "Slice size for timeshare threads"); #ifdef SMP /* Enable forwarding of wakeups to all other cpus */ SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); @@ -470,9 +456,8 @@ schedcpu(void) struct thread *td; struct proc *p; struct td_sched *ts; - int awake, realstathz; + int awake; - realstathz = stathz ? stathz : hz; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); @@ -644,14 +629,28 @@ sched_setup(void *dummy) { setup_runqs(); - if (sched_quantum == 0) - sched_quantum = SCHED_QUANTUM; - hogticks = 2 * sched_quantum; + /* + * To avoid divide-by-zero, we set realstathz a dummy value + * in case which sched_clock() called before sched_initticks(). + */ + realstathz = hz; + sched_slice = realstathz / 10; /* ~100ms */ /* Account for thread0. */ sched_load_add(); } +/* + * This routine determines the sched_slice after stathz and hz are setup. + */ +static void +sched_initticks(void *dummy) +{ + + realstathz = stathz ? stathz : hz; + sched_slice = realstathz / 10; /* ~100ms */ +} + /* External interfaces start here */ /* @@ -669,6 +668,7 @@ schedinit(void) proc0.p_sched = NULL; /* XXX */ thread0.td_sched = &td_sched0; thread0.td_lock = &sched_lock; + td_sched0.ts_slice = sched_slice; mtx_init(&sched_lock, "sched lock", NULL, MTX_SPIN | MTX_RECURSE); } @@ -685,9 +685,9 @@ sched_runnable(void) int sched_rr_interval(void) { - if (sched_quantum == 0) - sched_quantum = SCHED_QUANTUM; - return (sched_quantum); + + /* Convert sched_slice from stathz to hz. */ + return (hz / (realstathz / sched_slice)); } /* @@ -724,9 +724,10 @@ sched_clock(struct thread *td) * Force a context switch if the current thread has used up a full * quantum (default quantum is 100ms). */ - if (!TD_IS_IDLETHREAD(td) && - ticks - PCPU_GET(switchticks) >= sched_quantum) + if (!TD_IS_IDLETHREAD(td) && (--ts->ts_slice <= 0)) { + ts->ts_slice = sched_slice; td->td_flags |= TDF_NEEDRESCHED; + } stat = DPCPU_PTR(idlestat); stat->oldidlecalls = stat->idlecalls; @@ -780,6 +781,7 @@ sched_fork_thread(struct thread *td, str ts = childtd->td_sched; bzero(ts, sizeof(*ts)); ts->ts_flags |= (td->td_sched->ts_flags & TSF_AFFINITY); + ts->ts_slice = 1; } void @@ -1076,6 +1078,7 @@ sched_wakeup(struct thread *td) } td->td_slptick = 0; ts->ts_slptime = 0; + ts->ts_slice = sched_slice; sched_add(td, SRQ_BORING); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 12:51:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD680106566C; Sat, 6 Oct 2012 12:51:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B86AF8FC14; Sat, 6 Oct 2012 12:51:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96CpGGa066110; Sat, 6 Oct 2012 12:51:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96CpGX8066107; Sat, 6 Oct 2012 12:51:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061251.q96CpGX8066107@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 12:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241248 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 12:51:16 -0000 Author: mav Date: Sat Oct 6 12:51:16 2012 New Revision: 241248 URL: http://svn.freebsd.org/changeset/base/241248 Log: MFC r239157: Rework r220198 change (by fabient). I believe it solves the problem from the wrong direction. Before it, if preemption and end of time slice happen same time, thread was put to the head of the queue as for only preemption. It could cause single thread to run for indefinitely long time. r220198 handles it by not clearing TDF_NEEDRESCHED in case of preemption. But that causes delayed context switch every time preemption happens, even when not needed. Solve problem by introducing scheduler-specifoc thread flag TDF_SLICEEND, set when thread's time slice is over and it should be put to the tail of queue. Using SW_PREEMPT flag for that purpose as it was before just not enough informative to work correctly. On my tests this by 2-3 times reduces run time deviation (improves fairness) in cases when several threads share one CPU. Modified: stable/9/sys/kern/sched_4bsd.c stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_4bsd.c ============================================================================== --- stable/9/sys/kern/sched_4bsd.c Sat Oct 6 12:38:41 2012 (r241247) +++ stable/9/sys/kern/sched_4bsd.c Sat Oct 6 12:51:16 2012 (r241248) @@ -105,6 +105,7 @@ struct td_sched { /* flags kept in td_flags */ #define TDF_DIDRUN TDF_SCHED0 /* thread actually ran. */ #define TDF_BOUND TDF_SCHED1 /* Bound to one CPU. */ +#define TDF_SLICEEND TDF_SCHED2 /* Thread time slice is over. */ /* flags kept in ts_flags */ #define TSF_AFFINITY 0x0001 /* Has a non-"full" CPU set. */ @@ -726,7 +727,7 @@ sched_clock(struct thread *td) */ if (!TD_IS_IDLETHREAD(td) && (--ts->ts_slice <= 0)) { ts->ts_slice = sched_slice; - td->td_flags |= TDF_NEEDRESCHED; + td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; } stat = DPCPU_PTR(idlestat); @@ -942,6 +943,7 @@ sched_switch(struct thread *td, struct t struct mtx *tmtx; struct td_sched *ts; struct proc *p; + int preempted; tmtx = NULL; ts = td->td_sched; @@ -963,8 +965,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - if (!(flags & SW_PREEMPT)) - td->td_flags &= ~TDF_NEEDRESCHED; + preempted = !(td->td_flags & TDF_SLICEEND); + td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; @@ -982,7 +984,7 @@ sched_switch(struct thread *td, struct t } else { if (TD_IS_RUNNING(td)) { /* Put us back on the run queue. */ - sched_add(td, (flags & SW_PREEMPT) ? + sched_add(td, preempted ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING); } Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Sat Oct 6 12:38:41 2012 (r241247) +++ stable/9/sys/kern/sched_ule.c Sat Oct 6 12:51:16 2012 (r241248) @@ -189,6 +189,9 @@ static struct td_sched td_sched0; #define SCHED_INTERACT_HALF (SCHED_INTERACT_MAX / 2) #define SCHED_INTERACT_THRESH (30) +/* Flags kept in td_flags. */ +#define TDF_SLICEEND TDF_SCHED2 /* Thread time slice is over. */ + /* * tickincr: Converts a stathz tick into a hz domain scaled by * the shift factor. Without the shift the error rate @@ -1841,7 +1844,7 @@ sched_switch(struct thread *td, struct t struct td_sched *ts; struct mtx *mtx; int srqflag; - int cpuid; + int cpuid, preempted; THREAD_LOCK_ASSERT(td, MA_OWNED); KASSERT(newtd == NULL, ("sched_switch: Unsupported newtd argument")); @@ -1854,8 +1857,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - if (!(flags & SW_PREEMPT)) - td->td_flags &= ~TDF_NEEDRESCHED; + preempted = !(td->td_flags & TDF_SLICEEND); + td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; tdq->tdq_switchcnt++; /* @@ -1867,7 +1870,7 @@ sched_switch(struct thread *td, struct t TD_SET_CAN_RUN(td); } else if (TD_IS_RUNNING(td)) { MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); - srqflag = (flags & SW_PREEMPT) ? + srqflag = preempted ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING; #ifdef SMP @@ -2237,7 +2240,7 @@ sched_clock(struct thread *td) * We're out of time, force a requeue at userret(). */ ts->ts_slice = sched_slice; - td->td_flags |= TDF_NEEDRESCHED; + td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; } /* From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 12:58:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42C9E106564A; Sat, 6 Oct 2012 12:58:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A14548FC0A; Sat, 6 Oct 2012 12:58:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Cwvvs067078; Sat, 6 Oct 2012 12:58:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96CwvRh067075; Sat, 6 Oct 2012 12:58:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061258.q96CwvRh067075@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 12:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241249 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 12:58:58 -0000 Author: mav Date: Sat Oct 6 12:58:56 2012 New Revision: 241249 URL: http://svn.freebsd.org/changeset/base/241249 Log: MFC r239185, r239196: Some minor tunings/cleanups inspired by bde@ after previous commits: - remove extra dynamic variable initializations; - restore (4BSD) and implement (ULE) hogticks variable setting; - make sched_rr_interval() more tolerant to options; - restore (4BSD) and implement (ULE) kern.sched.quantum sysctl, a more user-friendly wrapper for sched_slice; - tune some sysctl descriptions; - make some style fixes. Modified: stable/9/sys/kern/sched_4bsd.c stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_4bsd.c ============================================================================== --- stable/9/sys/kern/sched_4bsd.c Sat Oct 6 12:51:16 2012 (r241248) +++ stable/9/sys/kern/sched_4bsd.c Sat Oct 6 12:58:56 2012 (r241249) @@ -119,9 +119,9 @@ struct td_sched { static struct td_sched td_sched0; struct mtx sched_lock; -static int realstathz; /* stathz is sometimes 0 and run off of hz. */ +static int realstathz = 127; /* stathz is sometimes 0 and run off of hz. */ static int sched_tdcnt; /* Total runnable threads in the system. */ -static int sched_slice = 1; /* Thread run time before rescheduling. */ +static int sched_slice = 12; /* Thread run time before rescheduling. */ static void setup_runqs(void); static void schedcpu(void); @@ -185,12 +185,33 @@ setup_runqs(void) runq_init(&runq); } +static int +sysctl_kern_quantum(SYSCTL_HANDLER_ARGS) +{ + int error, new_val, period; + + period = 1000000 / realstathz; + new_val = period * sched_slice; + error = sysctl_handle_int(oidp, &new_val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (new_val <= 0) + return (EINVAL); + sched_slice = imax(1, (new_val + period / 2) / period); + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); + return (0); +} + SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "Scheduler"); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "4BSD", 0, "Scheduler name"); +SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT | CTLFLAG_RW, + NULL, 0, sysctl_kern_quantum, "I", + "Quantum for timeshare threads in microseconds"); SYSCTL_INT(_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, - "Slice size for timeshare threads"); + "Quantum for timeshare threads in stathz ticks"); #ifdef SMP /* Enable forwarding of wakeups to all other cpus */ SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); @@ -628,21 +649,15 @@ resetpriority_thread(struct thread *td) static void sched_setup(void *dummy) { - setup_runqs(); - /* - * To avoid divide-by-zero, we set realstathz a dummy value - * in case which sched_clock() called before sched_initticks(). - */ - realstathz = hz; - sched_slice = realstathz / 10; /* ~100ms */ + setup_runqs(); /* Account for thread0. */ sched_load_add(); } /* - * This routine determines the sched_slice after stathz and hz are setup. + * This routine determines time constants after stathz and hz are setup. */ static void sched_initticks(void *dummy) @@ -650,6 +665,8 @@ sched_initticks(void *dummy) realstathz = stathz ? stathz : hz; sched_slice = realstathz / 10; /* ~100ms */ + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); } /* External interfaces start here */ @@ -688,7 +705,7 @@ sched_rr_interval(void) { /* Convert sched_slice from stathz to hz. */ - return (hz / (realstathz / sched_slice)); + return (imax(1, (sched_slice * hz + realstathz / 2) / realstathz)); } /* @@ -723,9 +740,9 @@ sched_clock(struct thread *td) /* * Force a context switch if the current thread has used up a full - * quantum (default quantum is 100ms). + * time slice (default is 100ms). */ - if (!TD_IS_IDLETHREAD(td) && (--ts->ts_slice <= 0)) { + if (!TD_IS_IDLETHREAD(td) && --ts->ts_slice <= 0) { ts->ts_slice = sched_slice; td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; } Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Sat Oct 6 12:51:16 2012 (r241248) +++ stable/9/sys/kern/sched_ule.c Sat Oct 6 12:58:56 2012 (r241249) @@ -201,9 +201,9 @@ static struct td_sched td_sched0; * preempt_thresh: Priority threshold for preemption and remote IPIs. */ static int sched_interact = SCHED_INTERACT_THRESH; -static int realstathz; -static int tickincr; -static int sched_slice = 1; +static int realstathz = 127; +static int tickincr = 8 << SCHED_TICK_SHIFT;; +static int sched_slice = 12; #ifdef PREEMPTION #ifdef FULL_PREEMPTION static int preempt_thresh = PRI_MAX_IDLE; @@ -1363,13 +1363,6 @@ sched_setup(void *dummy) #else tdq_setup(tdq); #endif - /* - * To avoid divide-by-zero, we set realstathz a dummy value - * in case which sched_clock() called before sched_initticks(). - */ - realstathz = hz; - sched_slice = (realstathz/10); /* ~100ms */ - tickincr = 1 << SCHED_TICK_SHIFT; /* Add thread0's load since it's running. */ TDQ_LOCK(tdq); @@ -1380,7 +1373,7 @@ sched_setup(void *dummy) } /* - * This routine determines the tickincr after stathz and hz are setup. + * This routine determines time constants after stathz and hz are setup. */ /* ARGSUSED */ static void @@ -1389,7 +1382,9 @@ sched_initticks(void *dummy) int incr; realstathz = stathz ? stathz : hz; - sched_slice = (realstathz/10); /* ~100ms */ + sched_slice = realstathz / 10; /* ~100ms */ + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); /* * tickincr is shifted out by 10 to avoid rounding errors due to @@ -1418,7 +1413,7 @@ sched_initticks(void *dummy) affinity = SCHED_AFFINITY_DEFAULT; #endif if (sched_idlespinthresh < 0) - sched_idlespinthresh = max(16, 2 * hz / realstathz); + sched_idlespinthresh = imax(16, 2 * hz / realstathz); } @@ -1606,8 +1601,8 @@ int sched_rr_interval(void) { - /* Convert sched_slice to hz */ - return (hz/(realstathz/sched_slice)); + /* Convert sched_slice from stathz to hz. */ + return (imax(1, (sched_slice * hz + realstathz / 2) / realstathz)); } /* @@ -2231,16 +2226,15 @@ sched_clock(struct thread *td) sched_interact_update(td); sched_priority(td); } + /* - * We used up one time slice. - */ - if (--ts->ts_slice > 0) - return; - /* - * We're out of time, force a requeue at userret(). + * Force a context switch if the current thread has used up a full + * time slice (default is 100ms). */ - ts->ts_slice = sched_slice; - td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; + if (!TD_IS_IDLETHREAD(td) && --ts->ts_slice <= 0) { + ts->ts_slice = sched_slice; + td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; + } } /* @@ -2795,21 +2789,44 @@ sysctl_kern_sched_topology_spec(SYSCTL_H #endif +static int +sysctl_kern_quantum(SYSCTL_HANDLER_ARGS) +{ + int error, new_val, period; + + period = 1000000 / realstathz; + new_val = period * sched_slice; + error = sysctl_handle_int(oidp, &new_val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (new_val <= 0) + return (EINVAL); + sched_slice = imax(1, (new_val + period / 2) / period); + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); + return (0); +} + SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "Scheduler"); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "ULE", 0, "Scheduler name"); +SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT | CTLFLAG_RW, + NULL, 0, sysctl_kern_quantum, "I", + "Quantum for timeshare threads in microseconds"); SYSCTL_INT(_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, - "Slice size for timeshare threads"); + "Quantum for timeshare threads in stathz ticks"); SYSCTL_INT(_kern_sched, OID_AUTO, interact, CTLFLAG_RW, &sched_interact, 0, - "Interactivity score threshold"); -SYSCTL_INT(_kern_sched, OID_AUTO, preempt_thresh, CTLFLAG_RW, &preempt_thresh, - 0,"Min priority for preemption, lower priorities have greater precedence"); -SYSCTL_INT(_kern_sched, OID_AUTO, static_boost, CTLFLAG_RW, &static_boost, - 0,"Controls whether static kernel priorities are assigned to sleeping threads."); -SYSCTL_INT(_kern_sched, OID_AUTO, idlespins, CTLFLAG_RW, &sched_idlespins, - 0,"Number of times idle will spin waiting for new work."); -SYSCTL_INT(_kern_sched, OID_AUTO, idlespinthresh, CTLFLAG_RW, &sched_idlespinthresh, - 0,"Threshold before we will permit idle spinning."); + "Interactivity score threshold"); +SYSCTL_INT(_kern_sched, OID_AUTO, preempt_thresh, CTLFLAG_RW, + &preempt_thresh, 0, + "Maximal (lowest) priority for preemption"); +SYSCTL_INT(_kern_sched, OID_AUTO, static_boost, CTLFLAG_RW, &static_boost, 0, + "Assign static kernel priorities to sleeping threads"); +SYSCTL_INT(_kern_sched, OID_AUTO, idlespins, CTLFLAG_RW, &sched_idlespins, 0, + "Number of times idle thread will spin waiting for new work"); +SYSCTL_INT(_kern_sched, OID_AUTO, idlespinthresh, CTLFLAG_RW, + &sched_idlespinthresh, 0, + "Threshold before we will permit idle thread spinning"); #ifdef SMP SYSCTL_INT(_kern_sched, OID_AUTO, affinity, CTLFLAG_RW, &affinity, 0, "Number of hz ticks to keep thread affinity for"); @@ -2817,17 +2834,14 @@ SYSCTL_INT(_kern_sched, OID_AUTO, balanc "Enables the long-term load balancer"); SYSCTL_INT(_kern_sched, OID_AUTO, balance_interval, CTLFLAG_RW, &balance_interval, 0, - "Average frequency in stathz ticks to run the long-term balancer"); + "Average period in stathz ticks to run the long-term balancer"); SYSCTL_INT(_kern_sched, OID_AUTO, steal_idle, CTLFLAG_RW, &steal_idle, 0, "Attempts to steal work from other cores before idling"); SYSCTL_INT(_kern_sched, OID_AUTO, steal_thresh, CTLFLAG_RW, &steal_thresh, 0, - "Minimum load on remote cpu before we'll steal"); - -/* Retrieve SMP topology */ + "Minimum load on remote CPU before we'll steal"); SYSCTL_PROC(_kern_sched, OID_AUTO, topology_spec, CTLTYPE_STRING | - CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", + CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", "XML dump of detected CPU topology"); - #endif /* ps compat. All cpu percentages from ULE are weighted. */ From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 13:01:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CCDA106566B; Sat, 6 Oct 2012 13:01:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 868E78FC1A; Sat, 6 Oct 2012 13:01:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96D18Tv067460; Sat, 6 Oct 2012 13:01:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96D18DE067458; Sat, 6 Oct 2012 13:01:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061301.q96D18DE067458@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 13:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241250 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 13:01:08 -0000 Author: mav Date: Sat Oct 6 13:01:08 2012 New Revision: 241250 URL: http://svn.freebsd.org/changeset/base/241250 Log: MFC r239194: Allow idle threads to steal second threads from other cores on systems with 8 or more cores to improve utilization. None of my tests on 2xXeon (2x6x2) system shown any slowdown from mentioned "excess thrashing". Same time in pbzip2 test with number of threads more then number of CPUs I see up to 10% speedup with SMT disabled and up 5% with SMT enabled. Thinking about trashing I was trying to limit that stealing within same last level cache, but got only worse results. Present code any way prefers to steal threads from topologically closer cores. Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Sat Oct 6 12:58:56 2012 (r241249) +++ stable/9/sys/kern/sched_ule.c Sat Oct 6 13:01:08 2012 (r241250) @@ -1404,12 +1404,6 @@ sched_initticks(void *dummy) * what realstathz is. */ balance_interval = realstathz; - /* - * Set steal thresh to roughly log2(mp_ncpu) but no greater than 4. - * This prevents excess thrashing on large machines and excess idle - * on smaller machines. - */ - steal_thresh = min(fls(mp_ncpus) - 1, 3); affinity = SCHED_AFFINITY_DEFAULT; #endif if (sched_idlespinthresh < 0) From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 13:38:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77E3F106566C; Sat, 6 Oct 2012 13:38:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 487038FC18; Sat, 6 Oct 2012 13:38:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96DcoCk072802; Sat, 6 Oct 2012 13:38:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96DcoP0072800; Sat, 6 Oct 2012 13:38:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061338.q96DcoP0072800@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 13:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241251 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 13:38:50 -0000 Author: mav Date: Sat Oct 6 13:38:49 2012 New Revision: 241251 URL: http://svn.freebsd.org/changeset/base/241251 Log: MFC r212455: Merge some SCHED_ULE features to SCHED_4BSD: - Teach SCHED_4BSD to inform cpu_idle() about high sleep/wakeup rate to choose optimized handler. In case of x86 it is MONITOR/MWAIT. Also it will be needed to bypass forthcoming idle tick skipping logic to not consume resources on events rescheduling when it won't give any benefits. - Teach SCHED_4BSD to wake up idle CPUs without using IPI. In case of x86, when MONITOR/MWAIT is active, it require just single memory write. This doubles performance on some heavily switching test loads. Modified: stable/8/sys/kern/sched_4bsd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Sat Oct 6 13:01:08 2012 (r241250) +++ stable/8/sys/kern/sched_4bsd.c Sat Oct 6 13:38:49 2012 (r241251) @@ -158,6 +158,12 @@ static struct runq runq_pcpu[MAXCPU]; long runq_length[MAXCPU]; #endif +struct pcpuidlestat { + u_int idlecalls; + u_int oldidlecalls; +}; +static DPCPU_DEFINE(struct pcpuidlestat, idlestat); + static void setup_runqs(void) { @@ -709,6 +715,7 @@ sched_rr_interval(void) void sched_clock(struct thread *td) { + struct pcpuidlestat *stat; struct td_sched *ts; THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -728,6 +735,10 @@ sched_clock(struct thread *td) if (!TD_IS_IDLETHREAD(td) && ticks - PCPU_GET(switchticks) >= sched_quantum) td->td_flags |= TDF_NEEDRESCHED; + + stat = DPCPU_PTR(idlestat); + stat->oldidlecalls = stat->idlecalls; + stat->idlecalls = 0; } /* @@ -1168,7 +1179,15 @@ forward_wakeup(int cpunum) } if (map) { forward_wakeups_delivered++; - ipi_selected(map, IPI_AST); + SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { + id = pc->pc_cpumask; + if ((map & id) == 0) + continue; + if (cpu_idle_wakeup(pc->pc_cpuid)) + map &= ~id; + } + if (map) + ipi_selected(map, IPI_AST); return (1); } if (cpunum == NOCPU) @@ -1185,7 +1204,8 @@ kick_other_cpu(int pri, int cpuid) pcpu = pcpu_find(cpuid); if (idle_cpus_mask & pcpu->pc_cpumask) { forward_wakeups_delivered++; - ipi_cpu(cpuid, IPI_AST); + if (!cpu_idle_wakeup(cpuid)) + ipi_cpu(cpuid, IPI_AST); return; } @@ -1577,12 +1597,16 @@ sched_tick(void) void sched_idletd(void *dummy) { + struct pcpuidlestat *stat; + stat = DPCPU_PTR(idlestat); for (;;) { mtx_assert(&Giant, MA_NOTOWNED); - while (sched_runnable() == 0) - cpu_idle(0); + while (sched_runnable() == 0) { + cpu_idle(stat->idlecalls + stat->oldidlecalls > 64); + stat->idlecalls++; + } mtx_lock_spin(&sched_lock); mi_switch(SW_VOL | SWT_IDLE, NULL); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 13:42:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E743106567A; Sat, 6 Oct 2012 13:42:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D5438FC16; Sat, 6 Oct 2012 13:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96DgMf2073391; Sat, 6 Oct 2012 13:42:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96DgMf1073388; Sat, 6 Oct 2012 13:42:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061342.q96DgMf1073388@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 13:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241252 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 13:42:22 -0000 Author: mav Date: Sat Oct 6 13:42:21 2012 New Revision: 241252 URL: http://svn.freebsd.org/changeset/base/241252 Log: MFC r239153: SCHED_4BSD scheduling quantum mechanism appears to be broken for some time. With switchticks variable being reset each time thread preempted (that is done regularly by interrupt threads) scheduling quantum may never expire. It was not noticed in time because several other factors still regularly trigger context switches. Handle the problem by replacing that mechanism with its equivalent from SCHED_ULE called time slice. It is effectively the same, just measured in context of stathz instead of hz. Some unification is probably not bad. Modified: stable/8/sys/kern/sched_4bsd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Sat Oct 6 13:38:49 2012 (r241251) +++ stable/8/sys/kern/sched_4bsd.c Sat Oct 6 13:42:21 2012 (r241252) @@ -94,6 +94,7 @@ struct td_sched { fixpt_t ts_pctcpu; /* (j) %cpu during p_swtime. */ int ts_cpticks; /* (j) Ticks of cpu time. */ int ts_slptime; /* (j) Seconds !RUNNING. */ + int ts_slice; /* Remaining part of time slice. */ int ts_flags; struct runq *ts_runq; /* runq the thread is currently on */ #ifdef KTR @@ -117,9 +118,9 @@ struct td_sched { static struct td_sched td_sched0; struct mtx sched_lock; +static int realstathz; /* stathz is sometimes 0 and run off of hz. */ static int sched_tdcnt; /* Total runnable threads in the system. */ -static int sched_quantum; /* Roundrobin scheduling quantum in ticks. */ -#define SCHED_QUANTUM (hz / 10) /* Default sched quantum */ +static int sched_slice = 1; /* Thread run time before rescheduling. */ static void setup_runqs(void); static void schedcpu(void); @@ -145,6 +146,10 @@ SYSINIT(schedcpu, SI_SUB_RUN_SCHEDULER, &sched_kp); SYSINIT(sched_setup, SI_SUB_RUN_QUEUE, SI_ORDER_FIRST, sched_setup, NULL); +static void sched_initticks(void *dummy); +SYSINIT(sched_initticks, SI_SUB_CLOCKS, SI_ORDER_THIRD, sched_initticks, + NULL); + /* * Global run queue. */ @@ -177,31 +182,12 @@ setup_runqs(void) runq_init(&runq); } -static int -sysctl_kern_quantum(SYSCTL_HANDLER_ARGS) -{ - int error, new_val; - - new_val = sched_quantum * tick; - error = sysctl_handle_int(oidp, &new_val, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - if (new_val < tick) - return (EINVAL); - sched_quantum = new_val / tick; - hogticks = 2 * sched_quantum; - return (0); -} - SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "Scheduler"); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "4BSD", 0, "Scheduler name"); - -SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof sched_quantum, sysctl_kern_quantum, "I", - "Roundrobin scheduling quantum in microseconds"); - +SYSCTL_INT(_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, + "Slice size for timeshare threads"); #ifdef SMP /* Enable forwarding of wakeups to all other cpus */ SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); @@ -478,9 +464,8 @@ schedcpu(void) struct thread *td; struct proc *p; struct td_sched *ts; - int awake, realstathz; + int awake; - realstathz = stathz ? stathz : hz; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); @@ -652,14 +637,28 @@ sched_setup(void *dummy) { setup_runqs(); - if (sched_quantum == 0) - sched_quantum = SCHED_QUANTUM; - hogticks = 2 * sched_quantum; + /* + * To avoid divide-by-zero, we set realstathz a dummy value + * in case which sched_clock() called before sched_initticks(). + */ + realstathz = hz; + sched_slice = realstathz / 10; /* ~100ms */ /* Account for thread0. */ sched_load_add(); } +/* + * This routine determines the sched_slice after stathz and hz are setup. + */ +static void +sched_initticks(void *dummy) +{ + + realstathz = stathz ? stathz : hz; + sched_slice = realstathz / 10; /* ~100ms */ +} + /* External interfaces start here */ /* @@ -677,6 +676,7 @@ schedinit(void) proc0.p_sched = NULL; /* XXX */ thread0.td_sched = &td_sched0; thread0.td_lock = &sched_lock; + td_sched0.ts_slice = sched_slice; mtx_init(&sched_lock, "sched lock", NULL, MTX_SPIN | MTX_RECURSE); } @@ -693,9 +693,9 @@ sched_runnable(void) int sched_rr_interval(void) { - if (sched_quantum == 0) - sched_quantum = SCHED_QUANTUM; - return (sched_quantum); + + /* Convert sched_slice from stathz to hz. */ + return (hz / (realstathz / sched_slice)); } /* @@ -732,9 +732,10 @@ sched_clock(struct thread *td) * Force a context switch if the current thread has used up a full * quantum (default quantum is 100ms). */ - if (!TD_IS_IDLETHREAD(td) && - ticks - PCPU_GET(switchticks) >= sched_quantum) + if (!TD_IS_IDLETHREAD(td) && (--ts->ts_slice <= 0)) { + ts->ts_slice = sched_slice; td->td_flags |= TDF_NEEDRESCHED; + } stat = DPCPU_PTR(idlestat); stat->oldidlecalls = stat->idlecalls; @@ -788,6 +789,7 @@ sched_fork_thread(struct thread *td, str ts = childtd->td_sched; bzero(ts, sizeof(*ts)); ts->ts_flags |= (td->td_sched->ts_flags & TSF_AFFINITY); + ts->ts_slice = 1; } void @@ -1099,6 +1101,7 @@ sched_wakeup(struct thread *td) } td->td_slptick = 0; ts->ts_slptime = 0; + ts->ts_slice = sched_slice; sched_add(td, SRQ_BORING); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 13:43:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52ADB106566C; Sat, 6 Oct 2012 13:43:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EDAF8FC14; Sat, 6 Oct 2012 13:43:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96DhvKD073728; Sat, 6 Oct 2012 13:43:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Dhu8m073724; Sat, 6 Oct 2012 13:43:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061343.q96Dhu8m073724@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 13:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241253 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 13:43:57 -0000 Author: mav Date: Sat Oct 6 13:43:56 2012 New Revision: 241253 URL: http://svn.freebsd.org/changeset/base/241253 Log: MFC r239157: Rework r220198 change (by fabient). I believe it solves the problem from the wrong direction. Before it, if preemption and end of time slice happen same time, thread was put to the head of the queue as for only preemption. It could cause single thread to run for indefinitely long time. r220198 handles it by not clearing TDF_NEEDRESCHED in case of preemption. But that causes delayed context switch every time preemption happens, even when not needed. Solve problem by introducing scheduler-specifoc thread flag TDF_SLICEEND, set when thread's time slice is over and it should be put to the tail of queue. Using SW_PREEMPT flag for that purpose as it was before just not enough informative to work correctly. On my tests this by 2-3 times reduces run time deviation (improves fairness) in cases when several threads share one CPU. Modified: stable/8/sys/kern/sched_4bsd.c stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Sat Oct 6 13:42:21 2012 (r241252) +++ stable/8/sys/kern/sched_4bsd.c Sat Oct 6 13:43:56 2012 (r241253) @@ -105,6 +105,7 @@ struct td_sched { /* flags kept in td_flags */ #define TDF_DIDRUN TDF_SCHED0 /* thread actually ran. */ #define TDF_BOUND TDF_SCHED1 /* Bound to one CPU. */ +#define TDF_SLICEEND TDF_SCHED2 /* Thread time slice is over. */ /* flags kept in ts_flags */ #define TSF_AFFINITY 0x0001 /* Has a non-"full" CPU set. */ @@ -734,7 +735,7 @@ sched_clock(struct thread *td) */ if (!TD_IS_IDLETHREAD(td) && (--ts->ts_slice <= 0)) { ts->ts_slice = sched_slice; - td->td_flags |= TDF_NEEDRESCHED; + td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; } stat = DPCPU_PTR(idlestat); @@ -965,6 +966,7 @@ sched_switch(struct thread *td, struct t struct mtx *tmtx; struct td_sched *ts; struct proc *p; + int preempted; tmtx = NULL; ts = td->td_sched; @@ -986,8 +988,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - if (!(flags & SW_PREEMPT)) - td->td_flags &= ~TDF_NEEDRESCHED; + preempted = !(td->td_flags & TDF_SLICEEND); + td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; @@ -1005,7 +1007,7 @@ sched_switch(struct thread *td, struct t } else { if (TD_IS_RUNNING(td)) { /* Put us back on the run queue. */ - sched_add(td, (flags & SW_PREEMPT) ? + sched_add(td, preempted ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING); } Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Sat Oct 6 13:42:21 2012 (r241252) +++ stable/8/sys/kern/sched_ule.c Sat Oct 6 13:43:56 2012 (r241253) @@ -187,6 +187,9 @@ static struct td_sched td_sched0; #define SCHED_INTERACT_HALF (SCHED_INTERACT_MAX / 2) #define SCHED_INTERACT_THRESH (30) +/* Flags kept in td_flags. */ +#define TDF_SLICEEND TDF_SCHED2 /* Thread time slice is over. */ + /* * tickincr: Converts a stathz tick into a hz domain scaled by * the shift factor. Without the shift the error rate @@ -1850,7 +1853,7 @@ sched_switch(struct thread *td, struct t struct td_sched *ts; struct mtx *mtx; int srqflag; - int cpuid; + int cpuid, preempted; THREAD_LOCK_ASSERT(td, MA_OWNED); KASSERT(newtd == NULL, ("sched_switch: Unsupported newtd argument")); @@ -1862,8 +1865,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - if (!(flags & SW_PREEMPT)) - td->td_flags &= ~TDF_NEEDRESCHED; + preempted = !(td->td_flags & TDF_SLICEEND); + td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; tdq->tdq_switchcnt++; /* @@ -1875,7 +1878,7 @@ sched_switch(struct thread *td, struct t TD_SET_CAN_RUN(td); } else if (TD_IS_RUNNING(td)) { MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); - srqflag = (flags & SW_PREEMPT) ? + srqflag = preempted ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING; #ifdef SMP @@ -2244,7 +2247,7 @@ sched_clock(struct thread *td) * We're out of time, force a requeue at userret(). */ ts->ts_slice = sched_slice; - td->td_flags |= TDF_NEEDRESCHED; + td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; } /* From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 14:04:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A3FD106566B; Sat, 6 Oct 2012 14:04:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7A238FC12; Sat, 6 Oct 2012 14:04:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96E4amF076731; Sat, 6 Oct 2012 14:04:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96E4aFA076728; Sat, 6 Oct 2012 14:04:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210061404.q96E4aFA076728@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Oct 2012 14:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241254 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 14:04:37 -0000 Author: mav Date: Sat Oct 6 14:04:36 2012 New Revision: 241254 URL: http://svn.freebsd.org/changeset/base/241254 Log: MFC r239185, r239196: Some minor tunings/cleanups inspired by bde@ after previous commits: - remove extra dynamic variable initializations; - restore (4BSD) and implement (ULE) hogticks variable setting; - make sched_rr_interval() more tolerant to options; - restore (4BSD) and implement (ULE) kern.sched.quantum sysctl, a more user-friendly wrapper for sched_slice; - tune some sysctl descriptions; - make some style fixes. Modified: stable/8/sys/kern/sched_4bsd.c stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Sat Oct 6 13:43:56 2012 (r241253) +++ stable/8/sys/kern/sched_4bsd.c Sat Oct 6 14:04:36 2012 (r241254) @@ -119,9 +119,9 @@ struct td_sched { static struct td_sched td_sched0; struct mtx sched_lock; -static int realstathz; /* stathz is sometimes 0 and run off of hz. */ +static int realstathz = 127; /* stathz is sometimes 0 and run off of hz. */ static int sched_tdcnt; /* Total runnable threads in the system. */ -static int sched_slice = 1; /* Thread run time before rescheduling. */ +static int sched_slice = 12; /* Thread run time before rescheduling. */ static void setup_runqs(void); static void schedcpu(void); @@ -183,12 +183,33 @@ setup_runqs(void) runq_init(&runq); } +static int +sysctl_kern_quantum(SYSCTL_HANDLER_ARGS) +{ + int error, new_val, period; + + period = 1000000 / realstathz; + new_val = period * sched_slice; + error = sysctl_handle_int(oidp, &new_val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (new_val <= 0) + return (EINVAL); + sched_slice = imax(1, (new_val + period / 2) / period); + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); + return (0); +} + SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "Scheduler"); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "4BSD", 0, "Scheduler name"); +SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT | CTLFLAG_RW, + NULL, 0, sysctl_kern_quantum, "I", + "Quantum for timeshare threads in microseconds"); SYSCTL_INT(_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, - "Slice size for timeshare threads"); + "Quantum for timeshare threads in stathz ticks"); #ifdef SMP /* Enable forwarding of wakeups to all other cpus */ SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); @@ -636,21 +657,15 @@ resetpriority_thread(struct thread *td) static void sched_setup(void *dummy) { - setup_runqs(); - /* - * To avoid divide-by-zero, we set realstathz a dummy value - * in case which sched_clock() called before sched_initticks(). - */ - realstathz = hz; - sched_slice = realstathz / 10; /* ~100ms */ + setup_runqs(); /* Account for thread0. */ sched_load_add(); } /* - * This routine determines the sched_slice after stathz and hz are setup. + * This routine determines time constants after stathz and hz are setup. */ static void sched_initticks(void *dummy) @@ -658,6 +673,8 @@ sched_initticks(void *dummy) realstathz = stathz ? stathz : hz; sched_slice = realstathz / 10; /* ~100ms */ + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); } /* External interfaces start here */ @@ -696,7 +713,7 @@ sched_rr_interval(void) { /* Convert sched_slice from stathz to hz. */ - return (hz / (realstathz / sched_slice)); + return (imax(1, (sched_slice * hz + realstathz / 2) / realstathz)); } /* @@ -731,9 +748,9 @@ sched_clock(struct thread *td) /* * Force a context switch if the current thread has used up a full - * quantum (default quantum is 100ms). + * time slice (default is 100ms). */ - if (!TD_IS_IDLETHREAD(td) && (--ts->ts_slice <= 0)) { + if (!TD_IS_IDLETHREAD(td) && --ts->ts_slice <= 0) { ts->ts_slice = sched_slice; td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; } Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Sat Oct 6 13:43:56 2012 (r241253) +++ stable/8/sys/kern/sched_ule.c Sat Oct 6 14:04:36 2012 (r241254) @@ -199,9 +199,9 @@ static struct td_sched td_sched0; * preempt_thresh: Priority threshold for preemption and remote IPIs. */ static int sched_interact = SCHED_INTERACT_THRESH; -static int realstathz; -static int tickincr; -static int sched_slice = 1; +static int realstathz = 127; +static int tickincr = 8 << SCHED_TICK_SHIFT;; +static int sched_slice = 12; #ifdef PREEMPTION #ifdef FULL_PREEMPTION static int preempt_thresh = PRI_MAX_IDLE; @@ -1356,13 +1356,6 @@ sched_setup(void *dummy) #else tdq_setup(tdq); #endif - /* - * To avoid divide-by-zero, we set realstathz a dummy value - * in case which sched_clock() called before sched_initticks(). - */ - realstathz = hz; - sched_slice = (realstathz/10); /* ~100ms */ - tickincr = 1 << SCHED_TICK_SHIFT; /* Add thread0's load since it's running. */ TDQ_LOCK(tdq); @@ -1373,7 +1366,7 @@ sched_setup(void *dummy) } /* - * This routine determines the tickincr after stathz and hz are setup. + * This routine determines time constants after stathz and hz are setup. */ /* ARGSUSED */ static void @@ -1382,7 +1375,9 @@ sched_initticks(void *dummy) int incr; realstathz = stathz ? stathz : hz; - sched_slice = (realstathz/10); /* ~100ms */ + sched_slice = realstathz / 10; /* ~100ms */ + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); /* * tickincr is shifted out by 10 to avoid rounding errors due to @@ -1597,8 +1592,8 @@ int sched_rr_interval(void) { - /* Convert sched_slice to hz */ - return (hz/(realstathz/sched_slice)); + /* Convert sched_slice from stathz to hz. */ + return (imax(1, (sched_slice * hz + realstathz / 2) / realstathz)); } /* @@ -2238,16 +2233,15 @@ sched_clock(struct thread *td) sched_interact_update(td); sched_priority(td); } + /* - * We used up one time slice. - */ - if (--ts->ts_slice > 0) - return; - /* - * We're out of time, force a requeue at userret(). + * Force a context switch if the current thread has used up a full + * time slice (default is 100ms). */ - ts->ts_slice = sched_slice; - td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; + if (!TD_IS_IDLETHREAD(td) && --ts->ts_slice <= 0) { + ts->ts_slice = sched_slice; + td->td_flags |= TDF_NEEDRESCHED | TDF_SLICEEND; + } } /* @@ -2814,21 +2808,44 @@ sysctl_kern_sched_topology_spec(SYSCTL_H } #endif +static int +sysctl_kern_quantum(SYSCTL_HANDLER_ARGS) +{ + int error, new_val, period; + + period = 1000000 / realstathz; + new_val = period * sched_slice; + error = sysctl_handle_int(oidp, &new_val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (new_val <= 0) + return (EINVAL); + sched_slice = imax(1, (new_val + period / 2) / period); + hogticks = imax(1, (2 * hz * sched_slice + realstathz / 2) / + realstathz); + return (0); +} + SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "Scheduler"); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "ULE", 0, "Scheduler name"); +SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT | CTLFLAG_RW, + NULL, 0, sysctl_kern_quantum, "I", + "Quantum for timeshare threads in microseconds"); SYSCTL_INT(_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, - "Slice size for timeshare threads"); + "Quantum for timeshare threads in stathz ticks"); SYSCTL_INT(_kern_sched, OID_AUTO, interact, CTLFLAG_RW, &sched_interact, 0, - "Interactivity score threshold"); -SYSCTL_INT(_kern_sched, OID_AUTO, preempt_thresh, CTLFLAG_RW, &preempt_thresh, - 0,"Min priority for preemption, lower priorities have greater precedence"); -SYSCTL_INT(_kern_sched, OID_AUTO, static_boost, CTLFLAG_RW, &static_boost, - 0,"Controls whether static kernel priorities are assigned to sleeping threads."); -SYSCTL_INT(_kern_sched, OID_AUTO, idlespins, CTLFLAG_RW, &sched_idlespins, - 0,"Number of times idle will spin waiting for new work."); -SYSCTL_INT(_kern_sched, OID_AUTO, idlespinthresh, CTLFLAG_RW, &sched_idlespinthresh, - 0,"Threshold before we will permit idle spinning."); + "Interactivity score threshold"); +SYSCTL_INT(_kern_sched, OID_AUTO, preempt_thresh, CTLFLAG_RW, + &preempt_thresh, 0, + "Maximal (lowest) priority for preemption"); +SYSCTL_INT(_kern_sched, OID_AUTO, static_boost, CTLFLAG_RW, &static_boost, 0, + "Assign static kernel priorities to sleeping threads"); +SYSCTL_INT(_kern_sched, OID_AUTO, idlespins, CTLFLAG_RW, &sched_idlespins, 0, + "Number of times idle thread will spin waiting for new work"); +SYSCTL_INT(_kern_sched, OID_AUTO, idlespinthresh, CTLFLAG_RW, + &sched_idlespinthresh, 0, + "Threshold before we will permit idle thread spinning"); #ifdef SMP SYSCTL_INT(_kern_sched, OID_AUTO, affinity, CTLFLAG_RW, &affinity, 0, "Number of hz ticks to keep thread affinity for"); @@ -2836,15 +2853,13 @@ SYSCTL_INT(_kern_sched, OID_AUTO, balanc "Enables the long-term load balancer"); SYSCTL_INT(_kern_sched, OID_AUTO, balance_interval, CTLFLAG_RW, &balance_interval, 0, - "Average frequency in stathz ticks to run the long-term balancer"); + "Average period in stathz ticks to run the long-term balancer"); SYSCTL_INT(_kern_sched, OID_AUTO, steal_idle, CTLFLAG_RW, &steal_idle, 0, "Attempts to steal work from other cores before idling"); SYSCTL_INT(_kern_sched, OID_AUTO, steal_thresh, CTLFLAG_RW, &steal_thresh, 0, - "Minimum load on remote cpu before we'll steal"); - -/* Retrieve SMP topology */ + "Minimum load on remote CPU before we'll steal"); SYSCTL_PROC(_kern_sched, OID_AUTO, topology_spec, CTLTYPE_STRING | - CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", + CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", "XML dump of detected CPU topology"); #endif From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 17:54:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5308106564A; Sat, 6 Oct 2012 17:54:42 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0C008FC16; Sat, 6 Oct 2012 17:54:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96HsgXi009273; Sat, 6 Oct 2012 17:54:42 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Hsg4n009271; Sat, 6 Oct 2012 17:54:42 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210061754.q96Hsg4n009271@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Oct 2012 17:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241255 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 17:54:43 -0000 Author: kientzle Date: Sat Oct 6 17:54:42 2012 New Revision: 241255 URL: http://svn.freebsd.org/changeset/base/241255 Log: Fix "make install" Also make arm the same as other platforms: Install man pages for all CPUs in the family. Modified: head/lib/libpmc/Makefile Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Sat Oct 6 14:04:36 2012 (r241254) +++ head/lib/libpmc/Makefile Sat Oct 6 17:54:42 2012 (r241255) @@ -42,7 +42,7 @@ MAN+= pmc.sandybridgeuc.3 MAN+= pmc.westmere.3 MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 -.elif ${MACHINE_CPUARCH} == "arm" && ${CPUTYPE} == "xscale" +.elif ${MACHINE_CPUARCH} == "arm" MAN+= pmc.xscale.3 .elif ${MACHINE_CPUARCH} == "mips" MAN+= pmc.mips24k.3 From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:42:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A13F0106566B; Sat, 6 Oct 2012 18:42:03 +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 8AB328FC12; Sat, 6 Oct 2012 18:42:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Ig3eY017321; Sat, 6 Oct 2012 18:42:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Ig3V4017319; Sat, 6 Oct 2012 18:42:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061842.q96Ig3V4017319@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241256 - stable/9/sys/boot/i386/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:42:03 -0000 Author: avg Date: Sat Oct 6 18:42:02 2012 New Revision: 241256 URL: http://svn.freebsd.org/changeset/base/241256 Log: MFC r240341,240637: loader/i386: replace ugly inb/outb re-implementations with cpufunc.h Modified: stable/9/sys/boot/i386/loader/main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/i386/loader/main.c ============================================================================== --- stable/9/sys/boot/i386/loader/main.c Sat Oct 6 17:54:42 2012 (r241255) +++ stable/9/sys/boot/i386/loader/main.c Sat Oct 6 18:42:02 2012 (r241256) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -321,34 +322,19 @@ command_heap(int argc, char *argv[]) return(CMD_OK); } -/* ISA bus access functions for PnP, derived from */ -static int +/* ISA bus access functions for PnP. */ +static int isa_inb(int port) { - u_char data; - - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && - ((port) < 0x10000)) { - __asm __volatile("inb %1,%0" : "=a" (data) : "id" ((u_short)(port))); - } else { - __asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port)); - } - return(data); + + return (inb(port)); } static void isa_outb(int port, int value) { - u_char al = value; - - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && - ((port) < 0x10000)) { - __asm __volatile("outb %0,%1" : : "a" (al), "id" ((u_short)(port))); - } else { - __asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port)); - } + + outb(port, value); } #ifdef LOADER_ZFS_SUPPORT From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:42:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3391C1065713; Sat, 6 Oct 2012 18:42:40 +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 1C3F38FC18; Sat, 6 Oct 2012 18:42:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IgdZG017437; Sat, 6 Oct 2012 18:42:39 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Igdcj017435; Sat, 6 Oct 2012 18:42:39 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061842.q96Igdcj017435@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241257 - stable/8/sys/boot/i386/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:42:40 -0000 Author: avg Date: Sat Oct 6 18:42:39 2012 New Revision: 241257 URL: http://svn.freebsd.org/changeset/base/241257 Log: MFC r240341,240637: loader/i386: replace ugly inb/outb re-implementations with cpufunc.h Modified: stable/8/sys/boot/i386/loader/main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/i386/loader/main.c ============================================================================== --- stable/8/sys/boot/i386/loader/main.c Sat Oct 6 18:42:02 2012 (r241256) +++ stable/8/sys/boot/i386/loader/main.c Sat Oct 6 18:42:39 2012 (r241257) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -321,34 +322,19 @@ command_heap(int argc, char *argv[]) return(CMD_OK); } -/* ISA bus access functions for PnP, derived from */ -static int +/* ISA bus access functions for PnP. */ +static int isa_inb(int port) { - u_char data; - - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && - ((port) < 0x10000)) { - __asm __volatile("inb %1,%0" : "=a" (data) : "id" ((u_short)(port))); - } else { - __asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port)); - } - return(data); + + return (inb(port)); } static void isa_outb(int port, int value) { - u_char al = value; - - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && - ((port) < 0x10000)) { - __asm __volatile("outb %0,%1" : : "a" (al), "id" ((u_short)(port))); - } else { - __asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port)); - } + + outb(port, value); } #ifdef LOADER_ZFS_SUPPORT From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:45:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 392E81065670; Sat, 6 Oct 2012 18:45:14 +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 243018FC1A; Sat, 6 Oct 2012 18:45:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IjDXX017856; Sat, 6 Oct 2012 18:45:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IjDpO017854; Sat, 6 Oct 2012 18:45:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061845.q96IjDpO017854@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241258 - stable/9/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:45:14 -0000 Author: avg Date: Sat Oct 6 18:45:13 2012 New Revision: 241258 URL: http://svn.freebsd.org/changeset/base/241258 Log: MFC r240348: zfs boot: print only an attribute name in fzap_list Modified: stable/9/sys/boot/zfs/zfsimpl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/9/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:42:39 2012 (r241257) +++ stable/9/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:45:13 2012 (r241258) @@ -1418,7 +1418,8 @@ fzap_list(const spa_t *spa, const dnode_ */ value = fzap_leaf_value(&zl, zc); - printf("%s 0x%jx\n", name, (uintmax_t)value); + //printf("%s 0x%jx\n", name, (uintmax_t)value); + printf("%s\n", name); } } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:45:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E306106564A; Sat, 6 Oct 2012 18:45:19 +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 092A58FC1C; Sat, 6 Oct 2012 18:45:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IjIch017901; Sat, 6 Oct 2012 18:45:18 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IjIVm017899; Sat, 6 Oct 2012 18:45:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061845.q96IjIVm017899@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241259 - stable/8/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:45:19 -0000 Author: avg Date: Sat Oct 6 18:45:18 2012 New Revision: 241259 URL: http://svn.freebsd.org/changeset/base/241259 Log: MFC r240348: zfs boot: print only an attribute name in fzap_list Modified: stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:45:13 2012 (r241258) +++ stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:45:18 2012 (r241259) @@ -1418,7 +1418,8 @@ fzap_list(const spa_t *spa, const dnode_ */ value = fzap_leaf_value(&zl, zc); - printf("%s 0x%jx\n", name, (uintmax_t)value); + //printf("%s 0x%jx\n", name, (uintmax_t)value); + printf("%s\n", name); } } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:47:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EEA2B106566B; Sat, 6 Oct 2012 18:47:15 +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 D8DD58FC18; Sat, 6 Oct 2012 18:47:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IlFKj018306; Sat, 6 Oct 2012 18:47:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IlFOp018304; Sat, 6 Oct 2012 18:47:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061847.q96IlFOp018304@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241260 - stable/9/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:47:16 -0000 Author: avg Date: Sat Oct 6 18:47:15 2012 New Revision: 241260 URL: http://svn.freebsd.org/changeset/base/241260 Log: MFC r240342: boot: file_loadraw should strdup name argument Modified: stable/9/sys/boot/common/module.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/module.c ============================================================================== --- stable/9/sys/boot/common/module.c Sat Oct 6 18:45:18 2012 (r241259) +++ stable/9/sys/boot/common/module.c Sat Oct 6 18:47:15 2012 (r241260) @@ -396,7 +396,7 @@ file_loadraw(char *type, char *name) /* Looks OK so far; create & populate control structure */ fp = file_alloc(); - fp->f_name = name; + fp->f_name = strdup(name); fp->f_type = strdup(type); fp->f_args = NULL; fp->f_metadata = NULL; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:47:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F27A910657E0; Sat, 6 Oct 2012 18:47:31 +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 DC8A48FC08; Sat, 6 Oct 2012 18:47:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IlV58018382; Sat, 6 Oct 2012 18:47:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IlVHQ018380; Sat, 6 Oct 2012 18:47:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061847.q96IlVHQ018380@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241261 - stable/8/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:47:32 -0000 Author: avg Date: Sat Oct 6 18:47:31 2012 New Revision: 241261 URL: http://svn.freebsd.org/changeset/base/241261 Log: MFC r240342: boot: file_loadraw should strdup name argument Modified: stable/8/sys/boot/common/module.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/common/module.c ============================================================================== --- stable/8/sys/boot/common/module.c Sat Oct 6 18:47:15 2012 (r241260) +++ stable/8/sys/boot/common/module.c Sat Oct 6 18:47:31 2012 (r241261) @@ -400,7 +400,7 @@ file_loadraw(char *type, char *name) /* Looks OK so far; create & populate control structure */ fp = file_alloc(); - fp->f_name = name; + fp->f_name = strdup(name); fp->f_type = strdup(type); fp->f_args = NULL; fp->f_metadata = NULL; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:49:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85FF810656C3; Sat, 6 Oct 2012 18:49:19 +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 5646A8FC17; Sat, 6 Oct 2012 18:49:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96InJQJ018714; Sat, 6 Oct 2012 18:49:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96InJhr018712; Sat, 6 Oct 2012 18:49:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061849.q96InJhr018712@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:49:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241262 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:49:19 -0000 Author: avg Date: Sat Oct 6 18:49:18 2012 New Revision: 241262 URL: http://svn.freebsd.org/changeset/base/241262 Log: MFC r240345: zfs: fix sa_modify_attrs handling of variable-sized attributes Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:47:31 2012 (r241261) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:49:18 2012 (r241262) @@ -1604,8 +1604,11 @@ sa_replace_all_by_template(sa_handle_t * } /* - * add/remove/replace a single attribute and then rewrite the entire set + * Add/remove a single attribute or replace a variable-sized attribute value + * with a value of a different size, and then rewrite the entire set * of attributes. + * Same-length attribute value replacement (including fixed-length attributes) + * is handled more efficiently by the upper layers. */ static int sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr, @@ -1687,18 +1690,19 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att attr = idx_tab->sa_layout->lot_attrs[i]; if (attr == newattr) { - if (action == SA_REMOVE) { - j++; - continue; + /* duplicate attributes are not allowed */ + ASSERT(action == SA_REPLACE || + action == SA_REMOVE); + /* must be variable-sized to be replaced here */ + if (action == SA_REPLACE) { + ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); + SA_ADD_BULK_ATTR(attr_desc, j, attr, + locator, datastart, buflen); } - ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); - ASSERT(action == SA_REPLACE); - SA_ADD_BULK_ATTR(attr_desc, j, attr, - locator, datastart, buflen); } else { length = SA_REGISTERED_LEN(sa, attr); if (length == 0) { - length = hdr->sa_lengths[length_idx++]; + length = hdr->sa_lengths[length_idx]; } SA_ADD_BULK_ATTR(attr_desc, j, attr, @@ -1706,6 +1710,8 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att (TOC_OFF(idx_tab->sa_idx_tab[attr]) + (uintptr_t)old_data[k]), length); } + if (SA_REGISTERED_LEN(sa, attr) == 0) + length_idx++; } if (k == 0 && hdl->sa_spill) { hdr = SA_GET_HDR(hdl, SA_SPILL); @@ -1723,6 +1729,7 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att SA_ADD_BULK_ATTR(attr_desc, j, newattr, locator, datastart, buflen); } + ASSERT3U(j, ==, attr_count); error = sa_build_layouts(hdl, attr_desc, attr_count, tx); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:50:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22C421065680; Sat, 6 Oct 2012 18:50:15 +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 E785A8FC1D; Sat, 6 Oct 2012 18:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IoEAY018879; Sat, 6 Oct 2012 18:50:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IoETX018877; Sat, 6 Oct 2012 18:50:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061850.q96IoETX018877@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241263 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:50:15 -0000 Author: avg Date: Sat Oct 6 18:50:14 2012 New Revision: 241263 URL: http://svn.freebsd.org/changeset/base/241263 Log: MFC r240345: zfs: fix sa_modify_attrs handling of variable-sized attributes Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:49:18 2012 (r241262) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:50:14 2012 (r241263) @@ -1604,8 +1604,11 @@ sa_replace_all_by_template(sa_handle_t * } /* - * add/remove/replace a single attribute and then rewrite the entire set + * Add/remove a single attribute or replace a variable-sized attribute value + * with a value of a different size, and then rewrite the entire set * of attributes. + * Same-length attribute value replacement (including fixed-length attributes) + * is handled more efficiently by the upper layers. */ static int sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr, @@ -1687,18 +1690,19 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att attr = idx_tab->sa_layout->lot_attrs[i]; if (attr == newattr) { - if (action == SA_REMOVE) { - j++; - continue; + /* duplicate attributes are not allowed */ + ASSERT(action == SA_REPLACE || + action == SA_REMOVE); + /* must be variable-sized to be replaced here */ + if (action == SA_REPLACE) { + ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); + SA_ADD_BULK_ATTR(attr_desc, j, attr, + locator, datastart, buflen); } - ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); - ASSERT(action == SA_REPLACE); - SA_ADD_BULK_ATTR(attr_desc, j, attr, - locator, datastart, buflen); } else { length = SA_REGISTERED_LEN(sa, attr); if (length == 0) { - length = hdr->sa_lengths[length_idx++]; + length = hdr->sa_lengths[length_idx]; } SA_ADD_BULK_ATTR(attr_desc, j, attr, @@ -1706,6 +1710,8 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att (TOC_OFF(idx_tab->sa_idx_tab[attr]) + (uintptr_t)old_data[k]), length); } + if (SA_REGISTERED_LEN(sa, attr) == 0) + length_idx++; } if (k == 0 && hdl->sa_spill) { hdr = SA_GET_HDR(hdl, SA_SPILL); @@ -1723,6 +1729,7 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att SA_ADD_BULK_ATTR(attr_desc, j, newattr, locator, datastart, buflen); } + ASSERT3U(j, ==, attr_count); error = sa_build_layouts(hdl, attr_desc, attr_count, tx); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:51:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA9AB106566B; Sat, 6 Oct 2012 18:51:43 +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 C57288FC0A; Sat, 6 Oct 2012 18:51:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IphSB019145; Sat, 6 Oct 2012 18:51:43 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IphV4019143; Sat, 6 Oct 2012 18:51:43 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061851.q96IphV4019143@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241264 - stable/9/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:51:44 -0000 Author: avg Date: Sat Oct 6 18:51:43 2012 New Revision: 241264 URL: http://svn.freebsd.org/changeset/base/241264 Log: MFC r240629: g_disk_flushcache definitely should not be traced under G_T_TOPOLOGY Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Sat Oct 6 18:50:14 2012 (r241263) +++ stable/9/sys/geom/geom_disk.c Sat Oct 6 18:51:43 2012 (r241264) @@ -391,7 +391,7 @@ g_disk_start(struct bio *bp) error = ENOIOCTL; break; case BIO_FLUSH: - g_trace(G_T_TOPOLOGY, "g_disk_flushcache(%s)", + g_trace(G_T_BIO, "g_disk_flushcache(%s)", bp->bio_to->name); if (!(dp->d_flags & DISKFLAG_CANFLUSHCACHE)) { g_io_deliver(bp, ENODEV); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:52:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85AE710656C1; Sat, 6 Oct 2012 18:52:07 +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 6F3648FC0A; Sat, 6 Oct 2012 18:52:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Iq795019237; Sat, 6 Oct 2012 18:52:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Iq7DQ019234; Sat, 6 Oct 2012 18:52:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061852.q96Iq7DQ019234@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241265 - stable/8/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:52:07 -0000 Author: avg Date: Sat Oct 6 18:52:06 2012 New Revision: 241265 URL: http://svn.freebsd.org/changeset/base/241265 Log: MFC r240629: g_disk_flushcache definitely should not be traced under G_T_TOPOLOGY Modified: stable/8/sys/geom/geom_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/geom_disk.c ============================================================================== --- stable/8/sys/geom/geom_disk.c Sat Oct 6 18:51:43 2012 (r241264) +++ stable/8/sys/geom/geom_disk.c Sat Oct 6 18:52:06 2012 (r241265) @@ -367,7 +367,7 @@ g_disk_start(struct bio *bp) error = ENOIOCTL; break; case BIO_FLUSH: - g_trace(G_T_TOPOLOGY, "g_disk_flushcache(%s)", + g_trace(G_T_BIO, "g_disk_flushcache(%s)", bp->bio_to->name); if (!(dp->d_flags & DISKFLAG_CANFLUSHCACHE)) { g_io_deliver(bp, ENODEV); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:53:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B99AA106568A; Sat, 6 Oct 2012 18:53:48 +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 98F608FC08; Sat, 6 Oct 2012 18:53:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IrmaS019531; Sat, 6 Oct 2012 18:53:48 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IrmMS019529; Sat, 6 Oct 2012 18:53:48 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061853.q96IrmMS019529@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241266 - stable/9/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:53:48 -0000 Author: avg Date: Sat Oct 6 18:53:48 2012 New Revision: 241266 URL: http://svn.freebsd.org/changeset/base/241266 Log: MFC r240347: zfs boot: fix/replace fzap_rlookup implementation Modified: stable/9/sys/boot/zfs/zfsimpl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/9/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:52:06 2012 (r241265) +++ stable/9/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:53:48 2012 (r241266) @@ -1516,9 +1516,7 @@ fzap_rlookup(const spa_t *spa, const dno int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; fat_zap_t z; - uint64_t *ptrtbl; - uint64_t hash; - int rc; + int i, j; if (zh.zap_magic != ZAP_MAGIC) return (EIO); @@ -1527,59 +1525,34 @@ fzap_rlookup(const spa_t *spa, const dno z.zap_phys = (zap_phys_t *) zap_scratch; /* - * Figure out where the pointer table is and read it in if necessary. + * This assumes that the leaf blocks start at block 1. The + * documentation isn't exactly clear on this. */ - if (zh.zap_ptrtbl.zt_blk) { - rc = dnode_read(spa, dnode, zh.zap_ptrtbl.zt_blk * bsize, - zap_scratch, bsize); - if (rc) - return (rc); - ptrtbl = (uint64_t *) zap_scratch; - } else { - ptrtbl = &ZAP_EMBEDDED_PTRTBL_ENT(&z, 0); - } - - hash = zap_hash(zh.zap_salt, name); - zap_leaf_t zl; zl.l_bs = z.zap_block_shift; + for (i = 0; i < zh.zap_num_leafs; i++) { + off_t off = (i + 1) << zl.l_bs; - off_t off = ptrtbl[hash >> (64 - zh.zap_ptrtbl.zt_shift)] << zl.l_bs; - zap_leaf_chunk_t *zc; - - rc = dnode_read(spa, dnode, off, zap_scratch, bsize); - if (rc) - return (rc); + if (dnode_read(spa, dnode, off, zap_scratch, bsize)) + return (EIO); - zl.l_phys = (zap_leaf_phys_t *) zap_scratch; + zl.l_phys = (zap_leaf_phys_t *) zap_scratch; - /* - * Make sure this chunk matches our hash. - */ - if (zl.l_phys->l_hdr.lh_prefix_len > 0 - && zl.l_phys->l_hdr.lh_prefix - != hash >> (64 - zl.l_phys->l_hdr.lh_prefix_len)) - return (ENOENT); + for (j = 0; j < ZAP_LEAF_NUMCHUNKS(&zl); j++) { + zap_leaf_chunk_t *zc; - /* - * Hash within the chunk to find our entry. - */ - int shift = (64 - ZAP_LEAF_HASH_SHIFT(&zl) - zl.l_phys->l_hdr.lh_prefix_len); - int h = (hash >> shift) & ((1 << ZAP_LEAF_HASH_SHIFT(&zl)) - 1); - h = zl.l_phys->l_hash[h]; - if (h == 0xffff) - return (ENOENT); - zc = &ZAP_LEAF_CHUNK(&zl, h); - while (zc->l_entry.le_hash != hash) { - if (zc->l_entry.le_next == 0xffff) { - zc = 0; - break; + zc = &ZAP_LEAF_CHUNK(&zl, j); + if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) + continue; + if (zc->l_entry.le_value_intlen != 8 || + zc->l_entry.le_value_numints != 1) + continue; + + if (fzap_leaf_value(&zl, zc) == value) { + fzap_name_copy(&zl, zc, name); + return (0); + } } - zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); - } - if (fzap_leaf_value(&zl, zc) == value) { - fzap_name_copy(&zl, zc, name); - return (0); } return (ENOENT); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:54:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0463010657EF; Sat, 6 Oct 2012 18:54:02 +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 D88FA8FC19; Sat, 6 Oct 2012 18:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Is1ee019598; Sat, 6 Oct 2012 18:54:01 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Is1XS019596; Sat, 6 Oct 2012 18:54:01 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061854.q96Is1XS019596@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241267 - stable/8/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:54:02 -0000 Author: avg Date: Sat Oct 6 18:54:01 2012 New Revision: 241267 URL: http://svn.freebsd.org/changeset/base/241267 Log: MFC r240347: zfs boot: fix/replace fzap_rlookup implementation Modified: stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:53:48 2012 (r241266) +++ stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:54:01 2012 (r241267) @@ -1516,9 +1516,7 @@ fzap_rlookup(const spa_t *spa, const dno int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; fat_zap_t z; - uint64_t *ptrtbl; - uint64_t hash; - int rc; + int i, j; if (zh.zap_magic != ZAP_MAGIC) return (EIO); @@ -1527,59 +1525,34 @@ fzap_rlookup(const spa_t *spa, const dno z.zap_phys = (zap_phys_t *) zap_scratch; /* - * Figure out where the pointer table is and read it in if necessary. + * This assumes that the leaf blocks start at block 1. The + * documentation isn't exactly clear on this. */ - if (zh.zap_ptrtbl.zt_blk) { - rc = dnode_read(spa, dnode, zh.zap_ptrtbl.zt_blk * bsize, - zap_scratch, bsize); - if (rc) - return (rc); - ptrtbl = (uint64_t *) zap_scratch; - } else { - ptrtbl = &ZAP_EMBEDDED_PTRTBL_ENT(&z, 0); - } - - hash = zap_hash(zh.zap_salt, name); - zap_leaf_t zl; zl.l_bs = z.zap_block_shift; + for (i = 0; i < zh.zap_num_leafs; i++) { + off_t off = (i + 1) << zl.l_bs; - off_t off = ptrtbl[hash >> (64 - zh.zap_ptrtbl.zt_shift)] << zl.l_bs; - zap_leaf_chunk_t *zc; - - rc = dnode_read(spa, dnode, off, zap_scratch, bsize); - if (rc) - return (rc); + if (dnode_read(spa, dnode, off, zap_scratch, bsize)) + return (EIO); - zl.l_phys = (zap_leaf_phys_t *) zap_scratch; + zl.l_phys = (zap_leaf_phys_t *) zap_scratch; - /* - * Make sure this chunk matches our hash. - */ - if (zl.l_phys->l_hdr.lh_prefix_len > 0 - && zl.l_phys->l_hdr.lh_prefix - != hash >> (64 - zl.l_phys->l_hdr.lh_prefix_len)) - return (ENOENT); + for (j = 0; j < ZAP_LEAF_NUMCHUNKS(&zl); j++) { + zap_leaf_chunk_t *zc; - /* - * Hash within the chunk to find our entry. - */ - int shift = (64 - ZAP_LEAF_HASH_SHIFT(&zl) - zl.l_phys->l_hdr.lh_prefix_len); - int h = (hash >> shift) & ((1 << ZAP_LEAF_HASH_SHIFT(&zl)) - 1); - h = zl.l_phys->l_hash[h]; - if (h == 0xffff) - return (ENOENT); - zc = &ZAP_LEAF_CHUNK(&zl, h); - while (zc->l_entry.le_hash != hash) { - if (zc->l_entry.le_next == 0xffff) { - zc = 0; - break; + zc = &ZAP_LEAF_CHUNK(&zl, j); + if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) + continue; + if (zc->l_entry.le_value_intlen != 8 || + zc->l_entry.le_value_numints != 1) + continue; + + if (fzap_leaf_value(&zl, zc) == value) { + fzap_name_copy(&zl, zc, name); + return (0); + } } - zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); - } - if (fzap_leaf_value(&zl, zc) == value) { - fzap_name_copy(&zl, zc, name); - return (0); } return (ENOENT); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:55:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A48B11065670; Sat, 6 Oct 2012 18:55:32 +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 8E9FB8FC1A; Sat, 6 Oct 2012 18:55:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96ItWcv019870; Sat, 6 Oct 2012 18:55:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96ItWZL019868; Sat, 6 Oct 2012 18:55:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061855.q96ItWZL019868@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241268 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:55:32 -0000 Author: avg Date: Sat Oct 6 18:55:32 2012 New Revision: 241268 URL: http://svn.freebsd.org/changeset/base/241268 Log: MFC r240631: zfs: allow both DEBUG and ZFS_DEBUG to be defined on command line Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Sat Oct 6 18:54:01 2012 (r241267) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Sat Oct 6 18:55:32 2012 (r241268) @@ -42,8 +42,10 @@ extern "C" { */ #if defined(DEBUG) || !defined(_KERNEL) +#if !defined(ZFS_DEBUG) #define ZFS_DEBUG #endif +#endif extern int zfs_flags; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:55:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD358106564A; Sat, 6 Oct 2012 18:55:54 +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 C68CD8FC08; Sat, 6 Oct 2012 18:55:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Its4o019964; Sat, 6 Oct 2012 18:55:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Itsba019962; Sat, 6 Oct 2012 18:55:54 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061855.q96Itsba019962@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241269 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:55:55 -0000 Author: avg Date: Sat Oct 6 18:55:54 2012 New Revision: 241269 URL: http://svn.freebsd.org/changeset/base/241269 Log: MFC r240631: zfs: allow both DEBUG and ZFS_DEBUG to be defined on command line Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Sat Oct 6 18:55:32 2012 (r241268) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Sat Oct 6 18:55:54 2012 (r241269) @@ -42,8 +42,10 @@ extern "C" { */ #if defined(DEBUG) || !defined(_KERNEL) +#if !defined(ZFS_DEBUG) #define ZFS_DEBUG #endif +#endif extern int zfs_flags; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:57:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D641F106566C; Sat, 6 Oct 2012 18:57:27 +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 C07F78FC17; Sat, 6 Oct 2012 18:57:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IvRat020249; Sat, 6 Oct 2012 18:57:27 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IvRxo020247; Sat, 6 Oct 2012 18:57:27 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061857.q96IvRxo020247@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241270 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:57:28 -0000 Author: avg Date: Sat Oct 6 18:57:27 2012 New Revision: 241270 URL: http://svn.freebsd.org/changeset/base/241270 Log: MFC r240632: zfs: correctly calculate dn_bonuslen for saving SAs to disk Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:55:54 2012 (r241269) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:57:27 2012 (r241270) @@ -577,7 +577,7 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ for (i = 0; i != attr_count; i++) { boolean_t is_var_sz; - *total += attr_desc[i].sa_length; + *total += P2ROUNDUP(attr_desc[i].sa_length, 8); if (done) goto next; @@ -712,6 +712,8 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu length = SA_REGISTERED_LEN(sa, attrs[i]); if (length == 0) length = attr_desc[i].sa_length; + else + VERIFY(length == attr_desc[i].sa_length); if (buf_space < length) { /* switch to spill buffer */ VERIFY(bonustype == DMU_OT_SA); @@ -741,6 +743,7 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu if (sa->sa_attr_table[attrs[i]].sa_length == 0) { sahdr->sa_lengths[len_idx++] = length; } + VERIFY((uintptr_t)data_start % 8 == 0); data_start = (void *)P2ROUNDUP(((uintptr_t)data_start + length), 8); buf_space -= P2ROUNDUP(length, 8); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:57:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D42110657D5; Sat, 6 Oct 2012 18:57:45 +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 474F28FC14; Sat, 6 Oct 2012 18:57:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IvjOd020334; Sat, 6 Oct 2012 18:57:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IvjoU020331; Sat, 6 Oct 2012 18:57:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061857.q96IvjoU020331@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241271 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:57:45 -0000 Author: avg Date: Sat Oct 6 18:57:44 2012 New Revision: 241271 URL: http://svn.freebsd.org/changeset/base/241271 Log: MFC r240632: zfs: correctly calculate dn_bonuslen for saving SAs to disk Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:57:27 2012 (r241270) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Sat Oct 6 18:57:44 2012 (r241271) @@ -577,7 +577,7 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ for (i = 0; i != attr_count; i++) { boolean_t is_var_sz; - *total += attr_desc[i].sa_length; + *total += P2ROUNDUP(attr_desc[i].sa_length, 8); if (done) goto next; @@ -712,6 +712,8 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu length = SA_REGISTERED_LEN(sa, attrs[i]); if (length == 0) length = attr_desc[i].sa_length; + else + VERIFY(length == attr_desc[i].sa_length); if (buf_space < length) { /* switch to spill buffer */ VERIFY(bonustype == DMU_OT_SA); @@ -741,6 +743,7 @@ sa_build_layouts(sa_handle_t *hdl, sa_bu if (sa->sa_attr_table[attrs[i]].sa_length == 0) { sahdr->sa_lengths[len_idx++] = length; } + VERIFY((uintptr_t)data_start % 8 == 0); data_start = (void *)P2ROUNDUP(((uintptr_t)data_start + length), 8); buf_space -= P2ROUNDUP(length, 8); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:59:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1556106566C; Sat, 6 Oct 2012 18:59:12 +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 A06588FC14; Sat, 6 Oct 2012 18:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IxChR020623; Sat, 6 Oct 2012 18:59:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IxCH9020621; Sat, 6 Oct 2012 18:59:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061859.q96IxCH9020621@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241272 - stable/9/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:59:13 -0000 Author: avg Date: Sat Oct 6 18:59:12 2012 New Revision: 241272 URL: http://svn.freebsd.org/changeset/base/241272 Log: MFC r240650: hwpmc amd_pcpu_fini: fix a bug in code locked under DEBUG Modified: stable/9/sys/dev/hwpmc/hwpmc_amd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_amd.c Sat Oct 6 18:57:44 2012 (r241271) +++ stable/9/sys/dev/hwpmc/hwpmc_amd.c Sat Oct 6 18:59:12 2012 (r241272) @@ -839,7 +839,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int c for (i = 0; i < AMD_NPMCS; i++) { KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); - KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + (i-1)), + KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + i), ("[amd,%d] CPU%d/PMC%d not stopped", __LINE__, cpu, i)); } #endif From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 18:59:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBA5C10657A7; Sat, 6 Oct 2012 18:59:23 +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 9AC098FC0C; Sat, 6 Oct 2012 18:59:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96IxNR6020684; Sat, 6 Oct 2012 18:59:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96IxNgH020682; Sat, 6 Oct 2012 18:59:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061859.q96IxNgH020682@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 18:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241273 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 18:59:23 -0000 Author: avg Date: Sat Oct 6 18:59:23 2012 New Revision: 241273 URL: http://svn.freebsd.org/changeset/base/241273 Log: MFC r240650: hwpmc amd_pcpu_fini: fix a bug in code locked under DEBUG Modified: stable/8/sys/dev/hwpmc/hwpmc_amd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/hwpmc/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_amd.c Sat Oct 6 18:59:12 2012 (r241272) +++ stable/8/sys/dev/hwpmc/hwpmc_amd.c Sat Oct 6 18:59:23 2012 (r241273) @@ -838,7 +838,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int c for (i = 0; i < AMD_NPMCS; i++) { KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); - KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + (i-1)), + KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + i), ("[amd,%d] CPU%d/PMC%d not stopped", __LINE__, cpu, i)); } #endif From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:01:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 428BF1065672; Sat, 6 Oct 2012 19:01:21 +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 2E06B8FC16; Sat, 6 Oct 2012 19:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96J1LeA021121; Sat, 6 Oct 2012 19:01:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96J1KhK021119; Sat, 6 Oct 2012 19:01:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061901.q96J1KhK021119@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241274 - stable/9/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:01:21 -0000 Author: avg Date: Sat Oct 6 19:01:20 2012 New Revision: 241274 URL: http://svn.freebsd.org/changeset/base/241274 Log: MFC r240349: zfs boot: add a size check for a value in fzap_lookup Modified: stable/9/sys/boot/zfs/zfsimpl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/9/sys/boot/zfs/zfsimpl.c Sat Oct 6 18:59:23 2012 (r241273) +++ stable/9/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:01:20 2012 (r241274) @@ -1289,6 +1289,8 @@ fzap_lookup(const spa_t *spa, const dnod zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); } if (fzap_name_equal(&zl, zc, name)) { + if (zc->l_entry.le_value_intlen * zc->l_entry.le_value_numints > 8) + return (E2BIG); *value = fzap_leaf_value(&zl, zc); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:01:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 824141065846; Sat, 6 Oct 2012 19:01:32 +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 681D58FC18; Sat, 6 Oct 2012 19:01:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96J1WiB021182; Sat, 6 Oct 2012 19:01:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96J1WvR021180; Sat, 6 Oct 2012 19:01:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061901.q96J1WvR021180@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241275 - stable/8/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:01:32 -0000 Author: avg Date: Sat Oct 6 19:01:31 2012 New Revision: 241275 URL: http://svn.freebsd.org/changeset/base/241275 Log: MFC r240349: zfs boot: add a size check for a value in fzap_lookup Modified: stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:01:20 2012 (r241274) +++ stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:01:31 2012 (r241275) @@ -1289,6 +1289,8 @@ fzap_lookup(const spa_t *spa, const dnod zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); } if (fzap_name_equal(&zl, zc, name)) { + if (zc->l_entry.le_value_intlen * zc->l_entry.le_value_numints > 8) + return (E2BIG); *value = fzap_leaf_value(&zl, zc); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:05:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE383106564A; Sat, 6 Oct 2012 19:05:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9DAE8FC12; Sat, 6 Oct 2012 19:05:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96J5oiH021827; Sat, 6 Oct 2012 19:05:50 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96J5of9021825; Sat, 6 Oct 2012 19:05:50 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210061905.q96J5of9021825@svn.freebsd.org> From: Alan Cox Date: Sat, 6 Oct 2012 19:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241276 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:05:51 -0000 Author: alc Date: Sat Oct 6 19:05:50 2012 New Revision: 241276 URL: http://svn.freebsd.org/changeset/base/241276 Log: Correct two pessimizations in pmap_extract_and_hold(). Test the PTE for having PTE_RO set instead of PTE_D. This avoids some unnecessary failures by pmap_extract_and_hold() that will have to be handled by a call to vm_fault_hold(). Testing the PTE for both being non-zero and having PTE_V set is redundant. The latter suffices. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Oct 6 19:01:31 2012 (r241275) +++ head/sys/mips/mips/pmap.c Sat Oct 6 19:05:50 2012 (r241276) @@ -791,24 +791,25 @@ pmap_extract(pmap_t pmap, vm_offset_t va vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { - pt_entry_t *ptep; - pt_entry_t pte; + pt_entry_t pte, *ptep; + vm_paddr_t pa, pte_pa; vm_page_t m; - vm_paddr_t pa; m = NULL; pa = 0; PMAP_LOCK(pmap); retry: ptep = pmap_pte(pmap, va); - if ((ptep != NULL) && ((pte = *ptep) != 0) && - pte_test(&pte, PTE_V) && - (pte_test(&pte, PTE_D) || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, TLBLO_PTE_TO_PA(pte), &pa)) - goto retry; - - m = PHYS_TO_VM_PAGE(TLBLO_PTE_TO_PA(pte)); - vm_page_hold(m); + if (ptep != NULL) { + pte = *ptep; + if (pte_test(&pte, PTE_V) && (!pte_test(&pte, PTE_RO) || + (prot & VM_PROT_WRITE) == 0)) { + pte_pa = TLBLO_PTE_TO_PA(pte); + if (vm_page_pa_tryrelock(pmap, pte_pa, &pa)) + goto retry; + m = PHYS_TO_VM_PAGE(pte_pa); + vm_page_hold(m); + } } PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:06:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A45A510657D0; Sat, 6 Oct 2012 19:06:09 +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 8E4408FC19; Sat, 6 Oct 2012 19:06:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96J69gw021917; Sat, 6 Oct 2012 19:06:09 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96J69lv021915; Sat, 6 Oct 2012 19:06:09 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061906.q96J69lv021915@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241277 - stable/9/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:06:09 -0000 Author: avg Date: Sat Oct 6 19:06:09 2012 New Revision: 241277 URL: http://svn.freebsd.org/changeset/base/241277 Log: MFC r240343: rc.d/power_profile: use recently added Cmax for cx_lowest Modified: stable/9/etc/rc.d/power_profile Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/power_profile ============================================================================== --- stable/9/etc/rc.d/power_profile Sat Oct 6 19:05:50 2012 (r241276) +++ stable/9/etc/rc.d/power_profile Sat Oct 6 19:06:09 2012 (r241277) @@ -81,8 +81,7 @@ esac # Set the various sysctls based on the profile's values. node="hw.acpi.cpu.cx_lowest" highest_value="C1" -lowest_value="`(sysctl -n dev.cpu.0.cx_supported | \ - awk '{ print "C" split($0, a) }' -) 2> /dev/null`" +lowest_value="Cmax" eval value=\$${profile}_cx_lowest sysctl_set From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:06:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CA0F10658F4; Sat, 6 Oct 2012 19:06:23 +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 785758FC14; Sat, 6 Oct 2012 19:06:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96J6NRV021992; Sat, 6 Oct 2012 19:06:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96J6NR7021988; Sat, 6 Oct 2012 19:06:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061906.q96J6NR7021988@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241278 - stable/8/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:06:23 -0000 Author: avg Date: Sat Oct 6 19:06:23 2012 New Revision: 241278 URL: http://svn.freebsd.org/changeset/base/241278 Log: MFC r240343: rc.d/power_profile: use recently added Cmax for cx_lowest Modified: stable/8/etc/rc.d/power_profile Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.d/power_profile ============================================================================== --- stable/8/etc/rc.d/power_profile Sat Oct 6 19:06:09 2012 (r241277) +++ stable/8/etc/rc.d/power_profile Sat Oct 6 19:06:23 2012 (r241278) @@ -81,8 +81,7 @@ esac # Set the various sysctls based on the profile's values. node="hw.acpi.cpu.cx_lowest" highest_value="C1" -lowest_value="`(sysctl -n dev.cpu.0.cx_supported | \ - awk '{ print "C" split($0, a) }' -) 2> /dev/null`" +lowest_value="Cmax" eval value=\$${profile}_cx_lowest sysctl_set From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:19:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06763106566C; Sat, 6 Oct 2012 19:19:22 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2BDD8FC0C; Sat, 6 Oct 2012 19:19:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JJLEk023888; Sat, 6 Oct 2012 19:19:21 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JJLW0023879; Sat, 6 Oct 2012 19:19:21 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210061919.q96JJLW0023879@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Oct 2012 19:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241279 - in head: share/mk tools/build/options usr.bin usr.bin/bmake usr.bin/bmake/unit-tests X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:19:22 -0000 Author: marcel Date: Sat Oct 6 19:19:21 2012 New Revision: 241279 URL: http://svn.freebsd.org/changeset/base/241279 Log: Add bmake to the build and allow it to be installed as make(1) instead of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it easy for people to switch while working out the kinks -- think ports tree here. The option will be removed in due time. Submitted by: Simon Gerraty (sjg@juniper.net) Added: head/tools/build/options/WITH_BMAKE (contents, props changed) head/usr.bin/bmake/ head/usr.bin/bmake/Makefile (contents, props changed) head/usr.bin/bmake/Makefile.inc (contents, props changed) head/usr.bin/bmake/config.h (contents, props changed) head/usr.bin/bmake/unit-tests/ head/usr.bin/bmake/unit-tests/Makefile (contents, props changed) Modified: head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat Oct 6 19:06:23 2012 (r241278) +++ head/share/mk/bsd.own.mk Sat Oct 6 19:19:21 2012 (r241279) @@ -417,6 +417,7 @@ __DEFAULT_YES_OPTIONS = \ ZONEINFO __DEFAULT_NO_OPTIONS = \ + BMAKE \ BSD_GREP \ BIND_IDN \ BIND_LARGE_FILE \ Added: head/tools/build/options/WITH_BMAKE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_BMAKE Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,8 @@ +.\" $FreeBSD$ +Build and install the portable BSD make (bmake) as +.Xr make 1 +instead of the traditional FreeBSD make. +This build option is temporary. +It allows developers to switch to bmake in order to work out any remaining +kinks or issues. +This option will be removed in due time. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Oct 6 19:06:23 2012 (r241278) +++ head/usr.bin/Makefile Sat Oct 6 19:19:21 2012 (r241279) @@ -271,8 +271,12 @@ SUBDIR+= msgs .endif .if ${MK_MAKE} != "no" +.if ${MK_BMAKE} != "no" +SUBDIR+= bmake +.else SUBDIR+= make .endif +.endif .if ${MK_MAN_UTILS} != "no" SUBDIR+= catman Added: head/usr.bin/bmake/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/Makefile Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,209 @@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ + +.sinclude "Makefile.inc" + +SRCTOP?= ${.CURDIR:H:H} + +# look here first for config.h +CFLAGS+= -I${.CURDIR} + +# $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ +# @(#)Makefile 5.2 (Berkeley) 12/28/90 + +# $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $ + +PROG?= ${.CURDIR:T} +SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ + make.c parse.c str.c suff.c targ.c trace.c var.c util.c +SRCS+= strlist.c +SRCS+= make_malloc.c +SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \ + lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \ + lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \ + lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \ + lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c +SRCS += lstPrev.c + +# you can use this Makefile if you have an earlier version of bmake. +prefix= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= gcc + +# Base version on src date +MAKE_VERSION= 20120831 +DEFAULT_SYS_PATH = .../share/mk:/usr/share/mk + +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} +CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS+= -I. -I${srcdir} -DHAVE_CONFIG_H ${XDEFS} -DMAKE_NATIVE +CFLAGS+= ${CFLAGS_${.TARGET:T}} +CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\"" +LDFLAGS= +LIBOBJS= ${LIBOBJDIR}stresep$U.o +LDADD= + +.if !empty(LIBOBJS) +SRCS+= ${LIBOBJS:T:.o=.c} +.endif + +USE_META = yes +.if ${USE_META} != "no" +SRCS+= meta.c +CPPFLAGS+= -DUSE_META +FILEMON_H ?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif +.endif + +.PATH: ${srcdir} +.PATH: ${srcdir}/lst.lib + +OS!= uname -s +ARCH!= uname -p 2>/dev/null || uname -m + +# list of OS's which are derrived from BSD4.4 +isBSD44= NetBSD FreeBSD OpenBSD DragonFly + +.if ${OS} == "NetBSD" +# Don't set these for anyone else since we don't know what the effect may be. +# On FreeBSD WARNS=2 sets a bunch of -W flags that make does not handle. +WFORMAT= 1 +WARNS=4 +.NOPATH: bmake.cat1 +.if make(install) && exists(${DESTDIR}/usr/share/doc) +SUBDIR= PSD.doc +.endif +.endif + +.if empty(isBSD44:M${OS}) +# XXX not sure if we still want this given that configure +# lets us force or not the definition of MACHINE. +CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\"" +MANTARGET=cat +INSTALL?=${srcdir}/install-sh +.if (${MACHINE} == "sun386") +# even I don't have one of these anymore :-) +CFLAGS+= -DPORTAR +.elif (${MACHINE} != "sunos") +SRCS+= sigcompat.c +CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART +.endif +.endif +.if defined(.PARSEDIR) +.if make(obj) || make(clean) +SUBDIR+= unit-tests +.endif +.endif + +# many systems use gcc these days +CC_IS_GCC=yes +.if ${CC_IS_GCC} == "yes" +# problem with gcc3 +CFLAGS_var.o+= -Wno-cast-qual +.endif + +CFLAGS_main.o+= "-DMACHINE=\"${MACHINE}\"" "-DMACHINE_ARCH=\"${MACHINE_ARCH}\"" + +EXTRACT_MAN=no + +MAN=${PROG}.1 +.if (${PROG} != "make") +${MAN}: make.1 + @echo making ${PROG}.1 + @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@ + @(echo ".Sh HISTORY"; \ + echo ".Nm"; \ + echo "is derived from NetBSD"; \ + echo ".Xr make 1 ."; \ + echo It uses autoconf to facilitate portability to other platforms.) >> $@ + +.endif + +.if !empty(isBSD44:M${OS}) +.if "${OS}" != "NetBSD" +MAN1=${MAN} +.endif +MANTARGET?=man +.endif + +MANTARGET?= cat +MANDEST?= ${MANDIR}/${MANTARGET}1 + +.if ${MANTARGET} == "cat" +_mfromdir=${srcdir} +.endif + +.if exists(${srcdir}/../Makefile.inc) +.include "${srcdir}/../Makefile.inc" +.endif +.sinclude +# sigh, FreeBSD at least includes bsd.subdir.mk via bsd.obj.mk +# so the inclusion below, results in complaints about re-defined +# targets. For NetBSD though we need to explicitly include it. +.if defined(.PARSEDIR) +.if defined(SUBDIR) && !target(${SUBDIR:[1]}) +.sinclude +.endif +.endif + +CPPFLAGS+= -DMAKE_NATIVE +COPTS.var.c += -Wno-cast-qual +COPTS.job.c += -Wno-format-nonliteral +COPTS.parse.c += -Wno-format-nonliteral +COPTS.var.c += -Wno-format-nonliteral + +# Force these +BINDIR= ${prefix}/bin +MANDIR= ${prefix}/man + +arch.o: config.h +# make sure that MAKE_VERSION gets updated. +main.o: ${SRCS} ${MAKEFILE} + +MK?=${prefix}/share/mk +MKSRC?=mk +INSTALL?=${srcdir}/install-sh + +beforeinstall: + test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m 775 -d ${DESTDIR}${BINDIR} + test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m 775 -d ${DESTDIR}${MANDEST} + +# latest version of *.mk includes an installer. +# you should not need to set USE_OS +install-mk: +.if exists(${MKSRC}/install-mk) + test -d ${DESTDIR}${MK} || ${INSTALL} -m 775 -d ${DESTDIR}${MK} + ${MKSRC}/install-mk -v -m 644 ${DESTDIR}${MK} ${USE_OS} +.else + @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false +.endif + +.ifdef TOOLDIR +# this is a native netbsd build, +# use libutil rather than the local emalloc etc. +CPPFLAGS+= -DUSE_EMALLOC +LDADD+=-lutil +DPADD+=${LIBUTIL} +.endif + +# A simple unit-test driver to help catch regressions +accept test: + cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} + +# override some simple things +BINDIR= /usr/bin +MANDIR= /usr/share/man/man + +# make sure we get this +CFLAGS+= ${COPTS.${.IMPSRC:T}} +CLEANFILES+= bootstrap + +after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk + cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk + Added: head/usr.bin/bmake/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/Makefile.inc Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.include "bsd.own.mk" + +.if defined(.PARSEDIR) +# make sure this is available to unit-tests/Makefile +.export SRCTOP +.endif + +.if defined(MK_BMAKE) +PROG= make +.endif + +WARNS=3 Added: head/usr.bin/bmake/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/config.h Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,316 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ +/* $FreeBSD$ */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Path of default shell */ +/* #undef DEFSHELL_CUSTOM */ + +/* Shell spec to use by default */ +/* #undef DEFSHELL_INDEX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_AR_H 1 + +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_SIGLIST 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dirname' function. */ +#define HAVE_DIRNAME 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the `err' function. */ +#define HAVE_ERR 1 + +/* Define to 1 if you have the `errx' function. */ +#define HAVE_ERRX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getenv' function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getwd' function. */ +#define HAVE_GETWD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `killpg' function. */ +#define HAVE_KILLPG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RANLIB_H 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setpgid' function. */ +#define HAVE_SETPGID 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `sigvec' function. */ +#define HAVE_SIGVEC 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `stresep' function. */ +/* #undef HAVE_STRESEP */ + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if `struct stat' is a member of `st_rdev'. */ +#define HAVE_STRUCT_STAT_ST_RDEV 1 + +/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use + `HAVE_STRUCT_STAT_ST_RDEV' instead. */ +#define HAVE_ST_RDEV 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the `warn' function. */ +#define HAVE_WARN 1 + +/* Define to 1 if you have the `warnx' function. */ +#define HAVE_WARNX 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* define if your compiler has __attribute__ */ +/* #undef HAVE___ATTRIBUTE__ */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sjg@NetBSD.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bmake" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "bmake 20120620" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bmake" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "20120620" + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ Added: head/usr.bin/bmake/unit-tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/unit-tests/Makefile Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,103 @@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ + +SRCTOP?= ${.CURDIR:H:H:H} + +# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $ +# +# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $ +# +# Unit tests for make(1) +# The main targets are: +# +# all: run all the tests +# test: run 'all', capture output and compare to expected results +# accept: move generated output to expected results +# +# Adding a test case. +# Each feature should get its own set of tests in its own suitably +# named makefile which should be added to SUBFILES to hook it in. +# + +srcdir= ${SRCTOP}/contrib/bmake/unit-tests + +.MAIN: all + +UNIT_TESTS:= ${srcdir} + +# Simple sub-makefiles - we run them as a black box +# keep the list sorted. +SUBFILES= \ + comment \ + cond1 \ + error \ + export \ + export-all \ + doterror \ + dotwait \ + forloop \ + forsubst \ + hash \ + misc \ + moderrs \ + modmatch \ + modmisc \ + modorder \ + modts \ + modword \ + phony-end \ + posix \ + qequals \ + sysv \ + ternary \ + unexport \ + unexport-env \ + varcmd + +all: ${SUBFILES} + +flags.doterror= + +# the tests are actually done with sub-makes. +.PHONY: ${SUBFILES} +.PRECIOUS: ${SUBFILES} +${SUBFILES}: + -@${.MAKE} ${flags.$@:U-k} -f ${UNIT_TESTS}/$@ + +clean: + rm -f *.out *.fail *.core + +.sinclude + +TEST_MAKE?= ${.MAKE} +TOOL_SED?= sed +TOOL_TR?= tr +TOOL_DIFF?= diff +DIFF_FLAGS?= -u + +# ensure consistent results from sort(1) +LC_ALL= C +LANG= C +.export LANG LC_ALL + +# The driver. +# We always pretend .MAKE was called 'make' +# and strip ${.CURDIR}/ from the output +# and replace anything after 'stopped in' with unit-tests +# so the results can be compared. +test: + @echo "${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1" + @cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \ + ${TOOL_TR} -d '\015' | \ + ${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}:,make:,' \ + -e '/stopped/s, /.*, unit-tests,' \ + -e 's,${.CURDIR:C/\./\\\./g}/,,g' \ + -e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' > ${.TARGET}.out || { \ + tail ${.TARGET}.out; mv ${.TARGET}.out ${.TARGET}.fail; exit 1; } + ${TOOL_DIFF} ${DIFF_FLAGS} ${UNIT_TESTS}/${.TARGET}.exp ${.TARGET}.out + +accept: + mv test.out ${srcdir}/test.exp + From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:19:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDCB11065752; Sat, 6 Oct 2012 19:19:32 +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 8B4988FC0C; Sat, 6 Oct 2012 19:19:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JJW2Z023947; Sat, 6 Oct 2012 19:19:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JJWvd023945; Sat, 6 Oct 2012 19:19:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061919.q96JJWvd023945@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241280 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:19:33 -0000 Author: avg Date: Sat Oct 6 19:19:32 2012 New Revision: 241280 URL: http://svn.freebsd.org/changeset/base/241280 Log: make: report :M or :N pattern in debug mode MFC after: 12 days Modified: head/usr.bin/make/var.c Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Sat Oct 6 19:19:21 2012 (r241279) +++ head/usr.bin/make/var.c Sat Oct 6 19:19:32 2012 (r241280) @@ -1421,6 +1421,7 @@ modifier_M(VarParser *vp, const char val vp->ptr++; } *ptr = '\0'; + DEBUGF(VAR, ("Pattern :%s\n", patt)); if (modifier == 'M') { newValue = VarModify(value, VarMatch, patt); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:23:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FE94106566C; Sat, 6 Oct 2012 19:23:45 +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 7A94B8FC08; Sat, 6 Oct 2012 19:23:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JNjDE024625; Sat, 6 Oct 2012 19:23:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JNjgQ024623; Sat, 6 Oct 2012 19:23:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061923.q96JNjgQ024623@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241281 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:23:45 -0000 Author: avg Date: Sat Oct 6 19:23:44 2012 New Revision: 241281 URL: http://svn.freebsd.org/changeset/base/241281 Log: ktrace/kern_exec: check p_tracecred instead of p_cred .. when deciding whether to continue tracing across suid/sgid exec. Otherwise if root ktrace-d an unprivileged process and the processed exec-ed a suid program, then tracing didn't continue across exec. Reviewed by: bde, kib MFC after: 22 days Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sat Oct 6 19:19:32 2012 (r241280) +++ head/sys/kern/kern_exec.c Sat Oct 6 19:23:44 2012 (r241281) @@ -691,7 +691,8 @@ interpret: setsugid(p); #ifdef KTRACE - if (priv_check_cred(oldcred, PRIV_DEBUG_DIFFCRED, 0)) + if (p->p_tracecred != NULL && + priv_check_cred(p->p_tracecred, PRIV_DEBUG_DIFFCRED, 0)) ktrprocexec(p, &tracecred, &tracevp); #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:25:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66B781065673; Sat, 6 Oct 2012 19:25:41 +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 51CB68FC08; Sat, 6 Oct 2012 19:25:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JPfwT024922; Sat, 6 Oct 2012 19:25:41 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JPfEI024920; Sat, 6 Oct 2012 19:25:41 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061925.q96JPfEI024920@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241282 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:25:41 -0000 Author: avg Date: Sat Oct 6 19:25:40 2012 New Revision: 241282 URL: http://svn.freebsd.org/changeset/base/241282 Log: zfs boot: chose a "first" pool if none is explicitly requested MFC after: 8 days Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:23:44 2012 (r241281) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:25:40 2012 (r241282) @@ -513,7 +513,10 @@ zfs_dev_open(struct open_file *f, ...) dev = va_arg(args, struct zfs_devdesc *); va_end(args); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); rv = zfs_spa_init(spa); @@ -627,7 +630,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); return (buf); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:27:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAEEA1065670; Sat, 6 Oct 2012 19:27:04 +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 A4CB68FC19; Sat, 6 Oct 2012 19:27:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JR48m025164; Sat, 6 Oct 2012 19:27:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JR4qn025160; Sat, 6 Oct 2012 19:27:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061927.q96JR4qn025160@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241283 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:27:04 -0000 Author: avg Date: Sat Oct 6 19:27:04 2012 New Revision: 241283 URL: http://svn.freebsd.org/changeset/base/241283 Log: zfs boot: add code for listing child datasets of a given dataset - only filesystem datasets are supported - children names are printed to stdout To do: allow to iterate over the list and fetch names programatically MFC after: 17 days Modified: head/sys/boot/zfs/libzfs.h head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/libzfs.h ============================================================================== --- head/sys/boot/zfs/libzfs.h Sat Oct 6 19:25:40 2012 (r241282) +++ head/sys/boot/zfs/libzfs.h Sat Oct 6 19:27:04 2012 (r241283) @@ -59,6 +59,7 @@ int zfs_parsedev(struct zfs_devdesc *dev const char **path); char *zfs_fmtdev(void *vdev); int zfs_probe_dev(const char *devname, uint64_t *pool_guid); +int zfs_list(const char *name); extern struct devsw zfs_dev; extern struct fs_ops zfs_fsops; Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:25:40 2012 (r241282) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:27:04 2012 (r241283) @@ -658,3 +658,38 @@ zfs_fmtdev(void *vdev) rootname); return (buf); } + +int +zfs_list(const char *name) +{ + static char poolname[ZFS_MAXNAMELEN]; + uint64_t objid; + spa_t *spa; + const char *dsname; + int len; + int rv; + + len = strlen(name); + dsname = strchr(name, '/'); + if (dsname != NULL) { + len = dsname - name; + dsname++; + } + memcpy(poolname, name, len); + poolname[len] = '\0'; + + spa = spa_find_by_name(poolname); + if (!spa) + return (ENXIO); + rv = zfs_spa_init(spa); + if (rv != 0) + return (rv); + if (dsname != NULL) + rv = zfs_lookup_dataset(spa, dsname, &objid); + else + rv = zfs_get_root(spa, &objid); + if (rv != 0) + return (rv); + rv = zfs_list_dataset(spa, objid); + return (0); +} Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:25:40 2012 (r241282) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:27:04 2012 (r241283) @@ -1387,8 +1387,6 @@ zap_lookup(const spa_t *spa, const dnode return (EIO); } -#ifdef BOOT2 - /* * List a microzap directory. Assumes that the zap scratch buffer contains * the directory contents. @@ -1513,8 +1511,6 @@ zap_list(const spa_t *spa, const dnode_p return fzap_list(spa, dnode); } -#endif - static int objset_get_dnode(const spa_t *spa, const objset_phys_t *os, uint64_t objnum, dnode_phys_t *dnode) { @@ -1751,6 +1747,38 @@ zfs_lookup_dataset(const spa_t *spa, con return (0); } +#ifndef BOOT2 +static int +zfs_list_dataset(const spa_t *spa, uint64_t objnum/*, int pos, char *entry*/) +{ + uint64_t dir_obj, child_dir_zapobj; + dnode_phys_t child_dir_zap, dir, dataset; + dsl_dataset_phys_t *ds; + dsl_dir_phys_t *dd; + + if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); + return (EIO); + } + ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; + dir_obj = ds->ds_dir_obj; + + if (objset_get_dnode(spa, &spa->spa_mos, dir_obj, &dir)) { + printf("ZFS: can't find dirobj %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + dd = (dsl_dir_phys_t *)&dir.dn_bonus; + + child_dir_zapobj = dd->dd_child_dir_zapobj; + if (objset_get_dnode(spa, &spa->spa_mos, child_dir_zapobj, &child_dir_zap) != 0) { + printf("ZFS: can't find child zap %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + + return (zap_list(spa, &child_dir_zap) != 0); +} +#endif + /* * Find the object set given the object number of its dataset object * and return its details in *objset From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:27:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 614A11065670; Sat, 6 Oct 2012 19:27:55 +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 4BA2B8FC1A; Sat, 6 Oct 2012 19:27:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JRtlo025315; Sat, 6 Oct 2012 19:27:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JRt0w025313; Sat, 6 Oct 2012 19:27:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061927.q96JRt0w025313@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241284 - head/sys/boot/i386/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:27:55 -0000 Author: avg Date: Sat Oct 6 19:27:54 2012 New Revision: 241284 URL: http://svn.freebsd.org/changeset/base/241284 Log: zfs boot: add lszfs command to i386 loader ... to list child datasets of a specified dataset. Dataset name should be provided in poolname/dsname format. MFC after: 17 days Modified: head/sys/boot/i386/loader/main.c Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Sat Oct 6 19:27:04 2012 (r241283) +++ head/sys/boot/i386/loader/main.c Sat Oct 6 19:27:54 2012 (r241284) @@ -322,6 +322,29 @@ command_heap(int argc, char *argv[]) return(CMD_OK); } +#ifdef LOADER_ZFS_SUPPORT +COMMAND_SET(lszfs, "lszfs", "list child datasets of a zfs dataset", + command_lszfs); + +static int +command_lszfs(int argc, char *argv[]) +{ + int err; + + if (argc != 2) { + command_errmsg = "wrong number of arguments"; + return (CMD_ERROR); + } + + err = zfs_list(argv[1]); + if (err != 0) { + command_errmsg = strerror(err); + return (CMD_ERROR); + } + return (CMD_OK); +} +#endif + /* ISA bus access functions for PnP. */ static int isa_inb(int port) From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:28:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FB051065679; Sat, 6 Oct 2012 19:28:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89DD18FC08; Sat, 6 Oct 2012 19:28:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JSJd3025410; Sat, 6 Oct 2012 19:28:19 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JSJIj025408; Sat, 6 Oct 2012 19:28:19 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210061928.q96JSJIj025408@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Oct 2012 19:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241285 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:28:19 -0000 Author: marcel Date: Sat Oct 6 19:28:19 2012 New Revision: 241285 URL: http://svn.freebsd.org/changeset/base/241285 Log: Update to include WITH_BMAKE. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Oct 6 19:27:54 2012 (r241284) +++ head/share/man/man5/src.conf.5 Sat Oct 6 19:28:19 2012 (r241285) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd September 19, 2012 +.Dd October 6, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -217,6 +217,15 @@ toolchain is enabled. .It Va WITHOUT_BLUETOOTH .\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. +.It Va WITH_BMAKE +.\" from FreeBSD: head/tools/build/options/WITH_BMAKE 241279 2012-10-06 19:19:21Z marcel +Build and install the portable BSD make (bmake) as +.Xr make 1 +instead of the traditional FreeBSD make. +This build option is temporary. +It allows developers to switch to bmake in order to work out any remaining +kinks or issues. +This option will be removed in due time. .It Va WITHOUT_BOOT .\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. @@ -552,7 +561,7 @@ Set to build some programs without IPX s Set to not build tools for the support of jails; e.g. .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" $FreeBSD$ +.\" from FreeBSD: head/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:33:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 118CE106566C; Sat, 6 Oct 2012 19:33:48 +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 E6E1D8FC12; Sat, 6 Oct 2012 19:33:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JXli4026194; Sat, 6 Oct 2012 19:33:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JXlur026189; Sat, 6 Oct 2012 19:33:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061933.q96JXlur026189@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241286 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:33:48 -0000 Author: avg Date: Sat Oct 6 19:33:47 2012 New Revision: 241286 URL: http://svn.freebsd.org/changeset/base/241286 Log: zfs_mount: taste geom providers for root pool config This should allow to mount a dataset as a root filesystem even if it belongs to a pool that is not described in zpool.cache. This adds some overhead to the boot process though. If the root filesystem's pool is found in zpool.cache, the by default its cached configuration will be used for import. vfs.zfs.rootpool.prefer_cached_config could be set to zero to force the config to be retasted. Discussed with: gibbs, pjd, des MFC after: 25 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Oct 6 19:33:47 2012 (r241286) @@ -3550,8 +3550,8 @@ spa_create(const char *pool, nvlist_t *n return (0); } -#if defined(sun) #ifdef _KERNEL +#if defined(sun) /* * Get the root pool information from the root disk, then import the root pool * during the system boot up time. @@ -3753,8 +3753,115 @@ out: return (error); } -#endif +#else + +extern int +vdev_geom_read_pool_label(const char *name, nvlist_t **config); + +static nvlist_t * +spa_generate_rootconf(const char *name) +{ + nvlist_t *config; + nvlist_t *nvtop, *nvroot; + uint64_t pgid; + + if (vdev_geom_read_pool_label(name, &config) != 0) + return (NULL); + + /* + * Add this top-level vdev to the child array. + */ + VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, + &nvtop) == 0); + VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, + &pgid) == 0); + + /* + * Put this pool's top-level vdevs into a root vdev. + */ + VERIFY(nvlist_alloc(&nvroot, NV_UNIQUE_NAME, KM_SLEEP) == 0); + VERIFY(nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, + VDEV_TYPE_ROOT) == 0); + VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) == 0); + VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid) == 0); + VERIFY(nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, + &nvtop, 1) == 0); + + /* + * Replace the existing vdev_tree with the new root vdev in + * this pool's configuration (remove the old, add the new). + */ + VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0); + nvlist_free(nvroot); + return (config); +} + +int +spa_import_rootpool(const char *name) +{ + spa_t *spa; + vdev_t *rvd, *bvd, *avd = NULL; + nvlist_t *config, *nvtop; + uint64_t txg; + char *pname; + int error; + + /* + * Read the label from the boot device and generate a configuration. + */ + config = spa_generate_rootconf(name); + if (config == NULL) { + cmn_err(CE_NOTE, "Cannot find the pool label for '%s'", + name); + return (EIO); + } + + VERIFY(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, + &pname) == 0 && strcmp(name, pname) == 0); + VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) == 0); + + mutex_enter(&spa_namespace_lock); + if ((spa = spa_lookup(pname)) != NULL) { + /* + * Remove the existing root pool from the namespace so that we + * can replace it with the correct config we just read in. + */ + spa_remove(spa); + } + spa = spa_add(pname, config, NULL); + spa->spa_is_root = B_TRUE; + spa->spa_import_flags = ZFS_IMPORT_VERBATIM; + + /* + * Build up a vdev tree based on the boot device's label config. + */ + VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, + &nvtop) == 0); + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + error = spa_config_parse(spa, &rvd, nvtop, NULL, 0, + VDEV_ALLOC_ROOTPOOL); + spa_config_exit(spa, SCL_ALL, FTAG); + if (error) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); + cmn_err(CE_NOTE, "Can not parse the config for pool '%s'", + pname); + return (error); + } + + error = 0; + spa_history_log_version(spa, LOG_POOL_IMPORT); +out: + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + vdev_free(rvd); + spa_config_exit(spa, SCL_ALL, FTAG); + mutex_exit(&spa_namespace_lock); + + return (error); +} + #endif /* sun */ +#endif /* * Import a non-root pool into the system. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Sat Oct 6 19:33:47 2012 (r241286) @@ -419,7 +419,11 @@ extern int spa_get_stats(const char *poo size_t buflen); extern int spa_create(const char *pool, nvlist_t *config, nvlist_t *props, const char *history_str, nvlist_t *zplprops); +#if defined(sun) extern int spa_import_rootpool(char *devpath, char *devid); +#else +extern int spa_import_rootpool(const char *name); +#endif extern int spa_import(const char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags); extern nvlist_t *spa_tryimport(nvlist_t *tryconfig); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Oct 6 19:33:47 2012 (r241286) @@ -178,17 +178,11 @@ vdev_geom_detach(void *arg, int flag __u static uint64_t nvlist_get_guid(nvlist_t *list) { - nvpair_t *elem = NULL; uint64_t value; - while ((elem = nvlist_next_nvpair(list, elem)) != NULL) { - if (nvpair_type(elem) == DATA_TYPE_UINT64 && - strcmp(nvpair_name(elem), "guid") == 0) { - VERIFY(nvpair_value_uint64(elem, &value) == 0); - return (value); - } - } - return (0); + value = 0; + nvlist_lookup_uint64(list, ZPOOL_CONFIG_GUID, &value); + return (value); } static int @@ -226,8 +220,16 @@ vdev_geom_io(struct g_consumer *cp, int return (error); } -static uint64_t -vdev_geom_read_guid(struct g_consumer *cp) +static void +vdev_geom_taste_orphan(struct g_consumer *cp) +{ + + KASSERT(1 == 0, ("%s called while tasting %s.", __func__, + cp->provider->name)); +} + +static int +vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config) { struct g_provider *pp; vdev_label_t *label; @@ -235,13 +237,13 @@ vdev_geom_read_guid(struct g_consumer *c size_t buflen; uint64_t psize; off_t offset, size; - uint64_t guid; + uint64_t guid, state, txg; int error, l, len; g_topology_assert_not(); pp = cp->provider; - ZFS_LOG(1, "Reading guid from %s...", pp->name); + ZFS_LOG(1, "Reading config from %s...", pp->name); psize = pp->mediasize; psize = P2ALIGN(psize, (uint64_t)sizeof(vdev_label_t)); @@ -253,8 +255,8 @@ vdev_geom_read_guid(struct g_consumer *c label = kmem_alloc(size, KM_SLEEP); buflen = sizeof(label->vl_vdev_phys.vp_nvlist); + *config = NULL; for (l = 0; l < VDEV_LABELS; l++) { - nvlist_t *config = NULL; offset = vdev_label_offset(psize, l, 0); if ((offset % pp->sectorsize) != 0) @@ -264,27 +266,149 @@ vdev_geom_read_guid(struct g_consumer *c continue; buf = label->vl_vdev_phys.vp_nvlist; - if (nvlist_unpack(buf, buflen, &config, 0) != 0) + if (nvlist_unpack(buf, buflen, config, 0) != 0) continue; - guid = nvlist_get_guid(config); - nvlist_free(config); - if (guid != 0) - break; + if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE, + &state) != 0 || state >= POOL_STATE_DESTROYED) { + nvlist_free(*config); + *config = NULL; + continue; + } + + if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, + &txg) != 0 || txg == 0) { + nvlist_free(*config); + *config = NULL; + continue; + } + + break; } kmem_free(label, size); - if (guid != 0) - ZFS_LOG(1, "guid for %s is %ju", pp->name, (uintmax_t)guid); - return (guid); + return (*config == NULL ? ENOENT : 0); +} + +static int +vdev_geom_check_config(nvlist_t *config, const char *name, uint64_t *best_txg) +{ + uint64_t vdev_guid; + uint64_t txg; + char *pname; + + if (nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, &pname) != 0 || + strcmp(pname, name) != 0) + return (ENOENT); + + ZFS_LOG(1, "found pool: %s", pname); + + txg = 0; + nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg); + if (txg <= *best_txg) + return (ENOENT); + *best_txg = txg; + ZFS_LOG(1, "txg: %ju", (uintmax_t)*best_txg); + + return (0); +} + +static int +vdev_geom_attach_taster(struct g_consumer *cp, struct g_provider *pp) +{ + int error; + + if (pp->flags & G_PF_WITHER) + return (EINVAL); + if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) + return (EINVAL); + g_attach(cp, pp); + error = g_access(cp, 1, 0, 0); + if (error != 0) + g_detach(cp); + return (error); } static void -vdev_geom_taste_orphan(struct g_consumer *cp) +vdev_geom_dettach_taster(struct g_consumer *cp) { + g_access(cp, -1, 0, 0); + g_detach(cp); +} - KASSERT(1 == 0, ("%s called while tasting %s.", __func__, - cp->provider->name)); +int +vdev_geom_read_pool_label(const char *name, nvlist_t **config) +{ + struct g_class *mp; + struct g_geom *gp, *zgp; + struct g_provider *pp; + struct g_consumer *zcp; + nvlist_t *vdev_cfg; + uint64_t best_txg; + int error; + + DROP_GIANT(); + g_topology_lock(); + + zgp = g_new_geomf(&zfs_vdev_class, "zfs::vdev::taste"); + /* This orphan function should be never called. */ + zgp->orphan = vdev_geom_taste_orphan; + zcp = g_new_consumer(zgp); + + best_txg = 0; + *config = NULL; + LIST_FOREACH(mp, &g_classes, class) { + if (mp == &zfs_vdev_class) + continue; + LIST_FOREACH(gp, &mp->geom, geom) { + if (gp->flags & G_GEOM_WITHER) + continue; + LIST_FOREACH(pp, &gp->provider, provider) { + if (pp->flags & G_PF_WITHER) + continue; + if (vdev_geom_attach_taster(zcp, pp) != 0) + continue; + g_topology_unlock(); + error = vdev_geom_read_config(zcp, &vdev_cfg); + g_topology_lock(); + vdev_geom_dettach_taster(zcp); + if (error) + continue; + ZFS_LOG(1, "successfully read vdev config"); + + error = vdev_geom_check_config(vdev_cfg, name, + &best_txg); + if (error != 0) { + nvlist_free(vdev_cfg); + continue; + } + nvlist_free(*config); + *config = vdev_cfg; + } + } + } + + g_destroy_consumer(zcp); + g_destroy_geom(zgp); + g_topology_unlock(); + PICKUP_GIANT(); + return (*config == NULL ? ENOENT : 0); +} + +static uint64_t +vdev_geom_read_guid(struct g_consumer *cp) +{ + nvlist_t *config; + uint64_t guid; + + g_topology_assert_not(); + + guid = 0; + if (vdev_geom_read_config(cp, &config) == 0) { + guid = nvlist_get_guid(config); + nvlist_free(config); + } + return (guid); } static struct g_consumer * @@ -311,18 +435,12 @@ vdev_geom_attach_by_guid(uint64_t guid) if (gp->flags & G_GEOM_WITHER) continue; LIST_FOREACH(pp, &gp->provider, provider) { - if (pp->flags & G_PF_WITHER) - continue; - g_attach(zcp, pp); - if (g_access(zcp, 1, 0, 0) != 0) { - g_detach(zcp); + if (vdev_geom_attach_taster(zcp, pp) != 0) continue; - } g_topology_unlock(); pguid = vdev_geom_read_guid(zcp); g_topology_lock(); - g_access(zcp, -1, 0, 0); - g_detach(zcp); + vdev_geom_dettach_taster(zcp); if (pguid != guid) continue; cp = vdev_geom_attach(pp); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Oct 6 19:33:47 2012 (r241286) @@ -1539,6 +1539,25 @@ out: } #endif /* OPENSOLARIS_MOUNTROOT */ +static int +getpoolname(const char *osname, char *poolname) +{ + char *p; + + p = strchr(osname, '/'); + if (p == NULL) { + if (strlen(osname) >= MAXNAMELEN) + return (ENAMETOOLONG); + (void) strcpy(poolname, osname); + } else { + if (p - osname >= MAXNAMELEN) + return (ENAMETOOLONG); + (void) strncpy(poolname, osname, p - osname); + poolname[p - osname] = '\0'; + } + return (0); +} + /*ARGSUSED*/ static int zfs_mount(vfs_t *vfsp) @@ -1632,6 +1651,29 @@ zfs_mount(vfs_t *vfsp) goto out; } + /* Initial root mount: try hard to import the requested root pool. */ + if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 && + (vfsp->vfs_flag & MNT_UPDATE) == 0) { + char pname[MAXNAMELEN]; + spa_t *spa; + int prefer_cache; + + error = getpoolname(osname, pname); + if (error) + goto out; + + prefer_cache = 1; + TUNABLE_INT_FETCH("vfs.zfs.rootpool.prefer_cached_config", + &prefer_cache); + mutex_enter(&spa_namespace_lock); + spa = spa_lookup(pname); + mutex_exit(&spa_namespace_lock); + if (!prefer_cache || spa == NULL) { + error = spa_import_rootpool(pname); + if (error) + goto out; + } + } DROP_GIANT(); error = zfs_domount(vfsp, osname); PICKUP_GIANT(); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:33:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65D7D106566B; Sat, 6 Oct 2012 19:33:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5128A8FC16; Sat, 6 Oct 2012 19:33:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JXr7F026238; Sat, 6 Oct 2012 19:33:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JXrwn026236; Sat, 6 Oct 2012 19:33:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210061933.q96JXrwn026236@svn.freebsd.org> From: Alan Cox Date: Sat, 6 Oct 2012 19:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241287 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:33:53 -0000 Author: alc Date: Sat Oct 6 19:33:52 2012 New Revision: 241287 URL: http://svn.freebsd.org/changeset/base/241287 Log: In general pmap implementations do not set the wired attribute on the temporary mappings that are used to implement operations like pmap_zero_page(). There is no reason for the MIPS pmap to deviate from that practice. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Oct 6 19:33:47 2012 (r241286) +++ head/sys/mips/mips/pmap.c Sat Oct 6 19:33:52 2012 (r241287) @@ -239,8 +239,7 @@ pmap_lmem_map1(vm_paddr_t phys) sysm = &sysmap_lmem[cpu]; sysm->saved_intr = intr; va = sysm->base; - npte = TLBLO_PA_TO_PFN(phys) | - PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(phys) | PTE_C_CACHE | PTE_D | PTE_V | PTE_G; pte = pmap_pte(kernel_pmap, va); *pte = npte; sysm->valid1 = 1; @@ -262,12 +261,10 @@ pmap_lmem_map2(vm_paddr_t phys1, vm_padd sysm->saved_intr = intr; va1 = sysm->base; va2 = sysm->base + PAGE_SIZE; - npte = TLBLO_PA_TO_PFN(phys1) | - PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(phys1) | PTE_C_CACHE | PTE_D | PTE_V | PTE_G; pte = pmap_pte(kernel_pmap, va1); *pte = npte; - npte = TLBLO_PA_TO_PFN(phys2) | - PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(phys2) | PTE_C_CACHE | PTE_D | PTE_V | PTE_G; pte = pmap_pte(kernel_pmap, va2); *pte = npte; sysm->valid1 = 1; @@ -2329,7 +2326,8 @@ pmap_kenter_temporary(vm_paddr_t pa, int cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; /* Since this is for the debugger, no locks or any other fun */ - npte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(pa) | PTE_C_CACHE | PTE_D | PTE_V | + PTE_G; pte = pmap_pte(kernel_pmap, sysm->base); *pte = npte; sysm->valid1 = 1; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:38:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92B70106566B; Sat, 6 Oct 2012 19:38:34 +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 7D1298FC12; Sat, 6 Oct 2012 19:38:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JcY3c026917; Sat, 6 Oct 2012 19:38:34 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JcYlf026915; Sat, 6 Oct 2012 19:38:34 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061938.q96JcYlf026915@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241288 - head/sys/boot/i386/zfsboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:38:34 -0000 Author: avg Date: Sat Oct 6 19:38:33 2012 New Revision: 241288 URL: http://svn.freebsd.org/changeset/base/241288 Log: zfsboot: use the same zfs dataset naming format as loader Also, pool name alone now names a root dataset of the pool regardless of bootfs property value. MFC after: 15 days Modified: head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:33:52 2012 (r241287) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:38:33 2012 (r241288) @@ -553,7 +553,7 @@ main(void) if (parse()) autoboot = 0; if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmddup); + printf("%s: %s\n", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } @@ -577,13 +577,17 @@ main(void) if (!autoboot || !OPT_CHECK(RBX_QUIET)) { printf("\nFreeBSD/x86 boot\n"); if (zfs_rlookup(spa, zfsmount.rootobj, rootname) != 0) - printf("Default: %s:<0x%llx>:%s\n" + printf("Default: %s/<0x%llx>:%s\n" "boot: ", spa->spa_name, zfsmount.rootobj, kname); - else - printf("Default: %s:%s:%s\n" + else if (rootname[0] != '\0') + printf("Default: %s/%s:%s\n" "boot: ", spa->spa_name, rootname, kname); + else + printf("Default: %s:%s\n" + "boot: ", + spa->spa_name, kname); } if (ioctrl & IO_SERIAL) sio_flush(); @@ -708,12 +712,46 @@ load(void) } static int +zfs_mount_ds(char *dsname) +{ + uint64_t newroot; + spa_t *newspa; + char *q; + + q = strchr(dsname, '/'); + if (q) + *q++ = '\0'; + newspa = spa_find_by_name(dsname); + if (newspa == NULL) { + printf("\nCan't find ZFS pool %s\n", dsname); + return -1; + } + + if (zfs_spa_init(newspa)) + return -1; + + newroot = 0; + if (q) { + if (zfs_lookup_dataset(newspa, q, &newroot)) { + printf("\nCan't find dataset %s in ZFS pool %s\n", + q, newspa->spa_name); + return -1; + } + } + if (zfs_mount(newspa, newroot, &zfsmount)) { + printf("\nCan't mount ZFS dataset\n"); + return -1; + } + spa = newspa; + return (0); +} + +static int parse(void) { char *arg = cmd; char *ep, *p, *q; const char *cp; - //unsigned int drv; int c, i, j; while ((c = *arg++)) { @@ -773,37 +811,20 @@ parse(void) } /* + * If there is "zfs:" prefix simply ignore it. + */ + if (strncmp(arg, "zfs:", 4) == 0) + arg += 4; + + /* * If there is a colon, switch pools. */ - q = (char *) strchr(arg, ':'); + q = strchr(arg, ':'); if (q) { - spa_t *newspa; - uint64_t newroot; - - *q++ = 0; - newspa = spa_find_by_name(arg); - if (newspa) { - arg = q; - spa = newspa; - newroot = 0; - q = (char *) strchr(arg, ':'); - if (q) { - *q++ = 0; - if (zfs_lookup_dataset(spa, arg, &newroot)) { - printf("\nCan't find dataset %s in ZFS pool %s\n", - arg, spa->spa_name); - return -1; - } - arg = q; - } - if (zfs_mount(spa, newroot, &zfsmount)) { - printf("\nCan't mount ZFS dataset\n"); - return -1; - } - } else { - printf("\nCan't find ZFS pool %s\n", arg); + *q++ = '\0'; + if (zfs_mount_ds(arg) != 0) return -1; - } + arg = q; } if ((i = ep - arg)) { if ((size_t)i >= sizeof(kname)) From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:40:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DE331065742; Sat, 6 Oct 2012 19:40:13 +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 3ECEB8FC1B; Sat, 6 Oct 2012 19:40:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JeDof027178; Sat, 6 Oct 2012 19:40:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JeDAj027175; Sat, 6 Oct 2012 19:40:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061940.q96JeDAj027175@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241289 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:40:13 -0000 Author: avg Date: Sat Oct 6 19:40:12 2012 New Revision: 241289 URL: http://svn.freebsd.org/changeset/base/241289 Log: boot/zfs: call zfs_spa_init for all found pools ... and drop those for which it fails. Also, add more sanity checking to the function. MFC after: 16 days Modified: head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:38:33 2012 (r241288) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:40:12 2012 (r241289) @@ -370,10 +370,28 @@ vdev_read(vdev_t *vdev, void *priv, off_ static int zfs_dev_init(void) { + spa_t *spa; + spa_t *next; + spa_t *prev; + zfs_init(); if (archsw.arch_zfs_probe == NULL) return (ENXIO); archsw.arch_zfs_probe(); + + prev = NULL; + spa = STAILQ_FIRST(&zfs_pools); + while (spa != NULL) { + next = STAILQ_NEXT(spa, spa_link); + if (zfs_spa_init(spa)) { + if (prev == NULL) + STAILQ_REMOVE_HEAD(&zfs_pools, spa_link); + else + STAILQ_REMOVE_AFTER(&zfs_pools, prev, spa_link); + } else + prev = spa; + spa = next; + } return (0); } @@ -519,9 +537,6 @@ zfs_dev_open(struct open_file *f, ...) spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); mount = malloc(sizeof(*mount)); rv = zfs_mount(spa, dev->root_guid, mount); if (rv != 0) { @@ -601,9 +616,6 @@ zfs_parsedev(struct zfs_devdesc *dev, co spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); dev->pool_guid = spa->spa_guid; if (rootname[0] != '\0') { rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); @@ -638,10 +650,6 @@ zfs_fmtdev(void *vdev) printf("ZFS: can't find pool by guid\n"); return (buf); } - if (zfs_spa_init(spa) != 0) { - printf("ZFS: can't init pool\n"); - return (buf); - } if (dev->root_guid == 0 && zfs_get_root(spa, &dev->root_guid)) { printf("ZFS: can't find root filesystem\n"); return (buf); @@ -681,9 +689,6 @@ zfs_list(const char *name) spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); if (dsname != NULL) rv = zfs_lookup_dataset(spa, dsname, &objid); else Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:38:33 2012 (r241288) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:40:12 2012 (r241289) @@ -1881,13 +1881,14 @@ static int zfs_spa_init(spa_t *spa) { - if (spa->spa_inited) - return (0); if (zio_read(spa, &spa->spa_uberblock.ub_rootbp, &spa->spa_mos)) { printf("ZFS: can't read MOS of pool %s\n", spa->spa_name); return (EIO); } - spa->spa_inited = 1; + if (spa->spa_mos.os_type != DMU_OST_META) { + printf("ZFS: corrupted MOS of pool %s\n", spa->spa_name); + return (EIO); + } return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:41:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68CC21065670; Sat, 6 Oct 2012 19:41:12 +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 537008FC1D; Sat, 6 Oct 2012 19:41:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JfCwF027355; Sat, 6 Oct 2012 19:41:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JfCLh027353; Sat, 6 Oct 2012 19:41:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061941.q96JfCLh027353@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241290 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:41:12 -0000 Author: avg Date: Sat Oct 6 19:41:11 2012 New Revision: 241290 URL: http://svn.freebsd.org/changeset/base/241290 Log: boot/zfs: a small whitespace cleanup MFC after: 5 days Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:40:12 2012 (r241289) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:41:11 2012 (r241290) @@ -554,7 +554,7 @@ zfs_dev_open(struct open_file *f, ...) return (0); } -static int +static int zfs_dev_close(struct open_file *f) { @@ -563,7 +563,7 @@ zfs_dev_close(struct open_file *f) return (0); } -static int +static int zfs_dev_strategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:42:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7242A1065688; Sat, 6 Oct 2012 19:42:06 +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 5D1288FC0C; Sat, 6 Oct 2012 19:42:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Jg62r027566; Sat, 6 Oct 2012 19:42:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Jg63w027564; Sat, 6 Oct 2012 19:42:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061942.q96Jg63w027564@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241291 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:42:06 -0000 Author: avg Date: Sat Oct 6 19:42:05 2012 New Revision: 241291 URL: http://svn.freebsd.org/changeset/base/241291 Log: zfs boot spa_status: print bootfs for each reported pool MFC after: 9 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:41:11 2012 (r241290) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:42:05 2012 (r241291) @@ -71,6 +71,8 @@ static char *zfs_temp_buf, *zfs_temp_end #define TEMP_SIZE (1024 * 1024) static int zio_read(const spa_t *spa, const blkptr_t *bp, void *buf); +static int zfs_get_root(const spa_t *spa, uint64_t *objid); +static int zfs_rlookup(const spa_t *spa, uint64_t objnum, char *result); static void zfs_init(void) @@ -784,11 +786,20 @@ vdev_status(vdev_t *vdev, int indent) static void spa_status(spa_t *spa) { + static char bootfs[ZFS_MAXNAMELEN]; + uint64_t rootid; vdev_t *vdev; int good_kids, bad_kids, degraded_kids; vdev_state_t state; pager_printf(" pool: %s\n", spa->spa_name); + if (zfs_get_root(spa, &rootid) == 0 && + zfs_rlookup(spa, rootid, bootfs) == 0) { + if (bootfs[0] == '\0') + pager_printf("bootfs: %s\n", spa->spa_name); + else + pager_printf("bootfs: %s/%s\n", spa->spa_name, bootfs); + } pager_printf("config:\n\n"); pager_printf(STATUS_FORMAT, "NAME", "STATE"); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:42:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 220E8106564A; Sat, 6 Oct 2012 19:42:51 +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 0E6438FC17; Sat, 6 Oct 2012 19:42:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Jgo8n027705; Sat, 6 Oct 2012 19:42:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Jgoo6027703; Sat, 6 Oct 2012 19:42:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061942.q96Jgoo6027703@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241292 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:42:51 -0000 Author: avg Date: Sat Oct 6 19:42:50 2012 New Revision: 241292 URL: http://svn.freebsd.org/changeset/base/241292 Log: zfs loader: treat plain pool name as a name of its root dataset ... as opposed to the previous behavior of treating it as boot dataset (specified by bootfs or default) MFC after: 19 days Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:42:05 2012 (r241291) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:42:50 2012 (r241292) @@ -617,12 +617,9 @@ zfs_parsedev(struct zfs_devdesc *dev, co if (!spa) return (ENXIO); dev->pool_guid = spa->spa_guid; - if (rootname[0] != '\0') { - rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); - if (rv != 0) - return (rv); - } else - dev->root_guid = 0; + rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); + if (rv != 0) + return (rv); if (path != NULL) *path = (*end == '\0') ? end : end + 1; dev->d_dev = &zfs_dev; @@ -642,9 +639,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - if (dev->pool_guid == 0) + if (dev->pool_guid == 0) { spa = STAILQ_FIRST(&zfs_pools); - else + dev->pool_guid = spa->spa_guid; + } else spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); @@ -682,19 +680,17 @@ zfs_list(const char *name) if (dsname != NULL) { len = dsname - name; dsname++; - } + } else + dsname = ""; memcpy(poolname, name, len); poolname[len] = '\0'; spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - if (dsname != NULL) - rv = zfs_lookup_dataset(spa, dsname, &objid); - else - rv = zfs_get_root(spa, &objid); + rv = zfs_lookup_dataset(spa, dsname, &objid); if (rv != 0) return (rv); rv = zfs_list_dataset(spa, objid); - return (0); + return (rv); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:47:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00230106566B; Sat, 6 Oct 2012 19:47:24 +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 DE6228FC0A; Sat, 6 Oct 2012 19:47:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JlOZO028392; Sat, 6 Oct 2012 19:47:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JlOpN028387; Sat, 6 Oct 2012 19:47:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061947.q96JlOpN028387@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241293 - in head/sys/boot: i386/loader i386/zfsboot zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:47:25 -0000 Author: avg Date: Sat Oct 6 19:47:24 2012 New Revision: 241293 URL: http://svn.freebsd.org/changeset/base/241293 Log: zfs boot: export boot/primary pool and vdev guid all the way to kenv This is work in progress to for znextboot and it also provides some convenient infrastructure. MFC after: 20 days Modified: head/sys/boot/i386/loader/main.c head/sys/boot/i386/zfsboot/zfsboot.c head/sys/boot/zfs/libzfs.h head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/i386/loader/main.c Sat Oct 6 19:47:24 2012 (r241293) @@ -209,6 +209,7 @@ extract_currdev(void) { struct i386_devdesc new_currdev; #ifdef LOADER_ZFS_SUPPORT + char buf[20]; struct zfs_boot_args *zargs; #endif int biosdev = -1; @@ -239,10 +240,17 @@ extract_currdev(void) if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) zargs = (struct zfs_boot_args *)(kargs + 1); - if (zargs != NULL && zargs->size >= sizeof(*zargs)) { + if (zargs != NULL && + zargs->size >= offsetof(struct zfs_boot_args, primary_pool)) { /* sufficient data is provided */ new_currdev.d_kind.zfs.pool_guid = zargs->pool; new_currdev.d_kind.zfs.root_guid = zargs->root; + if (zargs->size >= sizeof(*zargs) && zargs->primary_vdev != 0) { + sprintf(buf, "%llu", zargs->primary_pool); + setenv("vfs.zfs.boot.primary_pool", buf, 1); + sprintf(buf, "%llu", zargs->primary_vdev); + setenv("vfs.zfs.boot.primary_vdev", buf, 1); + } } else { /* old style zfsboot block */ new_currdev.d_kind.zfs.pool_guid = kargs->zfspool; Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:47:24 2012 (r241293) @@ -176,6 +176,8 @@ zfs_read(spa_t *spa, const dnode_phys_t * Current ZFS pool */ static spa_t *spa; +static spa_t *primary_spa; +static vdev_t *primary_vdev; /* * A wrapper for dskread that doesn't have to worry about whether the @@ -526,7 +528,7 @@ main(void) * first pool we found, if any. */ if (!spa) { - spa = STAILQ_FIRST(&zfs_pools); + spa = spa_get_primary(); if (!spa) { printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); for (;;) @@ -534,6 +536,9 @@ main(void) } } + primary_spa = spa; + primary_vdev = spa_get_primary_vdev(spa); + if (zfs_spa_init(spa) != 0 || zfs_mount(spa, 0, &zfsmount) != 0) { printf("%s: failed to mount default pool %s\n", BOOTPROG, spa->spa_name); @@ -702,6 +707,11 @@ load(void) zfsargs.size = sizeof(zfsargs); zfsargs.pool = zfsmount.spa->spa_guid; zfsargs.root = zfsmount.rootobj; + zfsargs.primary_pool = primary_spa->spa_guid; + if (primary_vdev != NULL) + zfsargs.primary_vdev = primary_vdev->v_guid; + else + printf("failed to detect primary vdev\n"); __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), bootdev, KARGS_FLAGS_ZFS | KARGS_FLAGS_EXTARG, Modified: head/sys/boot/zfs/libzfs.h ============================================================================== --- head/sys/boot/zfs/libzfs.h Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/zfs/libzfs.h Sat Oct 6 19:47:24 2012 (r241293) @@ -53,6 +53,8 @@ struct zfs_boot_args uint32_t reserved; uint64_t pool; uint64_t root; + uint64_t primary_pool; + uint64_t primary_vdev; }; int zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:47:24 2012 (r241293) @@ -706,6 +706,34 @@ spa_find_by_name(const char *name) return (0); } +#ifdef BOOT2 +static spa_t * +spa_get_primary(void) +{ + + return (STAILQ_FIRST(&zfs_pools)); +} + +static vdev_t * +spa_get_primary_vdev(const spa_t *spa) +{ + vdev_t *vdev; + vdev_t *kid; + + if (spa == NULL) + spa = spa_get_primary(); + if (spa == NULL) + return (NULL); + vdev = STAILQ_FIRST(&spa->spa_vdevs); + if (vdev == NULL) + return (NULL); + for (kid = STAILQ_FIRST(&vdev->v_children); kid != NULL; + kid = STAILQ_FIRST(&vdev->v_children)) + vdev = kid; + return (vdev); +} +#endif + static spa_t * spa_create(uint64_t guid) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:48:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E89A1065676; Sat, 6 Oct 2012 19:48:16 +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 6D0228FC20; Sat, 6 Oct 2012 19:48:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JmFBw028551; Sat, 6 Oct 2012 19:48:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JmFPU028549; Sat, 6 Oct 2012 19:48:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061948.q96JmFPU028549@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241294 - head/sys/boot/i386/zfsboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:48:16 -0000 Author: avg Date: Sat Oct 6 19:48:15 2012 New Revision: 241294 URL: http://svn.freebsd.org/changeset/base/241294 Log: zfsboot: simplify probe_drive() a little bit The first discovered pool, whether it covers the whole boot disk or not, is going to be first in zfs_pools list. So there is no need at all for spapp parameter. This commit also fixes a bug where NULL would be assigned to NULL pointer when probe_drive was called with the spapp parameter of NULL. MFC after: 21 days Modified: head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:47:24 2012 (r241293) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:48:15 2012 (r241294) @@ -345,7 +345,7 @@ copy_dsk(struct dsk *dsk) } static void -probe_drive(struct dsk *dsk, spa_t **spap) +probe_drive(struct dsk *dsk) { #ifdef GPT struct gpt_hdr hdr; @@ -359,9 +359,10 @@ probe_drive(struct dsk *dsk, spa_t **spa /* * If we find a vdev on the whole disk, stop here. Otherwise dig - * out the MBR and probe each slice in turn for a vdev. + * out the partition table and probe each slice/partition + * in turn for a vdev. */ - if (vdev_probe(vdev_read, dsk, spap) == 0) + if (vdev_probe(vdev_read, dsk, NULL) == 0) return; sec = dmadat->secbuf; @@ -399,13 +400,7 @@ probe_drive(struct dsk *dsk, spa_t **spa if (memcmp(&ent->ent_type, &freebsd_zfs_uuid, sizeof(uuid_t)) == 0) { dsk->start = ent->ent_lba_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try - * to boot from that one). - */ - spap = NULL; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk * structure now since the vdev now owns this one. @@ -428,13 +423,7 @@ trymbr: if (!dp[i].dp_typ) continue; dsk->start = dp[i].dp_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try to boot - * from that one. - */ - spap = 0; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk structure now * since the vdev now owns this one. @@ -493,7 +482,7 @@ main(void) * Probe the boot drive first - we will try to boot from whatever * pool we find on that drive. */ - probe_drive(dsk, &spa); + probe_drive(dsk); /* * Probe the rest of the drives that the bios knows about. This @@ -520,20 +509,17 @@ main(void) dsk->part = 0; dsk->start = 0; dsk->init = 0; - probe_drive(dsk, NULL); + probe_drive(dsk); } /* - * If we didn't find a pool on the boot drive, default to the - * first pool we found, if any. + * The first discovered pool, if any, is the pool. */ + spa = spa_get_primary(); if (!spa) { - spa = spa_get_primary(); - if (!spa) { - printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); - for (;;) - ; - } + printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); + for (;;) + ; } primary_spa = spa; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:50:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A57DE1065672; Sat, 6 Oct 2012 19:50:23 +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 908FD8FC14; Sat, 6 Oct 2012 19:50:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JoNVA028913; Sat, 6 Oct 2012 19:50:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JoNIk028911; Sat, 6 Oct 2012 19:50:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061950.q96JoNIk028911@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241295 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:50:23 -0000 Author: avg Date: Sat Oct 6 19:50:23 2012 New Revision: 241295 URL: http://svn.freebsd.org/changeset/base/241295 Log: cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit Reviewed by: julian MFC after: 10 days Modified: head/sys/kern/kern_cons.c Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Sat Oct 6 19:48:15 2012 (r241294) +++ head/sys/kern/kern_cons.c Sat Oct 6 19:50:23 2012 (r241295) @@ -384,7 +384,7 @@ cngetc(void) if (cn_mute) return (-1); while ((c = cncheckc()) == -1) - ; + cpu_spinwait(); if (c == '\r') c = '\n'; /* console input is always ICRNL */ return (c); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:52:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 020EF106566B; Sat, 6 Oct 2012 19:52:51 +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 DFDF78FC08; Sat, 6 Oct 2012 19:52:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JqoG4029410; Sat, 6 Oct 2012 19:52:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Jqo3D029407; Sat, 6 Oct 2012 19:52:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061952.q96Jqo3D029407@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:52:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241296 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:52:51 -0000 Author: avg Date: Sat Oct 6 19:52:50 2012 New Revision: 241296 URL: http://svn.freebsd.org/changeset/base/241296 Log: g_part_taste: directly destroy consumer and geom here, no need for withering Besides withered but still alive consumers may interfere with re-tatsing. MFC after: 16 days Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Sat Oct 6 19:50:23 2012 (r241295) +++ head/sys/geom/part/g_part.c Sat Oct 6 19:52:50 2012 (r241296) @@ -1880,7 +1880,10 @@ g_part_taste(struct g_class *mp, struct if (error == 0) error = g_access(cp, 1, 0, 0); if (error != 0) { - g_part_wither(gp, error); + if (cp->provider) + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } @@ -1940,7 +1943,9 @@ g_part_taste(struct g_class *mp, struct g_topology_lock(); root_mount_rel(rht); g_access(cp, -1, 0, 0); - g_part_wither(gp, error); + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 19:57:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F04231065670; Sat, 6 Oct 2012 19:57:27 +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 DA3798FC08; Sat, 6 Oct 2012 19:57:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JvRot030146; Sat, 6 Oct 2012 19:57:27 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JvRA5030144; Sat, 6 Oct 2012 19:57:27 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061957.q96JvRA5030144@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241297 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:57:28 -0000 Author: avg Date: Sat Oct 6 19:57:27 2012 New Revision: 241297 URL: http://svn.freebsd.org/changeset/base/241297 Log: zvol: set mediasize in geom provider right upon its creation ... instead of deferring the action until first open. Unlike upstream this has no benefit on FreeBSD. We know that as soon as the provider is created it is going to be tasted and thus opened. Initial mediasize of zero causes tasting failure and subsequent retasting because of the size change. MFC after: 14 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 6 19:52:50 2012 (r241296) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 6 19:57:27 2012 (r241297) @@ -475,6 +475,7 @@ zvol_create_minor(const char *name) zvol_state_t *zv; objset_t *os; dmu_object_info_t doi; + uint64_t volsize; int error; ZFS_LOG(1, "Creating ZVOL %s...", name); @@ -535,9 +536,20 @@ zvol_create_minor(const char *name) zv = zs->zss_data = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); #else /* !sun */ + error = zap_lookup(os, ZVOL_ZAP_OBJ, "size", 8, 1, &volsize); + if (error) { + ASSERT(error == 0); + dmu_objset_disown(os, zvol_tag); + mutex_exit(&spa_namespace_lock); + return (error); + } + DROP_GIANT(); g_topology_lock(); zv = zvol_geom_create(name); + zv->zv_volsize = volsize; + zv->zv_provider->mediasize = zv->zv_volsize; + #endif /* !sun */ (void) strlcpy(zv->zv_name, name, MAXPATHLEN); From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 20:01:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7D7610656C4; Sat, 6 Oct 2012 20:01:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 985A88FC14; Sat, 6 Oct 2012 20:01:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K16r0030772; Sat, 6 Oct 2012 20:01:06 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K16Or030755; Sat, 6 Oct 2012 20:01:06 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210062001.q96K16Or030755@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Oct 2012 20:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 20:01:07 -0000 Author: marcel Date: Sat Oct 6 20:01:05 2012 New Revision: 241298 URL: http://svn.freebsd.org/changeset/base/241298 Log: Add support for bmake. This includes: 1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE, there's a bootstrap complication in ths respect. Avoid it. Make the necessary changes to have upgrade_checks work wth bmake anyway. 2. Remove the use of -E. It's not needed in our build because we use ?= for the respective variables, which means that we'll take the environment value (if any) anyway. 3. Properly declare phony targets as phony as bmake is a lot smarter (and thus agressive) about build avoidance. 4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot smarter about build avoidance and should not find files we generate in the source tree. We should not have files in the repository we want to generate, but this is an easier way to cross this hurdle. 5. Have behavior under bmake the same as it is under make with respect to halting when sub-commands fail. Add "set -e" to compound commands so that bmake is informed when sub-commands fail. 6. Make sure crunchgen uses the same make as the rest of the build. This is important when the make utility isn't called make (but bmake for example). 7. While here, add support for using MAKEOBJDIR to set the object tree location. It's the second alternative bmake looks for when determining the actual object directory (= .OBJDIR). Submitted by: Simon Gerraty Submitted by: John Van Horne Modified: head/Makefile head/Makefile.inc1 head/gnu/usr.bin/cc/cc_int/Makefile head/gnu/usr.bin/cc/include/Makefile head/kerberos5/Makefile head/kerberos5/tools/asn1_compile/Makefile head/kerberos5/tools/slc/Makefile head/lib/clang/include/Makefile head/share/mk/bsd.crunchgen.mk head/share/mk/bsd.dep.mk head/share/mk/bsd.obj.mk head/share/mk/bsd.subdir.mk head/share/mk/bsd.sys.mk head/share/mk/sys.mk head/tools/build/make_check/Makefile head/usr.sbin/crunch/examples/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -280,12 +280,14 @@ kernel: buildkernel installkernel # for building the world. # upgrade_checks: +.if !defined(.PARSEDIR) @if ! (cd ${.CURDIR}/tools/build/make_check && \ PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \ PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \ then \ (cd ${.CURDIR} && ${MAKE} make); \ fi +.endif # # Upgrade make(1) to the current version using the installed Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 6 19:57:27 2012 (r241297) +++ head/Makefile.inc1 Sat Oct 6 20:01:05 2012 (r241298) @@ -330,7 +330,7 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \ + -DWITHOUT_HTML -DNO_CTF -DNO_LINT \ DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif Modified: head/gnu/usr.bin/cc/cc_int/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_int/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/gnu/usr.bin/cc/cc_int/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -98,4 +98,7 @@ SRCS+= ${OBJS-all:R:S/$/.c/g} toplev.o: toplev.c ${CC} ${CFLAGS} -DTARGET_NAME=\"${GCC_TARGET}\" -c ${.IMPSRC} +# make sure we don't find .o's in ../cc_tools/ +CLEANFILES+= ${OBJS-all} + .include Modified: head/gnu/usr.bin/cc/include/Makefile ============================================================================== --- head/gnu/usr.bin/cc/include/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/gnu/usr.bin/cc/include/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -21,6 +21,4 @@ mm_malloc.h: pmm_malloc.h @cp ${.ALLSRC} ${.TARGET} CLEANFILES+= mm_malloc.h -.include -.include -.include +.include Modified: head/kerberos5/Makefile ============================================================================== --- head/kerberos5/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/kerberos5/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= doc lib libexec usr.bin usr.sbin +SUBDIR= doc lib libexec tools usr.bin usr.sbin # These are the programs which depend on Kerberos. KPROGS= lib/libpam \ Modified: head/kerberos5/tools/asn1_compile/Makefile ============================================================================== --- head/kerberos5/tools/asn1_compile/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/kerberos5/tools/asn1_compile/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -25,7 +25,7 @@ SRCS= \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/asn1 -I. -CLEANFILES= roken.h +CLEANFILES= roken.h lex.c parse.c roken.h: make-roken > ${.TARGET} Modified: head/kerberos5/tools/slc/Makefile ============================================================================== --- head/kerberos5/tools/slc/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/kerberos5/tools/slc/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -12,7 +12,7 @@ SRCS= roken.h \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I${KRB5DIR}/lib/vers -I. -CLEANFILES= roken.h +CLEANFILES= roken.h slc-gram.c slc-lex.c roken.h: ${MAKE_ROKEN} > ${.TARGET} Modified: head/lib/clang/include/Makefile ============================================================================== --- head/lib/clang/include/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/lib/clang/include/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -30,6 +30,4 @@ INCS= altivec.h \ xmmintrin.h \ xopintrin.h -.include -.include -.include +.include Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.crunchgen.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -38,6 +38,8 @@ OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache CRUNCHOBJS= ${.OBJDIR} .if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:=${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} .endif Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.dep.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -102,8 +102,8 @@ ${_YC} y.tab.h: ${_YSRC} CLEANFILES+= y.tab.c y.tab.h .elif !empty(YFLAGS:M-d) .for _YH in ${_YC:R}.h -.ORDER: ${_YC} ${_YH} -${_YC} ${_YH}: ${_YSRC} +${_YH}: ${_YC} +${_YC}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} SRCS+= ${_YH} CLEANFILES+= ${_YH} @@ -123,6 +123,9 @@ ${_YC:R}.o: ${_YC} .if defined(SRCS) depend: beforedepend ${DEPENDFILE} afterdepend +# Tell bmake not to look for generated files via .PATH +.NOPATH: ${DEPENDFILE} + # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \ Modified: head/share/mk/bsd.obj.mk ============================================================================== --- head/share/mk/bsd.obj.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.obj.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -44,6 +44,8 @@ ____: .if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:=${MAKEOBJDIR} .else CANONICALOBJDIR:=/usr/obj${.CURDIR} .endif @@ -116,6 +118,11 @@ cleanobj: clean cleandepend .endif @if [ -L ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi +# Tell bmake not to look for generated files via .PATH +.if !empty(CLEANFILES) +.NOPATH: ${CLEANFILES} +.endif + .if !target(clean) clean: .if defined(CLEANFILES) && !empty(CLEANFILES) Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.subdir.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -42,7 +42,7 @@ distribute: _SUBDIR: .USE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}for entry in ${SUBDIR}; do \ + @${_+_}set -e; for entry in ${SUBDIR}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \ edir=$${entry}.${MACHINE_ARCH}; \ @@ -79,7 +79,7 @@ ${__stage}${__target}: _SUBDIR .endif .endfor ${__target}: - ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} + ${_+_}set -e; cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} .endfor .if !target(install) Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.sys.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -126,3 +126,18 @@ CFLAGS+= ${SSP_CFLAGS} # Allow user-specified additional warning flags CFLAGS+= ${CWARNFLAGS} + + +# Tell bmake not to mistake standard targets for things to be searched for +# or expect to ever be up-to-date. +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ + beforelinking build build-tools buildfiles buildincludes \ + checkdpadd clean cleandepend cleandir cleanobj configure \ + depend dependall distclean distribute exe extract fetch \ + html includes install installfiles installincludes lint \ + obj objlink objs objwarn patch realall realdepend \ + realinstall regress subdir-all subdir-depend subdir-install \ + tags whereobj + +.PHONY: ${PHONY_NOTMAIN} +.NOTMAIN: ${PHONY_NOTMAIN} Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/sys.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -16,6 +16,10 @@ unix ?= We run FreeBSD, not UNIX. MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} .endif +# Set any local definitions first. Place this early, but it needs +# MACHINE_CPUARCH to be defined. +.sinclude + # If the special target .POSIX appears (without prerequisites or # commands) before the first noncomment line in the makefile, make shall # process the makefile as specified by the Posix 1003.2 specification. @@ -324,8 +328,19 @@ SHELL= ${__MAKE_SHELL} # XXX hint for bsd.port.mk OBJFORMAT?= elf +# Tell bmake to expand -V VAR by default +.MAKE.EXPAND_VARIABLES= yes + +.if !defined(.PARSEDIR) +# We are not bmake, which is more aggressive about searching .PATH +# It is sometime necessary to curb its enthusiasm with .NOPATH +# The following allows us to quietly ignore .NOPATH when not using bmake. +.NOTMAIN: .NOPATH +.NOPATH: + # Toggle on warnings .WARN: dirsyntax +.endif .endif Modified: head/tools/build/make_check/Makefile ============================================================================== --- head/tools/build/make_check/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/tools/build/make_check/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -56,8 +56,10 @@ all: @echo "ok 14 shell # Test shell detected no regression." @${SMAKE} shell_1 || ${SMAKE} failure @echo "ok 15 shell_1 # Test shell_1 detected no regression." +.if !defined(.PARSEDIR) @${SMAKE} shell_2 || ${SMAKE} failure @echo "ok 16 shell_2 # Test shell_2 detected no regression." +.endif .if make(C_check) C_check: @@ -92,17 +94,34 @@ lhs_expn: # to determine its value; that was not always the case. .undef notdef notdef: -.if defined(notdef) && ${notdef:U} +.if defined(notdef) && ${notdef:M/} .endif .endif .if make(modifiers) -# See if make(1) supports the C modifier. +.if defined(.PARSEDIR) +# check if bmake can expand plain variables +.MAKE.EXPAND_VARIABLES= yes +x!= ${SMAKE} -V .CURDIR:H modifiers: +.if ${.CURDIR:H} != "$x" + @false +.endif +.else +# See if make(1) supports the C modifier. +modifiers: dollarV @if ${SMAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \ grep -q "Unknown modifier 'C'"; then \ false; \ fi + +# check that make -V '${VAR}' works +V_expn != V_OK=ok ${SMAKE} -r -f /dev/null -V '$${V_OK}' +dollarV: +.if ${V_expn} == "" + @false +.endif +.endif .endif .if make(arith_expr) Modified: head/usr.sbin/crunch/examples/Makefile ============================================================================== --- head/usr.sbin/crunch/examples/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/usr.sbin/crunch/examples/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -19,14 +19,14 @@ all: $(CRUNCHED) exe: $(CRUNCHED) $(OUTPUTS): $(CONF) - crunchgen ${.CURDIR}/$(CONF) + MAKE=${MAKE} crunchgen ${.CURDIR}/$(CONF) $(CRUNCHED): $(OUTPUTS) submake submake: - make -f $(OUTMK) + ${MAKE} -f $(OUTMK) objs: - make -f $(OUTMK) objs + ${MAKE} -f $(OUTMK) objs cleandir: rm -f $(CLEANDIRFILES) From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 20:01:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41A1910657DC; Sat, 6 Oct 2012 20:01:18 +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 226938FC14; Sat, 6 Oct 2012 20:01:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K1H1Q030838; Sat, 6 Oct 2012 20:01:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K1Hpc030835; Sat, 6 Oct 2012 20:01:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062001.q96K1Hpc030835@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241299 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 20:01:18 -0000 Author: avg Date: Sat Oct 6 20:01:17 2012 New Revision: 241299 URL: http://svn.freebsd.org/changeset/base/241299 Log: boot/console: handle consoles that fail to probe - clarify meaning of console flags - perform i/o via a console only if both of the following conditions are met: o console is active (selected by user or config) o console flags that it can perform the operation - warn if a chosen console can not work (the warning may go nowhere without working and active console, though) Reviewed by: jhb Tested by: Uffe Jakobsen , Olivier Cochard-Labbe' MFC after: 26 days Modified: head/sys/boot/common/bootstrap.h head/sys/boot/common/console.c Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Sat Oct 6 20:01:05 2012 (r241298) +++ head/sys/boot/common/bootstrap.h Sat Oct 6 20:01:17 2012 (r241299) @@ -109,10 +109,10 @@ struct console const char *c_name; const char *c_desc; int c_flags; -#define C_PRESENTIN (1<<0) -#define C_PRESENTOUT (1<<1) -#define C_ACTIVEIN (1<<2) -#define C_ACTIVEOUT (1<<3) +#define C_PRESENTIN (1<<0) /* console can provide input */ +#define C_PRESENTOUT (1<<1) /* console can provide output */ +#define C_ACTIVEIN (1<<2) /* user wants input from console */ +#define C_ACTIVEOUT (1<<3) /* user wants output to console */ void (* c_probe)(struct console *cp); /* set c_flags to match hardware */ int (* c_init)(int arg); /* reinit XXX may need more args */ void (* c_out)(int c); /* emit c */ Modified: head/sys/boot/common/console.c ============================================================================== --- head/sys/boot/common/console.c Sat Oct 6 20:01:05 2012 (r241298) +++ head/sys/boot/common/console.c Sat Oct 6 20:01:17 2012 (r241299) @@ -100,11 +100,12 @@ getchar(void) { int cons; int rv; - + /* Loop forever polling all active consoles */ for(;;) for (cons = 0; consoles[cons] != NULL; cons++) - if ((consoles[cons]->c_flags & C_ACTIVEIN) && + if ((consoles[cons]->c_flags & (C_PRESENTIN | C_ACTIVEIN)) == + (C_PRESENTIN | C_ACTIVEIN) && ((rv = consoles[cons]->c_in()) != -1)) return(rv); } @@ -115,7 +116,8 @@ ischar(void) int cons; for (cons = 0; consoles[cons] != NULL; cons++) - if ((consoles[cons]->c_flags & C_ACTIVEIN) && + if ((consoles[cons]->c_flags & (C_PRESENTIN | C_ACTIVEIN)) == + (C_PRESENTIN | C_ACTIVEIN) && (consoles[cons]->c_ready() != 0)) return(1); return(0); @@ -125,13 +127,14 @@ void putchar(int c) { int cons; - + /* Expand newlines */ if (c == '\n') putchar('\r'); - + for (cons = 0; consoles[cons] != NULL; cons++) - if (consoles[cons]->c_flags & C_ACTIVEOUT) + if ((consoles[cons]->c_flags & (C_PRESENTOUT | C_ACTIVEOUT)) == + (C_PRESENTOUT | C_ACTIVEOUT)) consoles[cons]->c_out(c); } @@ -220,6 +223,10 @@ cons_change(const char *string) if (cons >= 0) { consoles[cons]->c_flags |= C_ACTIVEIN | C_ACTIVEOUT; consoles[cons]->c_init(0); + if ((consoles[cons]->c_flags & (C_PRESENTIN | C_PRESENTOUT)) != + (C_PRESENTIN | C_PRESENTOUT)) + printf("console %s failed to initialize\n", + consoles[cons]->c_name); } } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 20:04:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71A6E1065674; Sat, 6 Oct 2012 20:04:52 +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 5BF9D8FC08; Sat, 6 Oct 2012 20:04:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K4qJS031384; Sat, 6 Oct 2012 20:04:52 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K4qQT031382; Sat, 6 Oct 2012 20:04:52 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062004.q96K4qQT031382@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241300 - head/sys/boot/i386/libi386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 20:04:52 -0000 Author: avg Date: Sat Oct 6 20:04:51 2012 New Revision: 241300 URL: http://svn.freebsd.org/changeset/base/241300 Log: i386 comconsole: don't loop forever if hardware doesn't respond - clear capability flags when hw timeouts - retire comc_started status variable and directly use c_flags to see if comconsole is selected for use Reviewed by: jhb Tested by: Uffe Jakobsen , Olivier Cochard-Labbe MFC after: 26 days Modified: head/sys/boot/i386/libi386/comconsole.c Modified: head/sys/boot/i386/libi386/comconsole.c ============================================================================== --- head/sys/boot/i386/libi386/comconsole.c Sat Oct 6 20:01:17 2012 (r241299) +++ head/sys/boot/i386/libi386/comconsole.c Sat Oct 6 20:04:51 2012 (r241300) @@ -63,7 +63,6 @@ static void comc_setup(int speed, int po static int comc_speed_set(struct env_var *ev, int flags, const void *value); -static int comc_started; static int comc_curspeed; static int comc_port = COMPORT; static uint32_t comc_locator; @@ -87,9 +86,6 @@ comc_probe(struct console *cp) int speed, port; uint32_t locator; - /* XXX check the BIOS equipment list? */ - cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT); - if (comc_curspeed == 0) { comc_curspeed = COMSPEED; /* @@ -137,18 +133,19 @@ comc_probe(struct console *cp) env_setenv("comconsole_pcidev", EV_VOLATILE, env, comc_pcidev_set, env_nounset); } + comc_setup(comc_curspeed, comc_port); } static int comc_init(int arg) { - if (comc_started && arg == 0) - return 0; - comc_started = 1; comc_setup(comc_curspeed, comc_port); - return(0); + if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) == + (C_PRESENTIN | C_PRESENTOUT)) + return (CMD_OK); + return (CMD_ERROR); } static void @@ -166,13 +163,13 @@ comc_putchar(int c) static int comc_getchar(void) { - return(comc_ischar() ? inb(comc_port + com_data) : -1); + return (comc_ischar() ? inb(comc_port + com_data) : -1); } static int comc_ischar(void) { - return(inb(comc_port + com_lsr) & LSR_RXRDY); + return (inb(comc_port + com_lsr) & LSR_RXRDY); } static int @@ -185,7 +182,8 @@ comc_speed_set(struct env_var *ev, int f return (CMD_ERROR); } - if (comc_started && comc_curspeed != speed) + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_curspeed != speed) comc_setup(speed, comc_port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -203,7 +201,8 @@ comc_port_set(struct env_var *ev, int fl return (CMD_ERROR); } - if (comc_started && comc_port != port) { + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_port != port) { comc_setup(comc_curspeed, port); set_hw_console_hint(); } @@ -305,7 +304,8 @@ comc_pcidev_set(struct env_var *ev, int printf("Invalid pcidev\n"); return (CMD_ERROR); } - if (comc_started && comc_locator != locator) { + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_locator != locator) { error = comc_pcidev_handle(locator); if (error != CMD_OK) return (error); @@ -317,6 +317,8 @@ comc_pcidev_set(struct env_var *ev, int static void comc_setup(int speed, int port) { + static int TRY_COUNT = 1000000; + int tries; comc_curspeed = speed; comc_port = port; @@ -327,9 +329,15 @@ comc_setup(int speed, int port) outb(comc_port + com_cfcr, COMC_FMT); outb(comc_port + com_mcr, MCR_RTS | MCR_DTR); + tries = 0; do inb(comc_port + com_data); - while (inb(comc_port + com_lsr) & LSR_RXRDY); + while (inb(comc_port + com_lsr) & LSR_RXRDY && ++tries < TRY_COUNT); + + if (tries < TRY_COUNT) + comconsole.c_flags |= (C_PRESENTIN | C_PRESENTOUT); + else + comconsole.c_flags &= ~(C_PRESENTIN | C_PRESENTOUT); } static int From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 20:08:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F6BB106564A; Sat, 6 Oct 2012 20:08:30 +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 E32788FC16; Sat, 6 Oct 2012 20:08:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K8TAP032060; Sat, 6 Oct 2012 20:08:29 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K8TiX032052; Sat, 6 Oct 2012 20:08:29 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062008.q96K8TiX032052@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241301 - in head/sys/boot/i386: boot2 btx/btx gptboot zfsboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 20:08:30 -0000 Author: avg Date: Sat Oct 6 20:08:29 2012 New Revision: 241301 URL: http://svn.freebsd.org/changeset/base/241301 Log: add detection of serial console presence to btx and boot2-like blocks Note that this commit slightly increases size of boot blocks. Reviewed by: jhb Tested by: Olivier Cochard-Labbe MFC after: 26 days Modified: head/sys/boot/i386/boot2/boot2.c head/sys/boot/i386/boot2/lib.h head/sys/boot/i386/boot2/sio.S head/sys/boot/i386/btx/btx/btx.S head/sys/boot/i386/gptboot/gptboot.c head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/boot2/boot2.c Sat Oct 6 20:08:29 2012 (r241301) @@ -415,8 +415,10 @@ parse() } ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) : OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD; - if (ioctrl & IO_SERIAL) - sio_init(115200 / comspeed); + if (ioctrl & IO_SERIAL) { + if (sio_init(115200 / comspeed) != 0) + ioctrl &= ~IO_SERIAL; + } } else { for (q = arg--; *q && *q != '('; q++); if (*q) { Modified: head/sys/boot/i386/boot2/lib.h ============================================================================== --- head/sys/boot/i386/boot2/lib.h Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/boot2/lib.h Sat Oct 6 20:08:29 2012 (r241301) @@ -17,8 +17,8 @@ * $FreeBSD$ */ -void sio_init(int) __attribute__((regparm (3))); -void sio_flush(void); +int sio_init(int) __attribute__((regparm (3))); +int sio_flush(void); void sio_putc(int) __attribute__((regparm (3))); int sio_getc(void); int sio_ischar(void); Modified: head/sys/boot/i386/boot2/sio.S ============================================================================== --- head/sys/boot/i386/boot2/sio.S Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/boot2/sio.S Sat Oct 6 20:08:29 2012 (r241301) @@ -24,7 +24,7 @@ .globl sio_getc .globl sio_ischar -/* void sio_init(int div) */ +/* int sio_init(int div) */ sio_init: pushl %eax movw $SIO_PRT+0x3,%dx # Data format reg @@ -43,12 +43,16 @@ sio_init: pushl %eax call sio_flush ret -/* void sio_flush(void) */ +/* int sio_flush(void) */ -sio_flush.0: call sio_getc.1 # Get character -sio_flush: call sio_ischar # Check for character - jnz sio_flush.0 # Till none - ret # To caller +sio_flush: xorl %eax,%eax # Return value + xorl %ecx,%ecx # Timeout + movb $0x80,%ch # counter +sio_flush.1: call sio_ischar # Check for character + jz sio_flush.2 # Till none + loop sio_flush.1 # or counter is zero + movb $1, %al # Exhausted all tries +sio_flush.2: ret # To caller /* void sio_putc(int c) */ Modified: head/sys/boot/i386/btx/btx/btx.S ============================================================================== --- head/sys/boot/i386/btx/btx/btx.S Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/btx/btx/btx.S Sat Oct 6 20:08:29 2012 (r241301) @@ -812,7 +812,7 @@ putstr: lodsb # Load char .set SIO_DIV,(115200/SIOSPD) # 115200 / SPD /* - * void sio_init(void) + * int sio_init(void) */ sio_init: movw $SIO_PRT+0x3,%dx # Data format reg movb $SIO_FMT|0x80,%al # Set format @@ -828,14 +828,19 @@ sio_init: movw $SIO_PRT+0x3,%dx # Data movb $0x3,%al # Set RTS, outb %al,(%dx) # DTR incl %edx # Line status reg + call sio_getc.1 # Get character /* - * void sio_flush(void) + * int sio_flush(void) */ -sio_flush.0: call sio_getc.1 # Get character -sio_flush: call sio_ischar # Check for character - jnz sio_flush.0 # Till none - ret # To caller +sio_flush: xorl %eax,%eax # Return value + xorl %ecx,%ecx # Timeout + movb $0x80,%ch # counter +sio_flush.1: call sio_ischar # Check for character + jz sio_flush.2 # Till none + loop sio_flush.1 # or counter is zero + movb $1, %al # Exhausted all tries +sio_flush.2: ret # To caller /* * void sio_putc(int c) Modified: head/sys/boot/i386/gptboot/gptboot.c ============================================================================== --- head/sys/boot/i386/gptboot/gptboot.c Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/gptboot/gptboot.c Sat Oct 6 20:08:29 2012 (r241301) @@ -379,8 +379,10 @@ parse(char *cmdstr, int *dskupdated) } ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) : OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD; - if (ioctrl & IO_SERIAL) - sio_init(115200 / comspeed); + if (ioctrl & IO_SERIAL) { + if (sio_init(115200 / comspeed) != 0) + ioctrl &= ~IO_SERIAL; + } } else { for (q = arg--; *q && *q != '('; q++); if (*q) { Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 20:08:29 2012 (r241301) @@ -785,8 +785,10 @@ parse(void) } ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) : OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD; - if (ioctrl & IO_SERIAL) - sio_init(115200 / comspeed); + if (ioctrl & IO_SERIAL) { + if (sio_init(115200 / comspeed) != 0) + ioctrl &= ~IO_SERIAL; + } } if (c == '?') { dnode_phys_t dn; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 20:12:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A9331065672; Sat, 6 Oct 2012 20:12:25 +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 4519E8FC08; Sat, 6 Oct 2012 20:12:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96KCPjU032659; Sat, 6 Oct 2012 20:12:25 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96KCPJK032657; Sat, 6 Oct 2012 20:12:25 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062012.q96KCPJK032657@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241302 - head/lib/libkvm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 20:12:25 -0000 Author: avg Date: Sat Oct 6 20:12:24 2012 New Revision: 241302 URL: http://svn.freebsd.org/changeset/base/241302 Log: kvm_proclist: ignore processes in larvae state Reviewed by: jhb MFC after: 8 days Modified: head/lib/libkvm/kvm_proc.c Modified: head/lib/libkvm/kvm_proc.c ============================================================================== --- head/lib/libkvm/kvm_proc.c Sat Oct 6 20:08:29 2012 (r241301) +++ head/lib/libkvm/kvm_proc.c Sat Oct 6 20:12:24 2012 (r241302) @@ -144,6 +144,8 @@ kvm_proclist(kvm_t *kd, int what, int ar _kvm_err(kd, kd->program, "can't read proc at %p", p); return (-1); } + if (proc.p_state == PRS_NEW) + continue; if (proc.p_state != PRS_ZOMBIE) { if (KREAD(kd, (u_long)TAILQ_FIRST(&proc.p_threads), &mtd)) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 20:16:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A29A71065670; Sat, 6 Oct 2012 20:16:04 +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 8CC638FC17; Sat, 6 Oct 2012 20:16:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96KG4a1033182; Sat, 6 Oct 2012 20:16:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96KG41g033180; Sat, 6 Oct 2012 20:16:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062016.q96KG41g033180@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241303 - head/lib/libkvm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 20:16:04 -0000 Author: avg Date: Sat Oct 6 20:16:04 2012 New Revision: 241303 URL: http://svn.freebsd.org/changeset/base/241303 Log: kvm_getprocs: gracefully handle errors from kvm_deadprocs and don't confuse callers with incorrect return value MFC after: 9 days Modified: head/lib/libkvm/kvm_proc.c Modified: head/lib/libkvm/kvm_proc.c ============================================================================== --- head/lib/libkvm/kvm_proc.c Sat Oct 6 20:12:24 2012 (r241302) +++ head/lib/libkvm/kvm_proc.c Sat Oct 6 20:16:04 2012 (r241303) @@ -593,9 +593,15 @@ liveout: nprocs = kvm_deadprocs(kd, op, arg, nl[1].n_value, nl[2].n_value, nprocs); + if (nprocs <= 0) { + _kvm_freeprocs(kd); + nprocs = 0; + } #ifdef notdef - size = nprocs * sizeof(struct kinfo_proc); - (void)realloc(kd->procbase, size); + else { + size = nprocs * sizeof(struct kinfo_proc); + kd->procbase = realloc(kd->procbase, size); + } #endif } *cnt = nprocs; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 20:17:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E55D0106566C; Sat, 6 Oct 2012 20:17:28 +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 D0EDB8FC12; Sat, 6 Oct 2012 20:17:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96KHSsh033425; Sat, 6 Oct 2012 20:17:28 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96KHSgf033423; Sat, 6 Oct 2012 20:17:28 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062017.q96KHSgf033423@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241304 - head/lib/libprocstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 20:17:29 -0000 Author: avg Date: Sat Oct 6 20:17:28 2012 New Revision: 241304 URL: http://svn.freebsd.org/changeset/base/241304 Log: procstat_getprocs: honor kvm_getprocs interface - cnt is signed MFC after: 10 days Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Sat Oct 6 20:16:04 2012 (r241303) +++ head/lib/libprocstat/libprocstat.c Sat Oct 6 20:17:28 2012 (r241304) @@ -184,15 +184,18 @@ procstat_getprocs(struct procstat *procs struct kinfo_proc *p0, *p; size_t len; int name[4]; + int cnt; int error; assert(procstat); assert(count); p = NULL; if (procstat->type == PROCSTAT_KVM) { - p0 = kvm_getprocs(procstat->kd, what, arg, count); - if (p0 == NULL || count == 0) + *count = 0; + p0 = kvm_getprocs(procstat->kd, what, arg, &cnt); + if (p0 == NULL || cnt <= 0) return (NULL); + *count = cnt; len = *count * sizeof(*p); p = malloc(len); if (p == NULL) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 21:39:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 51F9C1065672; Sat, 6 Oct 2012 21:39:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 073188FC17; Sat, 6 Oct 2012 21:39:11 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d16d:2274:8c10:a1ca] (unknown [IPv6:2001:7b8:3a7:0:d16d:2274:8c10:a1ca]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D15F15C59; Sat, 6 Oct 2012 23:39:04 +0200 (CEST) Message-ID: <5070A4FC.4080802@FreeBSD.org> Date: Sat, 06 Oct 2012 23:39:08 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121002 Thunderbird/16.0 MIME-Version: 1.0 To: Marcel Moolenaar References: <201210062001.q96K16Or030755@svn.freebsd.org> In-Reply-To: <201210062001.q96K16Or030755@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 21:39:12 -0000 On 2012-10-06 22:01, Marcel Moolenaar wrote: > 2. Remove the use of -E. It's not needed in our build because we use ?= for > the respective variables, which means that we'll take the environment > value (if any) anyway. No, this will break builds of 32-bit libraries on amd64, at least when CC/CXX etc are set in make.conf. I put this in specifically in r227120. Please revert this particular change, unless you have tested that it works correctly, with e.g. CC=clang in make.conf. From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 21:42:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F4FF1065672; Sat, 6 Oct 2012 21:42:08 +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 EE2F58FC0A; Sat, 6 Oct 2012 21:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Lg7dq046469; Sat, 6 Oct 2012 21:42:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Lg7S3046467; Sat, 6 Oct 2012 21:42:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062142.q96Lg7S3046467@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 21:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241305 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 21:42:08 -0000 Author: avg Date: Sat Oct 6 21:42:07 2012 New Revision: 241305 URL: http://svn.freebsd.org/changeset/base/241305 Log: ata_da: set disk::d_ident from serial number MFC after: 10 days Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sat Oct 6 20:17:28 2012 (r241304) +++ head/sys/cam/ata/ata_da.c Sat Oct 6 21:42:07 2012 (r241305) @@ -1064,6 +1064,8 @@ adaregister(struct cam_periph *periph, v softc->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(softc->disk->d_descr, cgd->ident_data.model, MIN(sizeof(softc->disk->d_descr), sizeof(cgd->ident_data.model))); + strlcpy(softc->disk->d_ident, cgd->ident_data.serial, + MIN(sizeof(softc->disk->d_ident), sizeof(cgd->ident_data.serial))); softc->disk->d_hba_vendor = cpi.hba_vendor; softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 22:14:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00F471065670; Sat, 6 Oct 2012 22:14:20 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDBE68FC0A; Sat, 6 Oct 2012 22:14:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96MEJod051958; Sat, 6 Oct 2012 22:14:19 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96MEJ8b051951; Sat, 6 Oct 2012 22:14:19 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210062214.q96MEJ8b051951@svn.freebsd.org> From: Rick Macklem Date: Sat, 6 Oct 2012 22:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241306 - in stable/8/sys/fs: nfs nfsclient nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 22:14:20 -0000 Author: rmacklem Date: Sat Oct 6 22:14:19 2012 New Revision: 241306 URL: http://svn.freebsd.org/changeset/base/241306 Log: MFC: r240720 Modify the NFSv4 client so that it can handle owner and owner_group strings that consist entirely of digits, interpreting them as the uid/gid number. This change was needed since new (>= 3.3) Linux servers reply with these strings by default. This change is mandated by the rfc3530bis draft. Reported on freebsd-stable@ under the Subject heading "Problem with Linux >= 3.3 as NFSv4 server" by Norbert Aschendorff on Aug. 20, 2012. Modified: stable/8/sys/fs/nfs/nfs.h stable/8/sys/fs/nfs/nfs_commonacl.c stable/8/sys/fs/nfs/nfs_commonsubs.c stable/8/sys/fs/nfs/nfs_var.h stable/8/sys/fs/nfsclient/nfs_clcomsubs.c stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/nfs/nfs.h ============================================================================== --- stable/8/sys/fs/nfs/nfs.h Sat Oct 6 21:42:07 2012 (r241305) +++ stable/8/sys/fs/nfs/nfs.h Sat Oct 6 22:14:19 2012 (r241306) @@ -559,6 +559,7 @@ struct nfsrv_descript { #define ND_EXGSSINTEGRITY 0x00200000 #define ND_EXGSSPRIVACY 0x00400000 #define ND_INCRSEQID 0x00800000 +#define ND_NFSCL 0x01000000 /* * ND_GSS should be the "or" of all GSS type authentications. Modified: stable/8/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonacl.c Sat Oct 6 21:42:07 2012 (r241305) +++ stable/8/sys/fs/nfs/nfs_commonacl.c Sat Oct 6 22:14:19 2012 (r241306) @@ -101,12 +101,12 @@ nfsrv_dissectace(struct nfsrv_descript * if (gotid == 0) { if (flag & NFSV4ACE_IDENTIFIERGROUP) { acep->ae_tag = ACL_GROUP; - aceerr = nfsv4_strtogid(name, len, &gid, p); + aceerr = nfsv4_strtogid(nd, name, len, &gid, p); if (aceerr == 0) acep->ae_id = (uid_t)gid; } else { acep->ae_tag = ACL_USER; - aceerr = nfsv4_strtouid(name, len, &uid, p); + aceerr = nfsv4_strtouid(nd, name, len, &uid, p); if (aceerr == 0) acep->ae_id = uid; } Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonsubs.c Sat Oct 6 21:42:07 2012 (r241305) +++ stable/8/sys/fs/nfs/nfs_commonsubs.c Sat Oct 6 22:14:19 2012 (r241306) @@ -1401,12 +1401,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtouid(cp, j, &uid, p) || + if (nfsv4_strtouid(nd, cp, j, &uid, p) || nap->na_uid != uid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtouid(cp, j, &uid, p)) + if (nfsv4_strtouid(nd, cp, j, &uid, p)) nap->na_uid = nfsrv_defaultuid; else nap->na_uid = uid; @@ -1434,12 +1434,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd } if (compare) { if (!(*retcmpp)) { - if (nfsv4_strtogid(cp, j, &gid, p) || + if (nfsv4_strtogid(nd, cp, j, &gid, p) || nap->na_gid != gid) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (nfsv4_strtogid(cp, j, &gid, p)) + if (nfsv4_strtogid(nd, cp, j, &gid, p)) nap->na_gid = nfsrv_defaultgid; else nap->na_gid = gid; @@ -2594,27 +2594,41 @@ tryagain: * Convert a string to a uid. * If no conversion is possible return NFSERR_BADOWNER, otherwise * return 0. + * If this is called from a client side mount using AUTH_SYS and the + * string is made up entirely of digits, just convert the string to + * a number. */ APPLESTATIC int -nfsv4_strtouid(u_char *str, int len, uid_t *uidp, NFSPROC_T *p) +nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp, + NFSPROC_T *p) { int i; - u_char *cp; + char *cp, *endstr, *str0; struct nfsusrgrp *usrp; int cnt, ret; int error = 0; + uid_t tuid; if (len == 0) { error = NFSERR_BADOWNER; goto out; } + /* If a string of digits and an AUTH_SYS mount, just convert it. */ + str0 = str; + tuid = (uid_t)strtoul(str0, &endstr, 10); + if ((endstr - str0) == len && + (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { + *uidp = tuid; + goto out; + } /* * Look for an '@'. */ - cp = str; - for (i = 0; i < len; i++) - if (*cp++ == '@') - break; + cp = strchr(str0, '@'); + if (cp != NULL) + i = (int)(cp++ - str0); + else + i = len; cnt = 0; tryagain: @@ -2783,27 +2797,43 @@ tryagain: /* * Convert a string to a gid. + * If no conversion is possible return NFSERR_BADOWNER, otherwise + * return 0. + * If this is called from a client side mount using AUTH_SYS and the + * string is made up entirely of digits, just convert the string to + * a number. */ APPLESTATIC int -nfsv4_strtogid(u_char *str, int len, gid_t *gidp, NFSPROC_T *p) +nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp, + NFSPROC_T *p) { int i; - u_char *cp; + char *cp, *endstr, *str0; struct nfsusrgrp *usrp; int cnt, ret; int error = 0; + gid_t tgid; if (len == 0) { error = NFSERR_BADOWNER; goto out; } + /* If a string of digits and an AUTH_SYS mount, just convert it. */ + str0 = str; + tgid = (gid_t)strtoul(str0, &endstr, 10); + if ((endstr - str0) == len && + (nd->nd_flag & (ND_KERBV | ND_NFSCL)) == ND_NFSCL) { + *gidp = tgid; + goto out; + } /* * Look for an '@'. */ - cp = str; - for (i = 0; i < len; i++) - if (*cp++ == '@') - break; + cp = strchr(str0, '@'); + if (cp != NULL) + i = (int)(cp++ - str0); + else + i = len; cnt = 0; tryagain: Modified: stable/8/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/8/sys/fs/nfs/nfs_var.h Sat Oct 6 21:42:07 2012 (r241305) +++ stable/8/sys/fs/nfs/nfs_var.h Sat Oct 6 22:14:19 2012 (r241306) @@ -295,9 +295,11 @@ void nfsrv_adj(mbuf_t, int, int); void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *); int nfsd_errmap(struct nfsrv_descript *); void nfsv4_uidtostr(uid_t, u_char **, int *, NFSPROC_T *); -int nfsv4_strtouid(u_char *, int, uid_t *, NFSPROC_T *); +int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *, + NFSPROC_T *); void nfsv4_gidtostr(gid_t, u_char **, int *, NFSPROC_T *); -int nfsv4_strtogid(u_char *, int, gid_t *, NFSPROC_T *); +int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *, + NFSPROC_T *); int nfsrv_checkuidgid(struct nfsrv_descript *, struct nfsvattr *); void nfsrv_fixattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, NFSACL_T *, NFSPROC_T *, nfsattrbit_t *, Modified: stable/8/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clcomsubs.c Sat Oct 6 21:42:07 2012 (r241305) +++ stable/8/sys/fs/nfsclient/nfs_clcomsubs.c Sat Oct 6 22:14:19 2012 (r241306) @@ -126,11 +126,11 @@ nfscl_reqstart(struct nfsrv_descript *nd * First, fill in some of the fields of nd. */ if (NFSHASNFSV4(nmp)) - nd->nd_flag = ND_NFSV4; + nd->nd_flag = ND_NFSV4 | ND_NFSCL; else if (NFSHASNFSV3(nmp)) - nd->nd_flag = ND_NFSV3; + nd->nd_flag = ND_NFSV3 | ND_NFSCL; else - nd->nd_flag = ND_NFSV2; + nd->nd_flag = ND_NFSV2 | ND_NFSCL; nd->nd_procnum = procnum; nd->nd_repstat = 0; Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sat Oct 6 21:42:07 2012 (r241305) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sat Oct 6 22:14:19 2012 (r241306) @@ -2433,7 +2433,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, s goto nfsmout; } if (!nd->nd_repstat) { - nd->nd_repstat = nfsv4_strtouid(cp,j,&uid,p); + nd->nd_repstat = nfsv4_strtouid(nd, cp, j, &uid, + p); if (!nd->nd_repstat) nvap->na_uid = uid; } @@ -2459,7 +2460,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, s goto nfsmout; } if (!nd->nd_repstat) { - nd->nd_repstat = nfsv4_strtogid(cp,j,&gid,p); + nd->nd_repstat = nfsv4_strtogid(nd, cp, j, &gid, + p); if (!nd->nd_repstat) nvap->na_gid = gid; } From owner-svn-src-all@FreeBSD.ORG Sat Oct 6 22:46:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1154106566C; Sat, 6 Oct 2012 22:46:40 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id A2F148FC08; Sat, 6 Oct 2012 22:46:39 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id CB96384F; Sun, 7 Oct 2012 00:45:24 +0200 (CEST) Date: Sun, 7 Oct 2012 00:47:03 +0200 From: Pawel Jakub Dawidek To: Andriy Gapon Message-ID: <20121006224702.GA28611@garage.freebsd.pl> References: <201210061950.q96JoNIk028911@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <201210061950.q96JoNIk028911@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241295 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 22:46:41 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 06, 2012 at 07:50:23PM +0000, Andriy Gapon wrote: > Author: avg > Date: Sat Oct 6 19:50:23 2012 > New Revision: 241295 > URL: http://svn.freebsd.org/changeset/base/241295 >=20 > Log: > cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit This doesn't really help me. On machine that I tried something similar, with this patch CPU fan still goes crazy when I enter DDB. What did work for me was to reduce CPU speed to supported minimum. Entering DDB then did not result in CPU fan speed up. If something like this could be done automatically, that would be great. > Reviewed by: julian > MFC after: 10 days >=20 > Modified: > head/sys/kern/kern_cons.c >=20 > Modified: head/sys/kern/kern_cons.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_cons.c Sat Oct 6 19:48:15 2012 (r241294) > +++ head/sys/kern/kern_cons.c Sat Oct 6 19:50:23 2012 (r241295) > @@ -384,7 +384,7 @@ cngetc(void) > if (cn_mute) > return (-1); > while ((c =3D cncheckc()) =3D=3D -1) > - ; > + cpu_spinwait(); > if (c =3D=3D '\r') > c =3D '\n'; /* console input is always ICRNL */ > return (c); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBwtOYACgkQForvXbEpPzTygwCfR4XBG3gcSXbnkazBg7zrj4Fh VRcAoMx2pScfI1tko3lRadY+DeD3jtSc =diBM -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--