From owner-svn-src-stable@FreeBSD.ORG Sun Sep 30 00:44:25 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-stable@FreeBSD.ORG Sun Sep 30 00:44:54 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-stable@FreeBSD.ORG Sun Sep 30 13:32:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-stable@FreeBSD.ORG Sun Sep 30 15:33:53 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-stable@FreeBSD.ORG Sun Sep 30 16:11:51 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-stable@FreeBSD.ORG Sun Sep 30 16:17:55 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-stable@FreeBSD.ORG Sun Sep 30 16:21:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-stable@FreeBSD.ORG Mon Oct 1 03:17:24 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 05:48:46 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 05:57:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 06:00:09 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 06:01:21 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 06:42:08 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 08:33:40 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 10:54:04 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 11:16:22 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 14:52:35 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 14:55:23 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 15:47:02 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 15:47:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 15:47:36 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 15:50:17 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 15:50:19 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 16:34:13 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 17:45:57 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 19:09:25 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 19:13:47 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 19:22:53 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Mon Oct 1 19:43:37 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-stable@FreeBSD.ORG Tue Oct 2 06:37:48 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-stable@FreeBSD.ORG Tue Oct 2 12:57:48 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-stable@FreeBSD.ORG Tue Oct 2 17:04:54 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-stable@FreeBSD.ORG Tue Oct 2 17:05:21 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-stable@FreeBSD.ORG Wed Oct 3 11:56:02 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-stable@FreeBSD.ORG Wed Oct 3 11:56:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-stable@FreeBSD.ORG Wed Oct 3 14:28:56 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-stable@FreeBSD.ORG Thu Oct 4 01:26:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 01:33:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 01:33:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 01:33:49 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 01:37:12 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 01:37:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 01:37:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 08:52:08 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 08:52:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 08:52:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 08:57:06 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 08:57:07 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 09:02:06 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 09:02:39 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 09:49:53 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 09:54:00 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 12:43:46 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 21:55:38 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:16:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:16:40 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:17:00 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:23:40 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:23:58 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:24:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:31:57 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:32:13 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:32:28 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Thu Oct 4 22:56:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-stable@FreeBSD.ORG Fri Oct 5 09:47:55 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Fri Oct 5 10:44:51 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Fri Oct 5 14:20:54 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Fri Oct 5 14:43:49 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Fri Oct 5 15:36:30 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Fri Oct 5 22:42:58 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Fri Oct 5 22:42:58 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Fri Oct 5 22:42:58 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-stable@FreeBSD.ORG Sat Oct 6 12:25:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 12:38:43 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 12:51:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 12:58:58 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 13:01:08 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 13:38:50 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 13:42:22 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 13:43:57 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 14:04:37 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:42:03 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:42:40 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:45:14 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:45:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:47:16 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:47:32 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:49:19 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:50:15 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:51:43 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:52:07 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:53:48 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:54:02 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:55:32 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:55:54 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:57:27 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:57:45 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:59:12 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 18:59:23 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 19:01:21 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 19:01:32 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 19:06:09 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 19:06:23 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-stable@FreeBSD.ORG Sat Oct 6 22:14:20 2012 Return-Path: Delivered-To: svn-src-stable@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-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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; }